/*
 * Header / footer layout ported from the wfmca-ci "project" frontend theme
 * (frontend_assets/css/styles.css there). Only the chrome (top bar, main
 * nav, mobile nav, footer) is included here — page content keeps its own
 * existing styles from aofixo.css.
 */

/* Every Bootstrap modal on the site (#QRModal, #TermsModal-popup on
   request-meal; #exampleModal on programs/get-involved; etc.) picks up a
   translateY(~viewport-height) transform at runtime from one of the page's
   scroll-reveal/parallax libraries (jarallax/jquery.appear). Those libraries
   never "see" a modal to clear its reveal transform because Bootstrap keeps
   it display:none until triggered - so the moment it's opened, it renders
   a viewport-height below where it should (verified: off-screen on mobile,
   where the page scrolls; happened to compute to 0 on wide/short desktop
   viewports, which is why it looked fine there). Not scoped to any one
   breakpoint - the underlying cause isn't viewport-width-dependent. */
.modal.show {
    transform: none !important;
}

:root {
    --wfm-primary-dark: rgb(3, 21, 46);
    --wfm-primary-blue: rgb(42, 81, 136);
    --wfm-dark-1: rgb(3, 21, 46);
    --wfm-blue-5: rgb(152, 181, 226);
    --wfm-blue-6: rgb(202, 216, 241);
    --wfm-text-dark: #2C2C2C;
    --wfm-warm-beige: #F5E6D3;
    --wfm-light-cream: #FFF8F0;
    --wfm-gray-50: #F9FAFB;
    --wfm-gray-100: #F3F4F6;
    --wfm-gray-200: #E5E7EB;
    --wfm-font-heading: 'Lora', 'Merriweather', serif;
    --wfm-font-body: 'Poppins', sans-serif;
}

/* CI's header/footer type is set in Poppins; the page body elsewhere on
   this site uses the aofixo theme's "Plus Jakarta Sans", so it's pinned
   explicitly here rather than left to inherit. */
.wfm-header,
.wfm-mobile-nav,
.wfm-btn-donate-fixed,
.wfm-footer {
    font-family: var(--wfm-font-body);
}

/* Top bar */
.wfm-header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, .08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.wfm-header-top {
    background: var(--wfm-primary-dark);
    color: #fff;
    padding: 12px 0;
    font-size: 14px;
}

.wfm-header-top .container {
    display: flex;
    justify-content: flex-end;
    /* justify-content: space-between; */
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
}

.wfm-notice {
    background: var(--wfm-primary-blue);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.wfm-notice-track {
    display: inline-block;
    padding-left: 100%;
    animation: wfm-scroll-text 22s linear infinite;
}

@keyframes wfm-scroll-text {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.wfm-header-contact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wfm-header-contact a {
    color: #fff;
}

.wfm-dual-button {
    display: flex;
    list-style: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

.wfm-dual-button a {
    border: none;
    padding: 12px 10px;
    cursor: pointer;
    font-size: 13px;
    background-color: var(--wfm-primary-blue);
    color: #fff;
    text-decoration: none;
    transition: .3s ease;
}

.wfm-dual-button a:first-child {
    border-right: 1px solid rgba(255, 255, 255, .3);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.wfm-dual-button a:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.wfm-dual-button a:hover {
    background: #fff;
    color: var(--wfm-primary-blue);
    z-index: 1;
}

/* Compact mobile account bar (replaces the plain Register/Login strip on
   small screens). Hidden on desktop, where .wfm-dual-button still applies. */
.wfm-account-bar { display: none; }

.wfm-social-icons {
    display: flex;
    gap: 5px;
}

.wfm-social-icons a {
    width: 30px;
    height: 30px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-radius .2s ease;
}

.wfm-social-icons a:hover {
    border-radius: 50%;
}

.wfm-social-icons img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Main nav */
.wfm-header-main {
    padding: 20px 0;
}

.wfm-header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.wfm-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    max-width: 200px;
}

.wfm-logo img {
    max-width: 100%;
    height: auto;
}

.wfm-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
}

.wfm-nav > li {
    position: relative;
}

.wfm-nav a {
    color: var(--wfm-text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    transition: color .3s ease;
    position: relative;
}

.wfm-nav > li > a {
    display: inline-block;
    padding: 6px 0;
}

.wfm-nav a:hover {
    color: var(--wfm-primary-blue);
}

/* Animated underline on hover, ported from wfmca-ci/project's `nav a::after`
   (frontend_assets/css/styles.css there). Scoped to non-dropdown items only
   (:not(.wfm-nav-dropdown)) since .wfm-nav-dropdown > a already uses ::after
   for its ▼ arrow indicator - the reference site's dropdown trigger is a
   plain <div>, not an <a>, so it never competed with this rule there. */
.wfm-nav > li:not(.wfm-nav-dropdown) > a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--wfm-primary-blue);
    transition: width .3s ease;
}

.wfm-nav > li:not(.wfm-nav-dropdown) > a:hover::after {
    width: 100%;
}

.wfm-nav-dropdown > a {
    cursor: pointer;
    padding-right: 18px !important;
}

.wfm-nav-dropdown > a::after {
    content: '\25BC';
    position: absolute;
    right: 0;
    top: 8px;
    font-size: 10px;
    transition: transform .3s ease;
}

.wfm-nav-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.wfm-dropdown-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .15);
    border-radius: 8px;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all .3s ease;
    z-index: 100;
    padding-left: 0 !important;
}

.wfm-nav-dropdown:hover .wfm-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wfm-dropdown-menu li + li {
    border-top: 1px solid var(--wfm-warm-beige);
}

.wfm-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--wfm-text-dark);
    transition: all .3s ease;
    font-size: 13px;
}

.wfm-dropdown-menu a:hover {
    background: var(--wfm-light-cream);
    color: var(--wfm-primary-blue);
    padding-left: 25px;
}

.wfm-dropdown-menu form {
    margin: 0;
}

.wfm-dropdown-menu button.wfm-link-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--wfm-text-dark);
    font-size: 13px;
    cursor: pointer;
}

.wfm-dropdown-menu button.wfm-link-btn:hover {
    background: var(--wfm-light-cream);
    color: var(--wfm-primary-blue);
}

.wfm-btn-donate {
    background: var(--wfm-primary-blue);
    color: #fff;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 700;
    transition: all .3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.wfm-btn-donate:hover {
    background: var(--wfm-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, .4);
}

.wfm-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.wfm-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--wfm-primary-dark);
    border-radius: 2px;
    transition: all .3s ease;
    transform-origin: center;
}

.wfm-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wfm-menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.wfm-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.wfm-mobile-nav {
    flex-direction: column;
    background: #fff;
    border-top: 1px solid var(--wfm-gray-200);
    overflow: hidden;
    max-height: 0;
    transition: max-height .4s ease;
}

.wfm-mobile-nav.open { max-height: 700px; overflow-y: auto; }

.wfm-mobile-nav-link,
.wfm-mobile-nav-submenu a,
.wfm-mobile-nav-submenu-btn {
    display: block;
    padding: 13px 24px;
    color: var(--wfm-dark-1);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--wfm-gray-100);
    transition: background .2s, color .2s;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.wfm-mobile-nav-link:hover,
.wfm-mobile-nav-submenu a:hover,
.wfm-mobile-nav-submenu-btn:hover {
    background: var(--wfm-gray-50);
    color: var(--wfm-primary-blue);
}

.wfm-mobile-nav-group-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 24px;
    color: var(--wfm-dark-1);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--wfm-gray-100);
    cursor: pointer;
    user-select: none;
    transition: background .2s, color .2s;
}

.wfm-mobile-nav-group-label:hover {
    background: var(--wfm-gray-50);
    color: var(--wfm-primary-blue);
}

.wfm-mobile-nav-group-arrow {
    font-size: 10px;
    transition: transform .3s ease;
    display: inline-block;
}

.wfm-mobile-nav-group.open .wfm-mobile-nav-group-arrow { transform: rotate(180deg); }

.wfm-mobile-nav-submenu {
    display: none;
    flex-direction: column;
    background: var(--wfm-gray-50);
}

.wfm-mobile-nav-group.open .wfm-mobile-nav-submenu { display: flex; }

.wfm-mobile-nav-submenu a,
.wfm-mobile-nav-submenu-btn { font-size: 13px; padding-left: 36px; }

.wfm-btn-donate-fixed {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--wfm-primary-blue);
    color: #fff;
    text-align: center;
    padding: 16px 24px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, .15);
    transition: background .3s;
}

.wfm-btn-donate-fixed:hover { background: var(--wfm-primary-dark); color: #fff; }

@media (max-width: 968px) {
    .wfm-nav { display: none; }
    .wfm-menu-toggle { display: flex; }
    .wfm-mobile-nav { display: flex; }
    .wfm-btn-donate-fixed { display: block; }
    .wfm-btn-donate { display: none; }
    body { padding-bottom: 60px; }

    /* Account bar: swap the plain desktop strip for a compact card that
       reads as a UI component rather than an ad banner. Scoped to
       :has(.wfm-account-bar) so logged-in users' contact/social strip is
       untouched. */
    .wfm-header-top:has(.wfm-account-bar) { background: #fff; padding: 10px 0; }
    .wfm-header-top:has(.wfm-account-bar) .container { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
    .wfm-account-desktop { display: none; }

    .wfm-account-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        row-gap: 10px;
        order: -1;
        flex: 1 1 100%;
        box-sizing: border-box;
        width: 100%;
        padding: 12px 14px;
        gap: 12px;
        background: linear-gradient(135deg, var(--wfm-primary-dark) 0%, var(--wfm-primary-blue) 100%);
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(3, 21, 46, .2);
        color: #fff;
    }

    .wfm-account-bar-info {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .wfm-account-bar-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .15);
        font-size: 14px;
    }

    .wfm-account-bar-text {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
        min-width: 0;
    }

    .wfm-account-bar-text strong {
        font-size: 13px;
        font-weight: 600;
    }

    .wfm-account-bar-text small {
        font-size: 11px;
        color: rgba(255, 255, 255, .72);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .wfm-account-bar-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        margin-left: auto;
    }

    .wfm-account-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 12.5px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: background .25s ease, color .25s ease, border-color .25s ease;
    }

    .wfm-account-btn-primary {
        background: #fff;
        color: var(--wfm-primary-dark);
    }

    .wfm-account-btn-primary:hover,
    .wfm-account-btn-primary:active {
        background: var(--wfm-blue-6);
    }

    .wfm-account-btn-secondary {
        background: transparent;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .5);
    }

    .wfm-account-btn-secondary:hover,
    .wfm-account-btn-secondary:active {
        background: rgba(255, 255, 255, .12);
        border-color: #fff;
    }
}

@media (max-width: 540px) {
    .wfm-header-top .wfm-social-icons,
    .wfm-header-top .wfm-header-contact { display: none; }
}

@media (max-width: 400px) {
    .wfm-account-bar-text small { display: none; }
    .wfm-account-bar { padding: 10px 12px; gap: 8px; }
    .wfm-account-bar-actions { width: 100%; margin-left: 0; justify-content: stretch; }
    .wfm-account-btn { flex: 1 1 0; padding: 8px 10px; font-size: 12px; }
}

@media (min-width: 1200px) {
    .wfm-header-main .container { max-width: 1400px; }
    .wfm-header-top .container { max-width: 1140px; }
}

@media (min-width: 1400px) {
    .wfm-header-top .container { max-width: 1320px; }
}

/* Footer - ported 1:1 from wfmca-ci/project's footer.php + styles.css
   (the `footer`, `.footer-container`, `.footer-top`, `.footer-about`,
   `.footer-links`, `.footer-contact`, `.footer-bottom` block). */
.wfm-footer {
    background: var(--wfm-dark-1);
    color: #fff;
    padding: 80px 40px 30px;
}

.wfm-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wfm-footer .footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.wfm-footer .footer-about h3 {
    font-family: var(--wfm-font-heading);
    color: #fff;
    font-size: 26px;
    margin-bottom: 20px;
}

.wfm-footer .footer-about p {
    color: var(--wfm-blue-5);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Candid "Platinum Transparency" badge. Fixed width + height:auto (not the
   previous width:30%/height:35%) so the image keeps its real ~1:1 aspect
   ratio - a percentage height resolves against .footer-top's grid-row
   height here, which stretched/squished it out of shape, especially once
   the grid collapses to a single column on mobile. */
.wfm-footer .footer-badge {
    display: inline-block;
    margin-top: 4px;
}

.wfm-footer .footer-badge img {
    width: 110px;
    height: auto;
    display: block;
}

.wfm-footer .footer-contact {
    color: var(--wfm-blue-5);
    font-size: 14px;
}

.wfm-footer .footer-contact p { margin-bottom: 4px; }

.wfm-footer .footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.wfm-footer .footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wfm-footer .footer-links ul li { margin-bottom: 12px; }

.wfm-footer .footer-links a {
    color: var(--wfm-blue-5);
    text-decoration: none;
    font-size: 14px;
    transition: color .3s ease;
}

.wfm-footer .footer-links a:hover { color: #fff; }

.wfm-footer .social-icons {
    display: flex;
    gap: 5px;
}

.wfm-footer .social-icons a {
    width: 30px;
    height: 30px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-radius .2s ease;
}

.wfm-footer .social-icons a:hover { border-radius: 50%; }

.wfm-footer .social-icons img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wfm-footer .footer-bottom {
    text-align: center;
    color: var(--wfm-blue-5);
    font-size: 14px;
}

.wfm-footer .footer-bottom p { margin-bottom: 8px; }

@media (max-width: 968px) {
    .wfm-footer { padding: 60px 20px 20px; }
    .wfm-footer .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .wfm-footer .footer-about h3 { font-size: 22px; }
}

@media (max-width: 767px) {
    .wfm-footer { padding: 40px 20px 24px; }

    .wfm-footer .footer-top {
        gap: 30px;
        margin-bottom: 28px;
        padding-bottom: 28px;
    }

    .wfm-footer .footer-about h3 { font-size: 20px; margin-bottom: 10px; }
    .wfm-footer .footer-about p { font-size: 14px; line-height: 1.6; margin-bottom: 0; }
    .wfm-footer .footer-badge { margin-top: 14px; }
    .wfm-footer .footer-badge img { width: 90px; }

    .wfm-footer .footer-links h4 { font-size: 15px; margin-bottom: 12px; }
    .wfm-footer .footer-links ul li { margin-bottom: 4px; }
    .wfm-footer .footer-links a {
        display: inline-block;
        padding: 6px 0;
        font-size: 13.5px;
    }

    .wfm-footer .footer-contact { font-size: 13.5px; }
    .wfm-footer .footer-contact p { line-height: 1.5; }

    .wfm-footer .social-icons { margin-top: 10px; }

    .wfm-footer .footer-bottom {
        margin-top: 8px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, .12);
        font-size: 12.5px;
        line-height: 1.6;
    }
}

