/* Rendimiento global */
.below-fold-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 480px;
}

.hero-lcp-img,
.hero picture img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hero picture {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
}

video.hero-background,
video.hero-video-desktop,
video[data-deferred-video] {
    object-fit: cover;
}

/* Móvil: solo imagen WebP (sin descargar vídeo) */
@media (hover: none), (max-width: 768px) {
    video.hero-background,
    video.hero-video-desktop,
    video[data-deferred-video] {
        display: none !important;
    }
}

/* Escritorio: vídeo sobre el poster WebP cuando está activo */
@media (min-width: 769px) and (hover: hover) {
    video.hero-background,
    video.hero-video-desktop,
    video[data-deferred-video] {
        display: block;
    }

    .hero.hero--video-active picture,
    .hero.hero--video-active .hero-lcp-img,
    .course-hero.hero--video-active picture,
    .course-hero.hero--video-active .hero-lcp-img {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    video.hero-background,
    video.hero-video-desktop,
    video[data-deferred-video] {
        display: none !important;
    }
}

@media (hover: none), (max-width: 768px) {
    .blog-header::before,
    .blog-header::after,
    .newsletter-header::before,
    .newsletter-header::after {
        display: none !important;
    }

    .hero::before {
        animation: none !important;
        display: none;
    }

    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .below-fold-section {
        contain-intrinsic-size: auto 320px;
    }
}

iframe[loading="lazy"],
img[loading="lazy"] {
    content-visibility: auto;
}

iframe[data-src] {
    background: #f5f5f5;
    min-height: 200px;
}

.youtube-lazy-placeholder {
    background: #1a1a1a;
    min-height: 200px;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 16px !important;
        min-height: 420px;
    }

    .hero-text h1 {
        font-size: 1.75em !important;
        line-height: 1.25 !important;
    }
}
