/* =========================================================
   IDIOMAS.CSS — Páginas de la sección de alemán
   Paleta: verde profundo #2F5D50, lavanda conexión #B9A7D6
   ========================================================= */

body.idiomas-theme,
body.idiomas-theme #body-wrapper {
    background: #2F5D50;
}
body.idiomas-theme #body-wrapper {
    color: #FFFFFF;
    padding: 0;
}

/* Scrollbar acorde con la paleta (Firefox + Webkit) */
body.idiomas-theme {
    scrollbar-color: #B9A7D6 #2F5D50;
    scrollbar-width: thin;
}
body.idiomas-theme::-webkit-scrollbar {
    width: 10px;
    background: #2F5D50;
}
body.idiomas-theme::-webkit-scrollbar-thumb {
    background: #B9A7D6;
    border-radius: 5px;
}
body.idiomas-theme::-webkit-scrollbar-thumb:hover {
    background: #C8B6E2;
}

.idiomas-page {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.8rem 4rem;
    color: #FFFFFF;
    align-items: start;
}
.idiomas-page.has-related {
    grid-template-columns: 200px 1fr 240px;
    max-width: 1240px;
}

/* =========================================================
   ZONA DERECHA — ENLACES RELACIONADOS
   ========================================================= */
.idiomas-related {
    position: sticky;
    top: 6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(185, 167, 214, 0.35);
    border-radius: 8px;
    padding: 1.2rem 1rem;
}
.idiomas-related h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #B9A7D6;
    margin: 0 0 0.9rem;
    font-weight: 700;
}
.idiomas-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.idiomas-related li {
    padding: 0;
    margin: 0;
}
.idiomas-related a,
.idiomas-related a:visited {
    display: block;
    text-decoration: none !important;
    color: #FFFFFF;
    padding: 0.6rem 0.7rem;
    border-radius: 6px;
    transition: background 0.2s;
}
.idiomas-related a:hover {
    background: rgba(185, 167, 214, 0.15);
    color: #FFFFFF;
}
.idiomas-related a strong {
    display: block;
    color: #B9A7D6;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.idiomas-related a span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    line-height: 1.45;
}

.idiomas-content h1 {
    font-size: 2rem;
    color: #FFFFFF;
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
}

.idiomas-content h2 {
    font-size: 1.3rem;
    color: #B9A7D6;
    margin-top: 2.2rem;
    margin-bottom: 0.6rem;
}

.idiomas-content p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
    font-size: 1rem;
}

.idiomas-content strong {
    color: #FFFFFF;
}

.idiomas-content a {
    color: #B9A7D6;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.idiomas-content a:hover {
    color: #FFFFFF;
}

.idiomas-content ul {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.idiomas-content ul li {
    color: rgba(255, 255, 255, 0.92);
    padding-left: 1.2rem;
    position: relative;
}
.idiomas-content ul li::before {
    content: "▸";
    color: #B9A7D6;
    position: absolute;
    left: 0;
}

/* =========================================================
   IMÁGENES INLINE EN EL CONTENIDO
   ========================================================= */
.idiomas-content img {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    margin: 1.8rem auto;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

/* =========================================================
   RETRATO Y BANNER DE CURRICULUM
   ========================================================= */
.idiomas-content .cv-portrait {
    float: right;
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #B9A7D6;
    margin: 0 0 1rem 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
    max-height: none;
}
.idiomas-content .cv-banner {
    margin: 1.4rem 0 1.6rem;
    max-height: 180px;
    height: 180px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    clear: right;
}

/* =========================================================
   GRID DE TARJETAS (CV + Certificados / Especializaciones)
   ========================================================= */
.idiomas-content .cv-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-top: 0.6rem;
    clear: both;
}
.idiomas-content .cv-card {
    background: #FFFFFF;
    color: #454D5D;
    border: 1px solid rgba(185, 167, 214, 0.35);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.idiomas-content .cv-card:hover {
    box-shadow: 0 6px 20px rgba(185, 167, 214, 0.35);
    transform: translateY(-2px);
}
.idiomas-content .cv-card-thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F0EDF5;
}
.idiomas-content .cv-card-thumb img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}
.idiomas-content .cv-card-info {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.55rem;
}
.idiomas-content .cv-card-info h3 {
    color: #2F5D50;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.3;
}
.idiomas-content .cv-card-info p {
    color: #454D5D;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.idiomas-content .cv-card-link,
.idiomas-content .cv-card-link:visited {
    align-self: flex-start;
    color: #7A6B9F;
    font-weight: 700;
    text-decoration: none !important;
    font-size: 0.92rem;
    margin-top: 0.3rem;
}
.idiomas-content .cv-card-link:hover {
    color: #2F5D50;
}

@media (max-width: 600px) {
    .idiomas-content .cv-portrait {
        float: none;
        margin: 0 auto 1.2rem;
        width: 140px;
        height: 140px;
    }
}

/* =========================================================
   BOTÓN DESCARGA CV
   ========================================================= */
.cv-download,
.cv-download:visited {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.85rem 1.6rem;
    background: #B9A7D6;
    color: #2F5D50 !important;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    transition: background 0.2s;
}
.cv-download:hover {
    background: #C8B6E2;
    color: #2F5D50 !important;
}

/* =========================================================
   SUBNAV ENTRE CLASES / OTROS SERVICIOS / CURRICULUM
   (Sidebar izquierdo, sticky)
   ========================================================= */
.idiomas-subnav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 6rem;
}

.idiomas-chip,
.idiomas-chip:visited {
    display: block;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(185, 167, 214, 0.6);
    border-radius: 6px;
    color: #B9A7D6;
    font-size: 0.82rem;
    line-height: 1.25;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
.idiomas-chip:hover {
    background: rgba(185, 167, 214, 0.12);
    border-color: #B9A7D6;
    color: #FFFFFF !important;
}
.idiomas-chip.active {
    background: #B9A7D6;
    border-color: #B9A7D6;
    color: #2F5D50 !important;
    cursor: default;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .idiomas-page.has-related {
        grid-template-columns: 220px 1fr;
    }
    .idiomas-related {
        grid-column: 1 / -1;
        position: static;
    }
}

@media (max-width: 768px) {
    .idiomas-page,
    .idiomas-page.has-related {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .idiomas-subnav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .idiomas-chip { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 600px) {
    .idiomas-page { padding: 2rem 1.2rem 3rem; }
    .idiomas-content h1 { font-size: 1.6rem; }
    .idiomas-content h2 { font-size: 1.15rem; }
}
