/* 
 * header.css — Shree Seva Foundation
 * Ultra-Modern Interactive Header & Navigation System
 * Color System: Saffron (#FF6700), Deep Maroon (#4A0E17), Antique Gold (#D4AF37), Crimson Red ("॥ जय श्री राम ॥").
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Outfit:wght@400;500;600;700;800&family=Yatra+One&display=swap');

:root {
    --primary-color: #FF6700;    /* Rich Saffron */
    --secondary-color: #4A0E17;  /* Deep Spiritual Maroon */
    --bg-cream: #FCFBF7;         /* Soft Ivory */
    --bg-dark: #1E060A;          /* Charcoal Maroon */
    --text-color: #2C1A1D;       /* Charcoal Brown */
    --gold-accent: #D4AF37;      /* Antique Gold */
    --devotional-red: #E53935;   /* Crimson Red */
    --white: #FFFFFF;
    
    --font-heading: 'Cinzel', 'Outfit', serif;
    --font-marathi: 'Yatra One', cursive;
    --font-body: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.22s ease-out;
}

.sf-header-wrapper {
    font-family: var(--font-body);
    color: var(--text-color);
    position: relative;
    z-index: 1000;
    width: 100%;
}

.sf-header-wrapper *, 
.sf-header-wrapper *::before, 
.sf-header-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   1. TICKER / ANNOUNCEMENT BAR
   ========================================================================== */
.sf-notice-bar {
    background: linear-gradient(90deg, #FF6700 0%, #D84315 50%, #E53935 100%);
    color: var(--white);
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--gold-accent);
    position: relative;
    z-index: 1002;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.sf-notice-bar a {
    color: #FFFDF6;
    text-decoration: underline;
    margin-left: 10px;
    font-weight: 700;
}

.sf-notice-ticker {
    display: inline-block;
    white-space: nowrap;
    animation: sf-marquee 25s linear infinite;
    padding-left: 100%;
}

.sf-notice-ticker:hover {
    animation-play-state: paused;
}

@keyframes sf-marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   2. TOP HEADER BAR
   ========================================================================== */
.sf-top-header {
    background: var(--secondary-color);
    color: var(--white);
    font-size: 13px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.28);
    transition: var(--transition-smooth);
}

.sf-top-header a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: var(--transition-fast);
}

.sf-top-header a:hover {
    color: var(--primary-color);
}

.sf-top-info {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-top-info li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-top-info i {
    color: var(--gold-accent);
}

.sf-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.sf-top-socials {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-top-socials a {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition-fast);
}

.sf-top-socials a:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 103, 0, 0.4);
}

/* ==========================================================================
   3. MAIN STICKY HEADER & BRANDING
   ========================================================================== */
.sf-main-header {
    background: #FFFFFF;
    padding: 12px 0;
    box-shadow: 0 4px 25px rgba(44, 26, 29, 0.07);
    border-bottom: 2px solid var(--border-gold, rgba(212, 175, 55, 0.35));
    transition: var(--transition-smooth);
    position: sticky;
    top: 0;
    z-index: 999;
}

.sf-header-wrapper.is-sticky .sf-main-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(44, 26, 29, 0.14);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    animation: sf-slideDown 0.3s ease forwards;
}

@keyframes sf-slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.sf-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.sf-logo-container {
    width: 56px;
    height: 56px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
    box-shadow: 0 0 18px rgba(255, 103, 0, 0.35);
    transition: var(--transition-fast);
}

.sf-brand-wrapper:hover .sf-logo-container {
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(255, 103, 0, 0.5);
}

.sf-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.sf-brand-text {
    display: flex;
    flex-direction: column;
}

.sf-brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 21px;
    color: var(--secondary-color);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sf-brand-tagline {
    font-family: var(--font-marathi);
    font-size: 12px;
    color: var(--devotional-red);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(229, 57, 53, 0.3);
}

/* Nav Menu */
.sf-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-menu-link {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 0;
    position: relative;
    transition: var(--transition-fast);
}

.sf-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-accent));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sf-menu-link:hover,
.sf-menu-item.active .sf-menu-link {
    color: var(--primary-color);
}

.sf-menu-link:hover::after,
.sf-menu-item.active .sf-menu-link::after {
    width: 100%;
}

/* Dropdown Menu */
.sf-menu-item {
    position: relative;
}

.sf-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 12px 0;
    box-shadow: 0 14px 40px rgba(44, 26, 29, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    list-style: none;
    z-index: 1000;
}

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

.sf-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.sf-dropdown-link:hover {
    background: rgba(255, 103, 0, 0.08);
    color: var(--primary-color);
    padding-left: 26px;
}

/* Mega Menu */
.sf-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 600px;
    background: #FFFFFF;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 16px 45px rgba(44, 26, 29, 0.16);
    border: 1px solid rgba(212, 175, 55, 0.35);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.sf-menu-item:hover .sf-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sf-mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition-fast);
}

.sf-mega-item:hover {
    background: rgba(255, 103, 0, 0.08);
    transform: translateX(5px);
}

.sf-mega-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 103, 0, 0.14);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Header Buttons */
.sf-btn-donate {
    background: linear-gradient(135deg, #FF6700 0%, #E65100 100%);
    color: #FFFFFF !important;
    border: 1px solid var(--gold-accent);
    border-radius: 50px;
    padding: 9.5px 26px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255, 103, 0, 0.35);
    transition: var(--transition-smooth);
}

.sf-btn-donate:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(255, 103, 0, 0.5);
}

.sf-btn-member {
    background: var(--bg-cream);
    color: var(--secondary-color) !important;
    border: 1px solid var(--gold-accent);
    border-radius: 50px;
    padding: 9.5px 22px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.sf-btn-member:hover {
    background: var(--secondary-color);
    color: #FFFFFF !important;
}

/* Hamburger Button */
.sf-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1005;
}

.sf-hamburger span {
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: var(--transition-fast);
}

.sf-hamburger.active span:nth-child(1),
.sf-hamburger.is-active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.sf-hamburger.active span:nth-child(2),
.sf-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.sf-hamburger.active span:nth-child(3),
.sf-hamburger.is-active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ==========================================================================
   4. MOBILE NAVIGATION DRAWER & BOTTOM BAR
   ========================================================================== */
.sf-mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 6, 10, 0.65);
    backdrop-filter: blur(5px);
    z-index: 1003;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.sf-mobile-backdrop.active,
.sf-mobile-backdrop.is-active {
    opacity: 1 !important;
    visibility: visible !important;
}

.sf-mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #FFFFFF;
    z-index: 1004;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
    transition: var(--transition-smooth);
    overflow-y: auto;
}

.sf-mobile-drawer.active,
.sf-mobile-drawer.is-active {
    right: 0 !important;
}

.sf-mobile-menu {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.sf-mobile-menu-item {
    margin-bottom: 4px;
}

.sf-mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition-fast);
}

.sf-mobile-menu-link:hover,
.sf-mobile-menu-link.active,
.sf-mobile-menu-link.is-active {
    background: rgba(255, 103, 0, 0.08);
    color: var(--primary-color);
}

.sf-mobile-menu-link i.fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sf-mobile-menu-link.active i.fa-chevron-down,
.sf-mobile-menu-link.is-active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Mobile Submenu Items */
.sf-mobile-submenu {
    display: none;
    list-style: none;
    padding: 6px 0 6px 15px;
    margin: 0;
    border-left: 2px solid rgba(255, 103, 0, 0.2);
}

.sf-mobile-submenu.show {
    display: block;
}

.sf-mobile-submenu li a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.sf-mobile-submenu li a:hover {
    color: var(--primary-color);
    background: rgba(255, 103, 0, 0.05);
}

/* Bottom Mobile Sticky Bar */
.sf-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #FFFFFF;
    border-top: 1px solid var(--border-gold);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.09);
    z-index: 998;
    justify-content: space-around;
    align-items: center;
}

.sf-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    gap: 4px;
}

.sf-bottom-nav-item i {
    font-size: 18.5px;
    color: var(--text-muted);
}

.sf-bottom-nav-item.active i,
.sf-bottom-nav-item:hover i {
    color: var(--primary-color);
}

.sf-bottom-donate {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6700 0%, #D84315 100%);
    color: #FFFFFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -22px;
    box-shadow: 0 6px 18px rgba(255, 103, 0, 0.45);
    border: 2px solid #FFFFFF;
}

.sf-bottom-donate i {
    color: #FFFFFF !important;
    font-size: 20px;
}

@media (max-width: 991px) {
    .sf-hamburger { display: flex; }
    .sf-mobile-bottom-nav { display: flex; }
}

@media (max-width: 768px) {
    /* Hide desktop header donate button on mobile — sticky bottom bar & drawer handle donation */
    .sf-actions-col .sf-btn-donate { 
        display: none !important; 
    }
}

@media (max-width: 576px) {
    .sf-main-header {
        padding: 8px 0;
    }
    .sf-brand-wrapper {
        gap: 8px;
    }
    .sf-logo-container {
        width: 44px;
        height: 44px;
    }
    .sf-brand-title {
        font-size: clamp(13px, 4vw, 17px);
    }
    .sf-brand-tagline {
        font-size: clamp(9.5px, 2.8vw, 11px);
    }
    .sf-top-socials {
        display: none !important;
    }
    .sf-top-actions {
        justify-content: center !important;
        width: 100%;
    }
    .sf-lang-switcher {
        margin-right: 0 !important;
    }
    .sf-notice-bar {
        font-size: 11.5px;
        padding: 5px 10px;
    }
}

@media (max-width: 360px) {
    .sf-brand-title {
        font-size: 12.5px;
    }
    .sf-brand-tagline {
        font-size: 9px;
    }
    .sf-logo-container {
        width: 38px;
        height: 38px;
    }
}
