/* Hero Video Background Template - Clean & Simplified CSS */
/* Used by: About Us, Other Services, and other pages using hero-video-bg.php */

/* Hero Section - Main Container with Background - Modern Design */
.about-hero.other-services-hero {
    position: relative;
    width: 100vw;
    min-height: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-dark-blue) 0%, var(--color-primary-navy) 50%, var(--color-primary-dark-blue) 100%);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -80px; /* Pull up to eliminate gap from header */
    padding: 0;
    isolation: isolate;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .about-hero.other-services-hero {
        min-height: 550px;
        height: auto;
        margin-top: -70px; /* Mobile: 70px header */
        align-items: flex-end;
        padding-bottom: var(--spacing-lg);
        padding-top: var(--spacing-md);
    }
    
    .about-hero__bg {
        min-height: 100%;
    }
    
    .about-hero__bg img {
        object-position: center top;
        min-height: 100%;
        width: 100%;
    }
}

/* Background Image Container */
.about-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.about-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 1;
    will-change: transform;
    animation: heroImageFadeIn 1s ease-out;
    transform: scale(1.05);
    transition: transform var(--transition-slow);
}

.about-hero.other-services-hero:hover .about-hero__bg img {
    transform: scale(1);
}

@keyframes heroImageFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Modern Gradient Overlay for better text readability */
.about-hero__bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(23, 23, 73, 0.85) 0%,
        rgba(39, 65, 133, 0.75) 50%,
        rgba(23, 23, 73, 0.9) 100%
    );
    z-index: 2;
    animation: overlayFadeIn 0.8s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Decorative gradient accent */
.about-hero__bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 20% 50%,
        rgba(247, 168, 37, 0.15) 0%,
        transparent 50%
    );
    z-index: 3;
    pointer-events: none;
}

/* Background Elements Container */
.hero-background-elements {
    position: absolute;
    inset: 0;
    display: none;
}

@media (min-width: 768px) {
    .hero-background-elements {
        display: block;
    }
}

/* Background Circles */
.hero-bg-circle {
    position: absolute;
    border-radius: 50%;
}

.hero-bg-circle--1 {
    top: 0;
    left: 0;
    width: 24rem;
    height: 24rem;
    background-color: #f7941d;
    opacity: 0.1;
    transform: translate(-50%, -50%);
}

.hero-bg-circle--2 {
    bottom: 0;
    right: 0;
    width: 20rem;
    height: 20rem;
    background-color: #f7941d;
    opacity: 0.05;
    transform: translate(50%, 50%);
}

.hero-bg-circle--3 {
    top: 50%;
    left: 25%;
    width: 16rem;
    height: 16rem;
    background-color: white;
    opacity: 0.05;
    transform: translate(-50%, -50%);
}

.hero-bg-circle--4 {
    top: 33.333333%;
    right: 33.333333%;
    width: 12rem;
    height: 12rem;
    background-color: #f7941d;
    opacity: 0.08;
}

/* Decorative Circles */
.hero-decorative-circle {
    position: absolute;
    border-radius: 50%;
    background-color: #f7941d;
}

.hero-decorative-circle--1 {
    top: -1rem;
    right: -1rem;
    width: 2rem;
    height: 2rem;
    opacity: 0.6;
}

.hero-decorative-circle--2 {
    bottom: -1rem;
    left: -1rem;
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.4;
}

/* Text Content */
.hero-text-content {
    color: #fff;
    z-index: 3;
    position: relative;
    text-align: left;
}

/* Video Content */
.hero-video-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 3;
    position: relative;
}

.hero-video-content .relative {
    width: 100%;
    max-width: 600px;
}

.hero-video-content .bg-white {
    width: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-video-content .aspect-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    min-height: 300px;
}

.hero-video-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 300px;
    border: none;
    border-radius: 1.5rem 1.5rem 0 0;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Video hover effect */
.hero-video-content:hover iframe {
    transform: scale(1.03);
}

/* Responsive Design */
@media (max-width: 1023px) {
    .about-hero.other-services-hero {
        min-height: 400px;
        height: 400px;
    }
    
    .about-hero__content {
        padding-bottom: var(--spacing-lg);
    }
    
    .hero-video-content {
        margin-top: 2rem;
    }
    
    .hero-video-content .relative {
        max-width: 100%;
    }
    
    .hero-video-content .aspect-video {
        min-height: 250px;
    }
    
    .hero-video-content iframe {
        min-height: 250px;
    }
}

@media (max-width: 767px) {
    .about-hero.other-services-hero {
        min-height: 350px;
        height: 350px;
        align-items: flex-end;
    }
    
    .about-hero__content {
        padding-bottom: var(--spacing-md);
        text-align: left;
    }
    
    .about-hero__title {
        font-size: 2rem;
    }
    
    .about-hero__desc {
        font-size: var(--font-size-sm);
    }
    
    .about-hero.other-services-hero .grid {
        justify-content: center !important;
        align-items: center !important;
    }
    
    .hero-text-content {
        text-align: center;
    }
    
    .hero-text-content h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-video-content {
        margin-top: 1.5rem;
        display: block !important;
    }
    
    .hero-video-content .relative {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hero-video-content .bg-white {
        display: block !important;
        width: 100% !important;
        border-radius: 1rem;
    }
    
    .hero-video-content .aspect-video {
        padding-bottom: 56.25%;
        min-height: 200px;
        display: block !important;
        overflow: visible !important;
    }
    
    .hero-video-content iframe {
        min-height: 200px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        border-radius: 1rem 1rem 0 0;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Ensure body doesn't have horizontal scroll */
body {
    overflow-x: hidden;
}
