@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Outfit:wght@200;300;400;600&display=swap');

:root {
    /* Default / Base Variables (Vision Theme) */
    --primary-color: #ffd700;
    /* Gold */
    --accent-color: #29ffc6;
    /* Seafoam */
    --bg-tint: rgba(41, 255, 198, 0.05);
    --glass-border-color: rgba(41, 255, 198, 0.2);
    --deep-dark: #05020a;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-heavy: rgba(255, 255, 255, 0.08);
    --text-light: #e0d4fc;
    --neon-glow: 0 0 15px rgba(41, 255, 198, 0.4);
}

/* --- THEME OVERRIDES --- */

/* 1. VISION (Sage & Gold) - Default */
.theme-vision {
    --primary-color: #ffd700;
    --accent-color: #a8e6cf;
    --bg-tint: rgba(168, 230, 207, 0.05);
    --neon-glow: 0 0 15px rgba(168, 230, 207, 0.4);
}

/* 2. SECURITY (Crimson & Silver) - Contrast to Green */
.theme-security {
    --primary-color: #ff3333;
    /* Neon Red / Crimson */
    --accent-color: #e0e0e0;
    --bg-tint: rgba(255, 51, 51, 0.08);
    --neon-glow: 0 0 15px rgba(255, 51, 51, 0.6);
}

/* 3. ARCHITECTURE (Deep Azure & Blueprint White) */
.theme-architecture {
    --primary-color: #00b4d8;
    --accent-color: #caf0f8;
    --bg-tint: rgba(0, 180, 216, 0.08);
    --glass-border-color: rgba(0, 180, 216, 0.3);
    --neon-glow: 0 0 15px rgba(0, 180, 216, 0.5);
}

/* 4. SCIENCE (Electric Violet & Lab White) - Contrast to Cyan */
.theme-science {
    --primary-color: #bc13fe;
    /* Electric Violet */
    --accent-color: #f8f9fa;
    --bg-tint: rgba(188, 19, 254, 0.05);
    --glass-border-color: rgba(188, 19, 254, 0.3);
    --neon-glow: 0 0 15px rgba(188, 19, 254, 0.6);
}

/* 5. ARTS (Deep Vibrant Purple) */
.theme-arts {
    --primary-color: #9d00ff;
    /* Deep Electric Purple */
    --accent-color: #e2b3ff;
    /* Lavender Mist */
    --bg-tint: rgba(157, 0, 255, 0.1);
    --glass-border-color: rgba(157, 0, 255, 0.3);
    --neon-glow: 0 0 15px rgba(157, 0, 255, 0.6);
}

/* 6. PHYSICAL (Kinetic Amber & Warrior Red) */
.theme-physical {
    --primary-color: #ffaa00;
    --accent-color: #ff4d4d;
    --bg-tint: rgba(255, 170, 0, 0.08);
    --glass-border-color: rgba(255, 170, 0, 0.3);
    --neon-glow: 0 0 15px rgba(255, 170, 0, 0.5);
}

/* 7. INTEGRATION (Forest Green & Mycelium White) */
.theme-integration {
    --primary-color: #55a630;
    --accent-color: #e9edc9;
    --bg-tint: rgba(85, 166, 48, 0.1);
    --glass-border-color: rgba(85, 166, 48, 0.3);
    --neon-glow: 0 0 15px rgba(85, 166, 48, 0.5);
}

/* 8. NARRATIVE (Ethereal Pink & Spirit Gold) */
.theme-soul {
    --primary-color: #ff99c8;
    --accent-color: #ffd700;
    --bg-tint: rgba(255, 153, 200, 0.08);
    --glass-border-color: rgba(255, 153, 200, 0.3);
    --neon-glow: 0 0 15px rgba(255, 153, 200, 0.5);
}

/* 9. RECIPROCITY (Cobalt Blue & Platinum) - Contrast to Orange */
.theme-reciprocity {
    --primary-color: #0059ff;
    /* Cobalt Blue */
    --accent-color: #e9ecef;
    --bg-tint: rgba(0, 89, 255, 0.08);
    --glass-border-color: rgba(0, 89, 255, 0.3);
    --neon-glow: 0 0 15px rgba(0, 89, 255, 0.5);
}

/* 10. DEVELOPMENT (Blueprint Blue & Construction Yellow) */
.theme-development {
    --primary-color: #4361ee;
    --accent-color: #fee440;
    --bg-tint: rgba(67, 97, 238, 0.1);
    --glass-border-color: rgba(67, 97, 238, 0.3);
    --neon-glow: 0 0 15px rgba(67, 97, 238, 0.5);
}

/* 11. DONATE (Abundance Gold & Seed Green) */
.theme-donate {
    --primary-color: #fdc500;
    --accent-color: #70e000;
    --bg-tint: rgba(253, 197, 0, 0.08);
    --glass-border-color: rgba(253, 197, 0, 0.3);
    --neon-glow: 0 0 15px rgba(253, 197, 0, 0.5);
}

/* 12. CONTACT (Signal Green & Hologram Blue) */
.theme-contact {
    --primary-color: #06d6a0;
    --accent-color: #118ab2;
    --bg-tint: rgba(6, 214, 160, 0.08);
    --glass-border-color: rgba(6, 214, 160, 0.3);
    --neon-glow: 0 0 15px rgba(6, 214, 160, 0.5);
}

/* 13. FAQ (Clarity Blue & Wisdom White) */
.theme-faq {
    --primary-color: #48cae4;
    --accent-color: #f0f3bd;
    --bg-tint: rgba(72, 202, 228, 0.08);
    --glass-border-color: rgba(72, 202, 228, 0.3);
    --neon-glow: 0 0 15px rgba(72, 202, 228, 0.5);
}

/* 14. VOLUNTEER (Earth Brown & Moss Green) */
.theme-volunteer {
    --primary-color: #bc6c25;
    --accent-color: #606c38;
    --bg-tint: rgba(188, 108, 37, 0.08);
    --glass-border-color: rgba(188, 108, 37, 0.3);
    --neon-glow: 0 0 15px rgba(188, 108, 37, 0.5);
}

/* --- UNIVERSAL RESET & STYLE --- */

* {
    box-sizing: border-box;
}

body {
    background-color: var(--deep-dark);
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image:
        linear-gradient(rgba(5, 2, 10, 0.6), rgba(5, 2, 10, 0.8)),
        url('../assets/images/dashboard_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 0.5s ease;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
    margin: 0;
}

h1.page-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

p.subtitle {
    text-align: center;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-style: italic;
    opacity: 0.8;
}

/* --- LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.footer-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
}


/* --- COMPONENTS: CARDS --- */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--neon-glow);
    border-color: var(--primary-color);
    background: var(--glass-heavy);
}

.card-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px var(--glass-border-color));
    transition: transform 0.4s ease;
}

.glass-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px var(--primary-color));
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-desc {
    font-size: 0.95rem;
    color: rgba(224, 212, 252, 0.8);
    line-height: 1.5;
}

/* --- CONTENT PAGES --- */
.content-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(5px);
}

.content-section h2,
.content-section strong {
    color: var(--primary-color) !important;
}

/* Ensure links (especially emails) wrap properly */
a {
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    display: inline-block;
}


/* --- NAV CONTROLS --- */
.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
    gap: 20px;
}

.nav-button,
.back-button {
    background: var(--glass);
    border: 1px solid var(--glass-border-color);
    border-radius: 12px;
    padding: 15px 25px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    text-align: center;
    margin-bottom: 0;
}

.nav-button:hover,
.back-button:hover {
    background: var(--glass-heavy);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glass-border-color);
    transform: translateY(-3px);
    text-shadow: 0 0 8px var(--primary-color);
    color: var(--text-light);
}

.nav-button.disabled {
    opacity: 0;
    pointer-events: none;
}

/* --- HERO IMAGES --- */
.hero-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--primary-color);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.hero-container:hover .hero-image {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--deep-dark) 100%);
    pointer-events: none;
}

/* --- ANIMATIONS --- */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.logo-float {
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 768px) {
    h1.page-title {
        font-size: 2.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero-container {
        height: 250px;
    }

    /* Reduce container padding on mobile for wider cards */
    .container {
        padding: 20px 10px;
    }

    /* Fix navigation controls on mobile */
    .nav-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .nav-button,
    .back-button {
        min-width: unset;
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Ensure glass cards and content wrap properly on mobile */
    .glass-card {
        max-width: 100%;
        width: 100%;
        padding: 20px;
    }

    .glass-card * {
        max-width: 100%;
        word-wrap: break-word;
    }

    /* Reduce padding in content sections for more space */
    .content-section {
        padding: 25px 15px;
    }
}

.duo-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.duo-grid .glass-card {
    width: 100%;
    max-width: 350px;
    /* Align with approx grid card width */
    flex: 1 1 280px;
}