/* --- ESTILOS BASE (Igual que antes) --- */
        *,
*::before,
*::after {
    box-sizing: border-box;
}

body { 
    font-family: 'BUAP Sans', 'Segoe UI', sans-serif; 
    background-color: #f0f2f5; 
    margin: 0; 
    padding: 0; 
    color: #333; 
}

.main-header { 
    background: #1e3a5f; 
    width: min(1200px, 90%);
    border-radius:15px 15px 0 0; 
    margin:auto; 
    color: white; 
    padding: 15px 20px; 
    font-size: 1.2rem; 
    font-weight: bold; 
    display: flex; 
    align-items: center;
    gap:10px;
}

.back-link { 
    color: white; 
    text-decoration: none; 
    margin-right: 15px; 
    font-size: 1.5rem; 
    display: flex;
    align-items: center; 
}

.container {
    width: min(1200px, 90%);
    margin: 100px auto;
}

/* --- BLOQUE DESTACADO ¿POR QUÉ ESTUDIAR? --- */

.highlight-card {
    position: relative;
    border-left: 6px solid #1e3a5f;
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
}

/* Línea decorativa superior sutil */
.highlight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #1e3a5f, #3b82f6);
}

/* Texto mejorado */
.porque-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    position: relative;
}

/* Primera letra tipo editorial */
.porque-text::first-letter {
    font-size: 2.8rem;
    font-weight: bold;
    color: #1e3a5f;
    float: left;
    line-height: 1;
    margin-right: 8px;
    margin-top: 4px;
}


.info-card { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); padding: 25px; margin-bottom: 25px; }
.info-card .why-section{
    line-height: 2rem;
    text-align: justify;
}
.card-title { font-size: 1.3rem; color: #1e3a5f; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #eef6ff; font-weight: bold; }
.duracion-text { font-size: 1.2rem; font-weight: bold; color: #333; display: flex; align-items: center; }
.map-container { width: 100%; height: 400px; border-radius: 6px; overflow: hidden; border: 1px solid #ddd; }
.map-frame { width: 100%; height: 100%; border: 0; }

/* --- ESTILOS PLAN DE ESTUDIOS COMÚN (1ro - 4to) --- */
.plan-grid-comun { display: grid; grid-template-columns: repeat(1, 1fr); gap: 20px; margin-bottom: 30px;}
@media (min-width: 768px) { .plan-grid-comun { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .plan-grid-comun { grid-template-columns: repeat(4, 1fr); } }

.semestre-block { border: 1px solid #e0e0e0; border-radius: 6px; background-color: #fafafa; overflow: hidden; height: 100%; }
.semestre-header { background-color: #1e3a5f; color: white; padding: 10px 15px; font-weight: bold; font-size: 1.1rem; }
.semestre-content { padding: 15px; }
.area-tronco-label { display: block; font-weight: bold; color: #555; margin-bottom: 8px; font-size: 0.95rem; border-bottom: 1px solid #eee; padding-bottom: 5px;}
.materias-list { list-style-type: disc; padding-left: 20px; margin: 0; }
.materias-list li { margin-bottom: 6px; font-size: 0.9rem; color: #444; line-height: 1.4; }

/* --- NUEVOS ESTILOS PARA ÁREAS PROPEDÉUTICAS (5to y 6to FUSIONADOS) --- */
.areas-section-title { font-size: 1.3rem; color: #1e3a5f; margin-top: 40px; margin-bottom: 10px; font-weight: bold; text-align: center;}
.areas-section-desc { text-align: center; color: #666; margin-bottom: 25px; font-size: 1rem; max-width: 800px; margin-left: auto; margin-right: auto;}

/* Grid para las tarjetas de áreas */
.areas-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 25px; }
@media (min-width: 900px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }

/* Bloque principal de un Área (contiene 5to y 6to) */
.area-propedeutica-block {
    background-color: #fff;
    border: 2px solid #1e3a5f; /* Borde más destacado */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(30, 58, 95, 0.15);
}

.area-propedeutica-header {
    background-color: #1e3a5f;
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.15rem;
}

/* Contenedor flexible para poner 5to y 6to lado a lado */
.semestres-fusionados-flex {
    display: flex;
    flex-direction: column; /* En móviles, uno debajo del otro */
}

/* ------------------------ TABS ------------------------ */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #d0d4da;
    margin-bottom: 20px;
}

.tab-btn {
    background: #e9edf3;
    border: none;
    padding: 10px 18px;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1e3a5f;
    font-weight: bold;
}

.tab-btn.active {
    background: #1e3a5f;
    color: white;
}

.tab-section {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.tab-section.active {
    display: block;
}

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

@media (min-width: 600px) {
    .semestres-fusionados-flex {
        flex-direction: row; /* En tablet/escritorio, lado a lado */
    }
}

/* Mitad del contenedor (cada semestre) */
.semestre-mitad {
    flex: 1; /* Toman el mismo ancho */
    padding: 15px;
    border-bottom: 1px solid #eee;
}
@media (min-width: 600px) {
    .semestre-mitad {
        border-bottom: none;
        border-right: 1px solid #eee; /* Línea divisoria vertical */
    }
    .semestre-mitad:last-child { border-right: none; }
}

/* Título interno (5to Semestre / 6to Semestre) */
.sub-semestre-title {
    display: block;
    font-weight: bold;
    color: #1e3a5f;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

/* --- ESTILOS NUEVOS PARA SECCIONES COMPLEMENTARIAS --- */

/* Listas estilizadas para Perfiles */
.profile-list { list-style: none; padding: 0; }
.profile-list li { 
    position: relative; 
    padding-left: 25px; 
    margin-bottom: 10px; 
    color: #444; 
    line-height: 1.6; 
}
.profile-list li::before {
    content: '✔'; /* O un icono SVG si prefieres */
    position: absolute;
    left: 0;
    color: #1e3a5f;
    font-weight: bold;
}

/* Galería de Imágenes */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}
.gallery-item {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.gallery-item:hover { transform: scale(1.03); }

/* Redes Sociales */
.social-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}
.social-btn {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}
.social-btn:hover { opacity: 0.9; }
.social-btn.facebook { background-color: #1877F2; }
.social-btn.instagram { background-color: #E4405F; }
.social-btn.twitter { background-color: #1DA1F2; }
.social-btn.web { background-color: #1e3a5f; }
.social-icon { width: 20px; height: 20px; fill: white; margin-right: 10px; }
.social-btn.tiktok { 
    background-color: #000000; 
}