/* === PRISTINE LAWN CARE — CINEMATIC STYLES === */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* === GLASSMORPHISM NAVBAR === */
#ast-desktop-header.scrolled,
.site-header.scrolled,
.ast-primary-header-bar.scrolled {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 2px 24px rgba(0,0,0,0.10) !important;
  transition: all 0.35s ease !important;
}

/* === HERO — fade-in on load === */
.hero-line-1 { animation: fadeUp 0.8s ease 0.2s both; }
.hero-line-2 { animation: fadeUp 0.8s ease 0.4s both; }
.hero-subtitle { animation: fadeUp 0.8s ease 0.6s both; }
.hero-buttons { animation: fadeUp 0.8s ease 0.8s both; }
.hero-badges  { animation: fadeUp 0.8s ease 1.0s both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === ELEMENTOR SECTION ENTRANCES (applied via JS) === */
.e-con,
.elementor-widget {
  will-change: opacity, transform;
}

/* === SERVICE CARDS hover === */
.elementor-image-box-wrapper,
.elementor-icon-box-wrapper {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.elementor-image-box-wrapper:hover,
.elementor-icon-box-wrapper:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.13) !important;
}

/* === PARALLAX CTA === */
.cta-section {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
@supports (-webkit-overflow-scrolling: touch) {
  .cta-section { background-attachment: scroll; }
}

/* === AMELIA BRANDING === */
.amelia-app-booking {
  font-family: inherit !important;
  border-radius: 12px !important;
}
.amelia-app-booking .am-button.am-button-primary {
  background-color: #4A8C3F !important;
  border-color: #2D5A27 !important;
}
:root {
  --amelia-primary: #4A8C3F;
  --amelia-primary-dark: #2D5A27;
  --amelia-border-radius: 12px;
}

/* === HIDE AMELIA EMPLOYEE SELECTION STEP (CSS fallback) === */
/* Step-based booking form employee step */
.amelia-app-booking .am-step-bar-item:nth-child(3),
.amelia-app-booking .am-employee-step,
.amelia-app-booking [class*="employee-step"],
.amelia-app-booking .am-select-employee,
.amelia-app-booking .am-step.am-employee,
.amelia-v2-booking [class*="employee"],
.amelia-v2-booking .am-employee-step {
  display: none !important;
}

/* === BEFORE/AFTER SECTION === */
#pristine-before-after {
  background: #f3f7f3;
  padding: 70px 20px;
  text-align: center;
}
.ba-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.ba-section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #1A2E15;
  margin-bottom: 8px;
  font-weight: 700;
}
.ba-section-sub {
  color: #556b55;
  font-size: 1.05rem;
  margin-bottom: 40px;
}
.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.before-after-slider {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
  aspect-ratio: 3 / 4;
  background: #ccc;
}
.ba-after-img,
.ba-before-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.ba-before-clip {
  position: absolute;
  top: 0; left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}
.ba-before-clip .ba-before-img {
  width: 100%;
  max-width: none;
  min-width: 100%;
}
.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: ew-resize;
  pointer-events: all;
}
.ba-handle-line {
  width: 3px;
  flex: 1;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.ba-handle-circle {
  width: 44px;
  height: 44px;
  background: #4A8C3F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.6);
}
.ba-label {
  position: absolute;
  bottom: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.45);
  padding: 3px 10px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 5;
}
.ba-label-before { left: 12px; z-index: 6; }
.ba-label-after  { right: 12px; }

@media (max-width: 600px) {
  .ba-grid { grid-template-columns: 1fr; }
  .before-after-slider { aspect-ratio: 3 / 4; }
}

/* === CSS-CLASS ANIMATION SYSTEM === */
.pristine-hidden {
  opacity: 0 !important;
  transform: translateY(40px) !important;
}
.pristine-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.7s ease, transform 0.7s ease !important;
}

/* ===== BEFORE / AFTER SLIDER ===== */
.ba-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; margin-bottom: 3rem; }
@media(max-width:640px){ .ba-grid { grid-template-columns: 1fr; } }

.ba-slider-wrap { border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,0.12); background:#fff; }

.ba-slider {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  height: 280px;
}
.ba-img { display: block; width: 100%; height: 280px; object-fit: cover; position: absolute; top:0; left:0; }
.ba-img-after { z-index: 1; }

.ba-before-panel {
  position: absolute; top:0; left:0; width:50%; height:100%;
  overflow: hidden; z-index: 2;
  transition: width 0.05s linear;
}
.ba-before-panel img { display:block; width: 100%; height:280px; object-fit:cover; object-position: left center; }

.ba-handle-bar {
  position: absolute; top:0; left:50%; width:3px;
  height:100%; background:rgba(255,255,255,0.9);
  z-index:3; transform:translateX(-50%);
  transition: left 0.05s linear;
  pointer-events: none;
}
.ba-handle-btn {
  position: absolute; top:50%; left:50%;
  transform: translate(-50%,-50%);
  width: 44px; height: 44px;
  background: #2D5A27;
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  pointer-events: none;
}

.ba-pill {
  position: absolute; bottom: 12px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.2rem 0.65rem; border-radius: 3px;
  z-index: 4; pointer-events: none;
}
.ba-pill-l { left: 12px; background: #02231C; color: #fff; }
.ba-pill-r { right: 12px; background: #FF8000; color: #fff; }
