/* ==========================================================================
   Hero Stylesheet (hero_style.css)
   Centralized hero section styling for exateq.
   - Home Hero: Fullscreen / Video / Immersive background.
   - Global Subpage Hero: Standardized across all subpages.
     * Content (Text, Badge, Buttons) on the left.
     * Media / Image container on the right.
     * Linear gradient overlay from left (solid) fading into transparency on the right.
     * Configurable colors & image sizes/fitting.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base Hero Section & Elements (Global / Home)
   -------------------------------------------------------------------------- */
.heroSection {
    position: relative;
    width: 100%;
    min-height: 520px;
    height: 75vh;
    max-height: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--hero-bg, #102d59);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Background image support via CSS class or inline style */
.heroSection.hasBgImage,
.heroSection[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Home / Base Background Media Containers */
.heroImageContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.heroImageContainer img,
.heroBgImage {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85);
    z-index: 1;
}

.heroOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 85% 20%, rgba(85, 100, 170, 0.28) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
}

/* High-contrast gradient overlay for image-backed home heroes */
.heroSection.hasBgImage .heroOverlay,
.heroSection[style*="background-image"] .heroOverlay,
.heroOverlay.darkOverlay,
.heroImageOverlay {
    background: linear-gradient(
        135deg,
        rgba(16, 24, 48, 0.85) 0%,
        rgba(26, 35, 66, 0.72) 50%,
        rgba(42, 56, 102, 0.65) 100%
    );
    z-index: 2;
}

/* Video hero elements */
.videoContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.videoContainer video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.85);
}

.videoOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(20, 28, 55, 0.82) 0%,
        rgba(40, 52, 95, 0.65) 50%,
        rgba(85, 100, 170, 0.55) 100%
    );
    z-index: 2;
}

/* --------------------------------------------------------------------------
   2. Typography, Badges & Actions (Common)
   -------------------------------------------------------------------------- */
.heroContentWrapper {
    position: relative;
    z-index: 3;
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.heroContent {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: fadeInHero 0.8s ease-out;
}

.heroBadge {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.heroHeadline {
    color: #ffffff !important;
    font-size: clamp(2.2rem, 4.2vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.heroSubtitle {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.55;
    margin-bottom: 30px;
    max-width: 780px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.heroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* --------------------------------------------------------------------------
   3. Unified Global Subpage Hero Layout
   - Right-aligned image
   - Left-to-right gradient fade into transparency
   - Left-aligned content (Headline, Badge, Subtitle, Actions)
   -------------------------------------------------------------------------- */
.heroSection.subpageHero {
    min-height: 320px;
    height: auto;
    max-height: none;
    padding: 56px 0 50px 0;
    background-color: var(--hero-bg, #102d59);
    background-image: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Subpage hero image container: positioned on the right */
.heroSection.subpageHero .heroImageContainer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 100%;
    height: auto;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

/* Image on the right: contained and cleanly centered/aligned */
.heroSection.subpageHero .heroImageContainer img,
.heroSection.subpageHero .heroBgImage {
    position: absolute;
    top: 50%;
    right: 0;
    left: auto;
    transform: translateY(-50%);
    min-width: 58%;
    min-height: 100%;

    width: 58%;
    height: auto;

    max-height: none;
    max-width: 100%;

    object-fit: cover;
    object-position: right center;

    filter: none;
    z-index: 1;
}

/* Image sizing / fit modifiers */
.heroSection.subpageHero.heroCover .heroBgImage,
.heroSection.subpageHero .heroBgImage.heroCover {
    object-fit: cover;
    object-position: center;
}

.heroSection.subpageHero.heroContain .heroBgImage,
.heroSection.subpageHero .heroBgImage.heroContain {
    object-fit: contain;
    object-position: right center;
}

/* Color theme modifiers */
.heroSection.subpageHero.heroDarkBlue {
    --hero-bg: #081d49;
}

.heroSection.subpageHero.heroNavy {
    --hero-bg: #102d59;
}

.heroSection.subpageHero.heroDeepBlue {
    --hero-bg: #141c37;
}

/* Gradient overlay: solid on the left, fading seamlessly into transparency on the right */
.heroSection.subpageHero .heroOverlay,
.heroSection.subpageHero .heroImageContainer + .heroOverlay,
.heroSection.subpageHero .heroImageContainer ~ .heroOverlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--hero-bg, #102d59) 0%,
        var(--hero-bg, #102d59) 42%,
        rgba(16, 45, 89, 0.88) 58%,
        rgba(16, 45, 89, 0.35) 72%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 2;
}

.heroSection.subpageHero.heroDarkBlue .heroOverlay {
    background: linear-gradient(
        90deg,
        #081d49 0%,
        #081d49 32%,
        rgba(8, 29, 73, 0.88) 48%,
        rgba(8, 29, 73, 0.35) 72%,
        transparent 100%
    );
}

/* Subpage content formatting */
.heroSection.subpageHero .heroContentWrapper {
    padding: 0 20px;
}

.heroSection.subpageHero .heroContent {
    max-width: 620px;
    z-index: 3;
}

.heroSection.subpageHero .heroHeadline {
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    margin-bottom: 14px;
}

.heroSection.subpageHero .heroSubtitle {
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    margin-bottom: 0;
    max-width: 620px;
    line-height: 1.55;
}

.heroSection.subpageHero .heroActions {
    margin-top: 24px;
}

/* Optional inline video card (general option for any subpage hero) */
.heroVideoHero.subpageHero,
.heroSection.subpageHero.hasVideoCard,
.heroSection.subpageHero.heroWithVideo {
    min-height: 440px;
    padding: 55px 0;
}

.heroVideoHero.subpageHero .heroContentWrapper,
.heroSection.subpageHero.hasVideoCard .heroContentWrapper,
.heroSection.subpageHero.heroWithVideo .heroContentWrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.8fr);
    gap: 42px;
    align-items: center;
}

.heroVideoCard{
    min-width: 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 14px 38px rgba(7, 22, 44, 0.25);
    z-index: 4;
}

.heroVideoStart {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background: #102d59;
    color: white;
}

.heroVideoStart:focus-visible {
    outline: 3px solid #efd74f;
    outline-offset: 4px;
}

.heroVideoPoster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.heroVideoPlay{
    display: grid;
    place-items: center;
    position: absolute;
    left: 50%;
    top: 43%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    background: #5564aaf2;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 24px;
    padding-left: 3px;
    box-sizing: border-box;
}

.heroVideoLabel{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #102d59dc;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
}

.heroVideoPlayer{
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 10px;
    background: #102d59;
}

.heroVideoCard [hidden]{
    display: none !important;
}

.heroVideoCaption,
.heroVideoError{
    color: white;
    margin: 10px 8px 4px;
    font-size: 15px;
    line-height: 1.4;
}

.heroVideoError {
    color: #fff2bf;
}

/* --------------------------------------------------------------------------
   4. Careers & Articles Hero
   -------------------------------------------------------------------------- */
.careersHero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    background: #eef4fb;
}

.careersHeroPhoto {
    position: absolute;
    inset: 0 0 0 44%;
    overflow: hidden;
}

.careersPhoto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 35%;
}

.careersHeroShade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f5f9ff 45%, transparent);
}

.careersHeroContent {
    position: relative;
    padding-top: 38px !important;
    padding-bottom: 35px !important;
}

.careersHero h1 {
    font-size: clamp(38px, 4vw, 60px);
    line-height: 1.15;
    margin: 15px 0;
    color: #102d59;
}

.insightContainer .articleHero {
    background: #f0f5fb;
    padding: 65px 0 55px;
}

.insightContainer .articleHero h1 {
    font-size: clamp(33px, 4vw, 60px);
    line-height: 118%;
    max-width: 900px;
    margin: 14px 0 18px;
}

.insightContainer .articleHero .lead {
    font-size: 18px;
    line-height: 170%;
    color: #526880;
    max-width: 850px;
}

/* --------------------------------------------------------------------------
   5. Keyframes & Responsive Media Queries
   -------------------------------------------------------------------------- */
@keyframes fadeInHero {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 992px) {
    .heroSection.subpageHero .heroImageContainer {
        opacity: 0.85;
    }

    .heroSection.subpageHero .heroImageContainer img,
    .heroSection.subpageHero .heroBgImage {

        width: 40%;
    }

    .heroSection.subpageHero .heroOverlay,
    .heroSection.subpageHero .heroImageContainer + .heroOverlay {
        background: linear-gradient(
            90deg,
            var(--hero-bg, #102d59) 0%,
            var(--hero-bg, #102d59) 40%,
            rgba(16, 45, 89, 0.9) 60%,
            rgba(16, 45, 89, 0.45) 85%,
            transparent 100%
        );
    }

    .heroVideoHero.subpageHero .heroContentWrapper,
    .manualVideoHero.subpageHero .heroContentWrapper,
    .heroSection.subpageHero.hasVideoCard .heroContentWrapper,
    .heroSection.subpageHero.heroWithVideo .heroContentWrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .heroVideoCard,
    .manualVideoCard {
        max-width: 480px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 768px) {
    .heroSection {
        min-height: 480px;
        height: 70vh;
    }

    .heroSection.subpageHero .heroImageContainer img,
    .heroSection.subpageHero .heroBgImage {

        width: 100%;
    }

    .heroSection.subpageHero {
        min-height: 240px;
        height: auto;
        padding: 42px 0 38px 0;
    }

    .heroContentWrapper {
        padding: 30px 15px;
    }

    .heroSection.subpageHero .heroContentWrapper {
        padding: 0 16px;
    }

    .heroSection.subpageHero .heroImageContainer {
        opacity: 0.35;
    }

    .heroSection.subpageHero .heroOverlay,
    .heroSection.subpageHero .heroImageContainer + .heroOverlay {
        background: linear-gradient(
            90deg,
            rgba(16, 45, 89, 0.96) 0%,
            rgba(16, 45, 89, 0.88) 55%,
            rgba(16, 45, 89, 0.7) 100%
        );
    }

    .heroSection.subpageHero .heroContent {
        max-width: 100%;
    }

    .heroActions {
        flex-direction: column;
        width: 100%;
    }

    .heroActions .btn {
        width: 100%;
    }
}

@media screen and (max-width: 540px) {
    .heroHeadline {
        font-size: 2.1rem;
    }

    .heroSection.subpageHero .heroHeadline {
        font-size: 1.85rem;
    }

    .heroActions {
        flex-direction: column;
        width: 100%;
    }

    .heroActions .btn {
        width: 100%;
    }
}
