/* ==========================================================================
   AFYAPLUS — CUSTOM STYLES
   Header · Footer · Impact chart · Resources & Downloads · Mobile

   Load this file LAST in <head> (after style.css, gifall.css, home-enhance.css)
   so it wins over the older theme files.

   TABLE OF CONTENTS
     0.  Design tokens (colours, radius, shadows)
     1.  Base fixes
     2.  Header (desktop look + donate button)
     3.  FOOTER  ........ every footer rule is in this section,
                          including the footer's own breakpoints
     4.  Impact section & donut chart (look only — numbers/colours live in
         the "IMPACT DATA" block at the bottom of index.html)
     5.  Resources & Downloads
     6.  MOBILE  ........ all phone / tablet CSS
           6.1  Mobile menu (slide-out drawer)
           6.2  Header breakpoints
           6.3  Impact & Resources breakpoints
   ========================================================================== */


/* ==========================================================================
   0. DESIGN TOKENS
   ========================================================================== */
:root {
    --afy-primary: #07bde7;
    --afy-primary-dark: #0596b8;
    --afy-secondary: #ee104f;
    --afy-teal: #0a677e;
    --afy-navy: #0a1a2a;
    --afy-text: #1f2a37;
    --afy-muted: #5f6b7a;
    --afy-soft: #f4f8fb;
    --afy-line: #e6edf2;
    --afy-white: #ffffff;
    --afy-shadow-sm: 0 6px 20px rgba(10, 26, 42, 0.06);
    --afy-shadow-lg: 0 22px 44px rgba(10, 26, 42, 0.14);
    --afy-ease: 0.3s ease;
}


/* ==========================================================================
   1. BASE FIXES
   ========================================================================== */

/* style.css contains  body { height: 200vh }  (a leftover demo rule). Because
   the header is "position: sticky" inside <body>, it stopped sticking once you
   scrolled past two screens. Let the body grow with its content instead. */
body {
    height: auto;
    min-height: 100vh;
}

/* Locks page scroll while the mobile menu is open */
body.menu-open {
    overflow: hidden;
}


/* ==========================================================================
   2. HEADER (desktop look)
   Mobile / tablet header rules are in section 6.
   ========================================================================== */
header#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--afy-white);
    border-bottom: 1px solid var(--afy-line);
    transition: box-shadow var(--afy-ease);
}

header#main-header.scrolled {
    box-shadow: 0 4px 18px rgba(10, 26, 42, 0.12);
}

header#main-header .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    transition: padding var(--afy-ease);
}

header#main-header.scrolled .header-container {
    padding: 10px 20px;
}

header#main-header .logo {
    flex-shrink: 0;
    line-height: 0;
}

header#main-header .logo img {
    display: block;
    height: 60px;
    width: auto;
    transition: height var(--afy-ease);
}

header#main-header.scrolled .logo img {
    height: 44px;
}

/* Donate button + hamburger sit together on the right */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-actions .donate-btn,
.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 26px;
    border: 2px solid transparent;
    border-radius: 50px;
    background: var(--afy-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--afy-ease), transform var(--afy-ease), box-shadow var(--afy-ease);
}

.header-actions .donate-btn:hover,
.donate-btn:hover {
    background: var(--afy-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(7, 189, 231, 0.3);
}

.donate-btn:focus-visible {
    outline: 3px solid rgba(7, 189, 231, 0.45);
    outline-offset: 2px;
}

/* Desktop dropdowns also open with the keyboard */
.desktop-nav .nav-menu > li:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Between 993px and 1200px the menu is tighter so it never wraps */
@media (min-width: 993px) and (max-width: 1200px) {
    .desktop-nav .nav-menu > li { margin: 0 8px; }
    .desktop-nav .nav-menu > li > a { font-size: 13.5px; }
    .header-actions .donate-btn { padding: 8px 18px; font-size: 13px; }
    header#main-header .logo img { height: 50px; }
}

/* The hamburger only exists on tablet / phone (styled in 6.1) */
.mobile-menu-btn { display: none; }


/* ==========================================================================
   3. FOOTER
   ALL footer CSS is in this section — layout, columns, links, contact rows,
   social icons, copyright bar and the footer's own responsive rules.
   To change footer spacing, start with  .footer-grid  (column-gap).
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, var(--afy-teal), var(--afy-navy));
    color: rgba(255, 255, 255, 0.86);
    padding: 70px 0 0;
    font-size: 15px;
    line-height: 1.7;
}

.site-footer .container {
    max-width: 1200px;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---- Column layout ------------------------------------------------------
   Four columns. The first (About Us) is the widest and has its own extra
   right padding, so its text stays clear of "Quick Links".
   Change the fr numbers to re-balance the columns.
   ------------------------------------------------------------------------ */
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 0.9fr 1.3fr 1.5fr;
    column-gap: clamp(36px, 5vw, 76px);
    row-gap: 40px;
    align-items: start;
}

.site-footer .footer-col {
    min-width: 0; /* lets long words wrap instead of overflowing */
}

.site-footer .footer-about {
    padding-right: clamp(0px, 3vw, 40px);
}

.site-footer .footer-about p {
    max-width: 38ch;
}

/* ---- Headings (identical position in every column) -------------------- */
.site-footer .footer-heading {
    position: relative;
    margin: 0 0 22px;
    padding-bottom: 12px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.site-footer .footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: var(--afy-primary);
}

.site-footer p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.7;
}

/* ---- Link lists (Quick Links / Programs) ------------------------------ */
.site-footer .footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-links li {
    margin: 0 0 10px;
    padding: 0;
}

.site-footer .footer-links a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    line-height: 1.5;
    transition: color var(--afy-ease), transform var(--afy-ease);
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
    color: var(--afy-primary);
    transform: translateX(5px);
}

/* ---- Contact rows (icon column + text column) ------------------------- */
.site-footer .footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-contact li {
    display: grid;
    grid-template-columns: 22px 1fr;
    column-gap: 10px;
    margin: 0 0 14px;
    line-height: 1.55;
}

.site-footer .footer-contact i {
    margin-top: 4px;
    color: var(--afy-primary);
    text-align: center;
}

.site-footer .footer-contact a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color var(--afy-ease);
}

.site-footer .footer-contact a:hover {
    color: var(--afy-primary);
}

/* ---- Social icons ----------------------------------------------------- */
.site-footer .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
}

.site-footer .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    transition: background var(--afy-ease), transform var(--afy-ease);
}

.site-footer .social-links a:hover,
.site-footer .social-links a:focus-visible {
    background: var(--afy-primary);
    transform: translateY(-3px);
}

/* ---- Copyright bar ---------------------------------------------------- */
.site-footer .footer-bottom {
    margin-top: 56px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    text-align: center;
}

.site-footer .footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ---- Footer breakpoints ----------------------------------------------- */
@media (max-width: 1100px) {
    .site-footer .footer-grid {
        grid-template-columns: 1.4fr 1fr 1.2fr 1.3fr;
        column-gap: 32px;
    }
}

@media (max-width: 991.98px) {
    .site-footer { padding-top: 56px; }

    .site-footer .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 40px;
    }

    /* About Us takes the whole first row on tablets */
    .site-footer .footer-about {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .site-footer .footer-about p { max-width: 60ch; }
}

@media (max-width: 575.98px) {
    .site-footer { padding-top: 44px; }

    .site-footer .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        row-gap: 34px;
    }

    .site-footer .footer-bottom { margin-top: 40px; }
}


/* ==========================================================================
   4. IMPACT SECTION & DONUT CHART  (look only)
   The numbers and the donut colours are edited in the "IMPACT DATA" block at
   the bottom of index.html — not here.
   ========================================================================== */
.impact-chart-figure { position: relative; }

.impact-donut .donut-slice {
    fill: none;
    stroke-width: 18;
    stroke-linecap: butt;
    cursor: pointer;
    transition: stroke-dasharray 1.1s ease, opacity 0.25s ease, stroke-width 0.25s ease;
}

.impact-donut .donut-slice.is-dim { opacity: 0.28; }
.impact-donut .donut-slice.is-active { stroke-width: 22; }

.impact-chart-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 10px;
    line-height: 1.4;
    transition: background var(--afy-ease), opacity var(--afy-ease);
}

.impact-chart-legend li:hover,
.impact-chart-legend li.is-active {
    background: rgba(255, 255, 255, 0.14);
}

.impact-chart-legend li.is-dim { opacity: 0.55; }

.impact-chart-legend .legend-swatch {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    margin: 0;
    border-radius: 4px;
}


/* ==========================================================================
   5. RESOURCES & DOWNLOADS
   ========================================================================== */
.resources-section {
    position: relative;
    padding: 90px 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--afy-soft) 100%);
}

.resources-head {
    max-width: 660px;
    margin: 0 auto 50px;
    text-align: center;
}

.resources-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(7, 189, 231, 0.12);
    color: var(--afy-primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.resources-title {
    margin: 0 0 12px;
    color: var(--afy-navy);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
}

.resources-sub {
    margin: 0;
    color: var(--afy-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 28px;
}

.resource-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 34px 28px 26px;
    overflow: hidden;
    background: var(--afy-white);
    border: 1px solid var(--afy-line);
    border-radius: 20px;
    box-shadow: var(--afy-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease,
                opacity 0.6s ease;
}

/* Accent bar that grows on hover */
.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--afy-primary), var(--afy-secondary));
    transform: scaleX(0.22);
    transform-origin: left;
    transition: transform 0.45s ease;
}

.resource-card:hover,
.resource-card:focus-within {
    transform: translateY(-8px);
    border-color: rgba(7, 189, 231, 0.45);
    box-shadow: var(--afy-shadow-lg);
}

.resource-card:hover::before,
.resource-card:focus-within::before {
    transform: scaleX(1);
}

.resource-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--afy-secondary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.resource-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--afy-primary), var(--afy-teal));
    box-shadow: 0 10px 22px rgba(7, 189, 231, 0.3);
    color: #fff;
    font-size: 30px;
    transition: transform 0.35s ease;
}

.resource-card:hover .resource-icon {
    transform: rotate(-6deg) scale(1.08);
}

.resource-tag {
    margin-bottom: 8px;
    color: var(--afy-primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.resource-card h3 {
    margin: 0 0 10px;
    color: var(--afy-navy);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.resource-card p {
    flex: 1;
    margin: 0 0 26px;
    color: var(--afy-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.resource-btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 2px solid var(--afy-primary);
    border-radius: 999px;
    background: var(--afy-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--afy-ease), border-color var(--afy-ease),
                box-shadow var(--afy-ease), color var(--afy-ease);
}

.resource-btn i { transition: transform 0.25s ease; }

.resource-btn:hover,
.resource-btn:focus-visible {
    background: var(--afy-primary-dark);
    border-color: var(--afy-primary-dark);
    color: #fff;
    box-shadow: 0 10px 20px rgba(7, 189, 231, 0.35);
}

.resource-btn--download:hover i { transform: translateY(3px); }

.resource-btn--ghost {
    background: transparent;
    color: var(--afy-primary-dark);
}

.resource-btn--ghost:hover,
.resource-btn--ghost:focus-visible {
    background: rgba(7, 189, 231, 0.1);
    border-color: var(--afy-primary);
    color: var(--afy-primary-dark);
    box-shadow: none;
}

.resource-btn--ghost:hover i { transform: scale(1.15); }

/* Feedback after clicking "Download" (added by the script in index.html) */
.resource-btn.is-done,
.resource-btn.is-done:hover {
    background: #2e9e4d;
    border-color: #2e9e4d;
    color: #fff;
}

.resources-more {
    margin-top: 44px;
    text-align: center;
}

.resources-more a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--afy-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.resources-more a i { transition: transform 0.25s ease; }
.resources-more a:hover { color: var(--afy-secondary); }
.resources-more a:hover i { transform: translateX(5px); }

/* Scroll reveal — the script adds .reveal first, so without JavaScript the
   cards are simply visible. */
.resource-card.reveal {
    opacity: 0;
    transform: translateY(28px);
}

.resource-card.reveal.in {
    opacity: 1;
    transform: none;
}

.resource-card.reveal.in:hover,
.resource-card.reveal.in:focus-within {
    transform: translateY(-8px);
}


/* ==========================================================================
   6. MOBILE  —  all phone / tablet CSS
   (The footer's own breakpoints are in section 3 so the footer stays in one
   place.)
   ========================================================================== */

/* --------------------------------------------------------------------------
   6.1  MOBILE MENU (slide-out drawer)
   -------------------------------------------------------------------------- */

/* Hamburger button */
.mobile-menu-btn {
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--afy-primary);
    font-size: 26px;
    cursor: pointer;
    transition: background var(--afy-ease);
}

.mobile-menu-btn:hover { background: rgba(7, 189, 231, 0.1); }

.mobile-menu-btn:focus-visible {
    outline: 3px solid rgba(7, 189, 231, 0.45);
    outline-offset: 2px;
}

/* Dark backdrop behind the drawer */
#overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1900;
    display: block;
    background: rgba(10, 26, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

/* The drawer */
#mobileMenu.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    width: min(88vw, 380px);
    max-width: none;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    overflow: hidden;
    background: var(--afy-white);
    color: var(--afy-text);
    box-shadow: -12px 0 40px rgba(10, 26, 42, 0.25);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
}

#mobileMenu.mobile-menu.active {
    transform: none;
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.mobile-menu .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--afy-line);
}

.mobile-menu .mobile-menu-header .logo { line-height: 0; }
.mobile-menu .mobile-menu-header .logo img { display: block; height: 42px; width: auto; }

.mobile-menu .close-mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #f1f8fb;
    color: var(--afy-primary-dark);
    font-size: 22px;
    cursor: pointer;
    transition: background var(--afy-ease), color var(--afy-ease);
}

.mobile-menu .close-mobile-menu:hover {
    background: var(--afy-secondary);
    color: #fff;
}

/* Scrollable list area. (style.css hides every <nav> on tablets/phones and
   turns every "nav ul" into a row — these rules restore the drawer's nav.) */
.mobile-menu .mobile-nav {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px 16px;
}

.mobile-menu .mobile-nav ul {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-menu .mobile-nav li {
    position: static;
    margin: 0;
    padding: 0;
    border: 0;
}

.mobile-menu .mobile-nav li > a,
.mobile-menu .mobile-nav .mobile-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 14px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--afy-text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--afy-ease), color var(--afy-ease);
}

/* remove the desktop hover-underline from drawer links */
.mobile-menu .mobile-nav li > a::after { display: none; }

.mobile-menu .mobile-nav li > a:hover,
.mobile-menu .mobile-nav .mobile-dropdown-btn:hover,
.mobile-menu .mobile-nav .mobile-dropdown-btn[aria-expanded="true"] {
    background: #eef8fc;
    color: var(--afy-primary-dark);
}

.mobile-menu .mobile-dropdown-btn i {
    font-size: 0.8em;
    transition: transform 0.25s ease;
}

.mobile-menu .mobile-dropdown-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Accordion panels (opened by the ".active" class) */
.mobile-menu .mobile-nav ul.mobile-dropdown-menu {
    max-height: 0;
    padding: 0 0 0 14px;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.35s ease, visibility 0s linear 0.35s;
}

.mobile-menu .mobile-nav ul.mobile-dropdown-menu.active {
    max-height: 600px;
    visibility: visible;
    transition: max-height 0.35s ease, visibility 0s;
}

.mobile-menu .mobile-nav .mobile-dropdown-menu li > a {
    padding: 11px 12px !important;
    border-left: 2px solid #dcebf1;
    border-radius: 0 10px 10px 0;
    color: #4a5768;
    font-size: 15px;
    font-weight: 500 !important;
}

.mobile-menu .mobile-nav .mobile-dropdown-menu li > a:hover {
    border-left-color: var(--afy-primary);
}

/* Donate button pinned to the bottom of the drawer */
.mobile-menu .mobile-menu-footer {
    flex-shrink: 0;
    padding: 14px 18px 20px;
    border-top: 1px solid var(--afy-line);
    background: #fafcfd;
}

.mobile-menu .mobile-donate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 50px;
    background: var(--afy-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background var(--afy-ease), box-shadow var(--afy-ease);
}

.mobile-menu .mobile-donate:hover {
    background: var(--afy-primary-dark);
    color: #fff;
    box-shadow: 0 10px 20px rgba(7, 189, 231, 0.3);
}

/* --------------------------------------------------------------------------
   6.2  HEADER BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Tablet & phone: hide desktop menu, show hamburger */
@media (max-width: 992px) {
    .desktop-nav { display: none; }

    .mobile-menu-btn { display: inline-flex; }

    header#main-header .header-container,
    header#main-header.scrolled .header-container {
        padding: 10px 16px;
    }

    header#main-header .logo img,
    header#main-header.scrolled .logo img {
        height: 46px;
    }

    /* Compact donate button stays visible next to the hamburger */
    .header-actions .donate-btn {
        padding: 8px 18px;
        font-size: 13px;
        letter-spacing: 0.5px;
    }
}

/* Large phones */
@media (max-width: 480px) {
    header#main-header .logo img,
    header#main-header.scrolled .logo img {
        height: 40px;
    }

    #mobileMenu.mobile-menu { width: 92vw; }
}

/* Very small phones: donate lives inside the drawer only */
@media (max-width: 379px) {
    .header-actions .donate-btn { display: none; }
}

/* If the window is widened while the drawer is open */
@media (min-width: 993px) {
    #mobileMenu.mobile-menu,
    #overlay,
    .mobile-menu-btn {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   6.3  IMPACT & RESOURCES BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 991.98px) {
    .resources-section { padding: 72px 0; }

    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    /* an odd last card sits centred instead of leaving a gap */
    .resource-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 12px);
    }
}

/* Phone */
@media (max-width: 767.98px) {
    .resources-section { padding: 56px 0; }

    .resources-head { margin-bottom: 34px; }

    .resource-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .resource-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: auto;
        justify-self: stretch;
    }

    .resource-card { padding: 28px 22px 22px; }

    /* cards don't "lift" on touch screens */
    .resource-card:hover { transform: none; }

    .impact-chart-legend li { justify-content: flex-start; }
}

/* Small phone */
@media (max-width: 479.98px) {
    .resource-actions { flex-direction: column; }
    .resource-btn { width: 100%; padding: 13px 18px; }
    .resource-icon { width: 60px; height: 60px; font-size: 26px; }
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
    #mobileMenu.mobile-menu,
    #overlay,
    .resource-card,
    .resource-card::before,
    .resource-icon,
    .impact-donut .donut-slice {
        transition-duration: 0.01ms !important;
    }
}
