/* ------------------------------------------------------------------
   KidsBridge Academy — responsive + error-page styles (Laravel port)
   Additive only. Does not modify legacy style.css.
   Legacy layout is flexbox-based, so overrides force column direction.
   ------------------------------------------------------------------ */

/* ==================================================================
   Typography — modern, kid-friendly Nunito everywhere.
   Legacy used Arial (body) + Bitter serif (titles), which looked dated.
   The 'Satisfy' cursive hero (.showcase-top h2) is intentionally kept.
   ================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

body,
input, select, textarea, button,
h1, h2, h3, h4, h5, h6,
.main-nav li a,
.section-activity-left h2, .section-activity-rigth h2,
.activity-content h2, .activity-content p,
.kb-login, .kb-field input, .kb-btn, .kb-page-body,
.kb-footer, .search-container, .kb-search {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
h1, h2, h3, h4, h5, h6 { font-weight: 800; }

/* Keep the playful cursive ONLY on the showcase hero */
.showcase-top h2 { font-family: 'Satisfy', cursive !important; }

/* ==================================================================
   Modern login form (homepage sidebar) — secure, themed
   ================================================================== */
.kb-login {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 18px;
    background: #fff;
    border: 1px solid #dde3ee;
    border-radius: 10px;
}
.kb-login-head {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0b1c48;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef1f6;
}
.kb-login-head .fa { color: #2a6edb; }

/* Input with leading icon */
.kb-field {
    position: relative;
    display: flex;
    align-items: center;
}
.kb-field-icon {
    position: absolute;
    left: 14px;
    color: #9aa7c4;
    font-size: .95rem;
    pointer-events: none;
}
.kb-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 38px;
    font-size: 1rem;
    color: #1b2a4e;
    background: #fff;
    border: 1px solid #d5dce8;
    border-radius: 8px;
    outline: none;
    transition: border-color .15s;
}
.kb-field input::placeholder { color: #9aa7c4; }
.kb-field input:focus {
    border-color: #2a6edb;
}

.kb-turnstile { margin: 2px 0; }

/* Password show/hide toggle inside a .kb-field */
.kb-field input.kb-has-toggle { padding-right: 42px; }
.kb-pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9aa7c4;
    cursor: pointer;
    padding: 8px;
    font-size: .95rem;
    line-height: 1;
}
.kb-pw-toggle:hover { color: #2a6edb; }

/* Buttons */
.kb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 16px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.kb-btn-primary,
.kb-btn-primary:link,
.kb-btn-primary:visited {
    color: #fff !important;       /* beat legacy <a>/.btn color rules */
    background: #2a6edb;          /* solid blue, matches theme */
    opacity: 1;
}
.kb-btn-primary i { color: #fff !important; }
.kb-btn-primary:hover { background: #255fc0; color: #fff !important; }
.kb-btn-ghost,
.kb-btn-ghost:link,
.kb-btn-ghost:visited {
    color: #2a6edb !important;
    background: #fff;
    border-color: #cdd8ea;
    opacity: 1;
}
.kb-btn-ghost i { color: #2a6edb !important; }
.kb-btn-ghost:hover { background: #f4f7fd; color: #2a6edb !important; }

/* Messages */
.kb-login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: .9rem;
    color: #8a1f1f;
    background: #fdecec;
    border: 1px solid #f5c2c2;
    border-radius: 8px;
}
.kb-login-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: .8rem;
    color: #5a7d3b;
    margin-top: 2px;
}
.kb-login-foot .fa { color: #4caf50; }

/* ==================================================================
   Dashboard (empty shell, aligned with legacy CI profile/dashboard)
   ================================================================== */
.kb-dash-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 960px;
    margin: 0 auto 1.5rem;
    padding: 12px 16px;
    background: #f4f7fd;
    border: 1px solid #e3e8f2;
    border-radius: 10px;
}
.kb-dash-link {
    color: #2a6edb;
    text-decoration: none;
    font-weight: 600;
}
.kb-dash-link:hover { text-decoration: underline; }
.kb-dash-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0b1c48;
    font-weight: 600;
}
.kb-dash-role {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #1157b8;
    background: #eaf1fc;
    border-radius: 999px;
    padding: 3px 10px;
}
.kb-dash-head {
    max-width: 960px;
    margin: 0 auto 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef1f8;
}
.kb-dash-head h1 { margin: 0 0 .25rem; color: #0b1c48; font-size: 1.6rem; }
.kb-dash-head p { margin: 0; color: #6b7694; }
.kb-dash-body {
    max-width: 960px;
    margin: 0 auto;
    min-height: 220px;
}

/* Logged-in welcome card */
.kb-welcome {
    align-items: center;
    text-align: center;
    gap: 10px;
}
.kb-welcome-avatar {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #2a6edb 0%, #1b3a7a 100%);
    border-radius: 50%;
    margin-bottom: 4px;
}
.kb-welcome-hi {
    margin: 0;
    font-size: .9rem;
    color: #6b7694;
}
.kb-welcome-name {
    margin: 0;
    font-size: 1.35rem;
    color: #0b1c48;
    line-height: 1.2;
}
.kb-welcome-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 12px;
    padding: 4px 12px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #1157b8;
    background: #eaf1fc;
    border-radius: 999px;
}
.kb-welcome-role .fa { font-size: .55rem; color: #2ecc71; }
.kb-welcome .kb-btn { margin-top: 2px; }
.kb-welcome form { width: 100%; margin: 0; }

/* Centered auth card (standalone register / login pages) */
.kb-auth-wrap {
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
}
.kb-auth-card {
    width: 100%;
    max-width: 420px;
}

/* Plain pages: the CONTENT below the header gets a white background,
   no inner card. Container width is unchanged. A min-height keeps short
   pages from looking cramped against the footer. */
.kb-plain-page .kb-page,
.kb-plain-page .kb-auth-wrap {
    background: #fff;
    min-height: 60vh;
    padding-bottom: 2.5rem;
}
/* Full-width white (no gray gutters); center only the inner content. */
.kb-plain-page .kb-page {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
.kb-plain-page .kb-page-hero,
.kb-plain-page .kb-page-body {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
/* Content card becomes card-less on plain pages */
.kb-page-body.is-plain {
    background: transparent;
    border: 0;
    padding: 1.5rem 0 0;
}

/* Plain-white (no card) variant — content sits directly on the page,
   centered, no border/shadow box. Used for auth + content pages. */
.kb-auth-wrap.is-plain { padding-top: 1.5rem; }
.kb-auth-card.is-plain {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.kb-auth-card.is-plain .kb-login-head {
    justify-content: center;
    font-size: 1.4rem;
    border-bottom: 0;
    margin-bottom: .5rem;
}

/* Wider multi-field registration card */
.kb-register { max-width: 640px; }
.kb-field-group { display: flex; flex-direction: column; gap: 4px; }
.kb-field-group > label {
    font-size: .82rem;
    font-weight: 600;
    color: #0b1c48;
}
.kb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.kb-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 38px;
    font-size: 1rem;
    color: #1b2a4e;
    background: #fff;
    border: 1px solid #d5dce8;
    border-radius: 8px;
    outline: none;
    appearance: none;
    cursor: pointer;
}
.kb-field select:focus { border-color: #2a6edb; }
.kb-field input[type="date"] { color: #1b2a4e; }
.kb-err { color: #b3261e; font-size: .78rem; }
.kb-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .88rem;
    color: #3a4766;
    line-height: 1.5;
}
.kb-terms input { margin-top: 3px; }
.kb-terms a { color: #2a6edb; }

@media (max-width: 560px) {
    .kb-form-row { grid-template-columns: 1fr; }
}

/* ==================================================================
   Modern search box (activity filter)
   ================================================================== */
.kb-search { margin-top: 18px; }
.kb-search-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #0b1c48;
    margin-bottom: 6px;
}
.kb-search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.kb-search-icon {
    position: absolute;
    left: 13px;
    color: #9aa7c4;
    font-size: .95rem;
    pointer-events: none;
}
.kb-search-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 38px 11px 36px;
    font-size: .95rem;
    color: #1b2a4e;
    background: #fff;
    border: 1px solid #d5dce8;
    border-radius: 8px;
    outline: none;
    transition: border-color .15s;
}
.kb-search-box input:focus { border-color: #2a6edb; }
.kb-search-box input::placeholder { color: #9aa7c4; }
.kb-search-clear {
    position: absolute;
    right: 8px;
    border: 0;
    background: transparent;
    color: #9aa7c4;
    cursor: pointer;
    padding: 6px;
    font-size: .9rem;
}
.kb-search-clear:hover { color: #2a6edb; }

.activity-no-results {
    text-align: center;
    color: #6b7694;
    font-style: italic;
    padding: 1.5rem 0;
}

/* ==================================================================
   Modern professional footer
   ================================================================== */
.kb-footer {
    display: block !important;      /* override legacy flex footer */
    background: #0b1c48;
    color: #c7d2e8;
    border: 0 !important;
    border-radius: 0;               /* flush with the main card above */
    padding: 2.5rem 2rem 0;
    margin: 0 !important;           /* no gap between card and footer */
}
/* Remove the spacer that sat between the main card and the footer */
#main-body + .div-spacer { display: none; }
.kb-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.4fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.kb-footer-brand h3 {
    color: #fff;
    margin: .5rem 0;
    font-size: 1.15rem;
}
.kb-footer-brand p {
    font-size: .9rem;
    line-height: 1.6;
    color: #a9b6d4;
    margin: 0;
}
.kb-footer-logo {
    width: 84px;
    height: auto;              /* natural shape, no forced circle/crop */
    display: block;
}
.kb-footer-col h4 {
    color: #fff;
    font-size: .95rem;
    margin: 0 0 .9rem;
    letter-spacing: .02em;
}
.kb-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.kb-footer-col li { margin-bottom: .6rem; }
.kb-footer-col a {
    color: #c7d2e8;
    text-decoration: none;
    font-size: .9rem;
    transition: color .15s;
}
.kb-footer-col a:hover { color: #fff; }
.kb-footer-col a .fa,
.kb-footer-col a .fab { color: #5b8def; margin-right: 6px; }

.kb-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.1rem 0;
    font-size: .82rem;
    color: #8c9bbf;
}
.kb-footer-secure .fa { color: #4caf50; margin-right: 5px; }

/* ==================================================================
   Content pages (About / Privacy / Terms) — modern, readable
   ================================================================== */
.kb-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}
.kb-page-hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0b1c48 0%, #1b3a7a 100%);
    border-radius: 16px;
    color: #fff;
}
.kb-page-hero h1 {
    margin: 0;
    font-size: 2.2rem;
    color: #fff;
}
.kb-page-sub {
    margin: .6rem auto 0;
    max-width: 560px;
    color: #c7d2e8;
    font-size: 1rem;
}
.kb-page-body {
    background: #fff;
    border: 1px solid #e7ebf3;
    border-radius: 14px;
    padding: 2rem 2.25rem;
    color: #2b3550;
    line-height: 1.75;
}
.kb-page-body h2 {
    color: #0b1c48;
    font-size: 1.4rem;
    margin: 1.8rem 0 .6rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid #eef1f8;
}
.kb-page-body h3 {
    color: #1157b8;
    font-size: 1.08rem;
    margin: 1.4rem 0 .4rem;
}
.kb-page-body p { margin: 0 0 1rem; }
.kb-page-body a { color: #2a6edb; }
.kb-page-body > :first-child { margin-top: 0; }

/* About highlights */
.kb-page-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.75rem;
}
.kb-highlight {
    text-align: center;
    padding: 1.4rem 1rem;
    background: #f7f9fe;
    border: 1px solid #e7ebf3;
    border-radius: 12px;
}
.kb-highlight i {
    font-size: 1.8rem;
    color: #2a6edb;
    margin-bottom: .5rem;
}
.kb-highlight h3 {
    margin: .3rem 0 .4rem;
    font-size: 1rem;
    color: #0b1c48;
}
.kb-highlight p {
    margin: 0;
    font-size: .88rem;
    color: #5a688c;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .kb-page-hero { padding: 2rem 1rem 1.5rem; }
    .kb-page-hero h1 { font-size: 1.6rem; }
    .kb-page-body { padding: 1.5rem 1.25rem; }
    .kb-page-highlights { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .kb-footer { padding: 2rem 1.25rem 0; }
    .kb-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        text-align: center;
    }
    .kb-footer-logo { margin: 0 auto; }
    .kb-footer-bottom { flex-direction: column; text-align: center; }
}

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 10px;
    z-index: 30;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px 0;
    background: #0b1c48;
    border-radius: 2px;
    transition: .3s;
}

/* Error pages */
.error-page { max-width: 600px; margin: 60px auto; padding: 40px 20px; text-align: center; }
.error-code { font-size: 110px; font-weight: 800; line-height: 1; color: #2a6edb; margin-bottom: 10px; }
.error-title { font-size: 28px; margin: 0 0 12px; color: #222; }
.error-text  { font-size: 16px; color: #666; margin-bottom: 28px; }
.page-content { max-width: 900px; margin: 30px auto; padding: 0 16px; }

/* Error pages (reuse the about-style page layout) */
.kb-error { text-align: center; padding: 1rem 0 2rem; }
.kb-error-code {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: #2a6edb;
    margin-bottom: 1.25rem;
}
.kb-error-btn {
    width: auto;
    display: inline-flex;
    padding-left: 28px;
    padding-right: 28px;
}
@media (max-width: 768px) { .kb-error-code { font-size: 4.5rem; } }

/* Media never overflows */
img { max-width: 100%; height: auto; }

/* Never allow horizontal scroll on small screens */
html, body { max-width: 100%; overflow-x: hidden; }

/* Fix legacy bug: right-side activity images have `flex:1` and stretch
   wide when their text is short (e.g. Activity 8). Keep them the same
   fixed size as left-side images. */
.section-activity-rigth img {
    flex: 0 0 auto;
    width: 66px;
    height: 131px;
    object-fit: contain;
}

/* ------------------------------------------------------------------
   Modernized header: merge the red banner flush into the left edge
   of the header bar, with rounded top-left + bottom-left corners so
   it reads as one piece with the nav.
   ------------------------------------------------------------------ */
/* Banner is 1276x330 (ratio ~3.866). At 550px wide it is 550/3.866 = 142px
   tall. Set the bar to exactly that so the whole image (incl. the right
   arrow) shows with NO crop and NO top/bottom gap, at the original size. */
nav.main-nav-container {
    align-items: stretch;         /* logo cell fills full bar height */
    padding: 0 !important;        /* kill legacy 1rem padding so image is flush */
    overflow: hidden;             /* clip image to the bar's rounded corner */
    height: 142px;
    justify-content: flex-start !important;  /* we control spacing ourselves */
}
.logo-title-container {
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    line-height: 0;
    align-self: stretch;
}
.logo-title-container img {
    width: 550px;                 /* original size */
    height: 100%;
    display: block;
    margin: 0;
    object-fit: fill;             /* exact aspect ratio => whole image, no crop */
    border-top-left-radius: 50px;
    border-bottom-left-radius: 0;
}

/* Widen the card so the header + full nav fit on laptops. Legacy .container
   is only 70% wide, wasting side space; use narrow side gutters until there's
   room for the default 70%. */
.container { width: 70%; }
@media (max-width: 1499px) {
    .container { width: 95%; }      /* small side padding on laptops */
}

/* Hide the standalone abacus icon on desktop — it is already in the banner. */
@media (min-width: 769px) {
    nav.main-nav-container .logo-second { display: none; }

    /* Nav links: legacy makes the <ul> absolute + its <li> float:left, so the
       menu sticks to the left. Undo both and lay the links out as a centered
       flex row pushed to the right edge. */
    nav.main-nav-container ul.main-nav {
        position: static !important;
        align-self: center !important;
        align-items: center !important;
        display: flex !important;
        flex: 0 0 auto !important;
        flex-wrap: nowrap;
        gap: 1.75rem;
        margin-left: auto !important;      /* push the whole menu to the right */
        margin-right: 3rem !important;     /* breathing room on the right */
        right: auto !important;
        width: auto !important;
    }
    nav.main-nav-container ul.main-nav li {
        float: none !important;            /* kill legacy float:left */
        white-space: nowrap;
    }
}
nav.main-nav-container ul.main-nav li a {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ------------------------------------------------------------------
   Showcase heading "Be ready to be on the top!" — centered, bigger,
   flat (no slant) so the centering reads cleanly. Responsive sizes
   handled in the tablet/mobile blocks below.
   ------------------------------------------------------------------ */
.showcase-top {
    text-align: center;
    padding-left: 0 !important;
}
.showcase-top h2 {
    text-align: center;
    font-size: 3.4em;             /* base size (fits medium laptops) */
    transform: rotate(-4deg);     /* tilt the whole heading */
    -ms-transform: rotate(-4deg);
    -webkit-transform: rotate(-4deg);
    margin: 0 auto;
    line-height: 1.15;
    white-space: nowrap;          /* keep it on a single line */
    display: inline-block;
}
/* Go large only when there's real room */
@media (min-width: 1200px) {
    .showcase-top h2 { font-size: 5em; }
}

/* ==================================================================
   Modern-minimal activity / abacus selection cards (desktop).
   Subtle idle card; the legacy light-gray :hover border is kept as-is
   (not overridden here). Snappier transition than the legacy 2s.
   ================================================================== */
.section-activity-left,
.section-activity-rigth {
    align-items: center;
    gap: 1.25rem;
    margin-top: .9rem !important;
    padding: 1.1rem 1.25rem !important;
    min-height: 131px;                      /* uniform height (Activity 10 has no image) */
    box-sizing: border-box;
    border: 1px solid #edf0f6;              /* subtle idle outline */
    border-radius: 12px;
    background: #fff;
    transition: border-color .18s ease, background .18s ease !important;
}
/* Imageless card (Activity 10): center its text block */
.section-activity-left .activity-content,
.section-activity-rigth .activity-content { width: 100%; }
.section-activity-left:hover,
.section-activity-rigth:hover {
    background: #fafbfe;                     /* faint tint on hover */
}
/* Cleaner titles: drop the underline, keep the blue */
.section-activity-left h2,
.section-activity-rigth h2 {
    text-decoration: none;
    color: #1157b8;
    line-height: 1.3;
}
.section-activity-left:hover h2,
.section-activity-rigth:hover h2 { text-decoration: underline; }
/* Keep the activity image tidy and consistent */
.section-activity-left img,
.section-activity-rigth img {
    width: 66px;
    height: 131px;
    object-fit: contain;
}

/* ---------- Tablet ---------- */
@media (max-width: 992px) {
    .container { width: 90%; }

    #main-body {
        flex-direction: column;
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
    }
    .main-content-left,
    .main-content-rigth {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex: 1 1 100%;
        border-right: 0;
        margin-left: 0;
    }
    .main-content-left { border-right: 0; padding-right: 0; }
}

/* ---------- Tablet showcase size ---------- */
@media (max-width: 991px) {
    .showcase-top h2 { font-size: 3em; }
}

/* ---------- Nav collapses to hamburger on real mobile only ---------- */
@media (max-width: 768px) {
    /* Keep the red banner merged flush into the left of the bar (prominent),
       like desktop, and float a white hamburger on the right. */
    nav.main-nav-container {
        position: relative;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start !important;
        margin-top: 1.5rem;
        padding: 0 !important;
        height: auto !important;          /* bar height follows the logo, no warp */
        overflow: visible;                /* let the dropdown menu show below */
    }
    .logo-title-container {
        flex: 0 0 auto;
        align-self: flex-start;
        line-height: 0;
    }
    .logo-title-container img {
        width: 400px !important;          /* bigger & prominent, flush to the left */
        max-width: 88% !important;
        height: auto !important;          /* keep natural aspect ratio (no warp) */
        object-fit: contain !important;
        border-top-left-radius: 40px !important;
        border-bottom-left-radius: 0 !important;
        display: block;
    }
    .logo-second { display: none; }

    /* Showcase heading: tilted + single line, bigger, more top/bottom space */
    .showcase-top { margin: 2.25rem 0 2rem !important; padding: .25rem 0 !important; }
    .showcase-top h2 {
        font-size: clamp(1.3rem, 7.5vw, 2.4rem) !important;  /* a bit bigger */
        transform: rotate(-4deg) !important;
        -ms-transform: rotate(-4deg) !important;
        -webkit-transform: rotate(-4deg) !important;
        white-space: nowrap;
        max-width: 100%;
        padding: 0 4px;
        box-sizing: border-box;
        display: inline-block;
    }
    /* Kill the empty showcase spacer that created a big gap below the heading */
    .showcase-item-container { display: none !important; margin: 0 !important; }

    /* White hamburger, floated on the right, vertically centered */
    .nav-toggle {
        display: block;
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        z-index: 40;
        padding: 10px;
    }
    .nav-toggle span { background: #0b1c48; }  /* navy bars => visible on light-blue bar */

    /* Dropdown menu opens full-width below the bar */
    nav ul.main-nav {
        position: absolute !important;
        top: 100%;
        left: 0;
        display: none;
        width: 100%;
        flex-direction: column;
        align-self: stretch !important;
        align-items: stretch !important;
        margin: 0 !important;
        background: #D3DEF2;
        box-shadow: 0 6px 12px rgba(0,0,0,.12);
        z-index: 39;
    }
    nav ul.main-nav.open { display: flex; }
    .main-nav li { width: 100%; }
    .main-nav li a {
        display: block;
        padding: 12px 8px;
        border-top: 1px solid #e3e8f2;
    }

    /* Each activity = a clean, uniform card */
    #main-body .main-content-left > a {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        text-decoration: none;
    }

    /* Consistent card: image ALWAYS on top, then title, then text.
       Boxed so the images don't look scattered. */
    .section-activity-left,
    .section-activity-rigth {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: .75rem;
        margin: 0 !important;
        padding: 1.5rem 1.25rem !important;   /* balanced inner padding */
        width: 100%;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid #e3e8f2;
        border-radius: 14px;
        box-shadow: 0 2px 10px rgba(0,0,0,.07);
    }
    /* Uniform abacus image: same size in every card, on top */
    .section-activity-left img,
    .section-activity-rigth img {
        order: -1 !important;
        width: 48px !important;
        height: 135px !important;
        max-width: none !important;
        object-fit: contain !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    .activity-content {
        width: 100%;
        box-sizing: border-box;
    }
    .activity-content h2 {
        font-size: 1.15rem;
        margin: 0;
        line-height: 1.3;
    }
    .activity-content p {
        margin: .5rem 0 0;
        color: #444;
        line-height: 1.5;
    }
    .activity-content h2,
    .activity-content p {
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }
    /* Login / search inputs full width */
    .login-form input,
    .search-input input { width: 100%; box-sizing: border-box; }

    /* Footer: stack columns */
    footer {
        flex-direction: column;
        gap: 18px;
        text-align: center;
    }
    footer ul { padding: 0; list-style: none; }

    .error-code { font-size: 80px; }
    .error-title { font-size: 22px; }
}
