/* ================================================================
YOUTUBE CTA SECTION - Factory Image + Overlay + Logo
================================================================ */

/* ========== BASE ========== */
.packaging-youtube-section {
    position: relative;
    width: 100%;
    margin-top: 80px;
    overflow: hidden;
}

/* Responsive YouTube embed (replaces link-only CTA when URL is recognized) */
.packaging-video-embed-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 2rem;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.35);
}

.packaging-video-embed-wrap:last-child {
    margin-bottom: 0;
}

.packaging-video-iframe {
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: 0;
    display: block;
}

@media (max-width: 767.98px) {
    .packaging-video-embed-wrap {
        max-width: min(360px, 100%);
        margin-bottom: 1.25rem;
    }
}

/* ========== DESKTOP LAYOUT (≥768px) ========== */
.packaging-youtube-desktop {
    display: block;
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.packaging-youtube-mobile {
    display: none;
}

/* Factory Image - Desktop */
.packaging-youtube-factory-img {
    width: 1280px;
    max-width: 100%;
    height: 633px;
    object-fit: cover;
    display: block;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
}

/* Overlay Container - Desktop */
.packaging-youtube-overlay {
    position: absolute;
    width: 400px;
    height: 100px;
    top: 242px; /* 3417px - 3175px (relative to factory img top) */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(217, 217, 217, 0.15);
    border-radius: 25px;
    /* opacity: 0.15; */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Let clicks pass to link inside */
}

/* YouTube Link - Desktop */
.packaging-youtube-link {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    pointer-events: auto;
    z-index: 2;
}

/* YouTube Logo - Desktop */
.packaging-youtube-logo {
    width: 244.65px;
    height: 58.16px;
    object-fit: contain;
    opacity: 1;
    transition: transform 0.3s ease;
}

.packaging-youtube-link:hover .packaging-youtube-logo {
    transform: scale(1.05);
}

/* ========== MOBILE LAYOUT (≤767px) ========== */
@media (max-width: 767.98px) {
    .packaging-youtube-desktop {
        display: none;
    }
    
    .packaging-youtube-mobile {
        display: block;
        position: relative;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }
    
    /* Factory Image - Mobile */
    .packaging-youtube-factory-img-mobile {
        width: 360px;
        max-width: 100%;
        height: 194px;
        object-fit: cover;
        display: block;
        box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.25);
        margin: 0 auto;
    }
    
    /* Overlay Container - Mobile */
    .packaging-youtube-overlay-mobile {
        position: absolute;
        width: 99.93px;
        height: 25.26px;
        top: 66px; /* 850px - 784px (relative to factory img top) */
        left: 50%;
        transform: translateX(-50%);
        background: rgba(217, 217, 217, 0.15);
        border-radius: 25px;
        /* opacity: 0.15; */
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }
    
    /* YouTube Link - Mobile */
    .packaging-youtube-link-mobile {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        pointer-events: auto;
        z-index: 2;
    }
    
    /* YouTube Logo - Mobile */
    .packaging-youtube-logo-mobile {
        width: 99.93px;
        height: 25.26px;
        object-fit: contain;
        opacity: 1;
        transition: transform 0.3s ease;
    }
    
    .packaging-youtube-link-mobile:hover .packaging-youtube-logo-mobile {
        transform: scale(1.05);
    }
}

/* Small Mobile (≤319px) */
@media (max-width: 319.98px) {
    .packaging-youtube-factory-img-mobile {
        width: calc(100vw - 40px);
        max-width: 360px;
        height: auto;
        aspect-ratio: 360 / 194;
    }
    
    .packaging-youtube-overlay-mobile {
        width: 90px;
        height: 23px;
        top: 60px;
    }
    
    .packaging-youtube-logo-mobile {
        width: 90px;
        height: 23px;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .packaging-youtube-logo,
    .packaging-youtube-logo-mobile {
        transition: none !important;
    }
}