/* ============================================
   SOUTHERN POOL CO - V2.5 PREMIUM DESIGN
   ============================================ */

@layer base, components, utilities, enhancements;

/* === SVG NOISE TEXTURE PATTERNS === */
@layer base {
  :root {
    /* Fresh Blue Gradient Theme - Light to Dark */
    --light-blue: #87CEEB;     /* Sky blue - light and welcoming */
    --medium-blue: #4682B4;    /* Steel blue - professional */
    --deep-blue: #1e3a8a;      /* Deep blue - trust and reliability */
    --navy-blue: #0f172a;      /* Navy - strong and dependable */
    --warm-white: #fefefe;     /* Clean white */
    --text-dark: #1f2937;      /* Dark gray for high contrast text */
    
    /* Beautiful Blue Gradients */
    --gradient-primary: linear-gradient(135deg, var(--light-blue) 0%, var(--deep-blue) 100%);
    --gradient-hero: linear-gradient(135deg, var(--light-blue) 0%, var(--medium-blue) 50%, var(--deep-blue) 100%);
    --gradient-accent: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #1d4ed8 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    
    /* Premium Shadows */
    --shadow-glass: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-elevated: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-premium: 0 30px 80px rgba(0,0,0,0.25);
    --shadow-inset: inset 0 2px 4px rgba(255,255,255,0.1);
    
    /* Motion Easing */
    --ease-premium: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Typography */
    --font-display: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    
    /* Spacing & Sizing */
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --container-max: 1400px;
    
    /* SVG Noise Pattern */
    --noise-pattern: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --slate: #fefefe;
      --cloud: #0f172a;
      --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    }
  }

  [data-theme="dark"] {
    --slate: #fefefe;
    --cloud: #0f172a;
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
  }

  body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--warm-white);
    overflow-x: hidden;
    position: relative;
  }

  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--noise-pattern);
    pointer-events: none;
    z-index: -1;
    opacity: 0.03;
  }

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

  .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
  }
}

/* === PREMIUM GLASSMORPHISM HEADER === */
@layer components {
  .main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
  }

  .glassmorphism-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    margin: 0 2rem;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-glass);
    transition: all 0.3s var(--ease-premium);
  }

  .glassmorphism-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-glass);
    border-radius: var(--border-radius-lg);
    z-index: -1;
  }

  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .nav-logo {
    height: 55px; /* Larger logo */
    width: auto;
    transition: all 0.3s var(--ease-premium);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
    background: transparent !important; /* Remove any white background */
    border-radius: 8px;
  }

  .nav-logo:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  }

  .brand-text {
    display: flex;
    flex-direction: column;
    color: #0f172a;
    font-family: var(--font-display);
  }

  .brand-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .brand-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
  }

  .nav-links a {
    color: var(--text-dark); /* Use new theme color */
    text-decoration: none;
    font-weight: 600; /* Bolder for better visibility */
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s var(--ease-premium);
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: all 0.4s var(--ease-elastic);
    transform: translateX(-50%);
    border-radius: 2px;
  }

  .nav-links a:hover {
    color: var(--deep-blue); /* Use new theme color */
    letter-spacing: 0.5px;
  }

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

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

  .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    position: relative;
    overflow: hidden;
  }

  .theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
  }

  .sun-icon, .moon-icon {
    transition: all 0.3s var(--ease-premium);
  }

  [data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
  }

  [data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
  }

  .moon-icon {
    opacity: 0;
    transform: rotate(-180deg);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-180deg);
  }

  .cta-nav {
    background: var(--gradient-accent);
    color: white; /* White text on blue gradient */
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700; /* Bolder text */
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
  }

  .cta-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
  }

  .cta-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
  }

  .cta-nav:hover::before {
    left: 100%;
  }

  /* === ENHANCED HERO WITH CAUSTICS & BUBBLES === */
  .hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(135,206,235,0.4) 0%, rgba(30,58,138,0.7) 100%),
                url('photos/fam2.jpg') center/cover;
  }

  @keyframes heroBackgroundCycle {
    0% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/augpool3.jpg'); }
    12% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/decpool1rainbow.jpg'); }
    24% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/maypool2.jpg'); }
    36% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/julypool1.jpg'); }
    48% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/augpool1.jpg'); }
    60% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/octpool1.jpg'); }
    72% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/augpool5.jpg'); }
    84% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/julypool3.jpg'); }
    100% { background-image: linear-gradient(135deg, rgba(16,78,139,0.6) 0%, rgba(47,89,51,0.4) 100%), url('photos/augpool3.jpg'); }
  }

  .hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    mix-blend-mode: overlay;
  }

  .caustic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      radial-gradient(circle at 20% 80%, rgba(16,78,139,0.2) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(47,89,51,0.2) 0%, transparent 50%),
      radial-gradient(circle at 40% 40%, rgba(240,179,95,0.15) 0%, transparent 50%);
    z-index: 2;
    animation: causticShift 20s ease-in-out infinite;
    opacity: 0.6;
    mix-blend-mode: soft-light;
    pointer-events: none;
  }

  @keyframes causticShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-10px, -15px) scale(1.05); }
    66% { transform: translate(15px, -10px) scale(0.95); }
  }

  .bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
  }

  .bubble {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 70%, transparent 100%);
    border-radius: 50%;
    animation: bubbleRise 8s linear infinite;
  }

  @keyframes bubbleRise {
    0% {
      opacity: 0;
      transform: translateY(100vh) scale(0);
    }
    10% {
      opacity: 1;
      transform: translateY(90vh) scale(1);
    }
    90% {
      opacity: 1;
      transform: translateY(10vh) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateY(-10vh) scale(0);
    }
  }

  .hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 3;
  }

  .hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    color: white;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    transition: transform 0.1s ease-out;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-premium), 0 0 40px rgba(0,0,0,0.3);
  }

  .hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 
      0 0 20px rgba(0,0,0,0.8),
      0 4px 8px rgba(0,0,0,0.6),
      2px 2px 0px rgba(0,0,0,0.9),
      -2px -2px 0px rgba(0,0,0,0.9),
      2px -2px 0px rgba(0,0,0,0.9),
      -2px 2px 0px rgba(0,0,0,0.9);
  }

  @keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  .hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 400;
    margin-bottom: 3rem;
    color: white;
    letter-spacing: 0.5px;
    text-shadow: 
      0 0 15px rgba(0,0,0,0.8),
      0 2px 4px rgba(0,0,0,0.6),
      1px 1px 0px rgba(0,0,0,0.8),
      -1px -1px 0px rgba(0,0,0,0.8);
  }

  .cta-primary {
    background: var(--gradient-accent);
    color: white; /* White text on blue gradient */
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-weight: 700; /* Bolder text */
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s var(--ease-bounce);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    text-shadow: none; /* Remove any conflicting text shadow */
  }

  .cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
  }

  .cta-primary:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 40px 100px rgba(240,179,95,0.4);
  }

  .cta-primary:hover::before {
    left: 100%;
  }

  .scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
  }

  .scroll-arrow {
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.8);
    position: relative;
    animation: scrollPulse 2s ease-in-out infinite;
  }

  .scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid rgba(255,255,255,0.8);
  }

  @keyframes scrollPulse {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.4; transform: translateX(-50%) translateY(10px); }
  }

  .hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.3) 100%);
    z-index: 3;
    pointer-events: none;
  }

  /* === ENHANCED GALLERY WITH MASONRY === */
  .gallery-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(30,58,138,0.85) 100%),
                url('photos/julypool1.jpg') center/cover fixed;
    position: relative;
    color: white;
  }

  .gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--noise-pattern);
    opacity: 0.02;
  }

  .gallery-masonry {
    columns: 3;
    column-gap: 1.5rem;
    margin-top: 3rem;
  }

  .gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s var(--ease-premium);
    box-shadow: var(--shadow-glass);
    transform: scale(0.9);
    opacity: 0;
  }

  .gallery-item.show {
    transform: scale(1);
    opacity: 1;
  }

  .gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-elevated);
  }

  .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s var(--ease-premium);
  }

  .gallery-item:hover img {
    transform: scale(1.1);
  }

  .gallery-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    opacity: 0;
    transition: opacity 0.3s var(--ease-premium);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gallery-item:hover .gallery-overlay {
    opacity: 1;
  }

  .gallery-title {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s var(--ease-premium);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }

  .gallery-item:hover .gallery-title {
    transform: translateY(0);
  }

  /* Enhanced Lightbox */
  .lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-premium);
  }

  .lightbox-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
  }

  .lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
  }

  .lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-premium);
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
  }

  .lightbox-close {
    top: -60px;
    right: 0;
  }

  .lightbox-prev {
    top: 50%;
    left: -70px;
    transform: translateY(-50%);
  }

  .lightbox-next {
    top: 50%;
    right: -70px;
    transform: translateY(-50%);
  }

  .lightbox-close:hover,
  .lightbox-prev:hover,
  .lightbox-next:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
  }

  .lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
  }

  .lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
  }

  .lightbox-caption {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
  }

  /* === ENHANCED SERVICE CARDS === */
  .services-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(47,89,51,0.9) 0%, rgba(16,78,139,0.9) 100%),
                url('photos/maypool2.jpg') center/cover fixed;
    position: relative;
    color: white;
  }

  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }

  .service-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.5s var(--ease-premium);
    box-shadow: var(--shadow-glass);
    position: relative;
  }

  .service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--noise-pattern);
    opacity: 0.03;
    z-index: -1;
  }

  .service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-elevated);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(240, 179, 95, 0.5);
  }

  .service-card-inner {
    padding: 2.5rem;
    position: relative;
    z-index: 2;
  }

  .service-icon-wrapper {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--ease-elastic);
    box-shadow: var(--shadow-glass);
  }

  .service-card:hover .service-icon {
    transform: scale(1.1) rotateY(180deg);
  }

  .service-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-align: center;
    text-shadow: 
      0 0 15px rgba(0,0,0,0.8),
      0 3px 6px rgba(0,0,0,0.6),
      1px 1px 0px rgba(0,0,0,0.9);
  }

  .service-card p {
    color: white;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-shadow: 
      0 0 10px rgba(0,0,0,0.8),
      0 2px 4px rgba(0,0,0,0.6),
      1px 1px 0px rgba(0,0,0,0.7);
  }

  .service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    transition: transform 0.4s var(--ease-premium);
    position: relative;
  }

  .service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 78, 139, 0.85) 0%, rgba(47, 89, 51, 0.75) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(1.05);
    transition: all 0.4s var(--ease-premium);
    backdrop-filter: blur(8px);
  }

  .service-card:hover .service-overlay {
    opacity: 1;
    transform: scale(1);
  }

  .service-card:hover .service-image {
    transform: scale(1.05);
  }

  .service-cta {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
  }

  /* === ENHANCED PROCESS TIMELINE === */
  .process-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(16,78,139,0.9) 0%, rgba(47,89,51,0.9) 100%),
                url('photos/decpool2rainbow.jpg') center/cover fixed;
    color: white;
    position: relative;
    overflow: hidden;
  }

  .timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0;
  }

  .timeline-path {
    width: 100%;
    height: 100px;
    margin-bottom: 2rem;
  }

  .timeline-progress {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: timelineProgress 3s ease-out forwards;
    animation-delay: 1s;
  }

  @keyframes timelineProgress {
    to { stroke-dashoffset: 0; }
  }

  .timeline-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
  }

  .timeline-step {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s var(--ease-premium) forwards;
  }

  .timeline-step:nth-child(1) { animation-delay: 0.2s; }
  .timeline-step:nth-child(2) { animation-delay: 0.4s; }
  .timeline-step:nth-child(3) { animation-delay: 0.6s; }
  .timeline-step:nth-child(4) { animation-delay: 0.8s; }

  .step-marker {
    position: relative;
    width: 80px;
    height: 80px;
    background: var(--gradient-gold);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-elevated);
    transition: all 0.3s var(--ease-premium);
  }

  .timeline-step:hover .step-marker {
    transform: scale(1.15);
    box-shadow: var(--shadow-premium);
  }

  .step-icon {
    width: 32px;
    height: 32px;
    stroke: #0f172a; /* Fixed dark color for contrast against gold background */
    stroke-width: 2.5; /* Slightly thicker for better visibility */
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawIcon 1s ease-out forwards;
    animation-delay: 1.5s;
  }

  .timeline-step:nth-child(1) .step-icon { animation-delay: 1.7s; }
  .timeline-step:nth-child(2) .step-icon { animation-delay: 1.9s; }
  .timeline-step:nth-child(3) .step-icon { animation-delay: 2.1s; }
  .timeline-step:nth-child(4) .step-icon { animation-delay: 2.3s; }

  @keyframes drawIcon {
    to { stroke-dashoffset: 0; }
  }

  @keyframes markerPulse {
    0% { transform: scale(0.8); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
  }

  .step-number {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--cypress-green);
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .step-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .step-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
  }

  /* === ENHANCED TESTIMONIALS CAROUSEL === */
  .testimonials-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(30,58,138,0.9) 0%, rgba(15,23,42,0.95) 100%),
                url('photos/augpool5.jpg') center/cover fixed;
    position: relative;
    color: white;
  }

  .testimonials-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
  }

  .testimonials-carousel {
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-elevated);
  }

  .testimonial-track {
    display: flex;
    transition: transform 0.6s var(--ease-premium);
  }

  .testimonial-slide {
    flex: 0 0 calc(100% / 3);
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    position: relative;
    border-radius: var(--border-radius);
    margin: 0 0.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .testimonial-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--noise-pattern);
    opacity: 0.02;
  }

  .testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--sunset-gold);
    box-shadow: var(--shadow-glass);
  }

  .testimonial-quote {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.6;
    text-shadow: 
      0 0 20px rgba(0,0,0,0.8),
      0 4px 8px rgba(0,0,0,0.6),
      2px 2px 0px rgba(0,0,0,0.9);
    position: relative;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
  }

  .testimonial-quote::before,
  .testimonial-quote::after {
    content: '"';
    font-size: 3rem;
    color: var(--sunset-gold);
    opacity: 0.3;
    position: absolute;
  }

  .testimonial-quote::before {
    top: -20px;
    left: -10px;
  }

  .testimonial-quote::after {
    bottom: -40px;
    right: -10px;
  }

  .testimonial-author {
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 
      0 0 15px rgba(0,0,0,0.8),
      0 3px 6px rgba(0,0,0,0.6),
      1px 1px 0px rgba(0,0,0,0.9);
  }

  .testimonial-rating {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
  }

  .star {
    color: var(--sunset-gold);
    font-size: 1.2rem;
    animation: starGlow 2s ease-in-out infinite;
  }

  @keyframes starGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(240,179,95,0.3); }
    50% { text-shadow: 0 0 15px rgba(240,179,95,0.6); }
  }

  .carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
  }

  .carousel-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s var(--ease-premium);
    box-shadow: var(--shadow-glass);
  }

  .carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-elevated);
  }

  .carousel-pagination {
    display: flex;
    gap: 0.5rem;
  }

  .carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(16, 78, 139, 0.3);
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
  }

  .carousel-dot.active {
    background: var(--bayou-blue);
    transform: scale(1.3);
  }

  /* === ENHANCED CHAT WIDGET === */
  .chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    width: 380px;
    height: 550px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    transition: all 0.4s var(--ease-bounce);
    pointer-events: none;
  }

  .chatbot-widget.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.2rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-inset);
  }

  .chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s var(--ease-premium);
    padding: 0.25rem;
    border-radius: 4px;
  }

  .chat-close:hover {
    transform: scale(1.2);
    background: rgba(255,255,255,0.1);
  }

  .chat-messages {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--bayou-blue) transparent;
  }

  .chat-messages::-webkit-scrollbar {
    width: 6px;
  }

  .chat-messages::-webkit-scrollbar-track {
    background: transparent;
  }

  .chat-messages::-webkit-scrollbar-thumb {
    background: var(--bayou-blue);
    border-radius: 3px;
  }

  .message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .message-content {
    background: var(--bayou-blue);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: var(--shadow-glass);
  }

  .user-message {
    justify-content: flex-end;
  }

  .user-message .message-content {
    background: var(--gradient-gold);
    color: var(--slate);
  }

  .chat-input-form {
    padding: 1.2rem;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
  }

  .chat-input-form input {
    flex: 1;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    font-size: 0.95rem;
  }

  .chat-input-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
  }

  .chat-input-form input:focus {
    border-color: var(--sunset-gold);
    box-shadow: 0 0 0 3px rgba(240, 179, 95, 0.2);
    background: rgba(255, 255, 255, 0.15);
  }

  .chat-input-form button {
    background: var(--gradient-gold);
    color: var(--slate);
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s var(--ease-premium);
  }

  .chat-input-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass);
  }

  .chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow-elevated);
    transition: all 0.3s var(--ease-premium);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-premium);
  }

  .chat-icon {
    font-size: 2rem;
    transition: transform 0.3s var(--ease-premium);
  }

  .chatbot-widget.active + .chat-toggle .chat-icon {
    transform: rotate(180deg);
  }

  .chat-pulse {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: pulse 2s infinite;
  }

  .chatbot-widget.active + .chat-toggle .chat-pulse {
    display: none;
  }

  @keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
  }
}

/* === UTILITIES & RESPONSIVE === */
@layer utilities {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-premium);
  }

  .reveal.show {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-item {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s var(--ease-premium);
  }

  .reveal-item.show {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
  }

  .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 60px;
    height: 4px;
    background: var(--gradient-gold);
    transform: translateX(-50%);
    border-radius: 2px;
  }

  /* Special styling for sections with image backgrounds */
  .gallery-section .section-title,
  .services-section .section-title,
  .testimonials-section .section-title,
  .process-section .section-title {
    color: white;
    text-shadow: 
      0 0 25px rgba(0,0,0,0.9),
      0 6px 12px rgba(0,0,0,0.7),
      3px 3px 0px rgba(0,0,0,0.9);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }

  .gallery-section .section-subtitle,
  .services-section .section-subtitle,
  .testimonials-section .section-subtitle,
  .process-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
      0 0 15px rgba(0,0,0,0.8),
      0 3px 6px rgba(0,0,0,0.6),
      1px 1px 0px rgba(0,0,0,0.8);
  }

  .section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #374151; /* Fixed mid-dark gray for good contrast */
    font-weight: 500; /* Slightly bolder */
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  /* === ANIMATIONS === */
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* === RESPONSIVE BREAKPOINTS === */
  @media (max-width: 1024px) {
    .glassmorphism-nav {
      margin: 0 1rem;
      padding: 1rem;
    }

    .nav-links {
      gap: 1.5rem;
    }

    .gallery-masonry {
      columns: 2;
    }

    .timeline-steps {
      grid-template-columns: repeat(2, 1fr);
      gap: 3rem;
    }

    .testimonial-slide {
      flex: 0 0 50%;
    }
  }

  @media (max-width: 768px) {
    .glassmorphism-nav {
      margin: 0 0.5rem;
      padding: 0.75rem 1rem;
    }

    .nav-links {
      display: none;
    }

    .nav-actions {
      gap: 0.5rem;
    }

    .brand-text {
      display: none; /* Hide brand text on mobile to save space */
    }

    .nav-logo {
      height: 45px; /* Smaller logo on mobile */
    }

    .footer-brand {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
    }

    .footer-badges {
      justify-content: flex-start;
    }

    .hero-content {
      padding: 1rem;
    }

    .gallery-masonry {
      columns: 1;
    }

    .services-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }

    .timeline-steps {
      grid-template-columns: 1fr;
      gap: 2rem;
    }

    .testimonial-slide {
      flex: 0 0 100%;
    }

    .chatbot-widget {
      width: calc(100vw - 1rem);
      right: 0.5rem;
      left: 0.5rem;
      height: 480px;
    }

    .chat-toggle {
      bottom: 80px;
      width: 60px;
      height: 60px;
    }

    .lightbox-prev {
      left: 10px;
    }

    .lightbox-next {
      right: 10px;
    }
  }

  /* === ACCESSIBILITY === */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }

    .hero-title,
    .caustic-overlay,
    .bubble,
    .step-icon {
      animation: none !important;
    }
  }

  @media (prefers-contrast: high) {
    :root {
      --bayou-blue: #0d3a6b;
      --cypress-green: #1f3d23;
      --sunset-gold: #cc8f00;
    }
  }

  /* Focus styles for keyboard navigation */
  .cta-primary:focus,
  .cta-nav:focus,
  .carousel-btn:focus,
  .theme-toggle:focus,
  .chat-toggle:focus {
    outline: 3px solid var(--sunset-gold);
    outline-offset: 3px;
  }

  .nav-links a:focus {
    outline: 2px solid var(--bayou-blue);
    outline-offset: 4px;
    border-radius: 4px;
  }
}

/* === ENHANCEMENTS LAYER === */
@layer enhancements {
  /* Glass morphism quote section */
  .quote-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--slate) 0%, #1e293b 100%);
    position: relative;
  }

  .glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    position: relative;
  }

  .glass-morphism::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-glass);
    border-radius: var(--border-radius-lg);
    z-index: -1;
  }

  .quote-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
  }

  .quote-card h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: white;
    margin-bottom: 1rem;
  }

  .quote-card > p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
  }

  .quote-form {
    text-align: left;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .form-group {
    position: relative;
  }

  .form-group label {
    display: block;
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s var(--ease-premium);
    backdrop-filter: blur(10px);
  }

  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
  }

  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--sunset-gold);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(240, 179, 95, 0.2);
  }

  .form-error {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
  }

  .submit-btn {
    background: var(--gradient-gold);
    color: #0f172a; /* Fixed dark color for high contrast */
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700; /* Bolder text */
    border-radius: var(--border-radius);
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: all 0.3s var(--ease-premium);
    position: relative;
    overflow: hidden;
  }

  .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
  }

  .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
  }

  .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
  }

  .submit-btn.loading .btn-text {
    opacity: 0;
  }

  .submit-btn.loading .btn-loader {
    display: inline-block;
  }

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

  /* Footer styling */
  .site-footer {
    background: var(--slate);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
  }

  .site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--noise-pattern);
    opacity: 0.02;
  }

  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
  }

  .footer-section h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--sunset-gold);
  }

  .footer-section ul {
    list-style: none;
  }

  .footer-section ul li {
    padding: 0.4rem 0;
    opacity: 0.8;
    transition: opacity 0.3s var(--ease-premium);
  }

  .footer-section ul li:hover {
    opacity: 1;
  }

  .footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .footer-logo {
    height: 65px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(255,255,255,0.1));
  }

  .footer-brand-text h3 {
    color: var(--sunset-gold);
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
  }

  .footer-tagline {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.25rem 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .footer-description {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .badge {
    background: rgba(240,179,95,0.2);
    border: 1px solid rgba(240,179,95,0.4);
    color: var(--sunset-gold);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .social-links {
    margin-top: 1.5rem;
  }

  .social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sunset-gold);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(240,179,95,0.3);
    border-radius: var(--border-radius);
    background: rgba(240,179,95,0.1);
    transition: all 0.3s var(--ease-premium);
    font-weight: 500;
    font-size: 0.9rem;
  }

  .social-links a:hover {
    background: rgba(240,179,95,0.2);
    border-color: rgba(240,179,95,0.6);
    transform: translateY(-2px);
    color: white;
  }

  .social-links a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    opacity: 0.7;
  }

  /* Responsive form adjustments */
  @media (max-width: 768px) {
    .form-row {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .quote-card {
      padding: 2rem;
    }
  }
}