/* ==========================================================================
   HANNON HILLS — Hero Blocks
   Covers: Regular Carousel (hero--carousel) · Tabbed Carousel (hero--tabbed) · Search Hero (hero--search)
   Template: homebanner-carousel.vm (unified) · homebanner-v6-search.vm
   Depends on: Bootstrap grid (.container, .row, .col-*) already loaded by theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. UTILITIES
   -------------------------------------------------------------------------- */

:root {
     --header-height: 400px;
}

.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   1. HERO BASE — shared by all variants
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Scrim / darkening overlay */
.hero__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Content layer always sits above the scrim */
.hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 4rem 1.5rem;
}

/* Left-aligned content (V3 Statement) */
.hero__content--left {
    display: flex;
    align-items: center;
    text-align: left;
    background: linear-gradient(270deg, transparent, rgba(0, 0, 0, .45) 48.56%);
}

/* Center-aligned content (V2 Video, V6 Search) */
.hero__content--center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Bottom-aligned content (V4 Audience Hub) */
.hero__content--bottom {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding-bottom: 0;
}

/* Eyebrow */
.hero__eyebrow {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 0.5rem;
    background-color: var(--primary-template);
}

/* Subheading */
.hero__subheading {
    font-size: 1.125rem; /* below 768px: 16px mobile default */
    font-weight: 700;
    line-height: 1.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1.75rem;
}

/* Heading / subheading responsive sizes — explicit breakpoints (all variants) */
@media (min-width: 768px) {
    .hero__subheading { font-size: 1.25rem; line-height: 1.75rem; } /* 20px */
}


/* Accent rule (colored bar above eyebrow — V3, V5) */
.hero__accent-rule {
    height: 4px;
    width: 3rem;
    margin-bottom: 1rem;
}

/* CTA button group — default: inline row */
.hero__cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hero__content--center .hero__cta-group {
    justify-content: center;
}

/* Stacked CTA group (V3 Statement — buttons go full-width vertically) */
.hero__cta-group--stacked {
    flex-direction: column;
    align-items: stretch;
}

.hero__cta-group--stacked .hero__cta {
    display: block;
    width: 100%;
    text-align: center;
}

/* Base CTA button */
.hero__cta {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Solid primary CTA */
.hero__cta--primary {
    background-color: var(--primary-template);
    color: #ffffff;
    border-color: var(--primary-template);
    transition: all 0.3s ease;
}

.hero__cta--primary:hover,
.hero__cta--primary:focus {
    background-color: rgba(255,255,255,0.15)
    border-color: var(--primary-template);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Ghost / outline secondary CTA */
.hero__cta--secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
    transition: all 0.3s ease;
}

.hero__cta--secondary:hover,
.hero__cta--secondary:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Focus ring for keyboard users */
.hero__cta:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}


/* === 2. V1 — CAROUSEL HERO ================================================ */
/* RevSlider-free. Vanilla JS fade transitions, dot + arrow navigation.       */

.hero--carousel {
    position:relative; width:100%;
    height: calc(100vh - var(--header-height, 173px));
    min-height:400px;
    overflow:hidden;
    touch-action:pan-y pinch-zoom;
    -webkit-user-select:none; user-select:none;
}

/* Slides (shared with V6 tabbed) */
.hero__slide { position:absolute; top:0; left:0; width:100%; height:100%; opacity:0; transition:opacity 0.6s ease; z-index:0; }
.hero__slide--active { opacity:1; z-index:1; }
.hero__slide-img { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; object-position:center center; z-index:0; }
.hero__scrim { position:absolute; top:0; left:0; width:100%; height:100%; z-index:1; }

/* Video background — used by V1 video slide type */
.hero__video-bg { position:absolute; inset:0; z-index:0; overflow:hidden; }
.hero__video { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; object-position:center top; }
/* Poster shown on mobile or when video can't play */
.hero__video-poster { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; display:none; }
@media (prefers-reduced-motion: reduce) {
    .hero__video { display:none; }
    .hero__video-poster { display:block; }
}
@media (max-width: 767px) {
    .hero__video { display:none; }
    .hero__video-poster { display:block; }
}

/* Content positioning */
.hero__content { position:relative; z-index:2; height:100%; display:flex; align-items:center; padding:3rem 2.5rem; }
.hero__content .container { max-width:700px; }
.hero__content--left { text-align:left; }
.hero__content--left .container { margin-left:0; margin-right:auto; }
.hero__content--center { text-align:center; }
.hero__content--center .container { margin:0 auto; }
.hero__content--right { text-align:right; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .45) 48.56%);}
.hero__content--right .container { margin-left:auto; margin-right:0; }

/* Typography */
.hero__eyebrow { display:inline-block; font-size:0.875rem; font-weight:600; letter-spacing:0.1em; text-transform:uppercase; color:#fff; padding:4px 14px; margin-bottom:0.75rem; }
.hero__heading { font-size: 1.5rem; font-weight:700; line-height: 2rem; color:#fff; text-transform:uppercase; }
@media (min-width: 768px) {.hero__heading    { font-size: 1.875rem; line-height: 2.25rem;}  }
@media (min-width: 1024px) {.hero__heading { font-size: 3rem; line-height: 1;} }
@media (min-width: 1280px) {.hero__heading { font-size: 4.5rem; line-height: 1; } }

.hero__subheading { font-weight:400; line-height:1.5; color:rgba(255,255,255,0.9); margin:0 0 1.75rem; max-width:560px; }
.hero__content--center .hero__subheading { margin-left:auto; margin-right:auto; }

/* Inline content image (replaces stat badge) */
.hero__content-image { position:absolute; top:50%; right:5%; transform:translateY(-50%); z-index:2; max-width:100%; height:auto; }
.hero__content-image--left { right:auto; left:5%; }

/* CTA buttons */
.hero__cta-group { display:flex; flex-wrap:wrap; gap:0.75rem; }
.hero__content--center .hero__cta-group { justify-content:center; }
.hero__content--right .hero__cta-group { justify-content:flex-end; }
.hero__cta { display:inline-block; padding:0.75rem 1.75rem; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; font-size:0.875rem; text-decoration:none; border:2px solid transparent; transition:background-color 0.2s, border-color 0.2s; }
.hero__cta--primary { background-color:var(--primary-template); border-color:var(--primary-template); color:#fff; }
.hero__cta--secondary { background-color:transparent; border-color:rgba(255,255,255,0.6); color:#fff; }
.hero__cta--secondary:hover { background-color:rgba(255,255,255,0.1); }

/* Dot navigation */
.hero__dots { position:absolute; bottom:1.25rem; left:50%; transform:translateX(-50%); z-index:10; display:flex; gap:0.25rem; }
.hero__dot { width:6px; height:6px; border-radius:50%; border:2px solid #fff; background:transparent; cursor:pointer; padding:8px; box-sizing:content-box; transition:background-color 0.2s; }
.hero__dot--active, .hero__dot:hover { background:#fff; }
.hero__dot:focus-visible { outline:2px solid #fff; outline-offset:2px; }

/* Arrow navigation */
.hero__arrow { position:absolute; top:50%; transform:translateY(-50%); z-index:10; background:rgba(0,0,0,0.3); color:#fff; border:none; font-size:1.5rem; padding:0.75rem 1rem; cursor:pointer; transition:background-color 0.2s; line-height:1; }
.hero__arrow:hover { background:rgba(0,0,0,0.6); }
.hero__arrow:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.hero__arrow--prev { left:0; border-radius:0 4px 4px 0; }
.hero__arrow--next { right:0; border-radius:4px 0 0 4px; }

/* Card strip — white elevated cards with carousel */
.hero__card-strip {
    position:relative; z-index:10;
    margin-top:-60px; /* overlap the hero bottom edge */
    padding-bottom:1.5rem;
}
.hero__card-strip-inner { overflow:hidden; touch-action:pan-y pinch-zoom; }
.hero__card-strip-track {
    display:flex; gap:1.5rem;
    -webkit-user-select:none; user-select:none;
    transition:transform 0.4s ease;
    will-change:transform;
}

/* Card base */
.hero__card {
    flex:0 0 auto;
    background:#fff; 
    border-radius: 0.25rem;
    box-shadow:0 4px 20px rgba(0,0,0,0.10);
    overflow:hidden; position:relative;
    display:flex; flex-direction:column;
    cursor:pointer;
    margin-bottom: 20px;
    transition: 0.5s;
}
.hero__card:hover {box-shadow: 0 0 20px #999;}
/* Card thumbnail */
.hero__card-thumb { width:100%; aspect-ratio:16/10; overflow:hidden; flex-shrink:0; position:relative; }
.hero__card-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.35s ease; }
.hero__card:hover .hero__card-thumb img,
.hero__card:focus-within .hero__card-thumb img { transform:scale(1.05); }

/* Card body */
.hero__card-body { padding:1.25rem 1.5rem; flex:1; }
.hero__card-title { font-weight:700; font-size:1.05rem; line-height:1.3; color:#1a1a1a; }
.hero__card-title a { color:inherit; text-decoration:none; }
.hero__card-title a:hover { text-decoration:underline; }
.hero__card-accent { display:block; width:40px; height:3px; background:var(--primary-template); margin:0.5rem 0; border:none; }
.hero__card-subtitle { font-size:0.85rem; color:#666; margin-bottom:0.5rem; }
.hero__card-desc { font-size:0.875rem; color:#444; line-height:1.5; }

/* Card metadata footer */
.hero__card-footer {
    display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap;
    padding:0.625rem 1.5rem; border-top:1px solid #eee;
    font-size:0.78rem; color:#888;
}
.hero__card-avatar { width:26px; height:26px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.hero__card-author { color:#555; font-weight:500; }
.hero__card-meta { display:flex; align-items:center; gap:0.5rem; margin-left:auto; flex-wrap:wrap; }
.hero__card-meta span + span::before { content:'·'; margin-right:0.5rem; }
.hero__card-price { font-weight:700; color:#1a1a1a; }

/* Hover overlay — scoped to .hero__card-thumb, covers thumbnail only */
.hero__card-overlay {
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    opacity:0; transition:opacity 0.3s ease;
    z-index:5; pointer-events:none;
    background-color:var(--primary-template);
}
.hero__card:hover .hero__card-overlay,
.hero__card:focus-within .hero__card-overlay { opacity:0.88; }
.hero__card-overlay span {
    color:#fff; font-weight:700; font-size:1rem;
    text-transform:uppercase; letter-spacing:0.06em;
    text-align:center; padding:0 1rem;
}

/* Card carousel navigation arrows */
.hero__card-strip-nav {
    position:absolute; top:calc(50% - 1.5rem); transform:translateY(-50%);
    z-index:6; background:#fff; border:none; border-radius:50%;
    width:40px; height:40px;
    box-shadow:0 2px 8px rgba(0,0,0,0.15);
    cursor:pointer; font-size:1.5rem; line-height:1;
    display:flex; align-items:center; justify-content:center;
    transition:box-shadow 0.2s;
}
.hero__card-strip-nav:hover { box-shadow:0 4px 14px rgba(0,0,0,0.22); }
.hero__card-strip-nav:focus-visible { outline:2px solid var(--primary-template); outline-offset:2px; }
.hero__card-strip-nav[disabled] { opacity:0.3; cursor:default; pointer-events:none; }
.hero__card-strip-nav--prev { left:-20px; }
.hero__card-strip-nav--next { right:-20px; }

@media (max-width: 991px) {
    .hero__content-image { display:none; }
}


/* ==========================================================================
   4. V6 — SEARCH HERO
   ========================================================================== */

.hero--search {
    min-height: 520px;
    display: flex;
    align-items: center;
}

/* Wrapper centers the search form and limits its width */
.hero__search-wrapper {
    margin-top: 2rem;
    width: 100%;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* The form itself */
.hero__search-form {
    width: 100%;
}

/* Input + button side by side */
.hero__search-input-group {
    display: flex;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    overflow: hidden;
}

/* Text input */
.hero__search-input {
    flex: 1;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    border: none;
    border-radius: 0;
    outline: none;
    color: #111111;
    background: #ffffff;
    min-width: 0;
}

.hero__search-input::placeholder {
    color: #888888;
}

.hero__search-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary-template);
}

/* Submit button */
.hero__search-btn {
    flex: 0 0 auto;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 0;
    background-color: var(--primary-template);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.hero__search-btn:hover,
.hero__search-btn:focus {
    background-color: #004570;
    outline: none;
}

.hero__search-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

.hero__search-icon {
    font-size: 0.9rem;
}

/* Quick-link chips row */
.hero__quick-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.hero__quick-links-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin-right: 0.25rem;
}

.hero__quick-link-chip {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    line-height: 1.4;
}

.hero__quick-link-chip:hover,
.hero__quick-link-chip:focus {
    background-color: var(--chip-accent, rgba(255, 255, 255, 0.2));
    border-color: var(--chip-accent, rgba(255, 255, 255, 0.9));
    outline: none;
}

.hero__quick-link-chip:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}


/* ── V6b: Tabbed Carousel Hero ─────────────────────────────────────────────── */
.hero--tabbed { position:relative; width:100%; min-height:600px; overflow:hidden; display:flex; flex-direction:column; touch-action:pan-y pinch-zoom; -webkit-user-select:none; user-select:none; }
.hero__tab-bar { position:absolute; bottom:0; left:0; right:0; z-index:10; display:flex; background:linear-gradient(to bottom, transparent, rgba(0,0,0,0.7)); }
.hero__tab { flex:1; padding:1rem 0.75rem; border:none; border-top:none; border-bottom:3px solid transparent; background:transparent; color:#fff; font-size:0.8rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; cursor:pointer; position:relative; transition:background-color 0.2s; text-align:center; }
.hero__tab--active { text-decoration: underline; text-decoration-color: var(--accent-template); text-decoration-thickness: 4px;text-underline-position: under; }
.hero__tab:hover, .hero__tab:focus { outline:none; }
.hero__tab:focus-visible { outline:2px solid #fff; outline-offset:-2px; }
.hero--tabbed .hero__content { padding-bottom:6rem; }

@media (max-width: 991px) {
    .hero--tabbed { min-height:520px; }
    .hero__tab { font-size:0.7rem; padding:0.75rem 0.5rem; letter-spacing:0.04em; }
}
@media (max-width: 767px) {
    .hero--tabbed { min-height:480px; }
    .hero__tab-bar { flex-wrap:wrap; }
    .hero__tab { flex:1 1 50%; font-size:0.7rem; border-right:1px solid rgba(255,255,255,0.15); box-shadow:inset 0 -1px 0 rgba(255,255,255,0.15); }
    .hero--tabbed .hero__content { padding-bottom:8rem; }
}




/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablets and below (992px) */
@media (max-width: 991px) {

    /* V1 Carousel: card strip overlap reduces on tablet */
    .hero__card-strip { margin-top:-60px; }

}

/* Mobile (768px) */
@media (max-width: 767px) {

    .hero__content { padding:2rem 1.25rem; }
    .hero__dots { bottom:0.75rem; }

    /* V1 Card strip: remove overlap on mobile */
    .hero__card-strip { margin-top:0; padding-top:1.5rem; }
    .hero__card-strip-nav--prev { left:-16px; }
    .hero__card-strip-nav--next { right:-16px; }

    /* V6 Search: stack input + button vertically */
    .hero__search-input-group {
        flex-direction: column;
        border-radius: 4px;
        overflow: visible;
        box-shadow: none;
    }
    .hero__search-input {
        border-radius: 4px 4px 0 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    }
    .hero__search-btn {
        border-radius: 0 0 4px 4px;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    }
    .hero__search-wrapper {
        padding: 0 0.5rem;
    }

    /* CTAs: full width on mobile */
    .hero__cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    .hero__content--center .hero__cta-group {
        align-items: center;
    }
    .hero__cta {
        width: 100%;
        text-align: center;
    }
}

/* Small mobile (480px) */
@media (max-width: 479px) {

    .hero__content {
        padding: 2.5rem 1rem;
    }

    /* V6: chips wrap naturally */
    .hero__quick-links {
        justify-content: flex-start;
    }
}


/* ==========================================================================
   6. REDUCED MOTION — respect user OS preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .hero__cta,
    .hero__search-btn,
    .hero__quick-link-chip,
    .hero__card {
        transition: none;
    }

    .hero__slide,
    .hero__tab,
    .hero__dot,
    .hero__arrow {
        transition: none;
    }
}


/* ==========================================================================
   7. HIGH CONTRAST / FORCED COLORS
   ========================================================================== */

@media (forced-colors: active) {

    .hero__cta {
        border: 2px solid ButtonText;
    }

    .hero__search-input {
        border: 1px solid ButtonText;
    }

    .hero__quick-link-chip {
        border: 1px solid ButtonText;
    }
}
