/* Custom CSS for static website - UPDATED VERSION */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #374151;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header scroll effect */
.header-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Navigation hover effects */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #2563eb, #059669);
  transition: width 0.3s ease;
}

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

/* FIXED HAMBURGER MENU STYLES */
.hamburger-line {
  transition: all 0.3s ease;
  transform-origin: center;
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  position: absolute;
}

/* Hamburger animation states - CORRECTED */
.hamburger-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
  top: 10px !important;
}

.hamburger-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px !important;
}

/* Default hamburger positions */
.hamburger-line:nth-child(1) {
  top: 0;
}

.hamburger-line:nth-child(2) {
  top: 10px;
}

.hamburger-line:nth-child(3) {
  top: 20px;
}

/* Mobile menu animations - IMPROVED */
.mobile-menu-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Mobile menu background fix */
#mobile-menu {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 231, 235, 0.8);
  z-index: 45;
}

/* Mobile navigation link styling */
.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.mobile-nav-link:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  transform: translateX(8px);
}

/* Ensure proper z-index hierarchy */
#mobile-menu-btn {
  z-index: 51;
}

/* Button hover effects - FIXED FOR BETTER READABILITY */
.btn-primary {
  background: linear-gradient(to right, #2563eb, #059669);
  color: #ffffff !important;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(to right, #1d4ed8, #047857);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-primary:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  color: #ffffff !important;
}

.btn-secondary {
  background: transparent;
  color: #2563eb !important;
  border: 2px solid #2563eb;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #2563eb;
  color: #ffffff !important;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-secondary:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Scroll animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Scroll to top button */
.scroll-to-top-visible {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Form validation styles */
.form-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
}

.error-message::before {
  content: "⚠";
  margin-right: 0.25rem;
}

.success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: start;
}

.error-alert {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: start;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #2563eb, #059669);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #1d4ed8, #047857);
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .fixed,
  .sticky,
  header,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
  }

  .container {
    max-width: none;
    padding: 0;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn-primary,
  .btn-secondary {
    border: 2px solid currentColor;
  }

  .nav-link::after {
    background: currentColor;
  }
}

/* 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;
  }

  .fade-in-up {
    opacity: 1;
    transform: none;
  }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
}

/* Responsive Design Improvements */
@media (max-width: 640px) {
  .container {
    padding: 0 0.75rem;
  }

  .mobile-nav-link {
    font-size: 1.1rem;
    padding: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .text-4xl {
    font-size: 2rem;
  }

  .text-6xl {
    font-size: 2.5rem;
  }

  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Performance Optimizations */
.card-hover,
.btn-primary,
.btn-secondary,
.nav-link {
  will-change: transform;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  background: #111827;
  color: #f9fafb;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  padding: 1rem;
}

.cookie-banner a { color: #93c5fd; text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-btn {
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.cookie-btn-primary { background: linear-gradient(to right, #2563eb, #059669); color: #fff; }
.cookie-btn-secondary { background: #1f2937; color: #e5e7eb; border: 1px solid #374151; }
.cookie-hidden { display: none; }

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Enhanced Button Styles for Better Readability - EXCLUDE FAQ AND NAV */
button:not(.faq-question):not(.mobile-nav-link), 
.btn:not(.faq-question):not(.mobile-nav-link), 
a[class*="btn"]:not(.mobile-nav-link):not(.faq-question) {
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Ensure FAQ questions maintain their flex layout */
.faq-question {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  text-align: left !important;
  padding: 1.5rem !important;
  font-weight: 600 !important;
  border: none !important;
  background: transparent !important;
}

/* Green buttons (phone/call buttons) */
.bg-green-600, .bg-green-600:hover {
  color: #ffffff !important;
}

.bg-green-600:hover {
  background-color: #047857 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.4);
}

/* Blue buttons */
.bg-blue-600, .bg-blue-600:hover {
  color: #ffffff !important;
}

.bg-blue-600:hover {
  background-color: #1d4ed8 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

/* Border buttons with blue border */
.border-blue-600 {
  color: #2563eb !important;
  background-color: transparent;
}

.border-blue-600:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

/* Border buttons with green border */
.border-green-600 {
  color: #059669 !important;
  background-color: transparent;
}

.border-green-600:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.4);
}

/* Gradient buttons */
.bg-gradient-to-r {
  color: #ffffff !important;
}

.bg-gradient-to-r:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

/* Specific gradient button combinations */
.from-blue-600.to-green-600 {
  background: linear-gradient(to right, #2563eb, #059669);
  color: #ffffff !important;
}

.from-blue-600.to-green-600:hover,
.hover\\:from-blue-700.hover\\:to-green-700:hover {
  background: linear-gradient(to right, #1d4ed8, #047857) !important;
  color: #ffffff !important;
}

/* Ensure text is always readable on all buttons */
button, .btn, a[class*="btn"], 
button:hover, .btn:hover, a[class*="btn"]:hover,
button:focus, .btn:focus, a[class*="btn"]:focus,
button:active, .btn:active, a[class*="btn"]:active {
  text-decoration: none;
}

/* Force white text on all gradient and colored buttons - EXCLUDE gradient text */
button.bg-gradient-to-r, a.bg-gradient-to-r:not(.text-transparent), 
button.bg-gradient-to-r:hover, a.bg-gradient-to-r:hover:not(.text-transparent), 
button.bg-gradient-to-r:focus, a.bg-gradient-to-r:focus:not(.text-transparent), 
button.bg-gradient-to-r:active, a.bg-gradient-to-r:active:not(.text-transparent),
button.bg-blue-600, a.bg-blue-600, 
button.bg-blue-600:hover, a.bg-blue-600:hover, 
button.bg-blue-600:focus, a.bg-blue-600:focus, 
button.bg-blue-600:active, a.bg-blue-600:active,
button.bg-green-600, a.bg-green-600, 
button.bg-green-600:hover, a.bg-green-600:hover, 
button.bg-green-600:focus, a.bg-green-600:focus, 
button.bg-green-600:active, a.bg-green-600:active,
.text-white, .text-white:hover, .text-white:focus, .text-white:active {
  color: #ffffff !important;
}

/* Force proper text color on border buttons */
.border-blue-600:not(:hover):not(:focus):not(:active) {
  color: #2563eb !important;
}

.border-green-600:not(:hover):not(:focus):not(:active) {
  color: #059669 !important;
}

/* Override any conflicting Tailwind hover states - ONLY FOR BUTTONS */
button.hover\\:text-white:hover,
a.hover\\:text-white:hover,
button.hover\\:bg-blue-600:hover,
a.hover\\:bg-blue-600:hover,
button.hover\\:bg-green-600:hover,
a.hover\\:bg-green-600:hover {
  color: #ffffff !important;
}

/* Exclude FAQ questions and mobile nav from button styles */
.faq-question,
.mobile-nav-link {
  box-shadow: none !important;
  background: transparent !important;
}

.faq-question:hover {
  box-shadow: none !important;
  background-color: #f9fafb !important; /* Gray-50 */
  transform: none !important;
}

.mobile-nav-link:hover {
  box-shadow: none !important;
  /* Transform is handled in mobile nav styles above */
}

/* Prevent any button-related CSS from affecting these elements */
.faq-question:not(.btn):not([class*="bg-"]),
.mobile-nav-link:not(.btn):not([class*="bg-"]) {
  background: transparent !important;
  border: none !important;
}

.faq-question:hover:not(.btn):not([class*="bg-"]) {
  background-color: #f9fafb !important; /* Gray-50 for FAQ hover */
}

/* Fixed contact buttons */
.fixed .bg-green-600:hover,
.fixed .bg-blue-600:hover {
  transform: scale(1.1);
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Fix for Tailwind hover states that might cause text readability issues */
.hover\\:from-blue-700:hover {
  --tw-gradient-from: #1d4ed8 !important;
}

.hover\\:to-green-700:hover {
  --tw-gradient-to: #047857 !important;
}

/* Ensure all button text is properly contrasted - EXCLUDE text elements */
button[class*="bg-"], 
a[class*="bg-"]:not(.text-transparent),
button.bg-blue-600, button.bg-green-600, 
a.bg-blue-600, a.bg-green-600,
button.bg-gradient-to-r:not(.text-transparent), 
a.bg-gradient-to-r:not(.text-transparent),
button[class*="bg-"]:hover, 
a[class*="bg-"]:hover:not(.text-transparent),
button.bg-blue-600:hover, button.bg-green-600:hover, 
a.bg-blue-600:hover, a.bg-green-600:hover,
button.bg-gradient-to-r:hover:not(.text-transparent), 
a.bg-gradient-to-r:hover:not(.text-transparent) {
  color: #ffffff !important;
  text-shadow: none;
}

/* Preserve gradient text effects - NO HOVER EFFECTS */
.text-transparent.bg-clip-text.bg-gradient-to-r {
  color: transparent !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  transition: none !important;
}

.text-transparent.bg-clip-text.bg-gradient-to-r:hover {
  color: transparent !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

/* FAQ Styles - Fix text readability */
.faq-question {
  color: #111827 !important; /* Dark gray for better readability */
}

.faq-question:hover {
  color: #111827 !important; /* Keep same color on hover */
}

.faq-answer {
  color: #6b7280 !important; /* Gray-500 for answers */
  padding-top: 1rem !important; /* Increase top padding for better spacing */
}

/* Mobile Navigation - Fix text readability */
.mobile-nav-link {
  color: #374151 !important; /* Gray-700 */
  display: block !important;
  padding: 0.75rem 1rem !important;
  text-decoration: none !important;
  border-radius: 0.5rem !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
}

.mobile-nav-link:hover {
  color: #2563eb !important; /* Blue-600 */
  background-color: rgba(239, 246, 255, 1) !important; /* Blue-50 */
  transform: translateX(8px) !important;
}

/* Ensure mobile menu button is hidden on desktop */
@media (min-width: 1024px) {
  #mobile-menu-btn {
    display: none !important;
  }
  
  /* Ensure desktop navigation is visible */
  nav.hidden.lg\\:flex {
    display: flex !important;
  }
}

/* Mobile menu button should only be visible on mobile */
@media (max-width: 1023px) {
  #mobile-menu-btn {
    display: block !important;
  }
}

/* Custom Properties for Easy Theming */
:root {
  --primary-color: #2563eb;
  --secondary-color: #059669;
  --text-color: #374151;
  --bg-color: #ffffff;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* FINAL OVERRIDES - HIGHEST SPECIFICITY */
/* Force FAQ question text to be visible */
button.faq-question,
button.faq-question span,
.faq-question,
.faq-question span,
button.faq-question.text-gray-900,
button.faq-question.text-gray-900 span {
  color: #111827 !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #111827 !important;
}

button.faq-question:hover,
button.faq-question:hover span,
.faq-question:hover,
.faq-question:hover span,
button.faq-question.text-gray-900:hover,
button.faq-question.text-gray-900:hover span {
  color: #111827 !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #111827 !important;
}

/* Force mobile navigation text to be visible */
a.mobile-nav-link,
.mobile-nav-link {
  color: #374151 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

a.mobile-nav-link:hover,
.mobile-nav-link:hover {
  color: #2563eb !important;
  opacity: 1 !important;
  visibility: visible !important;
  background-color: #eff6ff !important;
}

/* Override any conflicting styles */
#mobile-menu .mobile-nav-link {
  color: #374151 !important;
}

#mobile-menu .mobile-nav-link:hover {
  color: #2563eb !important;
  background-color: #eff6ff !important;
}

/* Ensure mobile menu links are visible when menu is open */
#mobile-menu.mobile-menu-open .mobile-nav-link,
.mobile-menu-open .mobile-nav-link,
#mobile-menu .mobile-nav-link.text-gray-700,
.mobile-nav-link.text-gray-700 {
  color: #374151 !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #374151 !important;
}

#mobile-menu.mobile-menu-open .mobile-nav-link:hover,
.mobile-menu-open .mobile-nav-link:hover,
#mobile-menu .mobile-nav-link.text-gray-700:hover,
.mobile-nav-link.text-gray-700:hover {
  color: #2563eb !important;
  background-color: #eff6ff !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #2563eb !important;
}

/* Nuclear option - override ALL possible conflicting styles */
* .faq-question,
* .faq-question span,
* .mobile-nav-link {
  color: inherit !important;
}

section .faq-question,
section .faq-question span {
  color: #111827 !important;
}

nav .mobile-nav-link,
#mobile-menu .mobile-nav-link {
  color: #374151 !important;
}
