/* Fix bottom whitespace under hero images on non-home pages only */
body:not(.home) .page-hero,
body:not(.home) .hero,
body:not(.home) .service-hero,
body:not(.home) .correction-hero,
body:not(.home) .ceramic-hero {
  position: relative;
  overflow: hidden;       /* hides any overflow that was causing the band */
  min-height: 65vh;       /* keeps a consistent height like the good page */
  margin: 0;
  padding: 0;
}

body:not(.home) .page-hero img,
body:not(.home) .hero img,
body:not(.home) .service-hero img,
body:not(.home) .correction-hero img,
body:not(.home) .ceramic-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* fills the container, no gaps */
  display: block;          /* removes inline-image baseline gap */
}

/* Fix hero darken overlay to fully cover image without header interference */
body:not(.home) .hero-overlay,
body:not(.home) .page-hero .hero-overlay,
body:not(.home) .service-hero .hero-overlay,
body:not(.home) .correction-hero .hero-overlay,
body:not(.home) .ceramic-hero .hero-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(11, 15, 20, 0.6) !important;
  z-index: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure hero background covers full area */
body:not(.home) .hero-bg,
body:not(.home) .page-hero .hero-bg,
body:not(.home) .service-hero .hero-bg,
body:not(.home) .correction-hero .hero-bg,
body:not(.home) .ceramic-hero .hero-bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  overflow: hidden !important;
}

/* Ensure hero content stays above overlay */
body:not(.home) .hero-content,
body:not(.home) .page-hero .hero-content,
body:not(.home) .service-hero .hero-content,
body:not(.home) .correction-hero .hero-content,
body:not(.home) .ceramic-hero .hero-content {
  position: relative !important;
  z-index: 3 !important;
}

/* If a top margin from the next section is creating a band, kill it */
body:not(.home) .page-hero + *,
body:not(.home) .hero + *,
body:not(.home) .service-hero + *,
body:not(.home) .correction-hero + *,
body:not(.home) .ceramic-hero + * {
  margin-top: 0 !important;
}

/* CONTACT FORM MOBILE FIXES - STEP 1 ALWAYS VISIBLE */
@media (max-width: 768px) {
  
  /* DISABLE TRANSITIONS THAT MIGHT HIDE FORM */
  .form-step, .form-step * {
    transition: none !important;
    animation: none !important;
  }
  
  /* NUCLEAR OVERRIDE FOR STEP 2 - ALWAYS SHOW WHEN ACTIVE */
  .form-step[data-step="2"].active,
  .form-step[data-step="2"][class*="active"],
  .quote-form .form-step[data-step="2"].active,
  #contactQuoteForm .form-step[data-step="2"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 999 !important;
    transform: none !important;
    clip: none !important;
    clip-path: none !important;
  }
  /* STEP 1 PERMANENT VISIBILITY - CANNOT BE OVERRIDDEN */
  .form-step[data-step="1"],
  .form-step[data-step="1"].active,
  .quote-form .form-step[data-step="1"],
  #contactQuoteForm .form-step[data-step="1"],
  form .form-step[data-step="1"],
  .quote-form-section .form-step[data-step="1"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 16px !important;
    background: transparent !important;
    border: none !important;
    min-height: auto !important;
    max-height: none !important;
  }
  
  /* STEP 2 AND 3 HIDDEN BY DEFAULT */
  .form-step[data-step="2"],
  .form-step[data-step="3"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* WHEN STEP 2 BECOMES ACTIVE, SHOW IT AND HIDE STEP 1 */
  .form-step[data-step="2"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    z-index: 10 !important;
    padding: 16px !important;
    margin: 0 !important;
  }
  
  /* ENSURE ALL STEP 2 FORM ELEMENTS ARE VISIBLE WHEN ACTIVE */
  .form-step[data-step="2"].active .form-group,
  .form-step[data-step="2"].active input,
  .form-step[data-step="2"].active textarea,
  .form-step[data-step="2"].active button,
  .form-step[data-step="2"].active label,
  .form-step[data-step="2"].active .timing-chips,
  .form-step[data-step="2"].active .form-step-nav,
  .form-step[data-step="2"].active h3 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .form-step[data-step="2"].active .timing-chips,
  .form-step[data-step="2"].active .form-step-nav {
    display: flex !important;
  }
  
  .form-step[data-step="2"].active input,
  .form-step[data-step="2"].active textarea {
    display: inline-block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .form-step[data-step="2"].active .timing-chip {
    display: inline-block !important;
    padding: 12px 20px !important;
    margin: 4px 8px 4px 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    color: white !important;
    cursor: pointer !important;
  }
  
  /* HIDE STEP 1 WHEN STEP 2 IS ACTIVE */
  .form-step[data-step="2"].active ~ .form-step[data-step="1"] {
    display: none !important;
  }
  
  /* FORCE HIDE STEP 1 WHEN STEP 2 IS ACTIVE (NUCLEAR) */
  body:has(.form-step[data-step="2"].active) .form-step[data-step="1"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* WHEN STEP 3 BECOMES ACTIVE, SHOW IT */
  .form-step[data-step="3"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    z-index: 10 !important;
  }
  
  /* ENSURE ALL STEP 1 FORM ELEMENTS ARE ALWAYS VISIBLE */
  .form-step[data-step="1"] .form-group,
  .form-step[data-step="1"] input,
  .form-step[data-step="1"] label,
  .form-step[data-step="1"] button,
  .form-step[data-step="1"] .package-buttons,
  .form-step[data-step="1"] .package-btn,
  .form-step[data-step="1"] h3 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .form-step[data-step="1"] .package-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .form-step[data-step="1"] input {
    display: inline-block !important;
  }
  
  /* ACTIVE STEP OVERRIDE - Force active step to show */
  .form-step.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    transform: translateY(0) !important;
    position: relative !important;
    animation: fadeInUp 0.3s ease;
  }
  
  /* STEP 2 WHEN ACTIVE - Show contact details */
  .form-step[data-step="2"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    transform: translateY(0) !important;
    position: relative !important;
  }
  
  /* STEP 3 WHEN ACTIVE - Show confirmation */
  .form-step[data-step="3"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    transform: translateY(0) !important;
    position: relative !important;
  }
  
  /* ENSURE ALL ACTIVE STEP ELEMENTS ARE VISIBLE */
  .form-step.active .form-group,
  .form-step.active input,
  .form-step.active textarea,
  .form-step.active button,
  .form-step.active label,
  .form-step.active .timing-chips,
  .form-step.active .package-buttons,
  .form-step.active .form-step-nav,
  .form-step.active h3 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .form-step.active .timing-chips,
  .form-step.active .package-buttons,
  .form-step.active .form-step-nav {
    display: flex !important;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Ensure package buttons are properly styled */
  .package-btn {
    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    padding: 16px !important;
    text-align: left !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }
  
  .package-btn:hover,
  .package-btn.selected {
    background: var(--vd-luxury-blue) !important;
    border-color: var(--vd-luxury-blue) !important;
  }
  
  /* Timing chips styling */
  .timing-chip {
    display: inline-block !important;
    padding: 12px 20px !important;
    margin: 4px 8px 4px 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }
  
  .timing-chip:hover,
  .timing-chip.selected {
    background: var(--vd-luxury-blue) !important;
    border-color: var(--vd-luxury-blue) !important;
  }
  
  /* Form inputs on mobile */
  .form-group input,
  .form-group textarea {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 16px !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
  }
  
  /* Error state styling */
  .form-group input.error,
  .form-group textarea.error {
    border-color: #ff4444 !important;
    background: rgba(255, 68, 68, 0.1) !important;
  }
  
  /* Next/Submit buttons */
  .form-next,
  .form-submit {
    width: 100% !important;
    padding: 16px !important;
    margin-top: 24px !important;
    background: var(--vd-luxury-blue) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
  }
  
  .form-next:hover,
  .form-submit:hover {
    background: var(--vd-luxury-blue-hover) !important;
  }
  
  /* Progress indicators */
  .form-progress {
    margin-bottom: 32px !important;
  }
  
  .progress-step {
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
  }
  
  .progress-step.active {
    background: var(--vd-luxury-blue) !important;
    color: white !important;
  }
}
