/* =========================================
   ESTILOS SECCIÓN: IDIOMAS (REDISEÑO DE FONDOS)
   ========================================= */

/* Contenedor Principal */
.contenido-idiomas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px 0;
}

/* --- ESTILOS BASE --- */
.text-izq, .text-der, .back, .back-2 {
    border-radius: 20px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.text-izq:hover, .text-der:hover, .back:hover, .back-2:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* =========================================
   1. TARJETA IZQUIERDA: CURSO DE IDIOMAS
   (Cambio: Fondo Azul Profundo para mayor impacto)
   ========================================= */
.text-izq {
    /* Fondo degradado sutil azul oscuro */
    background: linear-gradient(145deg, var(--primary-blue) 0%, #162035 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Borde izquierdo rojo para contraste vibrante */
    border-left: 10px solid var(--primary-red); 
    color: white; /* Texto blanco por defecto */
}

/* Ajuste de colores de texto para fondo oscuro */
.text-izq h2 {
    font-size: 3rem;
    color: white; /* Antes azul, ahora blanco */
    margin-bottom: 15px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.text-izq .texto-destacado {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9); /* Blanco suave */
    font-weight: 500;
    margin-bottom: 15px;
}

/* Botón: Ahora blanco o rojo brillante para resaltar sobre el azul */
.text-izq .btn-stratrooms {
    background-color: var(--primary-red);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    align-self: flex-start;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid var(--primary-red);
    transition: all 0.3s;
}

.text-izq .btn-stratrooms:hover {
    background-color: transparent;
    border-color: white;
    color: white;
}

/* =========================================
   2. TARJETA DERECHA: EXAMEN 4 HABILIDADES
   (Cambio: Fondo Gris Perla Sutil)
   ========================================= */
.text-der {
    /* Ya no es blanco puro (#fff), sino un gris muy claro */
    background: #f8f9fa; 
    border: 1px solid rgba(0,0,0,0.05); /* Borde sutil */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 10px solid var(--primary-red);
}

/* Ajustes de Grid y Texto (Igual que antes) */
.tit-der {
    display: grid;
    grid-template-areas: "titulo titulo" "logo1 logo2";
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: center;
    justify-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.tit-der p {
    grid-area: titulo;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-light);
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    width: 80%;
}

.tit-der .logo-img {
    height: 85px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s;
    /* Filtro leve para que los logos se integren mejor si tienen fondo blanco */
    mix-blend-mode: multiply; 
}

.tit-der .logo-img:nth-of-type(1) { grid-area: logo1; justify-self: end; }
.tit-der .logo-img:nth-of-type(2) { grid-area: logo2; justify-self: start; }
.tit-der .logo-img:hover { transform: scale(1.15); }

.text-der span {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-red);
    text-transform: uppercase;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
    margin-top: 10px;
    line-height: 1;
}

/* =========================================
   3 y 4. TARJETAS INFERIORES (Sin cambios, ya tienen color)
   ========================================= */
.back {
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff5252 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* ... resto de estilos de .back ... */

.back-2 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2c3e50 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
/* ... resto de estilos de .back-2 ... */

/* Estilos internos de tarjetas inferiores */
.back h3, .back-2 h3 { color: white; font-size: 2rem; margin-bottom: 15px; }
.back p, .descrip p { color: rgba(255,255,255,0.95); font-size: 1.1rem; }
.img-text .mg-1 { background: rgba(255,255,255,0.15); padding: 15px; border-radius: 15px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2); }
.territorio-img { width: 130px; animation: floatMap 4s ease-in-out infinite; }
.desc30 { height: 70px; animation: pulseBadge 2s infinite; }
.img-text2 span { font-size: 1.5rem; font-weight: 800; color: #ffeb3b; }
.descrip img { width: 110px; height: 110px; border-radius: 50%; border: 5px solid white; box-shadow: 0 8px 20px rgba(0,0,0,0.3); float: right; }

/* Animaciones y Media Queries */
@keyframes floatMap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulseBadge { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

@media (min-width: 992px) {
    .contenido-idiomas {
        grid-template-columns: 1.3fr 1fr;
        grid-template-areas: "intro exam" "redcard bluecard";
    }
    .text-izq { grid-area: intro; }
    .text-der { grid-area: exam; }
    .back { grid-area: redcard; }
    .back-2 { grid-area: bluecard; }
}

@media (max-width: 992px) and (min-width: 768px) {
    .contenido-idiomas { grid-template-columns: 1fr 1fr; }
    .text-izq { grid-column: span 2; }
}

@media (max-width: 768px) {
    .contenido-idiomas { grid-template-columns: 1fr; gap: 20px; }
    .text-izq h2 { font-size: 2.2rem; }
    .img-text { flex-direction: column; text-align: center; }
    .descrip img { float: none; margin: 20px auto 0 auto; display: block; }
    .tit-der { display: flex; flex-direction: column; }
}