/* ---------------- */
/* Paleta de Colores (Variables CSS)
/* ---------------- */
:root {
    --color-primary: #082E87;  /* Azul UChile */
    --color-accent: #FFBE59;   /* Oro/Ámbar CTA */
    --color-bg-subtle: #C2D8EF; /* Azul Pálido (Fondo Convocatoria) */
    --color-text: #191917;    /* Casi Negro (Texto) */
    --color-white: #FFFFFF;
    --color-grey-light: #f4f4f4;
    --color-grey-dark: #555;

    /* Tipografía */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* AJUSTE: Desplazamiento suave y padding para el menú sticky */
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-secondary);
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.2;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 2.0rem; }
h3 { font-size: 1.6rem; margin-bottom: 1rem; color: var(--color-text); }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

ul {
    list-style: none;
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------------- */
/* Clases Utilitarias (Helpers)
/* ---------------- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: 2.5rem;
}

.grid--2-cols { grid-template-columns: 1fr 1fr; }
.grid--3-cols { grid-template-columns: 1fr 1fr 1fr; }

.text-center { text-align: center; }
.subtitle {
    font-size: 1.2rem;
    color: var(--color-grey-dark);
    margin: -1rem auto 2rem auto;
}
.text-small {
    font-size: 0.9rem;
    color: var(--color-grey-dark);
}

/* ============================================= */
/* NAVBAR STICKY
/* ============================================= */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-white);
    height: 80px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar__brand {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-accent);
}
.navbar__brand:hover {
    color: var(--color-white);
    text-decoration: none;
}

.navbar__menu {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0;
}

.navbar__link {
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--color-white);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}
.navbar__link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    text-decoration: none;
}

.navbar__link.active,
.navbar__brand.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* ============================================= */
/* 1. SECCIÓN HERO
/* ============================================= */
.hero {
    position: relative;
    min-height: calc(90vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    background-image: url('img/hero.webp');
    background-size: cover;
    background-position: center;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.60);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__pretitle {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-accent);
}

.hero__title {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.hero__date {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero__cta-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Botones (Componente Reusable) */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-text);
    border-color: var(--color-accent);
}
.btn--primary:hover {
    background-color: #ffca7a;
    border-color: #ffca7a;
    color: var(--color-text);
    text-decoration: none;
    transform: translateY(-2px);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}
.btn--secondary:hover {
    background-color: var(--color-white);
    color: var(--color-text);
    text-decoration: none;
    transform: translateY(-2px);
}

.btn--large {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

/* ============================================= */
/* 2. OBJETIVO Y MODALIDAD
/* ============================================= */
.objetivo {
    background-color: var(--color-grey-light);
}

.objetivo__card {
    background: var(--color-white);
    padding: 2rem;
    border-left: 5px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ============================================= */
/* 3. EJES TEMÁTICOS (Tabs)
/* ============================================= */
.tabs__nav {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid #ddd;
    margin-bottom: 2rem;
}

.tabs__nav-item {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--color-grey-dark);
    border-bottom: 4px solid transparent;
    transform: translateY(2px);
}

.tabs__nav-item.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tabs__panel {
    display: none;
    animation: fadeIn 0.5s;
}

.tabs__panel.active {
    display: block;
}

.list-columns {
    column-count: 2;
    column-gap: 2rem;
}

.list-columns li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #ddd;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================= */
/* 4. CONVOCATORIA (Ponencias)
/* ============================================= */
.convocatoria {
    background-color: var(--color-bg-subtle);
}

.fechas__grid {
    margin: 2rem 0 3rem 0;
}

.card {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.card__label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-grey-dark);
    margin-bottom: 0.5rem;
}

.card__date {
    display: block;
    font-family: var(--font-primary);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-primary);
}

.cta-section {
    margin: 3rem 0;
}

.accordion__item {
    background: var(--color-white);
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion__title {
    display: block;
    padding: 1rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: var(--color-primary);
}

.accordion__title::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--color-grey-dark);
}

.accordion__item[open] > .accordion__title::after {
    content: '−';
}

.accordion__content {
    padding: 1.5rem;
    border-top: 1px solid #ddd;
}

.accordion__content ul {
    list-style: disc;
    margin-left: 1.5rem;
}

/* ============================================= */
/* 5. COMITÉS
/* ============================================= */
.comite h3 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.card--comite {
    text-align: left;
    border-top: 4px solid var(--color-accent);
}

.card__title {
    color: var(--color-primary);
}

.card__text {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* AJUSTE: Comité Científico */
.comite__cientifico-lista {
    column-count: 2;
    column-gap: 2.5rem;
    margin-top: 1.5rem;
}

.comite-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    -webkit-column-break-inside: avoid;
            page-break-inside: avoid;
                 break-inside: avoid;
}

.comite-item__nombre {
    display: block;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.comite-item__institucion {
    display: block;
    font-size: 0.95rem;
    color: var(--color-grey-dark);
}

/* ============================================= */
/* 6. INSCRIPCIÓN (Público)
/* ============================================= */
.inscripcion {
    background-color: var(--color-grey-light);
}

.inscripcion__gratuito {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
}

.lead-capture__form {
    display: flex;
    max-width: 500px;
    margin: 2rem auto 0 auto;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.lead-capture__form input {
    flex-grow: 1;
    border: 2px solid var(--color-white);
    padding: 1rem;
    font-size: 1rem;
}
.lead-capture__form input:focus {
    outline: 2px solid var(--color-accent);
}

.lead-capture__form button {
    border-radius: 0;
    border-left: none;
}

/* ============================================= */
/* 6.5. NUEVA SECCIÓN: ORGANIZADORES (Logos)
/* ============================================= */
.organizadores {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.logo-grid {
    display: flex; 
    flex-wrap: wrap;  
    justify-content: center; 
    gap: 2.5rem; 
    align-items: center; 
    margin-top: 2rem;
}

.logo-grid__item {
    flex-basis: 180px;
    text-align: center; 
}

.logo-grid__item a {
    display: block;
    transition: transform 0.3s ease;
}

.logo-grid__item a:hover {
    transform: scale(1.1); 
    text-decoration: none;
}

.logo-grid__item img {
    max-width: 100%; 
    width: auto;
    max-height: 100px; 
    display: inline-block; /* Asegura centrado */
}

/* ============================================= */
/* 7. FOOTER (Contacto y Sede)
/* ============================================= */
.footer {
    background-color: var(--color-text);
    color: var(--color-grey-light);
    padding: 5rem 0 0 0;
}

.footer .grid {
    gap: 3rem;
}

.footer__title {
    font-family: var(--font-primary);
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.footer a {
    color: var(--color-white);
    display: inline-block;
    margin-bottom: 1rem;
}
.footer a:hover {
    color: var(--color-accent);
}

.footer__logos {
    margin-top: 1rem;
    opacity: 0.7;
}

.footer__logos img {
    margin-bottom: 1rem;
}

.footer__mapa {
    border-radius: 5px;
    overflow: hidden; /* Clave para que el iframe respete el borde redondeado */
    margin-top: 1rem;
    height: 200px;
}

.footer__mapa iframe {
    width: 100%;
    height: 100%; /* El iframe ocupa el 100% de los 200px del contenedor */
}

.footer__bottom {
    text-align: center;
    font-size: 0.9rem;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--color-grey-dark);
    color: var(--color-grey-dark);
}


/* ============================================= */
/* AJUSTE: Ritmo Vertical y Títulos
/* ============================================= */
.objetivo,
.temas,
.convocatoria,
.comite,
.inscripcion,
.organizadores {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

.section-header > .section-title {
    margin-bottom: 0.5rem;

}

.section-header > .subtitle {
    font-size: 1.15rem;
    color: var(--color-grey-dark);
    margin: 0;
    line-height: 1.5;
}

.section-header > .inscripcion__gratuito {
    margin-bottom: 0.5rem;
}

h2.section-title {
    margin-bottom: 2rem;
}

h3.subsection-title {
    margin-bottom: 2rem;
}

.inscripcion .section-header {
    max-width: 800px;
    margin-bottom: 2.5rem;
}

.mb_comite {
    margin-bottom: 3rem !important;
}

.mt_comite {
    margin-top: 5rem !important;
}

/* ============================================= */
/* 99. RESPONSIVE (Mobile-First)
/* ============================================= */

@media (max-width: 992px) {
    .grid--3-cols { grid-template-columns: 1fr 1fr; }
    .comite__cientifico-lista { column-count: 2; } /* Mantiene 2 cols en tablet */
}

@media (max-width: 768px) {
    .navbar__menu {
        display: none;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .grid--2-cols,
    .grid--3-cols {
        grid-template-columns: 1fr;
    }
    
    .hero {
        min-height: calc(95vh - 80px);
    }

    .list-columns { column-count: 1; }
    
    .comite__cientifico-lista { 
        column-count: 1; /* AJUSTE: 1 columna en móvil */
    }
    
    .tabs__nav {
        flex-direction: column;
    }
    .tabs__nav-item {
        border-bottom: 2px solid #ddd;
        transform: translateY(0);
    }
    .tabs__nav-item.active {
        border-bottom-color: var(--color-primary);
    }

    .lead-capture__form {
        flex-direction: column;
        box-shadow: none;
        border-radius: 0;
    }
    .lead-capture__form input,
    .lead-capture__form button {
        border-radius: 5px;
        margin-bottom: 0.5rem;
    }
}