/* ==========================================================================
   Ocala Pool Network - Core Production Stylesheet
   Designed for Mobile-First Performance & High PageSpeed Scores
   ========================================================================== */

:root {
  --primary-navy: #0f172a;
  --secondary-navy: #1e293b;
  --pool-blue: #0284c7;
  --pool-blue-dark: #0369a1;
  --pool-blue-light: #e0f2fe;
  --pool-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-gold-dark: #d97706;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --surface-light: #f8fafc;
  --surface-white: #ffffff;
  --border-light: #e2e8f0;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--text-dark);
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Image optimization & layout stability */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus styles for ADA / Section 508 Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #0284c7;
  outline-offset: 2px;
}

/* Skip link for screen reader accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* Phone link protection & microdata */
.dni-phone {
  white-space: nowrap;
  font-feature-settings: "tnum";
}

/* Hero gradient overlays for contrast & readability */
.hero-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.72) 60%, rgba(15, 23, 42, 0.9) 100%);
}

.hero-subpage-overlay {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(3, 105, 161, 0.75) 100%);
}

/* Subtly animated badge shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.trust-badge-glow {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 6s infinite;
}

/* FAQ Accordion Transitions */
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content.is-open {
  grid-template-rows: 1fr;
}

.faq-inner {
  overflow: hidden;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item[data-open="true"] .faq-chevron {
  transform: rotate(180deg);
}

/* Form floating labels & input states */
.form-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
  outline: none;
}

.form-input.is-invalid {
  border-color: #ef4444;
  background-color: #fef2f2;
}

/* Table styling for comparison matrix */
.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Sticky mobile call bar compensation */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }
}

/* Print styles */
@media print {
  .no-print,
  #mobile-bottom-bar,
  #estimate-modal,
  header {
    display: none !important;
  }
  body {
    padding: 0;
    color: #000000;
  }
}
