/**
 * Homepage-specific Hero styles
 * 
 * NOTE: This file depends on hero.css for base hero styling.
 * Homepage hero has unique components including video support and card grid.
 */

/* =========================================
   1. HOMEPAGE HERO SECTION
   ========================================= */

body.home section.hero.homepage-hero {
    /* Base positioning and background */
    position: relative;
    margin: 0 !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Dark overlay */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background-color: rgba(0, 0, 0, 0.2); /* 20% dark overlay */
    }
    


    
    /* Hero wrapper */
    .hero-wrapper {
        &.has-image {
            flex-direction: column;
          
            display: flex;
            align-items: center;
            justify-content: center;
           
        }
    }
    
    /* Hero content */
    .hero-content {
        &.has-image {
            margin: 4.8rem 0 0 0;
            text-align: center;
            background-color: transparent !important; /* Override base hero style */
            @media(max-width:992px){
                margin-top: 9.8rem;
            }
            @media(max-width:659px){
                margin-top: 4.8rem;
            }
            @media(max-width:549px){
                margin-top: 0rem;
            }
        }
    }
    
    /* Hero content doublebag */
    .hero-content-doublebag {
        &.has-image {
            top: 0;
            transform: none;
            margin: 0 auto;
            background-color: transparent !important;
            text-align: center;
            max-width: 80rem;
            
            @media (min-width: 992px) {
                margin-top: 2rem;
            }
            
            
            .hero-description {
                margin: 0 auto 3.6rem;
                max-width: 70rem;
            }
            
            .hero-content-wrapper {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            
            .btn {
                display: inline-block;
                margin: 0 auto;
            }
        }
    }
    
    /* Video background */
    .hero-video-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        overflow: hidden;
        pointer-events: none; 
        opacity: 0; 
        transition: opacity 1s ease-in-out;
        
        /* Loaded state - activated by JS */
        &.loaded {
            opacity: 1;
        }
        
        /* Mobile hiding for performance */
        @media (max-width: 767px) {
            display: none;
        }
        
        /* iframes and videos */
        iframe,
        video.self-hosted-video {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100vw;
            height: 56.25vw; /* 16:9 aspect ratio */
            min-height: 100%;
            min-width: 177.77vh; /* Ensures 16:9 video covers container height */
            background: transparent; 
            object-fit: cover;
            
            /* Desktop sizing adjustments */
            @media (min-width: 992px) {
                width: 100%;
                height: 100%;
                min-width: 100%;
                object-position: center center;
            }
        }
    }

    .hero-title {
        text-shadow: 1px 1px 5px rgb(0 0 0 / 30%);
    }
}

/* Homepage Hero Cards */

.home #layout-text_with_cards-1 {
    margin-top:-140px !important;
    .glide__arrows{
        display:none;
    }
}
