:root {
    --ssm-bg-sky: #87CEEB;
    --ssm-text-dark: #2c3e50;
    --ssm-card-bg: #ffffff;
    --ssm-accent-green: #8bc34a;
    --ssm-accent-yellow: #ffeb3b;
    --ssm-font-header: 'Comic Neue', 'Verdana', sans-serif;
    --ssm-font-body: 'Verdana', sans-serif;

    /* HERO sizing + behavior (main fix) */
    --ssm-hero-min-height: clamp(380px, 80vh, 1200px);
    --ssm-hero-content-max: 1200px;
    --ssm-hero-content-pad-y: 3.5rem;
    --ssm-hero-content-pad-x: 2rem;

    /* Optional overlay for text readability (kept subtle) */
    --ssm-hero-overlay: rgba(0, 0, 0, 0.18);

    /* Buttons */
    --ssm-btn-radius: 10px;
}

/* Base */
body {
    font-family: var(--ssm-font-body);
    background: #f0f9ff;
    color: var(--ssm-text-dark);
    margin: 0;
}

/* =========================
   HEADER + NAV
========================= */
.ssm-header {
    background: var(--ssm-accent-green);
    padding: 1rem 0 0 0;
    text-align: left;
    border-bottom: none;
    margin: 0;
}

.ssm-nav {
    background: #FF9800;
    padding: 0.5rem;
    text-align: center;
    border-bottom: none;
    margin: 0;
}

.ssm-nav a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 1.2rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.ssm-nav a:hover {
    text-decoration: underline;
}

/* =========================
   HERO (ALL FIXES)
   - No "max-height: 50vh" limit (that was in markup before)
   - Uses background-position to stop image dropping too far
   - Responsive height controls
========================= */
.ssm-hero {
    width: 100%;
    min-height: var(--ssm-hero-min-height);

    background-size: cover;
    background-repeat: no-repeat;

    /* KEY: keeps the subject higher if image has blank top */
    background-position: center top;

    display: grid;
    align-items: center;

    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.ssm-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ssm-hero-overlay);
    pointer-events: none;
}

.ssm-hero-content {
    position: relative;
    z-index: 1;

    max-width: var(--ssm-hero-content-max);
    margin: 0 auto;
    padding: var(--ssm-hero-content-pad-y) var(--ssm-hero-content-pad-x);

    text-align: center;
}

.ssm-hero-content h1,
.ssm-hero-content h2,
.ssm-hero-content p {
    margin-left: auto;
    margin-right: auto;
}

/* If you use .ssm-logo-text inside hero, keep it punchy */
.ssm-logo-text {
    font-family: var(--ssm-font-header);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.55);
    margin: 0;
}

/* Helpful generic button class */
.ssm-btn,
.ssm-action-btn,
.ssm-card-btn,
.ssm-view-btn {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    border-radius: var(--ssm-btn-radius);
}

/* Keep your existing action button, but make it look good in hero too */
.ssm-action-btn {
    background: #66cc66;
    color: white;
    padding: 0.85rem 2.1rem;
    border-radius: var(--ssm-btn-radius);
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

.ssm-action-btn:hover {
    background: #55bb55;
    transform: translateY(-1px);
}

.ssm-action-btn:active {
    transform: translateY(0px);
}

/* Mobile hero tuning (prevents too-tall hero on small screens) */
@media (max-width: 768px) {
    :root {
        --ssm-hero-min-height: clamp(280px, 55vh, 560px);
        --ssm-hero-content-pad-y: 2.2rem;
        --ssm-hero-content-pad-x: 1.25rem;
        --ssm-hero-overlay: rgba(0, 0, 0, 0.12);
    }
}

/* Large screens: allow a bigger hero feel */
@media (min-width: 1200px) {
    :root {
        --ssm-hero-min-height: clamp(460px, 82vh, 980px);
    }
}

/* =========================
   LOGO
========================= */
.ssm-logo-img {
    max-height: 150px;
    width: auto;
}

/* =========================
   LAYOUT CONTAINER
========================= */
.ssm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* =========================
   STORIES GRID + CARDS
========================= */
.ssm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.ssm-card {
    text-align: center;
    background: #fff;
    padding-bottom: 1rem;
}

.ssm-card-frame {
    background: #fff;
    border: 15px solid var(--ssm-accent-green);
    border-radius: 12px;
    transform: rotate(-2deg);
    padding: 5px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    height: 350px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.ssm-card-frame:hover {
    transform: rotate(0deg) scale(1.02);
    z-index: 10;
}

.ssm-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.ssm-card-title {
    font-family: var(--ssm-font-header);
    font-size: 1.5rem;
    margin-top: 0.5rem;
    font-weight: bold;
    color: var(--ssm-text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.ssm-card-title a {
    text-decoration: none;
    color: inherit;
}

.ssm-card-title a:hover {
    text-decoration: underline;
}

.ssm-card-intro {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    padding: 0 1rem;
}

.ssm-card-btn {
    display: inline-block;
    background: var(--ssm-bg-sky);
    color: white;
    padding: 0.65rem 1.7rem;
    border-radius: var(--ssm-btn-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.ssm-card-btn:hover {
    transform: translateY(-1px);
}

/* =========================
   ACTIVITY SECTION
========================= */
.ssm-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ssm-activity-btn-card {
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ssm-activity-btn-card:hover {
    transform: scale(1.05);
}

.ssm-act-color {
    background-color: #beeebd;
}

.ssm-act-puzzle {
    background-color: #ffe082;
}

.ssm-act-sing {
    background-color: #ffccbc;
}

.ssm-act-bed {
    background-color: #d1c4e9;
}

.ssm-act-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* =========================
   CHARACTER PROFILE
========================= */
.ssm-char-profile {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    background: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.ssm-char-img-large {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ssm-char-details h1 {
    font-family: var(--ssm-font-header);
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.ssm-stat-row {
    margin: 0.5rem 0;
    font-weight: bold;
}

.ssm-badges {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.ssm-badge {
    background: var(--ssm-accent-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: bold;
}

/* =========================
   SINGLE STORY
========================= */
.ssm-story-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ssm-story-title {
    font-family: var(--ssm-font-header);
    font-size: 3rem;
    color: var(--ssm-text-dark);
}

/* Single Story Layout */
.ssm-story-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.ssm-story-info h1 {
    font-family: var(--ssm-font-header);
    font-size: 3.5rem;
    color: var(--ssm-bg-sky);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.ssm-story-info p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.ssm-story-cover img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Sections */
.ssm-section-title {
    font-family: var(--ssm-font-header);
    font-size: 2.2rem;
    color: var(--ssm-bg-sky);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.ssm-content-block {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    max-width: 900px;
}

.ssm-meta-row {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: orange;
    font-weight: bold;
}

/* Clean Character Cards (Story Page) */
.ssm-char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.ssm-clean-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    text-align: left;
    border: 1px solid #eee;
}

.ssm-clean-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.ssm-clean-card h3 {
    font-family: var(--ssm-font-body);
    font-weight: 700;
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.ssm-clean-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.ssm-view-btn {
    background: var(--ssm-bg-sky);
    color: white;
    padding: 0.55rem 1.6rem;
    border-radius: var(--ssm-btn-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
}

.ssm-view-btn:hover {
    transform: translateY(-1px);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .ssm-story-top-grid {
        grid-template-columns: 1fr;
    }

    .ssm-char-profile {
        grid-template-columns: 1fr;
    }
}
