/* Priority Lexus VB + NN — H1 / hero spacing */

/* Accessories + service-scheduler: remove empty space around H1 (all breakpoints) */
[class*="Cms-module"][class*="__page"]:not([class*="__page--hero"]) {
  padding-top: 8px !important;
}

[class*="Cms-module"][class*="__page"]:not([class*="__page--hero"])
  .ccc-pg-sections > .ccc-section:first-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

[class*="Cms-module"][class*="__page"]:not([class*="__page--hero"])
  .ccc-pg-sections > .ccc-section:first-child [class*="Header-module"] {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

[class*="Cms-module"][class*="__page"]:not([class*="__page--hero"])
  .ccc-pg-sections > .ccc-section:first-child h1 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Gap between H1 and iframe */
[class*="Cms-module"][class*="__page"]:not([class*="__page--hero"])
  [class*="Iframe-module"][class*="__iframeContainer"] {
  margin-top: 0 !important;
}

@media (max-width: 767px) {
  .ccc-pg-sections h1 {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
  }

  /* Homepage: tighten hero content spacing */
  .ccc-pg-sections [class*="GroupHero1-module"][class*="__heroSection"] {
    min-height: 0 !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
  }

  .ccc-pg-sections [class*="GroupHero1-module"][class*="__leftCtn"] {
    padding-top: 12px !important;
    padding-bottom: 0 !important;
  }

  .ccc-pg-sections [class*="ccc-hero-ctas"] {
    margin-top: 0 !important;
    margin-bottom: 24px !important; /* space below bottom CTA buttons */
  }

  /*
   * Fill hero with video/image — no background band where media "ends".
   * Classic cover pattern (works better on iOS than object-fit alone).
   */
  .ccc-pg-sections [class*="HeroBackground-module"][class*="__heroVideoCtn"],
  .ccc-pg-sections [class*="HeroBackground-module"][class*="__heroPicture"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .ccc-pg-sections [class*="HeroBackground-module"][class*="__heroVideo"],
  .ccc-pg-sections [class*="HeroBackground-module"][class*="__heroPicture"] img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: auto !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* Collapse spacer directly under homepage hero */
  .ccc-pg-sections > .ccc-section:first-child + .ccc-section[aria-label^="Spacer"] {
    display: none !important;
  }
}
