/* =========================================
   ESTILOS SECCIÓN: NIVELES DE IDIOMAS
   ========================================= */

section.niveles {
    padding: 100px 0;
    background-color: #ffffff;
    /* Fondo con patrón de mundo sutil o puntos */
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 30px 30px;
    position: relative;
}

.contenido-niveles {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    
    /* GRID LAYOUT PRINCIPAL */
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    grid-template-areas: 
        "header header"
        "english french";
    gap: 40px;
}

/* =========================================
   1. HEADER DE SECCIÓN
   ========================================= */
.header-niveles {
    grid-area: header;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Contenedor del título y banderas */
.contenido-header-niveles {
    display: flex;
    align-items: center;
    gap: 30px;
    background: #fff;
    padding: 20px 50px;
    border-radius: 60px;
    box-shadow: 0 15px 40px rgba(31, 42, 68, 0.08);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    z-index: 2;
}

.contenido-header-niveles p {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0;
}

/* Banderas en el título */
.contenido-header-niveles img {
    height: 50px;
    width: auto;
    border-radius: 50%; /* Banderas circulares */
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}

.contenido-header-niveles img:hover {
    transform: scale(1.2) rotate(10deg);
}

/* Ocultar sub-headers vacíos si no se usan */
.sub-header, .sub-header-ingles, .sub-header-frances {
    display: none;
}

/* =========================================
   2. TARJETAS DE IDIOMAS (INGLÉS Y FRANCÉS)
   ========================================= */

/* Estilos compartidos */
.ingles-niveles, .frances-niveles {
    background: #ffffff;
    border-radius: 30px;
    padding: 50px 40px 0 40px; /* Padding bottom 0 para que la imagen toque el borde si quieres */
    box-shadow: 0 20px 60px rgba(31, 42, 68, 0.1);
    transition: transform 0.3s ease;
    border-top: 10px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden; /* Para contener la imagen al fondo */
}

/* Hover Effect: Elevación */
.ingles-niveles:hover, .frances-niveles:hover {
    transform: translateY(-15px);
}

/* --- TARJETA INGLÉS (Izquierda) --- */
.ingles-niveles {
    grid-area: english;
    border-top-color: var(--primary-red); /* Borde Rojo */
}

/* Título simulado para Inglés (opcional, si quieres agregar texto "INGLÉS") */
.ingles-niveles::before {
    content: '🇬🇧 INGLÉS';
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-red);
    text-align: center;
    display: block;
    margin-bottom: 30px;
}

/* --- TARJETA FRANCÉS (Derecha) --- */
.frances-niveles {
    grid-area: french;
    border-top-color: var(--primary-blue); /* Borde Azul */
}

.frances-niveles::before {
    content: '🇫🇷 FRANCÉS';
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-blue);
    text-align: center;
    display: block;
    margin-bottom: 30px;
}

/* =========================================
   3. LISTAS DE NIVELES (Custom Bullets)
   ========================================= */
.niveles-d ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.niveles-d ul li {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-left: 35px; /* Espacio para el icono */
    position: relative;
    font-weight: 500;
}

/* Icono Check para INGLÉS (Rojo) */
.ingles-niveles .niveles-d ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: 900;
    font-size: 1.3rem;
    background: rgba(211, 47, 47, 0.1);
    width: 25px; height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icono Check para FRANCÉS (Azul) */
.frances-niveles .niveles-d ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: 900;
    font-size: 1.3rem;
    background: rgba(31, 42, 68, 0.1);
    width: 25px; height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilo para los ítems de certificación (paréntesis) */
.niveles-d ul li:last-child {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: -10px;
    padding-left: 35px;
}
.niveles-d ul li:last-child::before {
    display: none; /* Quitar check del texto descriptivo */
}

/* =========================================
   4. IMÁGENES DE FONDO (TORRE / RELOJ)
   ========================================= */
.img-niveles {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.img-niveles img {
    height: 200px; /* Tamaño generoso */
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    transition: transform 0.4s ease;
}

/* Animación al hover de la tarjeta */
.ingles-niveles:hover .img-niveles img,
.frances-niveles:hover .img-niveles img {
    transform: scale(1.1) translateY(-5px);
}

/* =========================================
   5. FOOTER (DIPLOMA)
   ========================================= */
.footer-niveles {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    margin: 20px -40px 0 -40px; /* Expandir a los bordes de la tarjeta */
    border-top: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 2; /* Encima de la imagen si se cruzan */
}

.footer-niveles p {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Icono de Diploma */
.footer-niveles p::before {
    content: '🎓';
    font-size: 1.2rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .contenido-header-niveles {
        padding: 15px 30px;
        gap: 20px;
    }
    .contenido-header-niveles p {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .contenido-niveles {
        grid-template-columns: 1fr; /* Una columna */
        grid-template-areas: 
            "header"
            "english"
            "french";
        gap: 30px;
    }

    .contenido-header-niveles {
        flex-direction: column; /* Banderas arriba y abajo o a los lados del texto en fila nueva */
        text-align: center;
    }
    
    .contenido-header-niveles p {
        font-size: 1.8rem;
    }

    .ingles-niveles, .frances-niveles {
        padding: 40px 25px 0 25px;
    }
}