/* Autoglo 2026-11-20 — Insurance screenshot is the source of truth.
   ONE source of subpage hero geometry, not a new stacking patch.
   Applies only to subpage sections tagged by the installer.
   Insurance remains untouched; approved per-photo object-position is retained. */

@media (min-width: 761px) {
  section.ag-hero-match:not(.adas-hero),
  section.ag-hero-match.adas-hero > .adas-hero-inner {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 43.8%) minmax(0, 56.2%) !important;
    gap: 0 !important;
    align-items: stretch !important;
    min-height: 605px !important;
    height: auto !important;
    background: #10212c !important;
    overflow: hidden !important;
  }
  section.ag-hero-match.adas-hero {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    background: #10212c !important;
  }
  section.ag-hero-match .ag-layout-copy {
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 605px !important;
    height: auto !important;
    width: 100% !important;
    align-self: stretch !important;
    margin: 0 !important;
    padding: 54px clamp(27px, 2.6vw, 48px) 54px clamp(34px, 13.1vw, 234px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    transform: none !important;
    background: #10212c !important;
  }
  section.ag-hero-match .ag-layout-media {
    box-sizing: border-box !important;
    display: block !important;
    position: relative !important;
    min-height: 605px !important;
    height: auto !important;
    max-height: none !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    border-radius: 0 !important;
  }
  section.ag-hero-match .ag-layout-media > img {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    /* Intentionally do not set object-position. */
  }
  /* Keep the existing type system, but avoid oversize headings crossing the split. */
  section.ag-hero-match .ag-layout-copy h1 {
    max-width: 100%;
    overflow-wrap: normal;
  }
  /* Home: match the left content position, not the background photo. */
  body.ag-home-left-align section.hero > .container {
    box-sizing: border-box !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(34px, 13.1vw, 234px) !important;
  }
}
@media (max-width: 760px) {
  section.ag-hero-match:not(.adas-hero),
  section.ag-hero-match.adas-hero > .adas-hero-inner {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #10212c !important;
  }
  section.ag-hero-match.adas-hero {display: block !important; padding: 0 !important; min-height: 0 !important;}
  section.ag-hero-match .ag-layout-copy {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    order: 0 !important;
    align-self: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 47px 22px 50px !important;
    background: #10212c !important;
  }
  section.ag-hero-match .ag-layout-media {
    box-sizing: border-box !important;
    position: relative !important;
    order: 1 !important;
    align-self: auto !important;
    flex: 0 0 310px !important;
    width: 100% !important;
    height: 310px !important;
    max-height: 310px !important;
    min-height: 310px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  section.ag-hero-match .ag-layout-media > img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
  }
  body.ag-home-left-align section.hero > .container {padding-left: 22px !important; padding-right: 22px !important;}
}
@media (max-width: 420px) {
  section.ag-hero-match .ag-layout-media {flex-basis: 270px !important; height: 270px !important; max-height: 270px !important; min-height: 270px !important;}
}

/* AUTOGLO: INSURANCE-REFERENCE LOWER EDGE V5 */
/* Actual Insurance hero HTML specifies min-height:640px. The old V4 block
   fixed these four pages to exactly 605px and cropped the sections. Match
   Insurance's minimum instead, but allow copy to grow. No image positioning,
   horizontal coordinates, mobile CSS, or other pages are changed. */
@media (min-width: 1100px) {
  section.ag-hero-match:is(.paint-hero, .mechanical-hero, .pdr-hero, .cm-hero) {
    box-sizing: border-box !important;
    display: grid !important;
    min-height: 640px !important;
    height: auto !important;
    max-height: none !important;
    grid-template-rows: minmax(640px, auto) !important;
    padding-block: 0 !important;
    margin-block: 0 !important;
    overflow: hidden !important;
  }
  section.ag-hero-match:is(.paint-hero, .mechanical-hero, .pdr-hero, .cm-hero) > .ag-layout-copy,
  section.ag-hero-match:is(.paint-hero, .mechanical-hero, .pdr-hero, .cm-hero) > .ag-layout-media {
    box-sizing: border-box !important;
    min-height: 640px !important;
    height: auto !important;
    max-height: none !important;
    align-self: stretch !important;
    margin-block: 0 !important;
  }
  section.ag-hero-match:is(.paint-hero, .mechanical-hero, .pdr-hero, .cm-hero) > .ag-layout-copy {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding-top: 22px !important;
    padding-bottom: 22px !important;
  }
  section.ag-hero-match.cm-hero .cm-crumb { margin-bottom: 24px !important; }
  section.ag-hero-match.cm-hero .eyebrow { margin-bottom: 15px !important; }
  section.ag-hero-match.cm-hero .cm-display { margin-top: 13px !important; margin-bottom: 13px !important; }
  section.ag-hero-match.cm-hero .cm-hero-lead { margin-top: 16px !important; }
  section.ag-hero-match.cm-hero .cm-actions { margin-top: 22px !important; }
}
/* Desktop-only. On tablets and phones, hero blocks retain natural heights. */
/* END AUTOGLO INSURANCE-REFERENCE LOWER EDGE V5 */
