/*
 * Homepage hero: full-bleed background media (admin-uploaded hero image/video, or the
 * site default -- see templates/myapp/index.html), a dark gradient overlay so white copy
 * stays legible on the left, a floating white search card on the right, and a dark trust
 * strip overlapping the bottom edge of the media. Scoped under its own `.home-*` classes
 * rather than editing the shared theme stylesheet (static/css/myapp/style.css), which other
 * pages also depend on for `.hero`/`.card`-style classes.
 *
 * Colors come from the project's own --primary-color/--secondary-color custom properties
 * (set inline in templates/myapp/partials/layout.html from ProjectSettings.primary_color/
 * secondary_color), never hardcoded, so this follows whatever an admin configures there.
 */

.home-hero {
    position: relative;
    overflow: hidden;
    padding-bottom: 3rem;
}

.home-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.home-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Darker on the left (where the white text sits) fading toward the right (where the white
   search card already provides its own contrast) -- matches a real photographic hero
   treatment instead of one flat scrim over the whole image. */
.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(10, 10, 12, 0.82) 0%, rgba(10, 10, 12, 0.55) 45%, rgba(10, 10, 12, 0.15) 75%);
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

/* --------------------------------------------------------------------- left column --- */

.home-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.home-hero-eyebrow-bar {
    display: inline-block;
    width: 2rem;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.home-hero-title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

.home-hero-title-accent {
    display: block;
    color: var(--primary-color);
}

.home-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    max-width: 34rem;
    margin-bottom: 1.75rem;
}

.home-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.home-hero-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: #fff;
}

.home-hero-badge i {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-top: 0.15rem;
}

.home-hero-badge strong {
    display: block;
    font-size: 0.92rem;
}

.home-hero-badge span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

/* -------------------------------------------------------------------- search card --- */

.home-hero-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.home-hero-card-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.home-hero-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.04);
    color: var(--primary-color);
}

.home-hero-card-title {
    color: var(--heading-color, #2d465e);
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.home-hero-form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.home-hero-form .form-select {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

/* select2 replaces the plain <select> with its own markup (static/js/myapp -- see
   templates/myapp/index.html's inline init); these rules just bring its generated
   container in line with the card's own .form-select sizing/rounding instead of
   select2's default boxy look. */
.home-hero-form .select2-container--default .select2-selection--single {
    height: calc(1.5em + 1.3rem + 2px);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
}

.home-hero-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: normal;
    color: #212529;
}

.home-hero-form .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

.home-hero-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

.home-hero-form .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color);
}

.home-hero-form .select2-dropdown {
    border-radius: 0.5rem;
    overflow: hidden;
    border-color: var(--primary-color);
}

.home-hero-form .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
}

.home-hero-search-btn {
    position: relative;
    overflow: hidden;
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
}

.home-hero-search-btn:after {
    content: '';
    position: absolute;
    top: -20%;
    bottom: -20%;
    width: 25%;
    left: -30%;
    background: linear-gradient(90deg, transparent, #ffffff35, transparent);
    transform: skewX(-20deg);
    animation: buttonSheen 3s linear infinite;
}

/* 0-40%: paused off-screen left (1.2s of the 3s cycle). 40-85%: the glide itself (1.35s,
   `linear` so it crosses evenly rather than `ease-in-out`'s slow-fast-slow, which used to
   crush almost all of the visible crossing into well under half a second even though the
   keyframe window was wider). 85-100%: paused off-screen right (0.45s) before snapping back
   to the start. Net: a slow ~1.2s glide, once every 3s. */
@keyframes buttonSheen {
      0%,
      40% {
        left: -30%
      }
      85%,
      100% {
        left: 110%
      }
}

.home-hero-search-btn:hover,
.home-hero-search-btn:focus {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.home-hero-card-footnote {
    text-align: center;
    margin: 1.1rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.home-hero-card-footnote a {
    font-weight: 600;
    text-decoration: underline !important;
}

/* -------------------------------------------------------------------- trust strip --- */

.home-trust-strip-wrap {
    position: relative;
    z-index: 1;
    margin-top: -1.5rem;
}

.home-trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem 1rem;
    background: #15161a;
    border-radius: 0.9rem;
    padding: 1.5rem 2rem;
}

.home-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #fff;
    flex: 1 1 12rem;
}

.home-trust-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 0.2rem;
}

.home-trust-item strong {
    display: block;
    font-size: 0.95rem;
}

.home-trust-item span {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.home-trust-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 991px) {
    .home-trust-divider {
        display: none;
    }
}

@media (max-width: 767px) {
    .home-hero-inner {
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    .home-hero-card {
        padding: 1.5rem;
    }

    .home-trust-strip-wrap {
        margin-top: 1.5rem;
    }

    .home-trust-strip {
        padding: 1.25rem;
    }
}
