/* ============================================================ */
/* HEADER STYLES – Desktop & Mobile                             */
/* ============================================================ */

.foundation-header {
    background: #ffffff;
    padding: 8px 0;
    border-bottom: 1px solid #e9edf2;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.foundation-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ----- Logo ----- */
.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: #f17833;
}

.header-logo img {
    max-height: 60px;
    width: auto;
}

/* ----- Header Actions ----- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Secondary pill button */
.btn-secondary-pill {
    background: #14321f;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-secondary-pill:hover {
    background: #0b1f13;
    transform: translateY(-2px);
    color: #ffffff;
}

/* Search */
.header-search {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 50px;
    padding: 4px 4px 4px 18px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.header-search:focus-within {
    border-color: #f17833;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(241, 120, 51, 0.1);
}

.header-search input {
    background: transparent;
    border: none;
    padding: 9px 0;
    color: #0f172a;
    font-size: 0.9rem;
    width: 140px;
    outline: none;
}

.header-search input::placeholder {
    color: #94a3b8;
}

.header-search button {
    background: #f17833;
    border: none;
    border-radius: 50px;
    padding: 9px 16px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.header-search button:hover {
    background: #d96a2a;
}

/* Donate Button */
.btn-donate {
    background: #f17833;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-donate:hover {
    background: #d96a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 120, 51, 0.35);
    color: #fff;
}

/* ============================================================ */
/* VERIFY NGO DROPDOWN                                          */
/* ============================================================ */
.verify-dropdown {
    position: relative;
    display: inline-block;
}

.btn-verify {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    background: transparent !important;
    color: #2d7a4f !important;
    border: 1px solid #2d7a4f !important;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-verify:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.btn-verify i.fa-shield-alt {
    font-size: 1.2rem;
}

.btn-verify .dropdown-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.btn-verify[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.verify-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 220px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    border: 1px solid #e9edf2;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 4px;
}

.verify-dropdown .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(241, 120, 51, 0.06);
    color: #f17833;
}

.dropdown-item i {
    width: 18px;
    color: #f17833;
    font-size: 0.9rem;
}

/* ============================================================ */
/* MENU TOGGLE – Hamburger Icon                                 */
/* ============================================================ */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: #0f172a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle:hover span {
    background: #f17833;
}

/* ============================================================ */
/* MOBILE MENU PANEL (Slide-in Drawer)                          */
/* ============================================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: #ffffff;
    z-index: 1002;
    padding: 20px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9edf2;
}

.mobile-logo .logo-text {
    font-size: 1.4rem;
}

.mobile-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
}

.mobile-nav {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
}

.mobile-nav > li > a {
    display: block;
    padding: 14px 0;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.3s ease;
}

.mobile-nav > li:first-child > a {
    font-weight: 700;
}

.mobile-nav li a:hover {
    color: #f17833;
}

.mobile-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-dropdown > a i {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.mobile-dropdown.open > a i {
    transform: rotate(45deg);
    color: #f17833;
}

.mobile-dropdown-menu {
    list-style: none;
    padding: 0 0 0 16px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown.open .mobile-dropdown-menu {
    max-height: 300px;
}

.mobile-dropdown-menu li a {
    padding: 10px 0;
    font-weight: 400;
    font-size: 0.9rem;
    border-bottom: none;
    color: #475569;
}

.mobile-dropdown-menu li a:hover {
    color: #f17833;
}

.mobile-actions {
    padding-top: 20px;
    border-top: 1px solid #e9edf2;
}

.mobile-search {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 50px;
    padding: 4px 4px 4px 18px;
    margin-bottom: 12px;
}

.mobile-search input {
    background: transparent;
    border: none;
    padding: 10px 0;
    width: 100%;
    outline: none;
}

.mobile-search button {
    background: #f17833;
    border: none;
    border-radius: 50px;
    padding: 10px 16px;
    color: #fff;
    cursor: pointer;
}

.mobile-actions-buttons {
    display: flex;
    gap: 10px;
}

.btn-donate-mobile {
    flex: 1;
    display: block;
    background: #f17833;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.btn-donate-mobile:hover {
    background: #d96a2a;
    color: #fff;
}

.btn-secondary-pill-mobile {
    flex: 1;
    display: block;
    background: #14321f;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary-pill-mobile:hover {
    background: #0b1f13;
    color: #fff;
}

/* ============================================================ */
/* BOTTOM NAVIGATION (Mobile)                                   */
/* ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e9edf2;
    z-index: 999;
    display: none;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 4px 12px;
    min-width: 56px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.bottom-nav-item.active {
    color: #f17833;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.bottom-nav-item .nav-label {
    font-size: 0.6rem;
    letter-spacing: 0.3px;
}

/* Notification Badge */
.nav-badge {
    position: absolute;
    top: -2px;
    right: 4px;
    background: #e11d48;
    color: #ffffff;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #ffffff;
    line-height: 1;
}

/* Donate Button (Center - Highlighted) */
.bottom-nav-item.donate-nav {
    background: #f17833;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 50px;
    flex-direction: row;
    gap: 6px;
    min-width: auto;
    margin-top: -12px;
    box-shadow: 0 4px 14px rgba(241, 120, 51, 0.3);
}

.bottom-nav-item.donate-nav i {
    font-size: 1rem;
    margin-bottom: 0;
}

.bottom-nav-item.donate-nav .nav-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.bottom-nav-item.donate-nav.active {
    background: #d96a2a;
}

.bottom-nav-item.donate-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 120, 51, 0.4);
}

/* ============================================================ */
/* RESPONSIVE                                                    */
/* ============================================================ */

/* Tablet & Mobile – Show Bottom Nav */
@media (max-width: 992px) {
    .bottom-nav {
        display: flex !important;
    }
    body {
        padding-bottom: 70px;
    }
}

/* Tablet – Header Adjustments */
@media (max-width: 991.98px) {
    .btn-secondary-pill .donate-text {
        display: none;
    }
    .btn-secondary-pill {
        padding: 10px 14px;
    }
    .btn-donate {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
    .btn-donate .donate-text {
        display: none;
    }
    .header-search input {
        width: 100px;
    }
}

/* Mobile – Header Adjustments */
@media (max-width: 767.98px) {
    .header-logo img {
        max-height: 40px;
    }
    .logo-text {
        font-size: 1.4rem;
    }
    .btn-secondary-pill {
        display: none;
    }
    .header-search {
        display: none;
    }
    .btn-donate {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    .btn-donate .donate-text {
        display: none;
    }
    .btn-donate i {
        font-size: 1rem;
    }
    .btn-verify .donate-text {
        display: none;
    }
    .btn-verify {
        padding: 8px 12px;
        font-size: 0.75rem;
        border-radius: 50px;
    }
    .btn-verify i.fa-shield-alt {
        font-size: 1rem;
    }
    .btn-verify .dropdown-arrow {
        display: none;
    }
    .verify-dropdown {
        margin: 0 4px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .bottom-nav-item {
        padding: 4px 8px;
        min-width: 44px;
    }
    .bottom-nav-item i {
        font-size: 1.1rem;
    }
    .bottom-nav-item .nav-label {
        font-size: 0.5rem;
    }
    .nav-badge {
        font-size: 0.45rem;
        min-width: 14px;
        height: 14px;
        top: -4px;
        right: 0;
    }
    .bottom-nav-item.donate-nav {
        padding: 6px 14px;
    }
    .bottom-nav-item.donate-nav i {
        font-size: 0.85rem;
    }
    .bottom-nav-item.donate-nav .nav-label {
        font-size: 0.65rem;
    }
    .header-logo img {
        max-height: 32px;
    }
    .logo-text {
        font-size: 1.1rem;
    }
}

/* ============================================================ */
/* DESKTOP (993px and above)                                    */
/* ============================================================ */
@media (min-width: 993px) {
    .bottom-nav {
        display: none !important;
    }

    body {
        padding-bottom: 0;
    }

    /* Desktop dropdown – anchored card */
    .mobile-menu-overlay {
        background: transparent;
    }

    .mobile-menu {
        top: 88px;
        right: 20px;
        left: auto;
        bottom: auto;
        height: auto;
        max-height: calc(100vh - 108px);
        width: 380px;
        border-radius: 16px;
        border: 1px solid #e9edf2;
        box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
        padding: 24px;
        transform-origin: top right;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.98);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .mobile-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        right: 20px;
    }

    .foundation-header.scrolled ~ .mobile-menu {
        top: 78px;
    }

    /* Hide duplicate search in desktop dropdown */
    .mobile-menu .mobile-search {
        display: none;
    }

    .mobile-nav > li > a {
        font-size: 1rem;
        padding: 14px 0;
    }
}