/* ==========================================================================
   Marilu'z Cleaning Services - Custom Stylesheet
   Palette: Royal Blue, Vibrant Cyan, Warm Golden Crown, Pure White
   ========================================================================== */

:root {
  --primary-navy: #0b224e;
  --primary-navy-dark: #061533;
  --primary-blue: #1452cc;
  --primary-cyan: #0284c7;
  --primary-cyan-light: #38bdf8;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-gold-light: #fef3c7;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-subtle: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(11, 34, 78, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(11, 34, 78, 0.1);
  --shadow-lg: 0 20px 40px -10px rgba(11, 34, 78, 0.15);
  --shadow-gold: 0 8px 25px rgba(245, 158, 11, 0.35);
  --shadow-blue: 0 8px 25px rgba(20, 82, 204, 0.3);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

/* iOS Safari zoom prevention: keep form font-size at least 16px on mobile */
input, select, textarea {
  font-size: 16px !important;
}
@media (min-width: 640px) {
  input, select, textarea {
    font-size: 0.875rem !important;
  }
}

.font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Navigation */
.glass-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(11, 34, 78, 0.08);
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Gradient Texts & Accents */
.text-gradient-gold {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #0b224e 0%, #1452cc 60%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-licensed {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  color: #92400e;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

/* Hero Background Glows */
.hero-glow-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  top: -100px;
  left: -100px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  max-width: 100vw;
}

.hero-glow-2 {
  position: absolute;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: 0;
  right: -50px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  max-width: 100vw;
}

/* Service Card Hover Animations */
.service-card {
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -5px rgba(11, 34, 78, 0.12), 0 10px 10px -5px rgba(11, 34, 78, 0.04);
    border-color: rgba(2, 132, 199, 0.4);
  }

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

.service-image {
  transition: transform 0.5s ease-out;
}

/* Before / After Slider Component */
.ba-slider-container {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  user-select: none;
  touch-action: pan-y; /* Allows smooth vertical scrolling on mobile touch */
}

.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-after-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.ba-after-container .ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.ba-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #ffffff;
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1452cc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  color: #1452cc;
}

.ba-label {
  position: absolute;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
}

.ba-label-before {
  right: 1.25rem;
  bottom: 1.25rem;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.ba-label-after {
  left: 1.25rem;
  bottom: 1.25rem;
  background: rgba(245, 158, 11, 0.9);
  color: #ffffff;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Shine effect on main CTA button */
.btn-gold-shine {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

.btn-gold-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(30deg);
  transition: all 0.75s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-gold-shine:hover::after {
    left: 130%;
  }

  .btn-gold-shine:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.45);
  }
}

/* Testimonial Card */
.review-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .review-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
  }
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  transition: all 0.25s ease;
  background: #ffffff;
}

.faq-item.active {
  border-color: #0284c7;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.08);
}

.faq-item .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}

.faq-item.active .faq-answer {
  max-height: 350px;
}

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

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #0284c7;
}

/* Responsive Adaptive Adjustments across Devices */
@media (max-width: 1024px) {
  .ba-slider-container {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .ba-slider-container {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .ba-slider-container {
    height: 250px;
    border-radius: 0.875rem;
  }
  .ba-handle {
    width: 36px;
    height: 36px;
    border-width: 2.5px;
  }
  .ba-handle i {
    width: 16px;
    height: 16px;
  }
  .ba-label {
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
  }
  .ba-label-before {
    right: 0.6rem;
    bottom: 0.6rem;
  }
  .ba-label-after {
    left: 0.6rem;
    bottom: 0.6rem;
  }
}

/* Safe area insets for iOS devices */
.safe-pb {
  padding-bottom: max(0.625rem, env(safe-area-inset-bottom));
}
