/* ==========================================================================
   Global Theme Stylesheet - Zafar Charity Trust
   ========================================================================== */

:root {
    --bg-dark: #070a13;
    --bg-card-dark: #0d1222;
    --primary-blue: #dfb76c;      /* Warm Champagne Gold */
    --primary-cyan: #c59b27;      /* Rich Amber Gold */
    --primary-green: #0d9488;     /* Premium Emerald */
    --text-white: #f8fafc;
    --text-muted: #a4b3c6;
    --border-dark: rgba(223, 183, 108, 0.15); /* Soft Gold border */
    
    --bg-light: #FAF9F6;          /* Luxury Warm Off-White */
    --bg-card-light: #ffffff;
    --text-dark: #121826;         /* Charcoal Black */
    --text-light-muted: #5e697e;
    --border-light: rgba(223, 183, 108, 0.2); /* Gold border line */

    --font-roboto: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Universal scrollbar hide for all elements */
*, html, body {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important;  /* IE and Edge */
}

*::-webkit-scrollbar, html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, and Opera */
}

html {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
}

*, html, body, button, input, select, textarea {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: visible; /* Prevents double scrollbar rendering */
    height: auto;
}

h1, h2, h3, h4, h5, h6, .hero-title, .section-title, .section-heading {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-optical-sizing: auto;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

/* Roboto Utility Classes */
.roboto-thin { font-family: "Roboto", sans-serif; font-optical-sizing: auto; font-weight: 100; font-style: normal; }
.roboto-light { font-family: "Roboto", sans-serif; font-optical-sizing: auto; font-weight: 300; font-style: normal; }
.roboto-regular { font-family: "Roboto", sans-serif; font-optical-sizing: auto; font-weight: 400; font-style: normal; }
.roboto-medium { font-family: "Roboto", sans-serif; font-optical-sizing: auto; font-weight: 500; font-style: normal; }
.roboto-bold { font-family: "Roboto", sans-serif; font-optical-sizing: auto; font-weight: 700; font-style: normal; }
.roboto-black { font-family: "Roboto", sans-serif; font-optical-sizing: auto; font-weight: 900; font-style: normal; }

/* Page load animations */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Header / Sticky Navigation Bar
   ========================================================================== */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

/* Ensure WordPress admin bar is visible when logged in */
body.admin-bar .global-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .global-header {
        top: 46px;
    }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.4rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.5px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s;
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active-menu-item {
    color: var(--text-white);
}

.nav-link.active-menu-item::after {
    width: 100%;
}

/* Header Buttons Group */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    text-decoration: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
    color: var(--text-white);
    border: none;
    box-shadow: 0 4px 15px rgba(223, 183, 108, 0.25);
}

.btn-apply:hover {
    box-shadow: 0 6px 20px rgba(223, 183, 108, 0.45);
    transform: translateY(-2px);
}

.btn-dashboard {
    background: transparent;
    color: var(--text-white);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Light Mode Global Header Styles */
[data-theme="light"] .global-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .brand-name {
    color: #0f172a !important;
}

[data-theme="light"] .nav-link {
    color: #475569 !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active-menu-item {
    color: #0284c7 !important;
}

[data-theme="light"] .btn-dashboard {
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-dashboard:hover {
    background: #f1f5f9 !important;
    color: #0284c7 !important;
}

[data-theme="light"] .btn-theme-toggle {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}

[data-theme="light"] .btn-theme-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

[data-theme="light"] .global-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

[data-theme="light"] .footer-logo {
    color: #0f172a !important;
}

[data-theme="light"] .footer-desc {
    color: #64748b !important;
}

[data-theme="light"] .footer-col h4 {
    color: #0f172a !important;
}

[data-theme="light"] .footer-links a {
    color: #64748b !important;
}

[data-theme="light"] .footer-links a:hover {
    color: #0284c7 !important;
}

[data-theme="light"] .social-icon {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

[data-theme="light"] .social-icon:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
}

[data-theme="light"] .footer-bottom {
    border-top: 1px solid #e2e8f0 !important;
    color: #94a3b8 !important;
}

.mobile-drawer-actions {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-drawer-btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
}

/* Mobile Hamburger Menu */
.mobile-nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mobile-nav-toggle:hover {
    background: rgba(223, 183, 108, 0.15);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.global-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-dark);
    padding: 60px 40px 30px 40px;
    color: var(--text-muted);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-white);
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-desc {
    font-size: 0.8rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.9rem;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-dark);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.75rem;
}

.footer-secured {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-cyan);
    border: 1px solid rgba(6, 182, 212, 0.25);
    background: rgba(6, 182, 212, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Navigation
   ========================================================================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .global-header {
        padding: 12px 18px;
    }

    .header-brand .brand-name {
        font-size: 1.05rem;
        letter-spacing: -0.3px;
    }

    .brand-icon {
        font-size: 1.2rem;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .desktop-only-btn {
        display: none !important;
    }

    .header-apply-btn {
        font-size: 0.76rem !important;
        padding: 7px 13px !important;
        gap: 4px !important;
        border-radius: 20px !important;
    }

    .header-apply-btn span {
        white-space: nowrap !important;
    }

    /* Mobile Drawer Navigation */
    .nav-menu-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(7, 11, 22, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(223, 183, 108, 0.2);
        padding: 20px 24px 28px 24px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
        animation: navSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .nav-menu-wrapper.mobile-menu-active {
        display: block;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 10px 14px;
        font-size: 0.95rem;
        color: #cbd5e1;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .nav-link:hover, .nav-link.active-menu-item {
        background: rgba(223, 183, 108, 0.1);
        color: var(--primary-blue);
    }

    .nav-link::after {
        display: none;
    }

    .mobile-drawer-actions {
        display: flex;
    }
}

@keyframes navSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
    h3 { font-size: clamp(1.2rem, 4vw, 1.6rem); }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
