/* Premium Featured Media Layer - Canal+ Inspired */
.media-layer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 85vh;
    overflow: hidden;
    background: #000;
}

@media (max-width: 768px) {
    .media-layer { 
        aspect-ratio: 4 / 3; /* Immersive mobile vertical ratio */
        height: auto;
    }
}

.video-item {
    position: absolute;
    inset: 0;
    z-index: 10;
}

.video-item.overlay-intro {
    z-index: 20;
    background: #000;
    transition: opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1), transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.video-item.longFadeOutAnimation {
    opacity: 0;
    transform: scale(1.08); /* Billboard expands as it dissolves */
    pointer-events: none;
}

#Youtubeer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 105vw;
    height: 60vw;
    min-height: 105%;
    min-width: 180vh;
    transform: translate(-50%, -50%) scale(1.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#Youtubeer.active {
    opacity: 0.8;
}

/* UNIFIED BILLBOARD OVERLAY */
.intro-billboard {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.intro-billboard picture,
.intro-billboard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark Vignette for Text Legibility */
.intro-billboard::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
    pointer-events: none;
}

.parallax-zoom {
    animation: slowZoomIn 8s ease-out forwards;
}

@keyframes slowZoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Dynamic Text Overlay */
.intro-text-overlay {
    position: absolute;
    bottom: 10%;
    left: 5%;
    color: #fff;
    z-index: 22;
    text-align: left;
    max-width: 600px;
}

.intro-title {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1;
    font-style: italic;
    letter-spacing: -1px;
    text-transform: none;
}

.intro-brand {
    font-size: 4.5rem;
    font-weight: 900;
    font-style: normal;
    letter-spacing: -2px;
    display: block;
    margin-top: 10px;
}

.intro-brand span {
    color: #EC3655;
}

/* NEW INNOVATION: Progress Bar */
.intro-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 25;
}

.intro-progress-bar {
    width: 0%;
    height: 100%;
    background: #EC3655;
    transition: width 5s linear;
}

/* OVERLAY UI */
.trailer-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

.btn-trailer {
    position: absolute;
    bottom: 55px;
    left: 40px; 
    pointer-events: auto;
    background: #EC3655;
    color: white !important;
    padding: 12px 28px;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 5s, transform 0.8s ease 5s;
}

.btn-trailer.visible {
    opacity: 1;
    transform: translateY(0);
}

.media-mute-btn {
    position: absolute;
    bottom: 55px;
    left: 220px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease 5s, background 0.3s ease;
}

.media-mute-btn.visible {
    opacity: 1;
    transform: scale(1);
}

.media-mute-btn:hover {
    background: rgba(236, 54, 85, 0.4);
    border-color: #EC3655;
}

.trailer-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    transition: all 2s cubic-bezier(0.19, 1, 0.22, 1);
    white-space: nowrap;
}

.trailer-logo span {
    color: #EC3655;
}

.trailer-logo.settled {
    bottom: 55px;
    right: 40px;
    left: auto;
    top: auto;
    transform: scale(0.85);
    opacity: 1;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.9);
}

.trailer-logo.intro-center {
    opacity: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2.2);
}

/* MOBILE REFINEMENTS - NO MODIFICATION TO SITE HERO, ONLY THIS SECTION */
@media (max-width: 768px) {
    .intro-text-overlay {
        bottom: 12%;
        left: 5%;
        text-align: center;
        width: 90%;
        max-width: none;
    }
    .intro-title { 
        font-size: 1.4rem; 
        line-height: 1.2;
    }
    .intro-brand { 
        font-size: 2.2rem; 
        margin-top: 5px;
    }
    .btn-trailer {
        bottom: 25px;
        right: 20px;
        left: auto;
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    .trailer-logo.settled {
        bottom: 25px;
        left: 20px;
        right: auto;
        transform: scale(0.55);
    }
    .media-mute-btn {
        bottom: 25px;
        left: 50%;
        transform: translate(-50%, 0) scale(0.7);
        width: 35px;
        height: 35px;
    }
}
