/* NUCLEAR BLUE TEXT FIX - Maximum CSS Specificity Override */

/* Target ALL links on dark backgrounds with extreme specificity */
html body * a,
html body * a:link,
html body * a:visited,
html body div a,
html body section a,
html body main a,
html body p a,
html body span a,
html body .service-block a,
html body .authority-resources a,
html body .recent-posts a {
  color: #ffffff !important;
  background: rgba(220, 53, 69, 0.8) !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border: 2px solid transparent !important;
  display: inline-block !important;
  margin: 4px 2px !important;
  transition: all 0.3s ease !important;
  text-shadow: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* Hover states with maximum visibility */
html body * a:hover,
html body * a:focus,
html body div a:hover,
html body section a:hover,
html body main a:hover,
html body p a:hover,
html body span a:hover,
html body .service-block a:hover,
html body .authority-resources a:hover,
html body .recent-posts a:hover {
  color: #ffffff !important;
  background: #ff6b35 !important;
  border-color: #ff6b35 !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 12px rgba(255, 107, 53, 0.4) !important;
}

/* Specific targeting for service links that appear blue */
a[href*="virginia-water"],
a[href*="virginia-fire"],
a[href*="virginia-mold"],
a[href*="virginia-storm"],
a[href*="maryland-water"],
a[href*="maryland-fire"],
a[href*="maryland-mold"],
a[href*="dc-water"],
a[href*="dc-fire"],
a[href*="dc-mold"],
a[href*="water-damage"],
a[href*="fire-damage"],
a[href*="mold-remediation"],
a[href*="storm-damage"],
a[href*="restoration"] {
  color: #ffffff !important;
  background: #dc3545 !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  border: 3px solid #dc3545 !important;
  display: inline-block !important;
  margin: 8px 4px !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  min-width: 120px !important;
  text-align: center !important;
}

/* Emergency hover with enhanced visibility */
a[href*="virginia-water"]:hover,
a[href*="virginia-fire"]:hover,
a[href*="virginia-mold"]:hover,
a[href*="virginia-storm"]:hover,
a[href*="maryland-water"]:hover,
a[href*="maryland-fire"]:hover,
a[href*="maryland-mold"]:hover,
a[href*="dc-water"]:hover,
a[href*="dc-fire"]:hover,
a[href*="dc-mold"]:hover,
a[href*="water-damage"]:hover,
a[href*="fire-damage"]:hover,
a[href*="mold-remediation"]:hover,
a[href*="storm-damage"]:hover,
a[href*="restoration"]:hover {
  color: #ffffff !important;
  background: #ff4500 !important; /* Bright red-orange */
  border-color: #ff4500 !important;
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 8px 16px rgba(255, 69, 0, 0.6) !important;
}

/* Override any existing blue/cyan colors */
* {
  color: inherit;
}

*[style*="color: blue"],
*[style*="color: #0000ff"],
*[style*="color: #00d4ff"],
*[style*="color: cyan"] {
  color: #ffffff !important;
}

/* COMPREHENSIVE TEXT CONTRAST OVERRIDES */
/* Force dark text on all white/light backgrounds */
div[style*="background: white"],
div[style*="background: white"] *,
div[style*="background: #ffffff"],
div[style*="background: #ffffff"] *,
div[style*="background: #f8fafc"],
div[style*="background: #f8fafc"] *,
section[style*="background: rgba(255,255,255"],
section[style*="background: rgba(255,255,255"] *,
.expert-insight,
.expert-insight *,
.homeowner-stories,
.homeowner-stories * {
  color: #1f2937 !important; /* Force dark text on light backgrounds */
}

/* ONLY apply dark text to list items that are INSIDE light background containers */
div[style*="background: white"] ul li,
div[style*="background: white"] ul li *,
div[style*="background: #ffffff"] ul li,
div[style*="background: #ffffff"] ul li *,
div[style*="background: #f8fafc"] ul li,
div[style*="background: #f8fafc"] ul li *,
section[style*="background: rgba(255,255,255"] ul li,
section[style*="background: rgba(255,255,255"] ul li *,
.expert-insight ul li,
.expert-insight ul li *,
.homeowner-stories ul li,
.homeowner-stories ul li *,
div[style*="background: white"] ol li,
div[style*="background: white"] ol li *,
div[style*="background: #ffffff"] ol li,
div[style*="background: #ffffff"] ol li * {
  color: #1f2937 !important; /* Force dark text ONLY on light backgrounds */
}

/* Target specific text content that might be blue */
body *:contains("water damage restoration"),
body *:contains("fire damage restoration"),
body *:contains("mold removal"),
body *:contains("storm damage") {
  color: #ffffff !important;
}

/* Additional safeguards for common blue text scenarios */
.text-blue,
.blue,
.text-primary,
.link-blue,
[class*="blue"],
[class*="primary"] {
  color: #ffffff !important;
}

/* Make sure region selector buttons stay visible */
.region-btn {
  color: #000000 !important;
  background: #00d4ff !important;
  border-color: #00d4ff !important;
}

.region-btn:hover {
  color: #000000 !important;
  background: #00b8cc !important;
}

/* Phone number visibility */
.phone-number,
a[href^="tel:"] {
  color: #ffeb3b !important;
  background: rgba(0,0,0,0.3) !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Emergency banner phone number */
.emergency-cta .phone-number,
.emergency-banner a[href^="tel:"] {
  color: #ffffff !important;
  background: rgba(0,0,0,0.4) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}
/* Emergency Services Section Styling */
.emergency-services-section {
  margin: 30px 0;
  text-align: center;
}

.emergency-services-section h2 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 32px;
}

.emergency-services-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}

.emergency-service-btn {
  color: #ffffff !important;
  background: #dc3545 !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  border: 2px solid #dc3545 !important;
  display: inline-block !important;
  margin: 5px !important;
  text-shadow: none !important;
  font-size: 16px !important;
  min-width: 140px !important;
  text-align: center !important;
  transition: all 0.3s ease !important;
}

.emergency-service-btn:hover {
  color: #ffffff !important;
  background: #ff4500 !important;
  border-color: #ff4500 !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 12px rgba(255, 69, 0, 0.4) !important;
}

/* Mobile responsive for emergency services */
@media (max-width: 768px) {
  .emergency-services-links {
    flex-direction: column;
    align-items: center;
  }
  
  .emergency-service-btn {
    width: 90%;
    max-width: 300px;
  }
}

/* Hidden class for regional switching */
.emergency-services-links.hidden {
  display: none !important;
}

/* FIX YELLOW TEXT VISIBILITY ISSUES */
.small-text,
.disclaimer-text,
.update-text,
*[style*="color: yellow"],
*[style*="color: #ffeb3b"],
.text-yellow {
  color: #ffffff !important;
  background: rgba(255, 193, 7, 0.2) !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 16px !important; /* Increase from small text */
  font-weight: 600 !important;
  border: 1px solid rgba(255, 193, 7, 0.5) !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Specifically target any yellow informational text */
p[style*="color: yellow"],
span[style*="color: yellow"],
div[style*="color: yellow"] {
  color: #ffffff !important;
  background: #ffc107 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  margin: 4px 0 !important;
  border: 2px solid #ffc107 !important;
}

/* Emergency text should be highly visible */
.emergency-text,
.important-notice {
  color: #ffffff !important;
  background: #dc3545 !important;
  padding: 10px 15px !important;
  border-radius: 8px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  text-align: center !important;
  border: 3px solid #dc3545 !important;
  margin: 15px 0 !important;
}

/* COMPACT BANNER OPTIMIZATION */

/* Reduce top emergency call banner height */
.emergency-call-banner,
.top-emergency-banner {
  padding: 8px 20px !important; /* Reduced from larger padding */
  margin: 0 !important;
  font-size: 18px !important; /* Reduced from larger text */
  line-height: 1.3 !important;
}

/* Compact region selector */
.region-selector {
  padding: 15px !important; /* Reduced from 20px */
  margin-bottom: 20px !important; /* Reduced from 30px */
}

.region-selector h3 {
  margin-bottom: 10px !important; /* Reduced from 15px */
  font-size: 24px !important; /* Slightly smaller */
}

.region-buttons {
  gap: 10px !important; /* Reduced from 15px */
}

.region-btn {
  padding: 10px 20px !important; /* Reduced from 12px 24px */
  font-size: 14px !important; /* Slightly smaller */
}

/* Compact service sections */
.service-highlights,
.emergency-services-section {
  margin: 20px 0 !important; /* Reduced from 30px */
  padding: 15px !important; /* Reduced padding */
}

.emergency-services-section h2 {
  font-size: 28px !important; /* Reduced from 32px */
  margin-bottom: 15px !important; /* Reduced from 20px */
}

/* More compact emergency services links */
.emergency-services-links {
  gap: 10px !important; /* Reduced from 15px */
  margin: 15px 0 !important; /* Reduced from 20px */
}

.emergency-service-btn {
  padding: 10px 20px !important; /* Reduced from 12px 24px */
  font-size: 15px !important; /* Slightly smaller */
  min-width: 130px !important; /* Reduced from 140px */
}

/* Compact main service blocks */
.service-block {
  margin: 15px 0 !important; /* Reduced spacing */
  padding: 20px !important; /* Reduced padding */
}

.service-block h2 {
  font-size: 28px !important; /* Reduced title size */
  margin-bottom: 10px !important;
}

/* Compact bottom emergency banner */
.bottom-emergency-banner {
  padding: 15px 20px !important; /* Reduced from larger padding */
  font-size: 16px !important; /* Slightly smaller */
}

.bottom-emergency-banner .phone-number {
  font-size: 22px !important; /* Reduced from larger size */
  padding: 8px 16px !important;
}

/* Overall page spacing optimization */
body {
  line-height: 1.4 !important; /* Tighter line spacing */
}

section {
  margin: 15px 0 !important; /* Reduced section margins */
}

h1, h2, h3 {
  margin-top: 15px !important;
  margin-bottom: 10px !important;
}

/* Mobile spacing optimization */
@media (max-width: 768px) {
  .region-selector {
    padding: 10px !important;
    margin-bottom: 15px !important;
  }
  
  .emergency-services-section,
  .service-highlights {
    margin: 15px 0 !important;
    padding: 10px !important;
  }
  
  .service-block {
    margin: 10px 0 !important;
    padding: 15px !important;
  }
}

/* KNOWLEDGE HUB CONTRAST FIXES */
.community-knowledge-hub,
.community-knowledge-hub *,
.expert-insight,
.expert-insight *,
.homeowner-stories,
.homeowner-stories *,
.knowledge-content,
.knowledge-content *,
.expert-insight ul,
.expert-insight ul *,
.expert-insight li,
.expert-insight li * {
  color: #1f2937 !important; /* Dark text for light backgrounds */
}

.community-knowledge-hub h2,
.community-knowledge-hub h3,
.expert-insight h3,
.homeowner-stories h3 {
  color: #dc2626 !important; /* Red for headings */
}

.community-knowledge-hub strong,
.expert-insight strong,
.homeowner-stories strong,
.expert-insight li strong {
  color: #1f2937 !important; /* Dark text for strong elements */
}

/* Specific fix for list items in expert insights */
.expert-insight ul li,
.expert-insight ul li strong,
ul[style*="color: #1f2937"] li,
ul[style*="color: #1f2937"] li strong {
  color: #1f2937 !important; /* Ensure all list content is dark */
}

.story-highlight {
  color: #1f2937 !important; /* Dark text for testimonials */
}

.authority-message strong,
div[style*="background: #fef3c7"],
div[style*="background: #fef3c7"] *,
div[style*="background: #fef3c7"] strong {
  color: #1f2937 !important; /* Dark text in yellow boxes */
}

/* BLOG INDEX PAGE FIXES */
.blog-post,
.blog-post *,
.blog-content,
.blog-content *,
.authority-framework,
.authority-framework *,
html body div[style*="background: #fef3c7"],
html body div[style*="background: #fef3c7"] *,
html body section div[style*="background: #fef3c7"],
html body section div[style*="background: #fef3c7"] * {
  color: #1f2937 !important; /* Dark text for blog content and yellow boxes */
}

/* EMERGENCY CHAT WIDGET CONTRAST FIXES */
#emergency-ai-button,
.emergency-chat-overlay,
.emergency-chat-overlay * {
  color: inherit !important; /* Don't override chat widget colors */
}

div[style*="background: #ffffff"] {
  color: #1f2937 !important; /* Dark text on white backgrounds */
}

div[style*="background: white"] {
  color: #1f2937 !important; /* Dark text on white backgrounds */
}

/* HIGHLY VISIBLE NOTIFICATION STYLING */
.regional-notification,
.update-notice,
div[style*="background: lightyellow"],
p[style*="background: lightyellow"],
.notification-banner {
  color: #000000 !important; /* Black text for maximum contrast */
  background: #ffc107 !important; /* Bright yellow background */
  padding: 12px 20px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important; /* Bold text */
  border: 3px solid #ff9800 !important; /* Orange border for definition */
  margin: 10px 0 !important;
  text-shadow: none !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

/* Additional notification text patterns */
*[style*="color: lightyellow"],
*[style*="background-color: lightyellow"],
.light-yellow-bg,
.yellow-notice {
  color: #000000 !important;
  background: #ffc107 !important;
  padding: 10px 15px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  border: 2px solid #ff9800 !important;
}
