/* ============================================
   HHW3 — Nav stylesheet (header + footer, shared)
   ============================================ */

/* ============ NAV ============ */
.nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    height: var(--nav-h); transition: background 0.5s, box-shadow 0.5s, backdrop-filter 0.5s;
}
.nav.at-top { background: transparent; }
.nav.scrolled {
    background: rgba(250,248,243,0.92); backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
/* Inner pages always start scrolled (cream background nav) */
.nav.always-solid {
    background: rgba(250,248,243,0.92); backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1240px; margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between; padding: 0 32px;
}

.nav-logo {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--display); font-size: 1.2rem; transition: color 0.4s;
}
.nav.at-top .nav-logo { color: var(--white); }
.nav.scrolled .nav-logo,
.nav.always-solid .nav-logo { color: var(--forest); }

.nav-logo img {
    width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.25); transition: border-color 0.4s;
    background: var(--white);
}
.nav.scrolled .nav-logo img,
.nav.always-solid .nav-logo img { border-color: var(--sand); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
    font-size: 0.88rem; font-weight: 400; padding: 8px 18px;
    border-radius: 100px; transition: all 0.3s var(--ease);
    position: relative;
}
.nav.at-top .nav-link { color: rgba(255,255,255,0.85); }
.nav.at-top .nav-link:hover { color: #fff; background: rgba(255,255,255,0.12); }
.nav.scrolled .nav-link,
.nav.always-solid .nav-link { color: var(--text); }
.nav.scrolled .nav-link:hover,
.nav.always-solid .nav-link:hover { background: var(--warm); color: var(--forest); }

/* Active page indicator */
.nav-link.active { font-weight: 600; }
.nav.scrolled .nav-link.active,
.nav.always-solid .nav-link.active { color: var(--forest); }
.nav.at-top .nav-link.active { color: var(--white); }

/* Dropdown for Events submenu */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle::after {
    content: '▾'; margin-left: 6px; font-size: 0.7em; opacity: 0.7;
}
.nav-dropdown-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
    background: var(--white); border-radius: 14px; padding: 10px;
    min-width: 180px; box-shadow: 0 12px 32px rgba(20,53,42,0.12);
    border: 1px solid var(--sand);
    opacity: 0; pointer-events: none; transition: all 0.25s var(--ease);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
    display: block; padding: 10px 16px; border-radius: 8px;
    color: var(--text); font-size: 0.9rem;
    transition: all 0.2s;
}
.nav-dropdown-menu a:hover { background: var(--warm); color: var(--forest); }

.nav-donate-btn {
    margin-left: 10px; padding: 10px 26px; border-radius: 100px;
    font-size: 0.85rem; font-weight: 600;
    background: var(--gold); color: var(--charcoal);
    transition: all 0.35s var(--ease); box-shadow: 0 2px 12px rgba(212,162,78,0.25);
}
.nav-donate-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(212,162,78,0.35); }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.burger span { display: block; width: 22px; height: 2px; border-radius: 2px; transition: all 0.3s; }
.nav.at-top .burger span { background: #fff; }
.nav.scrolled .burger span,
.nav.always-solid .burger span { background: var(--charcoal); }

/* ============ FOOTER ============ */
.footer {
    background: var(--charcoal); color: rgba(255,255,255,0.7);
    padding: 80px 0 30px;
}
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 60px;
}
.footer-brand .nav-logo { color: var(--white); margin-bottom: 18px; }
.footer-brand .nav-logo img { border-color: rgba(255,255,255,0.15); }
.footer-brand p { color: rgba(255,255,255,0.55); max-width: 320px; line-height: 1.7; margin-bottom: 24px; }
.footer h4 {
    color: var(--white); font-family: var(--body); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
    margin-bottom: 22px;
}
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a {
    color: rgba(255,255,255,0.6); font-size: 0.95rem;
    transition: color 0.25s;
}
.footer-links a:hover { color: var(--gold-light); }

.social-row { display: flex; gap: 12px; }
.social-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--ease);
}
.social-btn:hover { background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.social-btn svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.8); transition: fill 0.3s; }
.social-btn:hover svg { fill: var(--charcoal); }

.footer-bottom {
    padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 20px;
    color: rgba(255,255,255,0.4); font-size: 0.85rem;
}
.footer-bottom a { color: var(--mint); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--gold-light); }

/* ============ RESPONSIVE NAV ============ */
@media (max-width: 960px) {
    .burger { display: flex; }
    .nav-links {
        position: fixed; top: var(--nav-h); left: 0; right: 0;
        background: var(--cream); flex-direction: column; gap: 0;
        padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        transform: translateY(-120%); transition: transform 0.4s var(--ease);
    }
    .nav-links.open { transform: translateY(0); }
    .nav-link { width: 100%; padding: 14px 18px; }
    .nav.at-top .nav-link { color: var(--text); }
    .nav-donate-btn { margin: 8px 0 0; width: 100%; text-align: center; }
    .nav-dropdown-menu {
        position: static; transform: none; opacity: 1; pointer-events: auto;
        box-shadow: none; padding: 0 0 0 16px; border: none; background: transparent;
        min-width: 0;
    }
    .nav-dropdown-toggle::after { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
