html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* HERO VIDEO */
.hero {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Overlay */
.video-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(17, 2, 2, 0.80); /* 60% */
    z-index: 1;
}

/***************************************************************** TEXTO */


.hero-text-carousel {
    position: absolute;
    top: 50%;
    left: 6vw;
    transform: translateY(-50%);
    z-index: 5;
    width: 70%;
    max-width: 900px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* TIPOGRAFÍA */
.hero-slide h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
}

.hero-slide p {
    font-size: 1.1rem;
    color: #4b89d8;
    margin-bottom: 1.2rem;
}

/* ANIMACIONES */
.slide-left {
    animation: slideLeft 0.9s ease forwards;
}

.slide-up {
    animation: slideUp 0.9s ease forwards;
}

.slide-fade {
    animation: fadeIn 1s ease forwards;
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-20px) translateY(30px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}

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



/****************************************************************** FIN */
/* NAVBAR INICIAL (TRANSPARENTE) */
#mainNav {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    background-color: transparent;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

/* NAVBAR AL HACER SCROLL */
#mainNav.scrolled {
    /* background-color: rgba(0, 0, 0, 0.995);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6); */
    background-color: #0f4186;
    box-shadow: 0 4px 15px rgba(15, 65, 134, 0.4);
}


#mainNav.scrolled .nav-link {
    color: #e6f0ff; /* celeste muy claro / casi blanco */
}

/* #mainNav.scrolled .nav-link:hover {
    color: #6fa8ff; 
} */

/* .navbar .nav-link:hover {
    color: #163aa3;
} */

#mainNav.scrolled .nav-link:hover,
.navbar .nav-link:hover {
    color: #afb7ce; /* Azul vibrante estilo tecnológico */
}

#mainNav.scrolled .nav-link.active {
    color: #ffffff;
}

#mainNav.scrolled .nav-link::after {
    background-color: #6fa8ff;
}

#mainNav.scrolled .navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

#mainNav.scrolled .navbar-toggler-icon {
    filter: brightness(2);
}


/* LOGO */
.logo {
    height: 100px;
    width: auto;
    transition: height 0.35s ease; 
}


/* Asegura que el contenido no quede tapado */
.content {
    margin-top: 100px;
}

.navbar {
    font-family: 'Inter', sans-serif;
}

.navbar .nav-link {
    color: #dbe1e9;; /* Las letras empiezan con tu azul */
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.navbar .nav-link {
    font-weight: 700;
}


.hero-slide h1,
.hero-slide p,
.hero-slide a {
    opacity: 0;
    transform: translateX(-40px);
}


.hero-slide.active h1 {
    animation: titleIn 0.8s ease-out forwards;
}

.hero-slide.active p {
    animation: textIn 0.8s ease-out forwards;
    animation-delay: 0.25s;
}

.hero-slide.active a {
    animation: buttonIn 0.8s ease-out forwards;
    animation-delay: 0.45s;
}


.hero-slide.leaving p {
    animation: textOut 0.5s ease-in forwards;
}

.hero-slide.leaving h1 {
    animation: titleOut 0.5s ease-in forwards;
    animation-delay: 0.2s;
}


@keyframes titleIn {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes textIn {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes buttonIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes textOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-20px); }
}

@keyframes titleOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-40px); }
}

.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Linea del Menu */
.navbar .nav-link {
    position: relative;
}

.navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #afb7ce; /* azul elegante */    
    transition: width 0.3s ease, left 0.3s ease;
}

.navbar .nav-link:hover::after {
    width: 100%;
    left: 0;
}

.navbar .nav-link.active::after {
    width: 100%;
    left: 0;
}

@media (max-width: 991px) {
    .navbar .nav-link::after {
        display: none;
    }
}


/****************************************************************** FOOTER */

.footer {
    background-color: #0f4186; /* azul corporativo */
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.footer-top {
    padding: 40px 0;
    background: transparent;
}

.footer-bottom {
    padding: 20px 0 15px;
    background: #0f4186;
    color: #fff;
}

.footer-bottom h6 {
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-bottom ul {
    padding: 0;
    list-style: none;
}

.footer-bottom ul li {
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-copy {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    opacity: 0.8;
    letter-spacing: 0.03em;
}

.footer-copy a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
}

.footer-copy a:hover {
    color: #6fa8ff;
    text-decoration: underline;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../assets/img/wm.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.25;   /* clave: MUY BAJO */
    pointer-events: none;
}


.footer > * {
    position: relative;
    z-index: 1;
}

.footer p,
.footer li,
.footer a {
    color: rgba(255,255,255,0.85);
}

.footer h6 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.footer a:hover {
    color: #6fa8ff;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .footer::before {
        opacity: 0.08;
    }
}

.libro-reclam {
    height: 40px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

.redes-sociales img {
    height: 80px;
    width: auto;
    margin: 0 6px;
    vertical-align: middle;
}

li a {
    text-decoration: none; /* quita el subrayado */
    color: inherit;        /* opcional: hereda el color del li */
}

/* Si quieres que al pasar el mouse cambie color pero siga sin subrayado */
li a:hover {
    color: #007bff; /* por ejemplo azul */
    text-decoration: none;
}

.sin-subrayado {
    text-decoration: none;
    color: inherit;
}

.sin-subrayado:hover {
    color: #007bff;
    text-decoration: none;
}

/***************************************** LOGO EMPRESA */
.logo-empresa {
    height: 20px;
    width: auto;
    margin-bottom: 15px;
}

.footer .logo-empresa {
    height: 45px;
    width: auto;
}

.footer .logos-empresa ul {
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: center;
    justify-content: flex-start;
}

.footer .logos-empresas li {
    margin: 0;
}


@media (max-width: 576px) {
    .footer .logos-empresas ul {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (min-width: 992px) {
    #mainNav.scrolled .logo {
        height: 55px; /* ajusta a gusto: 50–60px queda top */
    }
}

@media (max-width: 767px) {
    .footer-top .text-end {
        text-align: left !important;
    }

    .footer-top .text-end p,
    .footer-top .text-end a {
        display: block;
    }

    .footer-top .libro-reclam {
        margin-left: 0;
        margin-right: 8px;
    }

    .logo{
        height: 80px;
    }

    #mainNav.scrolled .logo {
    height: 50px;
}

    .hero-text-carousel {
        top: 35%;
        transform: translateY(-35%);
        width: 90%;
        left: 5vw;
    }    
}
/* ---------------------------
---------------------------
Seccion Quienes Somos
---------------------------
--------------------------- */

.section-info {
    padding: 80px 0;
    background-color: #f5f6f7;
}

.section-text {
    padding-right: 40px;
}

.section-paragraph {
    font-size: 15px;
    line-height: 1.7;
    color: #2b2b2b;
    margin-bottom: 18px;
    text-align: justify;
}

.section-btn {
    margin-top: 15px;
    padding: 10px 28px;
    font-weight: 600;
    border-radius: 4px;
}

.section-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}


.section-title {
    font-size: 34px;
    font-weight: 800;
    color: #1f2f46;
    margin-bottom: 35px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
}

/* línea decorativa elegante */
.section-title::after {
    content: "";
    width: 80px;
    height: 4px;
    background-color: #187cb6; /* azul elegante */ 
    position: absolute;
    left: 0;
    bottom: -12px;
}


/* 📱 MOBILE */
@media (max-width: 768px) {
    .section-info {
        padding: 50px 0;
    }

    .section-text {
        padding-right: 0;
        margin-bottom: 25px;
        text-align: left;
    }

    .section-paragraph {
        font-size: 14px;
    }

    .section-title {
        font-size: 26px;
        margin-bottom: 25px;
    }    
}

/* -------------------
-------------------
-------------------
Seccion Metricas
-------------------
-------------------
------------------- */

/* #atenas-group-section {
    background-color: #1f3b6d;
    padding: 90px 0;
    color: #ffffff;
} */

#atenas-group-section {
    /* Usamos tu color ancla y degradamos hacia un azul más claro, similar al PDF */
    background: linear-gradient(135deg, #0f4186 0%, #1e62bd 100%);
    padding: 90px 0;
    color: #ffffff;
    border-bottom: 3px solid #0f4186; /* Un detalle sutil para cerrar la sección */
}


#atenas-group-section .atenas-group-title {
    font-size: 34px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#atenas-group-section .atenas-group-subtitle {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 35px;
}

#atenas-group-section .atenas-group-logos {
    margin-bottom: 7px;
}

#atenas-group-section .atenas-group-logos img {
    height: 55px;
    margin: 0 15px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

#atenas-group-section .atenas-group-content {
    margin-top: 30px;
}

#atenas-group-section .atenas-group-text {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 18px;
    text-align: justify;
}

#atenas-group-section .atenas-group-metrics {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding-left: 40px;
}

#atenas-group-section .atenas-metric {
    border-left: 3px solid #6fa8ff;
    padding-left: 20px;
}

#atenas-group-section .atenas-counter {
    font-size: 42px;
    font-weight: 800;
    color: #6fa8ff;
    display: block;
}

#atenas-group-section .atenas-metric-label {
    font-size: 14px;
    opacity: 0.85;
}

/* 📱 Responsive */
@media (max-width: 991px) {
    #atenas-group-section .atenas-group-metrics {
        padding-left: 0;
        margin-top: 40px;
    }

    #atenas-group-section .atenas-group-text {
        text-align: left;
    }
}


/* ---------------------------------
Beneficios del Grupo empresarial
---------------------------------- */

/* ================= BENEFICIOS ESTERILIZA ================= */

.atenas-benefits-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.atenas-benefits-image img {
    width: 100%;
    max-width: 520px;
    display: block;
    margin: 0 auto;
}

.atenas-benefits-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2f46;
    margin-bottom: 25px;
}

.atenas-benefits-list {
    padding-left: 20px;
}

.atenas-benefits-list li {
    font-size: 15px;
    line-height: 1.8;
    color: #2b2b2b;
    margin-bottom: 18px;
    position: relative;
}

.atenas-benefits-list li::marker {
    color: #c51f1f; /* rojo corporativo */
}



/* Responsive */
@media (max-width: 991px) {
    .atenas-benefits-section {
        padding: 60px 0;
    }

    .atenas-benefits-title {
        text-align: center;
        margin-top: 30px;
    }
}


/* ************************************************
Trabaja con nosotros
************************************************ */

.careers-section {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    color: #5a5555;
}

.careers-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.careers-overlay {
    position: absolute;
    inset: 0;
    background: rgba(221,215,215,0.9);
    /* background: rgba(15, 65, 134, 0.78); */
    z-index: 2;
}

.careers-container {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.careers-text {
    flex: 1;
}

.careers-text h2 {
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.85;
}

.careers-text h3 {
    font-size: 36px;
    margin: 18px 0 25px;
    line-height: 1.2;
}

.careers-text p {
    margin-bottom: 15px;
    line-height: 1.6;
    opacity: 0.9;
    text-align: justify;
}

.careers-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 42px;
    background: #ffffff;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.careers-btn:hover {
    background: #eaeaea;
    transform: translateY(-3px);
}

.careers-image {
    flex: 1;
}

.careers-image img {
    width: 100%;
    border-radius: 14px;
}

/* ----------------
boton flotante ir arriba
----------------  */

    #scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none; /* oculto inicialmente */
    width: 50px;
    height: 50px;
    background-color: #00bfff; /* celeste */
    border: none;
    border-radius: 50%; /* círculo perfecto */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
    }

    #scrollTopBtn.show {
        display: block;
    }


    #scrollTopBtn:hover {
    transform: scale(1.1);
    background-color: #00a5d6; /* celeste un poco más oscuro al pasar */
    }



    /* Whatsapp float */



.whatsapp-float {
    position: fixed;
    bottom: 90px;       /* distancia desde abajo */
    right: 20px;        /* distancia desde la derecha */
    z-index: 9999;      /* siempre encima de todo */
    width: 60px;        /* tamaño del botón */
    height: 60px;
    border-radius: 50%; /* círculo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366; /* verde WhatsApp */
    transition: transform 0.3s;
}

.whatsapp-float img {
    width: 35px; /* tamaño del icono */
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes floatIn {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.whatsapp-float {
    animation: floatIn 0.5s ease-out;
}

/* Modal postulacion */


/* Modal */
.postulante-modal-content {
    border: 0;
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
    border-radius: 0.5rem;
}

.postulante-modal-header {
    background-color: #003366; /* azul corporativo */
    color: white;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.postulante-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.postulante-logo {
    height: 40px;
}

/* Botón cerrar */
.postulante-btn-close {
    filter: brightness(1.3);
}

/* Modal body */
.postulante-modal-body {
    padding: 2rem;
}

/* Inputs */
.postulante-input,
.postulante-select,
.postulante-textarea,
.postulante-file {
    width: 100%;
    border-radius: 0.4rem;
    padding: 0.6rem;
    border: 1px solid #ccc;
}

.postulante-input:focus,
.postulante-select:focus,
.postulante-textarea:focus,
.postulante-file:focus {
    border-color: #003366;
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 102, 0.25);
    outline: none;
}

/* Botón enviar */
.postulante-btn-submit {
    background-color: #003366;
    border-color: #003366;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0.4rem;
    transition: background-color 0.3s, transform 0.2s;
}

.postulante-btn-submit:hover {
    background-color: #002244;
    transform: translateY(-2px);
}

/* Botón abrir modal */
.postulante-btn-open {
    background-color: #003366;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0.4rem;
    cursor: pointer;
}

.postulante-btn-open:hover {
    background-color: #002244;
}


.card-header {
    font-size: 15px;
}

.modal-body {
    background-color: #f8f9fa;
}



/* Politicas  */


.politica-texto h6 {
    margin-top: 20px;
    font-weight: 600;
}

.politica-texto p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

/* Loading */

/* #loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.74);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
}

#loading-overlay img {
    width: 140px; 
} */


#loading-overlay {
    position: fixed !important; /* El !important asegura que nadie lo sobreescriba */
    top: 0;
    left: 0;
    width: 100vw; /* Cambia % por vw (viewport width) */
    height: 100vh; /* Cambia % por vh (viewport height) */
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999; /* Súbelo un dígito más por si acaso */
    
    /* Centrado infalible */
    display: none; /* Se cambia a flex por JS */
    justify-content: center;
    align-items: center;
    
    margin: 0;
    padding: 0;
}

#loading-overlay img {
    width: 140px;
    height: auto;
    position: relative; /* Asegura que no herede desplazamientos */
}






/* EMPRESA */


.navbar .dropdown-toggle::before,
.navbar .dropdown-toggle::after {
    text-decoration: none;
}

.navbar .dropdown-toggle::before {
    display: none !important;
}

.navbar .dropdown-toggle::after {
    content: none !important;
}

#mainNav {
    position: fixed;
}

/* .fecha-cuadro {
    width: 200px;
    height: 40px;
    border: 1px solid #000;
    line-height: 40px;     
    font-weight: bold;
    color: #000;      
    text-align: center;
    position: absolute;
    margin-top: -74px;
    margin-left: 118vh;
} */


.fecha-cuadro {
    position: fixed;

    /* 🔒 ALTURA EXACTA que tú decides */
    top: 12px;

    /* 🔒 DISTANCIA DESDE LA IZQUIERDA */
    left: 780px; /* ajústalo una sola vez */

    width: 200px;
    height: 40px;

    line-height: 40px;
    text-align: center;
    font-weight: bold;

    color: #000;
    /* border: 1px solid #000;
    background: rgba(255,255,255,0.7); */

    z-index: 1200;
}

.logo-footer{
    width: 157px !important;
    height: 50px !important;
}


@media (max-width: 991px) {
    .fecha-cuadro {
        display: none;
    }
}




/* Contenedor principal del video */
#media-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92); /* Casi negro para resaltar el video */
    z-index: 100000; /* Por encima de todo */
    display: none; /* Se activa por JS */
    justify-content: center;
    align-items: center;
}

/* El marco donde vive el video */
.media-video-frame {
    width: 90%;
    max-width: 950px;
    position: relative; 
    z-index: 10; /* Un nivel base */
}

.media-video-frame video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border: 2px solid #333;
}

/* Botón de cerrar */
/* LA X DEBE SER LA REINA DEL Z-INDEX */
.media-close-x {
    position: fixed; /* Cambia de absolute a FIXED */
    top: 20px;
    right: 20px;
    z-index: 1000001; /* Debe ser mayor que el overlay y el video */
    background: #0f4186; /* Tu azul corporativo */
    color: white;
    border: 2px solid white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.media-close-x:hover {
    background: #ff4d4d; /* Rojo al pasar el mouse para que el usuario sepa que es para cerrar */
    transform: rotate(90deg);
}

/* ---------------------------------- */

Reglas para Media Overlay

/* El contenedor relativo para que el icono no se escape */
.video-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

/* La capa que oscurece y el icono de play */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Fondo opaco inicial */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Oculto por defecto */
    transition: all 0.3s ease;
}

/* El círculo del botón Play */
.play-overlay i {
    color: white;
    font-size: 50px;
    background: rgba(0, 123, 255, 0.85); /* Azul Esteriliza */
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

/* EFECTO HOVER: Al pasar el mouse por el VidOrestes */
.video-wrapper:hover .play-overlay {
    opacity: 1; /* Aparece el fondo opaco */
}

.video-wrapper:hover .play-overlay i {
    transform: scale(1); /* El botón crece un poquito */
}

/* Para celulares: que se active al presionar */
.video-wrapper:active .play-overlay {
    opacity: 1;
}


/* ==========================================================================
   CONSOLIDACIÓN DE MEDIA OVERLAY (VIDEO ORESTES)
   ========================================================================== */

/* Contenedor principal del video */
#media-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.94); /* Un poco más oscuro para mejor contraste */
    z-index: 100000; /* Asegura estar por encima de todo */
    display: none; 
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Importante para alinear el loader y el video */
}

/* El marco donde vive el video o iframe */
.media-video-frame {
    width: 90%;
    max-width: 950px; /* Ajustado a tu requerimiento actual */
    position: relative;
    z-index: 100001; /* Mayor que el overlay para evitar clics fantasma */
}

/* Fuerza a que el iframe o video ocupe el espacio correctamente */
#media-container iframe, 
#media-container video {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9; /* Mantiene la proporción profesional */
    min-height: 300px;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border: 2px solid #333;
}

/* Estilos para el Cargador Interno del Video */
/* #media-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 100002;
} */

#media-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100002;
    padding: 0 20px;
}


/* Botón de cerrar */
.media-close-x {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 50px;
    cursor: pointer;
    line-height: 1;
    z-index: 100003;
    transition: color 0.2s;
}

.media-close-x:hover {
    color: #ff4d4d;
}

/* --- Efectos de Hover en la imagen (Thumbnail) --- */

.video-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.play-overlay i {
    color: white;
    font-size: 50px;
    background: rgba(0, 123, 255, 0.85); /* Azul Esteriliza */
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.video-wrapper:hover .play-overlay {
    opacity: 1;
}

.video-wrapper:hover .play-overlay i {
    transform: scale(1);
}

.video-wrapper:active .play-overlay {
    opacity: 1;
}