/* ==========================================================================
   Lucky Little Poppy - Modern Design System & Utility Styles
   Pairs with Tailwind CSS to deliver a clean, spacious, human-centered UI
   ========================================================================== */

:root, [data-theme], [data-theme="poppy"], [data-theme="light"] {
    --primary-red: #E5383B;
    --primary-red-dark: #D90429;
    --primary-red-rgb: 229, 56, 59;
    
    --lush-green: #1B4332;
    --lush-green-light: #2D6A4F;
    --lush-green-rgb: 27, 67, 50;
    
    --bg-cream: #FAF7F2;
    --bg-cream-rgb: 250, 247, 242;
    
    --text-dark: #1A1D20;
    --text-dark-rgb: 26, 29, 32;
    --text-muted: #525866;
    --text-muted-rgb: 82, 88, 102;
    
    --poppy-gold: #D4AF37;
    --poppy-gold-light: #F4A261;
    --poppy-gold-rgb: 212, 175, 55;
    
    --glass-bg: rgba(250, 247, 242, 0.88);
    --glass-border: rgba(229, 222, 210, 0.9);
    --card-bg: #FAF7F2;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* DaisyUI CSS Variable Overrides to eliminate harsh pure white */
    --b1: 40 29% 97%; /* #FAF7F2 */
    --b2: 38 35% 92%; /* #F3EDE2 */
    --b3: 38 38% 85%; /* #E8DEC8 */
    --bc: 210 10% 12%; /* #1A1D20 */
}

/* Modern Slate Dark Theme Variables */
[data-theme="dark"], [data-theme="slate"], html.dark, body.dark {
    --primary-red: #E5383B;
    --primary-red-dark: #D90429;
    --primary-red-rgb: 229, 56, 59;
    
    --lush-green: #2D6A4F;
    --lush-green-light: #40916C;
    --lush-green-rgb: 45, 106, 79;
    
    --bg-cream: #0F172A;
    --bg-cream-rgb: 15, 23, 42;
    
    --text-dark: #F8FAFC;
    --text-dark-rgb: 248, 250, 252;
    --text-muted: #94A3B8;
    --text-muted-rgb: 148, 163, 184;
    
    --poppy-gold: #F4A261;
    --poppy-gold-light: #FBBF24;
    --poppy-gold-rgb: 244, 162, 97;
    
    --glass-bg: rgba(30, 41, 59, 0.88);
    --glass-border: rgba(148, 163, 184, 0.18);
    --card-bg: #1E293B;

    /* DaisyUI Dark Overrides */
    --b1: 222 47% 11%; /* #0F172A */
    --b2: 217 33% 17%; /* #1E293B */
    --b3: 215 25% 27%; /* #334155 */
    --bc: 210 40% 98%; /* #F8FAFC */
}

/* Base resets & typography */
html {
    font-size: 15px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.nav-dropdown-trigger:focus-visible, .hamburger:focus-visible, [role="button"]:focus-visible {
    outline: 2px solid var(--primary-red) !important;
    outline-offset: 2px !important;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

/* Glassmorphism & Elevation */
.glass-panel {
    background: rgba(250, 247, 242, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(229, 222, 210, 0.9);
}

.glass-card {
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 222, 210, 0.88);
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(26, 29, 32, 0.04);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -4px rgba(26, 29, 32, 0.08);
    border-color: rgba(229, 56, 59, 0.25);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(250, 247, 242, 0.85);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--primary-red);
    background-color: rgba(229, 56, 59, 0.06);
}

.nav-links a.active {
    color: var(--primary-red);
    font-weight: 600;
    background-color: rgba(229, 56, 59, 0.08);
}

/* Dropdown styling */
.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    outline: none;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger:focus,
.nav-dropdown-trigger.active,
.dropdown:hover .nav-dropdown-trigger,
.dropdown:focus-within .nav-dropdown-trigger {
    color: var(--primary-red);
    background-color: rgba(229, 56, 59, 0.06);
}

.nav-dropdown-trigger .dropdown-arrow {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: currentColor;
    flex-shrink: 0;
}

.dropdown:hover .dropdown-arrow,
.dropdown:focus-within .dropdown-arrow,
.dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Desktop Dropdown Content */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-content {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(229, 222, 210, 0.95);
    border-radius: 12px;
    box-shadow: 0 14px 34px -4px rgba(26, 29, 32, 0.12), 0 4px 12px -2px rgba(26, 29, 32, 0.04);
    padding: 0.4rem;
    list-style: none;
    z-index: 60;
    margin: 0;
}

@media (min-width: 901px) {
    .nav-links .dropdown .dropdown-content {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(6px);
        transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links .dropdown:hover .dropdown-content,
    .nav-links .dropdown:focus-within .dropdown-content,
    .nav-links .dropdown.dropdown-open .dropdown-content {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.nav-links .dropdown-content li {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nav-links .dropdown-content a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.6rem 0.85rem;
    color: #343a40;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.nav-links .dropdown-content a:hover {
    color: var(--primary-red);
    background-color: rgba(229, 56, 59, 0.08);
    transform: translateX(3px);
}

.nav-links .dropdown-content a.active {
    color: var(--primary-red);
    font-weight: 600;
    background-color: rgba(229, 56, 59, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.protected-link, .admin-link {
    display: none;
}

.protected-link.is-visible, .admin-link.is-visible {
    display: list-item;
}

@media (min-width: 901px) {
    .protected-link.is-visible, .admin-link.is-visible {
        display: inline-flex;
        align-items: center;
    }
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.hamburger:hover {
    background-color: rgba(229, 56, 59, 0.08);
}

.hamburger span {
    width: 22px;
    height: 2px;
    background-color: var(--text-dark);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform-origin: center;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(250, 247, 242, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1.25rem;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 10px 25px rgba(0,0,0,0.05);
        max-height: calc(100vh - 75px);
        overflow-y: auto;
    }
    .navbar.menu-open .nav-links {
        display: flex;
    }

    /* Dropdown on mobile */
    .nav-links .dropdown {
        width: 100%;
        display: block;
        position: static;
    }
    
    .nav-links .nav-dropdown-trigger {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.7rem 0.85rem;
        font-size: 0.9375rem;
        font-weight: 600;
        color: #212529;
        border-radius: 10px;
    }
    
    .nav-links .dropdown-content {
        position: static;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.025);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 10px;
        margin: 0.25rem 0 0.5rem 0;
        padding: 0.35rem 0.5rem;
        width: 100%;
        min-width: unset;
        display: none;
        transform: none;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links .dropdown.mobile-open .dropdown-content,
    .nav-links .dropdown.dropdown-open .dropdown-content {
        display: block;
    }

    .nav-links .dropdown.mobile-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .nav-links .dropdown-content a {
        padding: 0.6rem 0.85rem;
        font-size: 0.875rem;
        font-weight: 500;
        width: 100%;
    }
    
    .nav-links > li > a {
        display: block;
        padding: 0.7rem 0.85rem;
        font-size: 0.9375rem;
        font-weight: 600;
        color: #212529;
        border-radius: 10px;
    }

    .nav-links li.protected-link,
    .nav-links li.admin-link {
        width: 100%;
    }
}

/* Marquee */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    background: var(--primary-red);
    color: #FAF7F2;
    padding: 0.6rem 0;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

[data-theme="dark"] .marquee-container,
html.dark .marquee-container {
    background: #1E293B;
    color: #94A3B8;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 35s linear infinite;
    gap: 2.5rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Subtle Hero */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 6rem 1.5rem 4rem 1.5rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: brightness(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 29, 32, 0.15) 0%, rgba(26, 29, 32, 0.28) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Dark mode hero adjustments — keep the image vivid */
[data-theme="dark"] .hero-bg,
html.dark .hero-bg {
    filter: brightness(0.95) contrast(1.08) !important;
}

[data-theme="dark"] .hero-overlay,
html.dark .hero-overlay {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.55) 100%);
}

.hero-content h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* Performant Scroll Reveal Animations (Native Compositor Thread) */
.glass-card, .resource-card, .stat-box, .section-header, .feature-card, .impact-card, .reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    will-change: opacity, transform;
}

.glass-card.is-revealed, .resource-card.is-revealed, .stat-box.is-revealed, .section-header.is-revealed, .feature-card.is-revealed, .impact-card.is-revealed, .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* Button & Control Classes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-red);
    color: #FAF7F2;
    box-shadow: 0 2px 8px rgba(229, 56, 59, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(229, 56, 59, 0.35);
}

.btn-outline {
    background-color: transparent;
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.04);
    border-color: var(--text-dark);
}

.btn-forest {
    background-color: var(--lush-green);
    color: #FAF7F2;
}

.btn-forest:hover {
    background-color: var(--lush-green-light);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.btn-large {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    border-radius: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2D3748;
    margin-bottom: 0.375rem;
}

.form-control, .clean-form input[type="text"], .clean-form input[type="email"], .clean-form select, .clean-form textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    background-color: #FAF7F2;
    border: 1px solid #D6D3CD;
    border-radius: 10px;
    color: #1A1D20;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.form-control:focus, .clean-form input:focus, .clean-form select:focus, .clean-form textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(229, 56, 59, 0.12);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
}

.badge-active, .badge-success {
    background-color: rgba(27, 67, 50, 0.1);
    color: var(--lush-green);
    border: 1px solid rgba(27, 67, 50, 0.2);
}

.badge-closed, .badge-danger {
    background-color: rgba(229, 56, 59, 0.1);
    color: var(--primary-red-dark);
    border: 1px solid rgba(229, 56, 59, 0.2);
}

.badge-gold {
    background-color: rgba(212, 175, 55, 0.12);
    color: #A67C00;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Lucide icon baseline alignment */
i[data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .glass-card, .resource-card, .stat-box, .section-header, .feature-card, .impact-card, .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .marquee-track {
        animation: none !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Theme Toggle Button & Icon Styling
   ========================================================================== */
.theme-toggle {
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    line-height: 1;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.08);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon-sun, .theme-icon-moon {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

/* ==========================================================================
   Modern Slate Dark Mode Component Overrides
   ========================================================================== */
[data-theme="dark"] body, [data-theme="slate"] body, html.dark body {
    background-color: #0F172A !important;
    color: #F8FAFC !important;
}

[data-theme="dark"] .glass-panel, [data-theme="slate"] .glass-panel, html.dark .glass-panel {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #F8FAFC;
}

[data-theme="dark"] .glass-card, [data-theme="slate"] .glass-card, html.dark .glass-card {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
    color: #F8FAFC;
}

[data-theme="dark"] .glass-card:hover, [data-theme="slate"] .glass-card:hover, html.dark .glass-card:hover {
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.5);
    border-color: rgba(229, 56, 59, 0.4);
}

[data-theme="dark"] .navbar, [data-theme="slate"] .navbar, html.dark .navbar {
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .navbar.navbar-scrolled, [data-theme="slate"] .navbar.navbar-scrolled, html.dark .navbar.navbar-scrolled {
    background: rgba(15, 23, 42, 0.96) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .nav-logo span, [data-theme="slate"] .nav-logo span, html.dark .nav-logo span {
    color: #F8FAFC !important;
}

[data-theme="dark"] .nav-links a, [data-theme="slate"] .nav-links a, html.dark .nav-links a,
[data-theme="dark"] .nav-dropdown-trigger, [data-theme="slate"] .nav-dropdown-trigger, html.dark .nav-dropdown-trigger {
    color: #CBD5E1;
}

[data-theme="dark"] .nav-links a:hover, [data-theme="slate"] .nav-links a:hover, html.dark .nav-links a:hover,
[data-theme="dark"] .nav-dropdown-trigger:hover, [data-theme="slate"] .nav-dropdown-trigger:hover, html.dark .nav-dropdown-trigger:hover,
[data-theme="dark"] .nav-dropdown-trigger:focus, [data-theme="slate"] .nav-dropdown-trigger:focus, html.dark .nav-dropdown-trigger:focus,
[data-theme="dark"] .dropdown:hover .nav-dropdown-trigger, [data-theme="slate"] .dropdown:hover .nav-dropdown-trigger, html.dark .dropdown:hover .nav-dropdown-trigger {
    color: #FF758F;
    background-color: rgba(229, 56, 59, 0.15);
}

[data-theme="dark"] .dropdown-content, [data-theme="slate"] .dropdown-content, html.dark .dropdown-content {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .dropdown-content a, [data-theme="slate"] .dropdown-content a, html.dark .dropdown-content a {
    color: #E2E8F0;
}

[data-theme="dark"] .dropdown-content a:hover, [data-theme="slate"] .dropdown-content a:hover, html.dark .dropdown-content a:hover {
    color: #FF758F;
    background-color: rgba(229, 56, 59, 0.18);
}

@media (max-width: 900px) {
    [data-theme="dark"] .nav-links, [data-theme="slate"] .nav-links, html.dark .nav-links {
        background: rgba(15, 23, 42, 0.98);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
    [data-theme="dark"] .hamburger span, [data-theme="slate"] .hamburger span, html.dark .hamburger span {
        background-color: #F8FAFC;
    }
    [data-theme="dark"] .nav-links .nav-dropdown-trigger, [data-theme="slate"] .nav-links .nav-dropdown-trigger, html.dark .nav-links .nav-dropdown-trigger,
    [data-theme="dark"] .nav-links > li > a, [data-theme="slate"] .nav-links > li > a, html.dark .nav-links > li > a {
        color: #F1F5F9;
    }
    [data-theme="dark"] .nav-links .dropdown-content, [data-theme="slate"] .nav-links .dropdown-content, html.dark .nav-links .dropdown-content {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

[data-theme="dark"] .form-control, [data-theme="slate"] .form-control, html.dark .form-control,
[data-theme="dark"] .clean-form input, [data-theme="slate"] .clean-form input, html.dark .clean-form input,
[data-theme="dark"] .clean-form select, [data-theme="slate"] .clean-form select, html.dark .clean-form select,
[data-theme="dark"] .clean-form textarea, [data-theme="slate"] .clean-form textarea, html.dark .clean-form textarea,
[data-theme="dark"] input[type="text"], [data-theme="slate"] input[type="text"], html.dark input[type="text"],
[data-theme="dark"] input[type="email"], [data-theme="slate"] input[type="email"], html.dark input[type="email"],
[data-theme="dark"] input[type="number"], [data-theme="slate"] input[type="number"], html.dark input[type="number"],
[data-theme="dark"] select, [data-theme="slate"] select, html.dark select,
[data-theme="dark"] textarea, [data-theme="slate"] textarea, html.dark textarea {
    background-color: #1E293B !important;
    border-color: #475569 !important;
    color: #F8FAFC !important;
}

[data-theme="dark"] .form-label, [data-theme="slate"] .form-label, html.dark .form-label {
    color: #CBD5E1;
}

[data-theme="dark"] .btn-outline, [data-theme="slate"] .btn-outline, html.dark .btn-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
}

[data-theme="dark"] .btn-outline:hover, [data-theme="slate"] .btn-outline:hover, html.dark .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #F8FAFC;
}

[data-theme="dark"] .resource-card, [data-theme="slate"] .resource-card, html.dark .resource-card,
[data-theme="dark"] .stat-box, [data-theme="slate"] .stat-box, html.dark .stat-box,
[data-theme="dark"] .feature-card, [data-theme="slate"] .feature-card, html.dark .feature-card,
[data-theme="dark"] .impact-card, [data-theme="slate"] .impact-card, html.dark .impact-card {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
    color: #F8FAFC;
}

/* Modern Slate Text & Neutral Color Overrides */
[data-theme="dark"] .text-stone-900, [data-theme="slate"] .text-stone-900, html.dark .text-stone-900,
[data-theme="dark"] .text-stone-800, [data-theme="slate"] .text-stone-800, html.dark .text-stone-800,
[data-theme="dark"] .text-gray-900, [data-theme="slate"] .text-gray-900, html.dark .text-gray-900,
[data-theme="dark"] .text-gray-800, [data-theme="slate"] .text-gray-800, html.dark .text-gray-800,
[data-theme="dark"] .text-slate-900, [data-theme="slate"] .text-slate-900, html.dark .text-slate-900,
[data-theme="dark"] .text-slate-800, [data-theme="slate"] .text-slate-800, html.dark .text-slate-800 {
    color: #F8FAFC !important;
}

[data-theme="dark"] .text-stone-700, [data-theme="slate"] .text-stone-700, html.dark .text-stone-700,
[data-theme="dark"] .text-gray-700, [data-theme="slate"] .text-gray-700, html.dark .text-gray-700,
[data-theme="dark"] .text-slate-700, [data-theme="slate"] .text-slate-700, html.dark .text-slate-700 {
    color: #E2E8F0 !important;
}

[data-theme="dark"] .text-stone-600, [data-theme="slate"] .text-stone-600, html.dark .text-stone-600,
[data-theme="dark"] .text-gray-600, [data-theme="slate"] .text-gray-600, html.dark .text-gray-600,
[data-theme="dark"] .text-slate-600, [data-theme="slate"] .text-slate-600, html.dark .text-slate-600 {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .text-stone-500, [data-theme="slate"] .text-stone-500, html.dark .text-stone-500,
[data-theme="dark"] .text-stone-400, [data-theme="slate"] .text-stone-400, html.dark .text-stone-400 {
    color: #94A3B8 !important;
}

/* Surface & Background Overrides */
[data-theme="dark"] .bg-\[\#FAF7F2\], [data-theme="slate"] .bg-\[\#FAF7F2\], html.dark .bg-\[\#FAF7F2\],
[data-theme="dark"] .bg-\[\#FAF7F2\]\/90, [data-theme="slate"] .bg-\[\#FAF7F2\]\/90, html.dark .bg-\[\#FAF7F2\]\/90,
[data-theme="dark"] .bg-\[\#FAF7F2\]\/95, [data-theme="slate"] .bg-\[\#FAF7F2\]\/95, html.dark .bg-\[\#FAF7F2\]\/95 {
    background-color: #1E293B !important;
}

[data-theme="dark"] .bg-white,
[data-theme="slate"] .bg-white,
html.dark .bg-white {
    background-color: #1E293B !important;
    color: #F8FAFC !important;
}

[data-theme="dark"] .bg-white\/80,
[data-theme="dark"] .bg-white\/90,
[data-theme="slate"] .bg-white\/80,
[data-theme="slate"] .bg-white\/90,
html.dark .bg-white\/80,
html.dark .bg-white\/90 {
    background-color: rgba(30, 41, 59, 0.85) !important;
}

/* Toggle switch thumb fix for dark mode */
[data-theme="dark"] .toggle-switch div::after,
[data-theme="slate"] .toggle-switch div::after,
html.dark .toggle-switch div::after {
    background-color: #F8FAFC !important;
}

[data-theme="dark"] .bg-stone-50, [data-theme="slate"] .bg-stone-50, html.dark .bg-stone-50,
[data-theme="dark"] .bg-stone-100, [data-theme="slate"] .bg-stone-100, html.dark .bg-stone-100,
[data-theme="dark"] .bg-stone-200, [data-theme="slate"] .bg-stone-200, html.dark .bg-stone-200 {
    background-color: #1E293B !important;
    color: #F8FAFC !important;
}

[data-theme="dark"] .bg-stone-50\/80, [data-theme="slate"] .bg-stone-50\/80, html.dark .bg-stone-50\/80,
[data-theme="dark"] .bg-stone-100\/60, [data-theme="slate"] .bg-stone-100\/60, html.dark .bg-stone-100\/60,
[data-theme="dark"] .bg-stone-100\/70, [data-theme="slate"] .bg-stone-100\/70, html.dark .bg-stone-100\/70 {
    background-color: rgba(30, 41, 59, 0.7) !important;
}

/* Borders & Dividers */
[data-theme="dark"] .border-stone-100, [data-theme="slate"] .border-stone-100, html.dark .border-stone-100,
[data-theme="dark"] .border-stone-200, [data-theme="slate"] .border-stone-200, html.dark .border-stone-200,
[data-theme="dark"] .border-stone-300, [data-theme="slate"] .border-stone-300, html.dark .border-stone-300,
[data-theme="dark"] .border-stone-200\/90, [data-theme="slate"] .border-stone-200\/90, html.dark .border-stone-200\/90 {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

[data-theme="dark"] .divide-stone-100 > :not([hidden]) ~ :not([hidden]),
[data-theme="slate"] .divide-stone-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-stone-100 > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] .divide-stone-200 > :not([hidden]) ~ :not([hidden]),
[data-theme="slate"] .divide-stone-200 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-stone-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(148, 163, 184, 0.15) !important;
}

/* Pill Buttons */
[data-theme="dark"] .pill-btn:not(.bg-poppy),
[data-theme="slate"] .pill-btn:not(.bg-poppy),
html.dark .pill-btn:not(.bg-poppy) {
    background-color: #1E293B !important;
    color: #CBD5E1 !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .pill-btn:not(.bg-poppy):hover,
[data-theme="slate"] .pill-btn:not(.bg-poppy):hover,
html.dark .pill-btn:not(.bg-poppy):hover {
    color: #F8FAFC !important;
    border-color: var(--primary-red) !important;
}

[data-theme="dark"] .badge-active, [data-theme="dark"] .badge-success,
[data-theme="slate"] .badge-active, [data-theme="slate"] .badge-success,
html.dark .badge-active, html.dark .badge-success {
    background-color: rgba(45, 106, 79, 0.25);
    color: #52B788;
    border-color: rgba(45, 106, 79, 0.4);
}

[data-theme="dark"] .badge-closed, [data-theme="dark"] .badge-danger,
[data-theme="slate"] .badge-closed, [data-theme="slate"] .badge-danger,
html.dark .badge-closed, html.dark .badge-danger {
    background-color: rgba(229, 56, 59, 0.2);
    color: #FF758F;
    border-color: rgba(229, 56, 59, 0.35);
}

[data-theme="dark"] .badge-gold, [data-theme="slate"] .badge-gold, html.dark .badge-gold {
    background-color: rgba(244, 162, 97, 0.2);
    color: #FBBF24;
    border-color: rgba(244, 162, 97, 0.35);
}

/* ==========================================================================
   Global Imagery Dimming Filter in Dark Mode
   Softens bright photographs/hero backgrounds in Modern Slate dark mode
   while explicitly preserving 100% vibrancy for brand logos & icons.
   ========================================================================== */
[data-theme="dark"] .photo-dim,
[data-theme="dark"] .hero-bg,
[data-theme="slate"] .photo-dim,
[data-theme="slate"] .hero-bg,
html.dark .photo-dim,
html.dark .hero-bg {
    filter: brightness(0.88) contrast(1.04);
    transition: filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dim photos & cards softly, but not logos */
[data-theme="dark"] .story-card img,
[data-theme="dark"] .giveaway-card img,
[data-theme="slate"] .story-card img,
[data-theme="slate"] .giveaway-card img,
html.dark .story-card img,
html.dark .giveaway-card img {
    filter: brightness(0.88) contrast(1.04);
    transition: filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .story-card img:hover,
[data-theme="dark"] .giveaway-card img:hover,
[data-theme="slate"] .story-card img:hover,
[data-theme="slate"] .giveaway-card img:hover,
html.dark .story-card img:hover,
html.dark .giveaway-card img:hover {
    filter: brightness(1) contrast(1);
}

/* Logos, Brand Emblems & Icons retain 100% full saturation & brightness */
[data-theme="dark"] .logo-img,
[data-theme="dark"] img.logo-img,
[data-theme="dark"] img[src*="Lucky.PNG"],
[data-theme="dark"] img[src*="logo"],
[data-theme="dark"] .brand-logo,
[data-theme="slate"] .logo-img,
[data-theme="slate"] img.logo-img,
[data-theme="slate"] img[src*="Lucky.PNG"],
[data-theme="slate"] img[src*="logo"],
[data-theme="slate"] .brand-logo,
html.dark .logo-img,
html.dark img.logo-img,
html.dark img[src*="Lucky.PNG"],
html.dark img[src*="logo"],
html.dark .brand-logo {
    filter: brightness(1) contrast(1) !important;
}

/* ==========================================================================
   Dark Mode: Section & Card Background Overrides
   Forces all hardcoded light backgrounds to adapt to Modern Slate
   ========================================================================== */

/* Sections with bg-[#FAF7F2] or bg-[#FAF7F2]/80 */
[data-theme="dark"] [class*="bg-[#FAF7F2]"],
html.dark [class*="bg-[#FAF7F2]"] {
    background-color: #1E293B !important;
}

/* Amber info boxes (Compassion Clause, Fair Use) */
[data-theme="dark"] [class*="bg-amber-50"],
html.dark [class*="bg-amber-50"] {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

[data-theme="dark"] .text-amber-900,
html.dark .text-amber-900 {
    color: #CBD5E1 !important;
}

/* Stone-colored text that's invisible on dark backgrounds */
[data-theme="dark"] .text-stone-900,
html.dark .text-stone-900 {
    color: #F1F5F9 !important;
}

[data-theme="dark"] .text-stone-800,
html.dark .text-stone-800 {
    color: #E2E8F0 !important;
}

[data-theme="dark"] .text-stone-700,
html.dark .text-stone-700 {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .text-stone-600,
html.dark .text-stone-600 {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .text-stone-500,
html.dark .text-stone-500 {
    color: #94A3B8 !important;
}

/* Lush Field Green text color adaptation for dark mode (brightened for high contrast readability) */
[data-theme="dark"] .text-field,
[data-theme="dark"] [class*="text-field"],
html.dark .text-field,
html.dark [class*="text-field"] {
    color: #4ADE80 !important; /* crisp vibrant emerald/green on slate */
}

[data-theme="dark"] .text-emerald-600,
[data-theme="dark"] .text-emerald-700,
[data-theme="slate"] .text-emerald-600,
[data-theme="slate"] .text-emerald-700,
html.dark .text-emerald-600,
html.dark .text-emerald-700 {
    color: #4ADE80 !important;
}

/* Stone background elements (icon boxes, badges) */
[data-theme="dark"] [class*="bg-stone-100"],
html.dark [class*="bg-stone-100"] {
    background-color: #334155 !important;
}

[data-theme="dark"] [class*="bg-stone-200"],
html.dark [class*="bg-stone-200"] {
    background-color: #334155 !important;
}

/* Colored state/category badges */
[data-theme="dark"] [class*="bg-blue-50"],
[data-theme="dark"] [class*="bg-cyan-50"],
[data-theme="dark"] [class*="bg-emerald-50"],
[data-theme="dark"] [class*="bg-purple-50"],
[data-theme="dark"] [class*="bg-rose-50"],
html.dark [class*="bg-blue-50"],
html.dark [class*="bg-cyan-50"],
html.dark [class*="bg-emerald-50"],
html.dark [class*="bg-purple-50"],
html.dark [class*="bg-rose-50"] {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

/* Border overrides for dark mode */
[data-theme="dark"] [class*="border-stone-200"],
[data-theme="dark"] [class*="border-stone-100"],
[data-theme="dark"] [class*="border-amber-200"],
html.dark [class*="border-stone-200"],
html.dark [class*="border-stone-100"],
html.dark [class*="border-amber-200"] {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

/* Pricing Section & Dynamic Cards in Dark Mode */
[data-theme="dark"] #pricing,
[data-theme="slate"] #pricing,
html.dark #pricing {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
}

[data-theme="dark"] #membership-pricing-grid .glass-card,
[data-theme="slate"] #membership-pricing-grid .glass-card,
html.dark #membership-pricing-grid .glass-card {
    background-color: rgba(30, 41, 59, 0.94) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] #membership-pricing-grid .glass-card[class*="border-poppy"],
[data-theme="slate"] #membership-pricing-grid .glass-card[class*="border-poppy"],
html.dark #membership-pricing-grid .glass-card[class*="border-poppy"] {
    border-color: rgba(229, 56, 59, 0.5) !important;
}

[data-theme="dark"] #membership-pricing-grid .glass-card:hover,
[data-theme="slate"] #membership-pricing-grid .glass-card:hover,
html.dark #membership-pricing-grid .glass-card:hover {
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.55) !important;
}

/* Footer in dark mode */
[data-theme="dark"] footer,
html.dark footer {
    background-color: #0F172A !important;
}



