/* Crown Carz — Fixed Header + Next-Level Multi-Layer Parallax & Scroll Experience */

/* 0. Clean viewport scrolling (never trap vertical touch scrolling on mobile) */
html {
  overflow-x: clip;
}

body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

/* 1. Fixed / Pinned Header across Desktop & Mobile on every page */
body.cc-has-fixed-header {
  padding-top: var(--cc-header-h, 72px) !important;
}

.site-header,
.header_section {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1030 !important;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header_section {
  background: rgba(10, 14, 20, 0.94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

html.cc-scrolled .site-header,
html.cc-scrolled .header_section {
  background: rgba(7, 10, 16, 0.96) !important;
  border-bottom-color: rgba(255, 193, 7, 0.24) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
}

@media (max-width: 991px) {
  .site-header,
  .header_section {
    position: fixed !important;
  }

  .site-header .navbar-collapse,
  .header_section .navbar-collapse {
    max-height: calc(100vh - var(--cc-header-h, 64px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 2. Top luxury gold scroll progress ribbon */
.cc-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2150;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #d99a00, #ffc107 52%, #fff2ad);
  box-shadow: 0 0 14px rgba(255, 193, 7, 0.65);
  transform-origin: left center;
  transform: scaleX(var(--cc-scroll-progress, 0));
  pointer-events: none;
  will-change: transform;
}

/* 3. Dramatic Homepage Hero Parallax + Curtain Overlap */
.hero-section {
  position: relative;
  z-index: 1;
}

.hero-bg {
  overflow: hidden;
  pointer-events: none;
}

.hero-bg__slide {
  inset: -24% 0 !important;
  translate: 0 var(--cc-hero-parallax, 0px);
  pointer-events: none;
}

/* Next section glides UP & OVER the receding hero like a sleek curtain */
.customer-reviews {
  position: relative;
  z-index: 3;
  box-shadow: 0 -24px 64px rgba(0, 0, 0, 0.34);
}

/* Inner-page hero parallax layers */
.hero_area {
  position: relative;
  overflow-x: clip;
  background-position: center calc(50% + var(--cc-bg-parallax, 0px));
}

.hero_area::before {
  translate: 0 var(--cc-bg-parallax, 0px);
  pointer-events: none;
}

.about_hero,
.blog-hero {
  position: relative;
  overflow-x: clip;
  background-position: center calc(50% + var(--cc-bg-parallax, 0px));
}

/* 4. Full-Bleed Photographic Parallax Window behind Dark Sections (contained in pointer-events:none wrapper so touch scroll never traps) */
.contact_section,
.areas_cover {
  position: relative;
  isolation: isolate;
}

.cc-parallax-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.cc-parallax-bg {
  position: absolute;
  inset: -28% 0;
  background-image: url('../fleet/our_services.jpeg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  translate: 0 var(--cc-bg-py, 0px);
  scale: var(--cc-bg-scale, 1.08);
  filter: brightness(0.42) saturate(1.1);
  pointer-events: none;
}

.cc-parallax-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% calc(36% + var(--cc-glow-shift, 0%)), rgba(255, 193, 7, 0.2), transparent 48%),
    linear-gradient(180deg, rgba(5, 8, 14, 0.84) 0%, rgba(5, 8, 14, 0.66) 50%, rgba(5, 8, 14, 0.9) 100%);
  pointer-events: none;
}

.contact_section > .container,
.areas_cover > .container,
.info_section > .container {
  position: relative;
  z-index: 1;
}

.contact_section .contact-card,
.contact_section .stat-card {
  background: rgba(12, 16, 24, 0.78);
  border-color: rgba(255, 193, 7, 0.28);
}

@media (hover: hover) and (pointer: fine) {
  .contact_section .contact-card,
  .contact_section .stat-card {
    background: rgba(12, 16, 24, 0.7);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

.info_section {
  position: relative;
  overflow-x: clip;
}

.info_section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% calc(38% + var(--cc-glow-shift, 0%)), rgba(255, 193, 7, 0.12), transparent 46%);
  pointer-events: none;
  z-index: 0;
}

/* 5. Multi-Axis Independent Parallax Properties (never conflict with hover `transform`) */
[data-cc-parallax] {
  translate: var(--cc-px, 0px) var(--cc-py, 0px);
  scale: var(--cc-ps, 1);
  rotate: var(--cc-pr, 0deg);
}

/* On mobile & touch devices: keep scrolling 100% native & trap-free on all cards & sections */
@media (max-width: 991px), (pointer: coarse) {
  section,
  .booking-panel,
  .service-card,
  .why-card,
  .customer-review-card,
  .contact-card,
  .stat-card,
  .blog-card {
    touch-action: pan-y;
  }

  [data-cc-desktop-only="true"] {
    translate: none !important;
    scale: none !important;
    rotate: none !important;
    will-change: auto !important;
  }

  .service-card,
  .why-card,
  .customer-review-card,
  .contact-card,
  .stat-card,
  .blog-card {
    will-change: auto !important;
  }
}

/* 6. Choreographed Scroll-Reveal Entrances */
html.cc-parallax-ready [data-cc-reveal] {
  opacity: 0;
  transform: translate3d(0, 36px, 0) scale(0.98);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--cc-delay, 0ms),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) var(--cc-delay, 0ms);
}

html.cc-parallax-ready [data-cc-reveal="left"] {
  transform: translate3d(-36px, 0, 0);
}

html.cc-parallax-ready [data-cc-reveal="right"] {
  transform: translate3d(36px, 0, 0);
}

html.cc-parallax-ready [data-cc-reveal="zoom"] {
  transform: translate3d(0, 26px, 0) scale(0.93);
}

html.cc-parallax-ready [data-cc-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* 7. Interactive Hover Elevation (desktop fine pointers only — never interferes with mobile touch) */
.service-card,
.why-card,
.customer-review-card,
.contact-card,
.stat-card,
.blog-card {
  position: relative;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover,
  .why-card:hover,
  .customer-review-card:hover,
  .blog-card:hover {
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
    border-color: rgba(255, 193, 7, 0.6);
  }

  .contact-card:hover,
  .stat-card:hover {
    border-color: rgba(255, 193, 7, 0.62);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
  }
}

.about-image img,
.contact-image img,
.app-image img {
  filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.24));
}

/* Smooth momentum scroll disables native CSS smooth-scroll fighting JS wheel lerp */
html.cc-smooth-wheel {
  scroll-behavior: auto !important;
}

/* 8. Accessibility: respect reduced motion completely */
@media (prefers-reduced-motion: reduce) {
  .cc-scroll-progress {
    display: none !important;
  }

  .hero-bg__slide,
  .cc-parallax-bg {
    inset: 0 !important;
    translate: none !important;
    scale: none !important;
  }

  [data-cc-parallax] {
    translate: none !important;
    scale: none !important;
    rotate: none !important;
    will-change: auto;
  }

  html.cc-parallax-ready [data-cc-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }
}
