:root {
    --dark-red: #3F070B;
    --deep-crimson: #710A14;
    --dark-burgundy: #180605;
    --dusty-rose: #818582;
    --rustic-red: #8F3C45;
}

body {
    font-family: 'Montserrat', sans-serif;
}

/* Sección de contacto rediseñada */
.contacto {
    background-color: #f9f9f9;
    padding: 3rem 1.5rem;
}

/* Grid de tres columnas */
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

/* Cada columna */
.contacto-col {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.contacto-col h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-burgundy);
    border-bottom: 2px solid var(--dusty-rose);
    display: inline-block;
    padding-bottom: 0.3rem;
}

.contacto-col p {
    margin: 0.5rem 0;
    color: #333;
    line-height: 1.4;
}

/* Enlace para boletín */
.contacto-link {
    color: var(--deep-crimson);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.contacto-link:hover {
    color: var(--rustic-red);
    text-decoration: underline;
}

/* Estilos de los items de contacto (para la columna central) */
.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
    background: #f9f9f9;
    padding: 0.8rem;
    border-radius: 8px;
}

.contacto-icon {
    font-size: 1.3rem;
    min-width: 32px;
    text-align: center;
}

.contacto-item p {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Responsive: en pantallas medianas se apila a dos columnas, en móviles una */
@media (max-width: 900px) {
    .contacto-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contacto-col:last-child {
        grid-column: span 2;
    }
}
@media (max-width: 600px) {
    .contacto-grid {
        grid-template-columns: 1fr;
    }
    .contacto-col:last-child {
        grid-column: auto;
    }
    .contacto-item {
        justify-content: center;
        text-align: center;
    }
}

.menu-title {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.main-content {
    margin-left: 0;
    transition: margin-left 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.page-header {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}


.image-header {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.image-header .logo {
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    width: clamp(40px, 25vw, 150px);
    height: auto;
    display: block;
}

/* Redes sociales en desktop */
.header-social {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
}

.header-social-link {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--deep-crimson);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-social-link:hover {
    background: var(--deep-crimson);
    color: white;
    transform: translateY(-2px);
}

/* Botón flotante */
.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--deep-crimson);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.2s;
    z-index: 1000;
}
.floating-btn:hover {
    background-color: var(--dark-burgundy);
    transform: scale(1.05);
}

/* Overlay transparente que solo captura clics fuera */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
    pointer-events: none; /* permite clics en el fondo, pero el contenido lo desactiva */
}
.popup-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Contenedor que posiciona la tarjeta junto al botón */
.popup-container {
    margin: 0 2rem 2rem 0; /* margen inferior y derecho igual al botón */
    width: 280px;
    max-width: calc(100vw - 2rem);
}

/* Tarjeta del popup (rediseño) */
.btn-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 1.2rem 1.5rem;
    position: relative;
    text-align: center;
    color: var(--dark-burgundy);
    border: 1px solid rgba(0,0,0,0.05);
}

.btn-card h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-burgundy);
    font-family: 'Montserrat', sans-serif;
}

.btn-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #555;
}

.btn-card .btn-inscripcion {
    display: inline-block;
    background: var(--deep-crimson);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-card .btn-inscripcion:hover {
    background: var(--dark-burgundy);
    transform: scale(1.02);
}

/* Botón cerrar (X) */
.popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    font-weight: bold;
}
.popup-close:hover {
    color: var(--deep-crimson);
}

/* Secciones generales */
.section {
    padding: 3.5rem 1.5rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--dark-burgundy);
    font-family: 'Source Serif 4', serif;
    font-family: 'Montserrat', sans-serif;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--dusty-rose);
    margin: 1rem auto 0;
}

/* Sección académica */
.academica {
    background: var(--dark-red);
    color: white;
}

.academica-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.academica-item {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 8px;
}

.academica-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--dusty-rose);
    font-weight: 600;
}

.academica-item ul {
    list-style: none;
}

.academica-item li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.badge {
    background: var(--dusty-rose);
    color: var(--dark-burgundy);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.destacado {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-center {
    text-align: center;
}

.btn-noticias {
    display: inline-block;
    background: white;
    color: var(--deep-crimson);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-noticias:hover {
    background: var(--dusty-rose);
    color: white;
}

/* Sección noticias */
.noticias {
    background: #f5f5f5;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.noticia {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.noticia:hover {
    transform: translateY(-4px);
}

.noticia-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.noticia-fecha {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    background: var(--deep-crimson);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.noticia-content {
    padding: 1.5rem;
}

.noticia-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-burgundy);
    font-weight: 600;
}

.noticia-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.read-more {
    color: var(--deep-crimson);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.read-more:hover {
    color: var(--rustic-red);
    gap: 0.3rem;
}

/* Footer */
.footer {
    background: var(--dark-burgundy);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Slider de fondo */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
}

.page-header {
    height: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-card {
    position: relative;
    z-index: 2;
    background: rgba(111, 30, 36, 0.95);
    padding: 2.5rem 3.5rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    max-width: 550px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .academica-grid,
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hero-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .hero-card h1 {
        font-size: 1.5rem;
    }
    
    .academica-grid,
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    
    .header-social {
        display: none;
    }
    
    .page-header {
        height: 200px;
    }

}

