/* ========================================
   PERFECT SITE-WIDE COLORS
   Jan 22, 2025 - Universal color enforcement
   Ensures: Dark backgrounds = White text
            Light backgrounds = Black text
   ======================================== */

/* ========================================
   HERO SECTION - DARK BACKGROUND ALWAYS
   ======================================== */
.hero,
.city-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    color: #ffffff !important;
}

/* Hero background container */
.hero-background {
    background: transparent !important;
}

/* All hero content - WHITE TEXT */
.hero *,
.city-hero *,
.hero-content *,
.city-hero-content *,
.hero-title,
.hero-subtitle,
.hero-badge,
.hero-badge * {
    color: #ffffff !important;
}

/* Hero stats - FORCE WHITE TEXT (user request) */
.hero-stats,
.hero-stats *,
.city-stats,
.city-stats *,
.stat-item,
.stat-item *,
.city-stat,
.city-stat *,
.stat-number,
.stat-label {
    color: #ffffff !important;
}

/* Override gradient text in stats for visibility */
.hero-stats .stat-number,
.city-stats .stat-number {
    -webkit-text-fill-color: #ffffff !important;
    text-fill-color: #ffffff !important;
    background: none !important;
}

/* Hero links and spans */
.hero a,
.city-hero a,
.hero-subtitle a,
.city-hero-subtitle a {
    color: #60a5fa !important; /* Light blue for visibility on dark bg */
    text-decoration: underline !important;
}

/* Hero CTA buttons - preserve their styling */
.hero .btn-primary,
.hero .btn-secondary,
.city-hero .btn-primary,
.city-hero .btn-secondary {
    color: #ffffff !important;
}

.hero .btn-secondary,
.city-hero .btn-secondary {
    color: #0ea5e9 !important;
}

/* ========================================
   WHITE/LIGHT SECTIONS - BLACK TEXT
   ======================================== */

/* Demo Features Section - BLACK TEXT (user request) */
.demo-section,
.demo-features,
.demo-features *,
.feature-highlight,
.feature-highlight *,
.feature-highlight strong,
.feature-highlight p {
    color: #000000 !important;
}

/* Bottom Line Section - BLACK TEXT (user request) */
.comparison-cta,
.comparison-cta *,
.comparison-summary,
.comparison-summary *,
.comparison-summary strong,
.comparison-summary p {
    color: #1e293b !important;
}

/* Privacy Promise - BLACK TEXT (user request) */
.privacy-guarantee,
.privacy-guarantee *,
.privacy-guarantee h2,
.privacy-guarantee h3,
.privacy-guarantee p {
    color: #1e293b !important;
}

/* Founder Bios - BLACK TEXT (user request) */
.founders-quick,
.founders-quick *,
.founder-quick,
.founder-quick *,
.founder-bio,
.founder-bio *,
.founder-credential,
.founder-quote {
    color: #1e293b !important;
}

/* All white/light background sections */
section[style*="background: white"] *,
section[style*="background: #fff"] *,
section[style*="background: #ffffff"] *,
section[style*="background: #f8fafc"] *,
section[style*="background: #f9fafb"] *,
section[style*="background: #e0e7ff"] *,
section[style*="background: #e0f2fe"] *,
section[style*="background: #f0f9ff"] *,
section[style*="background: linear-gradient(135deg, #f9fafb"] *,
section[style*="background: linear-gradient(135deg, #e0e7ff"] *,
section[style*="background: linear-gradient(135deg, #f0f9ff"] *,
div[style*="background: white"] *,
div[style*="background: #fff"] *,
div[style*="background: #ffffff"] *,
div[style*="background: rgba(255,255,255"] * {
    color: #1e293b !important;
}

/* White background boxes */
.trust-badge,
.trust-badge * {
    color: #1e293b !important;
}

/* ========================================
   DARK SECTIONS - WHITE TEXT
   ======================================== */

/* Navigation */
.navbar,
.navbar *,
.nav-links,
.nav-links a,
.logo-text {
    color: #ffffff !important;
}

/* Footer */
.footer,
.footer *,
footer,
footer * {
    background: #1e293b !important;
    color: #ffffff !important;
}

.footer a,
footer a {
    color: rgba(255,255,255,0.8) !important;
}

.footer a:hover,
footer a:hover {
    color: #ffffff !important;
}

/* Dark gradient sections (green, purple, etc.) - WHITE TEXT */
section[style*="background: linear-gradient(135deg, #10b981"] *,
section[style*="background: linear-gradient(135deg, #059669"] *,
section[style*="background: linear-gradient(135deg, #667eea"] *,
section[style*="background: linear-gradient(135deg, #764ba2"] *,
div[style*="background: linear-gradient(135deg, #10b981"] *,
div[style*="background: linear-gradient(135deg, #059669"] *,
div[style*="background: linear-gradient(135deg, #667eea"] *,
div[style*="background: linear-gradient(135deg, #764ba2"] * {
    color: #ffffff !important;
}

/* Crisis Banner */
.crisis-banner,
.crisis-banner * {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.crisis-banner a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* ========================================
   SPECIFIC OVERRIDES FOR INLINE STYLES
   ======================================== */

/* Trust badges with white background */
div[style*="background: rgba(255,255,255,0.9)"] * {
    color: #1e293b !important;
}

/* Green success boxes - white text */
div[style*="background: linear-gradient(135deg, #10b981"] *,
div[style*="background: linear-gradient(135deg, #059669"] * {
    color: #ffffff !important;
}

/* Purple/mission boxes - white text */
div[style*="background: linear-gradient(135deg, #667eea"] *,
div[style*="background: linear-gradient(135deg, #764ba2"] * {
    color: #ffffff !important;
}

/* Yellow warning/info boxes - dark text */
div[style*="background: #fef3c7"] *,
div[style*="background: #fde68a"] * {
    color: #92400e !important;
}

/* ========================================
   FAQ SECTIONS
   ======================================== */
.faq-section,
.faq-item,
.faq-question,
.faq-answer {
    color: #1e293b !important;
}

/* ========================================
   FORMS AND INPUTS
   ======================================== */
input,
textarea,
select,
.form-control {
    background: #ffffff !important;
    color: #1e293b !important;
}

input::placeholder,
textarea::placeholder {
    color: #64748b !important;
}

/* ========================================
   CONDITION PAGES
   ======================================== */
.condition-hero,
.condition-content,
.symptom-card,
.treatment-card {
    color: #1e293b !important;
}

/* ========================================
   CITY PAGES
   ======================================== */
.city-problem-card,
.city-solution-card,
.city-info {
    color: #1e293b !important;
}

.city-link {
    background: #1e293b !important;
    color: #ffffff !important;
}

.city-link:hover {
    background: #0f172a !important;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
/* Ensure sufficient contrast ratios */
a {
    text-decoration-thickness: 1px !important;
}

/* Focus states */
*:focus {
    outline: 2px solid #60a5fa !important;
    outline-offset: 2px !important;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    body,
    * {
        color: #000000 !important;
        background: #ffffff !important;
    }
}

/* ========================================
   RESPONSIVE OVERRIDES
   ======================================== */
@media (max-width: 768px) {
    /* Ensure mobile menu is readable */
    .nav-links {
        background: #ffffff !important;
    }
    
    .nav-links a {
        color: #1e293b !important;
    }
    
    /* Mobile hero adjustments */
    .hero,
    .city-hero {
        padding-top: calc(70px + 2rem) !important;
    }
}

/* ========================================
   FINAL CATCH-ALL RULES
   ======================================== */
/* If a section has a dark background class or attribute */
[class*="dark"],
[class*="hero"],
[style*="background: #0f172a"],
[style*="background: #1e293b"],
[style*="background: #0c1220"] {
    color: #ffffff !important;
}

/* If a section has a light background class or attribute */
[class*="light"],
[class*="white"],
[style*="background: #f"] {
    color: #1e293b !important;
}
