/* ===== VARIABLES CSS ===== */
:root {
    --primary-dark: #1a365d;
    --primary: #2c5282;
    --primary-light: #4299e1;
    --accent: #d4af37; /* Dorado para acentos */
    --light-bg: #f7fafc;
    --dark-text: #2d3748;
    --light-text: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;


    /* VARIABLES ADICIONALES (usadas en “Comisiones”) */
    --border-radius: 8px; /* Bordes redondeados en tarjetas */
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Sombra base de tarjetas */
    --hover-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Sombra al hacer hover */
    /*--primary-color: var(--primary); */ /* Alias del color principal */
    --accent-color: var(--accent); /* Alias del color de acento */
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Animación para el modal de galería */
@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

/* ===== LAYOUT Y CONTENEDORES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ENCABEZADO ===== */
header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--light-text);
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.header-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.left-block h1 {
    font-family: 'Georgia', serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: right;
    margin: 0;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.center-block p {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    line-height: 1.2;
    text-align: left;
    margin-left: 2rem;
    color: var(--light-text);
}

.date-location-block p {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.3rem;
    line-height: 1.3;
    text-align: center;
    color: var(--light-text);
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.right-block {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.language-flag {
    margin-left: 1rem;
    transition: var(--transition);
}

.language-flag:hover {
    transform: scale(1.1);
}

.language-flag img {
    width: 40px;
    height: 25px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 3px;
    transition: var(--transition);
}

.language-flag:hover img {
    border-color: var(--accent);
}

/* ===== NAVEGACIÓN ===== */
nav {
    background-color: var(--primary);
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--light-text);
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav ul li > a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav ul li:hover > a:after,
nav ul li a.active:after {
    width: 80%;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Submenú desplegable */
nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-dark);
    min-width: 200px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    border-top: 3px solid var(--accent);
    z-index: 101;
}

nav ul li:hover > ul {
    display: block;
    animation: fadeIn 0.3s ease;
}

nav ul ul li {
    width: 100%;
}

nav ul ul li a {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

nav ul ul li a:after {
    display: none;
}

/* Menú móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 102;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 2px 0;
    transition: var(--transition);
    transform-origin: center;
}

.main-menu {
    /* Estilos para menú principal */
}

/* ===== SECCIONES PRINCIPALES ===== */
/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/BW-mathhistory.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    text-align: center;
    position: relative;
}

/* Estilos específicos para la nueva sección hero */
.hero-container {
    display: flex;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 400px; /* Altura mínima en lugar de fija */
}

.hero-logo {
    display: block;
    justify-content: center;
    align-items: center;
}

.hero-logo img {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-center {
    text-align: center;
    color: var(--light-text);
}

.hero-center h2 {
    font-family: 'Georgia', serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.hero-date {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.hero-location {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.hero-quote {
    font-family: 'Georgia', serif;
    font-size: 1.4rem;
    font-style: italic;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    color: var(--accent);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 1rem;
    margin-top: 1rem;
}

.hero-portrait {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-portrait img {
    width: 200px;
    height: 230px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.excursion-text {
  font-size: clamp(0.9em, 1vw + 0.5em, 1.1em);
  color: #cccccc;
  font-weight: 500;
}

/* Estilos responsivos para la sección hero - MEJORADOS */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
        text-align: center;
        min-height: auto; /* Permite que la altura se ajuste al contenido */
        padding: 3rem 1.5rem; /* Más padding para mejor espaciado */
    }
    
    .hero-center {
        order: 2; /* Centro en segunda posición */
    }
    
    .hero-logo {
        order: 1; /* Logo primero */
    }
    
    .hero-portrait {
        order: 3; /* Retrato al final */
    }
    
    .hero-center h2 {
        font-size: 1.8rem;
    }
    
    .hero-date {
        font-size: 1.3rem;
    }
    
    .hero-location {
        font-size: 1.1rem;
    }
    
    .hero-quote {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .hero-logo img, .hero-portrait img {
        max-width: 120px;
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto; /* Altura automática en móviles */
        min-height: auto;
        padding: 2rem 0; /* Padding vertical para espaciado */
    }
    
    .hero-container {
        padding: 2rem 1rem;
        gap: 1.5rem;
    }
    
    .hero-center h2 {
        font-size: 1.6rem;
    }
    
    .hero-date {
        font-size: 1.2rem;
    }
    
    .hero-location {
        font-size: 1rem;
    }
    
    .hero-quote {
        font-size: 1.1rem;
    }
    
    .hero-portrait img {
        width: 90px;
        height: 90px;
    }
    
    .hero-logo img {
        width: 90px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 1.5rem 1rem;
        gap: 1.2rem;
    }
    
    .hero-center h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-date, .hero-location {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-quote {
        font-size: 1rem;
        margin-top: 1rem;
        padding-top: 0.8rem;
    }
    
    .hero-logo img, .hero-portrait img {
        max-width: 60px;
        width: 60px;
        height: 60px;
    }
}
/* Estilos específicos de la nueva sección hero terminan aquí */

.hero h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* Novedades */
.novedades {
    background-color: var(--primary-dark);
    color: var(--light-text);
    padding: 4rem 2rem;
}

.novedades h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.novedades h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent);
}

.novedades .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.novedades .card {
    background-color: var(--light-bg);
    color: var(--dark-text);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.novedades .card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--accent);
    transition: var(--transition);
}

.novedades .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.novedades .card:hover:before {
    width: 100%;
    opacity: 0.1;
}

.novedades .card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.novedades .card p {
    position: relative;
    z-index: 1;
}

/* Galería */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.galeria .item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.galeria .item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.galeria .item a {
    display: block;
    flex-grow: 1;
}

.galeria .item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.galeria .item:hover img {
    transform: scale(1.05);
}

.galeria .item .descripcion {
    padding: 1.5rem;
    background: var(--primary-dark);
    color: white;
    text-align: center;
}

.galeria .item .descripcion a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.galeria .item .descripcion a:hover {
    color: var(--accent);
}

/* ===== PÁGINAS ESPECÍFICAS ===== */
/* Breadcrumb */
.breadcrumb {
    background-color: #f1f5f9;
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--dark-text);
}

/* Cabecera de página */
.page-header {
    background: linear-gradient(to right, var(--primary-dark), var(--primary));
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.page-header .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-header h1 {
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Sección de presentación */
.presentation-section {
    padding: 40px 0;
    background-color: #f9f9f9;
}

.elegant-frame {
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.elegant-frame:before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid #d4af37;
    pointer-events: none;
    border-radius: 5px;
}

.presentation-text {
    color: #000;
    font-family: 'Georgia', serif;
    font-size: 17px;
    line-height: 1.7;
    text-align: justify;
}

/* Estilos para el título dentro del elegant-frame (movido de acercaHuaraz.php) */
.presentation-title {
    font-family: 'Georgia', serif;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    position: relative;
}

.presentation-title:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--primary-light);
}

/* Media query para el título dentro del elegant-frame (movido de acercaHuaraz.php) */
@media (max-width: 768px) {
    .presentation-title {
        font-size: 1.5rem;
    }
}


/* Ediciones previas */
.previous-editions {
    padding: 4rem 0;
}

.previous-editions .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.edition-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.edition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.edition-image {
    position: relative;
    overflow: hidden;
}

.edition-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.edition-card:hover .edition-image img {
    transform: scale(1.05);
}

.edition-year {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.edition-info {
    padding: 1.5rem;
}

.edition-info h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.btn-visit {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-visit:hover {
    background: var(--primary-dark);
}

/* Página de comités */
.committee-section {
    padding: 50px 0;
}

.committee-type {
    margin-bottom: 60px;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.committee-type h2 {
    color: #2c6b8c;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 15px;
    margin-top: 0;
    font-family: 'Georgia', serif;
}

.committee-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.committee-member {
    width: 180px;
    text-align: center;
    transition: transform 0.3s ease;
}

.committee-member:hover {
    transform: translateY(-5px);
}

.member-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    position: relative;
    border: 3px solid #f1f1f1;
    transition: border-color 0.3s ease;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.committee-member:hover .member-image img {
    filter: grayscale(0%);
}

.committee-member:hover .member-image {
    border-color: #2c6b8c;
}

.member-name {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 16px;
}

.member-role {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Comisiones (alternativa a comités) */
.commissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.commission-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.commission-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 15px 20px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 20px;
}

.member-list {
    list-style-type: none;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.member-item:last-child {
    border-bottom: none;
}

.member-name2 {
    font-weight: 500;
    flex: 1;
}

.member-role2 {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    background-color: rgba(52, 152, 219, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    white-space: nowrap;
}

.member-institution {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 3px;
}

/* ===== BOTONES ===== */
.download-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background-color: #1a4f8a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background-color: #0d3a6e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.download-section {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.download-btn-committee {
    display: inline-block;
    background-color: #2c6b8c;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.download-btn-committee:hover {
    background-color: #1f4e69;
}

/* ---------------------------------------------------------------------- */
/* ESTILOS DE TABLA (Originalmente en Contacto.php) */
/* ---------------------------------------------------------------------- */
table {
    border-collapse: collapse;
    width: 80%;
    margin: 20px auto; /* Centrar tabla */
}
th, td {
    border: 1px solid #000;
    padding: 8px;
    text-align: center;
    font-family: Arial, sans-serif;
}
th {
    background-color: #f2f2f2;
}
.plenaria { background-color: #A9D18E; } 
.minicurso { background-color: #FFD966; } 
.conferencia { background-color: #9FC5E8; } 
.almuerzo { background-color: #D9D9D9; } 
.cafe { background-color: #F4C7C3; } 
.credenciamiento { background-color: #B4A7D6; } 
.comunicacion { background-color: #E6B8AF; } 
.mesaredonda { background-color: #C5E0B4; } 
.clausura { background-color: #F8CBAD; } 
.inauguracion { background-color: #9EDFDB; } 
.cena { background-color: #A3A3A3; } 
.header-main { font-weight: bold; background-color: #6D9EEB; color: white; }

/* ---------------------------------------------------------------------- */
/* ESTILOS DE GALERÍA Y MODAL (Originalmente en Contacto.php) */
/* ---------------------------------------------------------------------- */

.image-gallery {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-around; 
    gap: 30px; 
    margin-top: 20px;
}

.elegant-image {
    max-width: 280px; /* Ancho de cada figura */
    margin-bottom: 30px; 
    text-align: left;
}

/* Estilo de Marco Elegante con Sombra */
.elegant-image img {
    width: 100%; 
    height: auto;
    display: block;
    border: 1px solid #ddd; 
    padding: 8px; 
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); 
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer; /* Indica que la imagen es clickeable */
}

.elegant-image img:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.elegant-caption {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 0.9em;
    line-height: 1.4; 
    margin-top: 10px;
    color: #555;
}

/* ESTILOS PARA LA VENTANA MODAL (Lightbox) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 60px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
    transition: all 0.3s ease-in-out;
    animation-name: zoom;
    animation-duration: 0.6s;
}

#caption {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.1em;
    animation-name: zoom;
    animation-duration: 0.6s;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* ---------------------------------------------------------------------- */

/* ===== PIE DE PÁGINA ===== */
footer {
    background-color: var(--primary-dark);
    color: var(--light-text);
    padding: 3rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-text div {
    margin: 0.5rem 0;
}

.footer-text a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.footer-text a:hover {
    text-decoration: underline;
}

/* ===== TÍTULOS ADICIONALES ===== */
h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* ===== MEDIA QUERIES ===== */
/* Pantallas grandes */
@media (max-width: 1200px) {
    .header-container {
        grid-template-columns: 1fr 2fr 1fr;
        grid-template-rows: auto auto;
    }
    
    .date-location-block {
        grid-column: 1 / 4;
        grid-row: 2 / 3;
        text-align: center;
        margin: 1rem 0 0;
    }
    
    .date-location-block p {
        font-size: 1.2rem;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .header-container {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .left-block {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        text-align: left;
    }
    
    .center-block {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        text-align: center;
        margin: 1rem 0 0;
    }
    
    .center-block p {
        text-align: center;
        margin-left: 0;
        font-size: 1.6rem;
    }
    
    .date-location-block {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
        text-align: center;
        margin: 0.5rem 0 0;
    }
    
    .date-location-block p {
        font-size: 1.1rem;
    }
    
    .right-block {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        justify-content: flex-end;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul ul {
        position: static;
        width: 100%;
        box-shadow: none;
        border-top: none;
        display: none;
        background-color: rgba(0, 0, 0, 0.1);
    }
 
    nav ul li:hover > ul {
        display: block;
    }
    
    .footer-text {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Menú móvil */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary-dark);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 101;
    }
    
    .main-menu.active {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
    }
            
    /* Animación para el icono de menú móvil */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Comités responsive */
    .committee-member {
        width: 160px;
    }
    
    .member-image {
        width: 130px;
        height: 130px;
    }
    
    /* Comisiones responsive */
    .commissions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Indicador visual para elementos con submenús en móviles */
    nav ul li:has(.submenu) > a {
        position: relative;
        padding-right: 40px !important;
    }
    
    nav ul li:has(.submenu) > a::after {
        content: "›";
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%) rotate(90deg);
        font-size: 1.5rem;
        transition: transform 0.3s ease;
    }
    
    nav ul li:has(.submenu) > a.submenu-active::after {
        transform: translateY(-50%) rotate(-90deg);
    }
    
    /* Estilos para submenús en móviles */
    .submenu {
        display: none;
        padding-left: 20px;
        background-color: rgba(0, 0, 0, 0.1);
    }
    
    .submenu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    .submenu li a {
        padding: 12px 20px !important;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .submenu li:last-child a {
        border-bottom: none;
    }
}

/* Tablets pequeñas */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .novedades .grid {
        grid-template-columns: 1fr;
    }
    
    .galeria {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .center-block p {
        font-size: 1.4rem;
    }
    
    .date-location-block p {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .committee-container {
        gap: 20px;
    }
    
    .committee-member {
        width: calc(50% - 20px);
        max-width: 180px;
    }
    
    .commissions-grid {
        grid-template-columns: 1fr;
    }
    
    .commission-card {
        margin-bottom: 20px;
    }
    
    /* Contacto.php media query adjustment for small tables on mobile */
    table {
        width: 95%;
        margin: 20px auto;
    }

    /* Plenaristas responsive */
    .ponentes-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
            
    .ponente-card {
        padding: 20px;
    }
            
    .ponente-imagen {
        width: 150px;
        height: 150px;
    }
            
    .ponente-nombre {
        font-size: 1.3rem;
    }
            
    .ponente-institucion {
        font-size: 1rem; /* Ajuste responsive */
    }
}

/* Móviles */
@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .left-block h1 {
        font-size: 2.2rem;
    }
    
    .center-block p {
        font-size: 1.2rem;
    }
    
    .date-location-block p {
        font-size: 0.9rem;
    }
    
    .hero {
        height: 50vh;
    }
    
    .hero h2 {
        font-size: 1.6rem;
        padding: 1rem;
    }
    
    .galeria {
        grid-template-columns: 1fr;
    }
    
    .committee-type {
        padding: 20px 15px;
    }
    
    .committee-member {
        width: 100%;
        max-width: 200px;
    }
    
    .edition-info {
        padding: 1rem;
    }
    
    .image-gallery {
        justify-content: center;
    }
    
    .elegant-image {
        max-width: 100%; /* Full width on smallest screens */
    }
}

/* Prevenir parpadeo en desktop durante la transición de tamaño */
@media (min-width: 993px) {
    .submenu {
        display: none;
    }
    
    nav ul li:hover > .submenu {
        display: block;
    }
}

/* Pantallas grandes para comisiones */
@media (min-width: 1025px) {
    .commissions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Estilos específicos para la sección de plenaristas (Movidos desde plenaristas.php) */
.ponentes-destacados {
    padding: 50px 0;
    background-color: #fff;
}

.ponentes-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.ponente-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ponente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.ponente-imagen {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--primary-light);
}

.ponente-nombre {
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px; /* Reducido para acercar a la institución */
}

.ponente-institucion {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.1rem; /* Tamaño más pequeño que el nombre */
    color: #666; /* Color más suave */
    font-style: italic;
    margin-bottom: 15px;
    font-weight: 500;
}

.ponente-descripcion {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
}

/* Para la Opción 1: Estilos para párrafos dentro de la descripción */
.ponente-descripcion p {
    margin-bottom: 1em; /* Espacio entre párrafos */
    text-align: justify; /* Opcional: justificar texto */
}

.ponente-descripcion p:last-child {
    margin-bottom: 0; /* Elimina el margen del último párrafo */
}

/* Responsive: en pantallas pequeñas, mostrar un máximo de 1 persona por fila */
@media (max-width: 768px) {
    .ponentes-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
            
    .ponente-card {
        padding: 20px;
    }
            
    .ponente-imagen {
        width: 150px;
        height: 150px;
    }
            
    .ponente-nombre {
        font-size: 1.3rem;
    }
            
    .ponente-institucion {
        font-size: 1rem; /* Ajuste responsive */
    }
}


/* Botón o miniatura */
.video-thumb {
    background: #444;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: 0.3s;
}
.video-thumb:hover {
    background: #222;
}

/* Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

/* Contenedor del video */
.video-modal-content {
    background: #000;
    padding: 10px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 80%;
}

.video-modal video {
    width: 100%;
    height: auto;
    display: block;
}

