/* ============================================================
   IDIOMAS - VERSIÓN CORREGIDA (3 COLUMNAS PRESERVADAS)
   ============================================================ */

:root {
    --cherry: #D61E43;
    --violet: #7E22CE;
    --orange: #F97316;
    --text-main: #1d1d1f;
    --text-sec: #6e6e73;
    --white: #ffffff;
    --bg-light: #f5f5f7;
    --border: rgba(0,0,0,0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --grad-rla: linear-gradient(135deg, #F97316 0%, #D61E43 50%, #7E22CE 100%);
}

/* 1. HERO (TU DISEÑO ORIGINAL) */
.idiomas-hero {
    position: relative;
    padding: 180px 8% 100px;
    text-align: center;
    background-image: url('../img/bg-countries.webp');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.big-number {
    font-size: clamp(8rem, 20vw, 14rem);
    font-weight: 900;
    line-height: 0.7;
    display: block;
    background: var(--grad-rla);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.1));
    margin-bottom: 20px;
}

.months-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 10px;
    color: var(--text-main);
    display: block;
    margin-bottom: 25px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-sec);
    max-width: 600px;
    margin: 0 auto;
}

/* 2. GRID DE IDIOMAS (MANTENIENDO TUS 3 COLUMNAS) */
.idiomas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* FORZADO A 3 COLUMNAS */
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.card-idioma {
    background: var(--white);
    border-radius: 40px;
    padding: 40px;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-idioma:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
    border-color: var(--accent);
}

.idioma-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }

.flag-wrapper {
    width: 65px; height: 65px;
    background: #f8f8f9;
    padding: 12px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.card-idioma:hover .flag-wrapper { transform: rotate(-5px) scale(1.1); background: var(--white); }

.flag-webp { width: 100%; height: 100%; object-fit: contain; }

.card-idioma h3 { font-size: 1.6rem; font-weight: 800; color: var(--text-main); }

.idioma-desc { color: var(--text-sec); line-height: 1.6; margin-bottom: 30px; font-size: 1rem; flex-grow: 1; }

/* 3. ROADMAP */
.roadmap-container { position: relative; margin-bottom: 35px; padding-top: 10px; }
.roadmap-line { position: absolute; top: 15px; left: 0; width: 100%; height: 2px; background: #e5e5e7; z-index: 1; }
.roadmap-steps { display: flex; justify-content: space-between; position: relative; z-index: 2; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.dot { width: 12px; height: 12px; background: white; border: 3px solid var(--accent); border-radius: 50%; margin-bottom: 10px; transition: var(--transition); }
.card-idioma:hover .dot { transform: scale(1.3); background: var(--accent); }
.time { font-size: 0.75rem; font-weight: 700; color: var(--text-main); }
.lvl { font-size: 0.7rem; color: var(--text-sec); text-transform: uppercase; }

/* 4. FOOTER CARD */
.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 25px; }
.duration { font-weight: 700; font-size: 0.9rem; color: var(--text-sec); }
.btn-course { padding: 12px 25px; background: var(--text-main); color: white; border-radius: 100px; font-size: 0.85rem; font-weight: 700; transition: var(--transition); text-decoration: none; }
.btn-course:hover { background: var(--accent); transform: translateX(5px); }

/* 5. SECCIÓN TODO PÚBLICO (NUEVA VIDA) */
.publico-section {
    max-width: 1400px;
    margin: 100px auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
    background: #fbfbfd;
    padding: 100px 8%;
    border-radius: 60px;
    border: 1px solid var(--border);
}

.publico-info h2 { font-size: 3rem; font-weight: 950; line-height: 1.1; color: var(--text-main); }
.publico-info h2 span { color: var(--violet); }

.programas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Estilo para los nuevos enlaces de programas */
.programa-item {
    background: white;
    padding: 35px;
    border-radius: 35px;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    display: block;
    color: inherit;
}

.programa-item:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(126, 34, 206, 0.1); 
    border-color: var(--violet); 
}

.prog-icon {
    width: 60px; height: 60px;
    background: var(--bg-light);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    color: var(--violet);
    font-size: 1.4rem;
    transition: var(--transition);
}

.programa-item:hover .prog-icon { background: var(--violet); color: var(--white); }

/* Hover específico para vacaciones (Cherry) */
.programa-item:has(.fa-sun):hover { border-color: var(--cherry); box-shadow: 0 20px 40px rgba(214, 30, 67, 0.1); }
.programa-item:has(.fa-sun):hover .prog-icon { background: var(--cherry); }

.programa-item h4 { font-size: 1.4rem; font-weight: 850; margin-bottom: 8px; }
.programa-item p { font-size: 0.95rem; color: var(--text-sec); line-height: 1.5; }

/* 6. MOBILE (ADAPTATIVO) */
@media (max-width: 1100px) {
    .idiomas-grid { grid-template-columns: repeat(2, 1fr); }
    .publico-section { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .publico-info { display: flex; flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
    .idiomas-grid { grid-template-columns: 1fr; }
    .programas-grid { grid-template-columns: 1fr; }
    .publico-section { padding: 60px 5%; border-radius: 40px; }
}