:root {
    --theme-color: #FFFFFF;
    --primary-color: #1AA4ED;
    --secondary-color: #05CBE7; 
    --text-menu-color: #222952;
    --text-menu-hover-color: #bb3c18; 
    --text-color-inverse: white;
    --text-color: rgb(122, 122, 122);
    --linea-color: #BCCF11;
    --navbar-shallow-color: #cfcccc;
    --menu-mobile-background-color: #1AA4ED;
    --fondo-gris: #f0f0f0;
}

html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 100px;
}

body {
    font-family: "Montserrat", sans-serif;
    background-color: var(--theme-color);
    color: var(--text-color);
    padding-top: 70px;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

/* ESTILOS BARRA DE MENU */

/* Logo */
.logo img {
    max-height: 80px;
    width: auto;
    margin-left: 0.7rem;
}

.topheader{
    position: fixed; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--theme-color);
    height: 80px;
    width: 100%;
    top: 0;
    box-shadow: 0 4px 5px var(--navbar-shallow-color); 
    z-index: 100;
}

.topnav {
    display: flex;
    justify-content: space-between;
    margin-right: 1.2rem;
}

/* Menu */
.menu {
    display: flex; 
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li {
    padding: 0 10px;
}

.menu a {
    color: var(--text-menu-color);
    font-size: 0.70rem;
    font-weight: 500;
    line-height: 50px;
    text-transform: uppercase; 
    position: relative;
}

.menu a::after {
    content: ""; 
    background-color: var(--linea-color);
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    width: 100%;
    height: 4px;
    opacity: 0;
    transition: opacity 0.5s;
}

.menu a.selected::after,
.menu a:hover::after {
    opacity: 0.9;
}

.menu a:hover {
    color: var(--text-menu-hover-color);
}

.open-menu,
.close-menu {
    display: none;
}

/* Responsive Menu (Tablets y Móviles) */
@media (max-width: 1200px) {
    .menu {
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        align-items: center;
        background-color: var(--secondary-color);
        height: 100%;
        overflow-y: auto;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .logo img {
        max-width: 130px;
        min-width: 100px;
    }
    .menu li {
        padding: 0;
    }

    .menu a {
        color: var(--text-color-inverse);
        line-height: 70px;
        font-size: 25px;
    }

    .open-menu,
    .close-menu {
        display: block;
        border: none;
        background: none;
        cursor: pointer;
    }

    .close-menu {
        align-self: flex-end;
        padding: 20px 15px;
    }

    .menu_opened {
        opacity: 1;
        pointer-events: all;
    }

    .open-menu:focus:not(:focus-visible),
    .close-menu:focus:not(:focus-visible) {
        outline: none;
    }

    .menu a::after {
        content: none;
    }

    .menu a:hover,
    .menu a.selected {
        color: var(--text-menu-color);
    }
}

/* Estilo secciones */
main {
    padding-top: 0px; 
}

.section {
    overflow: hidden;
}

.section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.section:not(:first-child) {
    margin-top: 20px;
}

/* Estilo secciones con más de una imagen vertical */
.image-section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
}

.image-section img,
.image-section source {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 720px) {
    .image-section {
        display: block;
        margin-bottom: 20px;
    }

    .large-screen-image {
        display: none;
    }

    .small-screen-image {
        display: initial;
    }
}

/* INICIO ESTILOS BOTÓN FLOTANTE (Inscripción) */
.buttonClass {
    font-size: 1rem;
    font-family: "Montserrat", Arial, sans-serif; 
    width: 250px;
    height: 50px;
    border-width: 1px;
    color: #fff;
    border-color: #BB3C18;
    font-weight: 600;
    border-radius: 15px;
    display: block;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
    background: #ba3c18;
    box-shadow: 0px 10px 14px -7px #232952;
}

.buttonClass:hover {
    background: #232952;
    box-shadow: 0px 10px 14px -7px #ba3c18;
}

.floating-button {
    position: fixed;
    top: 0.8rem;
    left: 25%; 
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s; 
}

.floating-button.visible {
    opacity: 1;
    visibility: visible;
}

/* --- BOTÓN PAGO CUOTAS (Estilos Base) --- */
.btn-cuotas {
    z-index: 1001; /* Encima de todo */
    background-color: #05CBE7; /* Azul corporativo */
    color: #232952; /* Texto oscuro */
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    padding: 5px 55px;
    padding-top: 15px;
    height: 50px;
    line-height: 40px; /* Centrado vertical */
    border-radius: 15px; /* Bordes iguales al de Inscripción */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn-cuotas:hover {
    background-color: #1AA4ED;
    transform: translateY(-2px);
    color: white;
    opacity: 1 !important; /* Quita transparencia al hover */
}

/* ESTADO 1: EN EL HEADER (Centrado) */
.btn-cuotas.header-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ESTADO 2: SCROLLED (Fijo DERECHA abajo del header) */
.btn-cuotas.scrolled-state {
    position: fixed;
    top: 95px; /* Debajo del header de 95px */
    right: 25px; /* A la DERECHA */
    opacity: 0.45; /* Opacidad reducida 5% más (45%) */
    transform: none; /* Reseteamos el translate */
}

/* ESTILOS CONFERENCISTAS (GRID - Código Legacy) */
.banner {
    width: 100%;
    height: auto;
    display: block;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: auto auto; 
    gap: 20px 10px; 
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
    margin-left: 50px;
    margin-bottom: 50px
}

.grid-container img {
    width: 75%;
    height: auto;
    object-fit: cover;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.grid-container img:hover {
    transform: scale(1.5);
}

.grid-container img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    mix-blend-mode: multiply;
}

.grid-container .grid-item a:hover img {
    transform: rotate(1deg) scale(1.15); 
    opacity: 0.5;
}

.empty-space {
    width: 100%;
    height: auto;
}

/* Media Query Unificada para Tablets */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Ajustes HOTELES para tablets */
    .image-hoteles {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .image-hoteles img {
        height: auto;
        object-fit: contain; 
    }
}

/* Media Query Corregida para Móviles */
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Ajustes específicos en Móviles */
@media (max-width: 720px) {
    .buttonClass {
        font-size: 0.8rem;
        width: 140px;
        height: 40px;
        line-height: 40px;
    }
    
    .floating-button {
        top: 20px; 
        left: 42%;
        bottom: unset;
    }

    /* AJUSTES PARA EL BOTÓN PAGO CUOTAS EN MÓVIL */
    .btn-cuotas {
        font-size: 0.75rem; 
        padding: 0 10px;
        height: 35px;
        line-height: 35px;
    }
    
    /* En móvil, el Header State también debe estar ajustado para no chocar */
    .btn-cuotas.header-state {
        /* Un poco más a la izquierda para no tapar el menú hamburguesa si es necesario */
        left: 45%; 
    }
    
    /* Scrolled state en móvil: También a la derecha */
    .btn-cuotas.scrolled-state {
        right: 10px;
    }
}

/* INICIO HOTELES */
.image-hoteles {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 10px;
    margin-top:10px;
}

.image-hoteles img {
    width: 100%;
    height: 600px;
    transition: transform 0.3s ease;
}

.image-hoteles img:hover{
    opacity: 0.5;
}

/* --- ESTILOS AGENDA POR DEFECTO (ESCRITORIO) --- */

.agenda-mobile {
    display: none; 
}

.agenda-desktop {
    display: flex;
    flex-direction: column; /* Apila las imágenes verticalmente una debajo de otra */
    align-items: center; /* Centra las imágenes en la pantalla */
    width: 100%;
}

.agenda-desktop img {
    width: 100%;
    height: 100vh; /* Hace que CADA imagen ocupe el 100% del alto de la pantalla del navegador */
    object-fit: contain; /* IMPORTANTE: Evita que las imágenes se deformen o recorten. Muestra la imagen completa ajustada al alto. */
    margin-bottom: 2rem; /* Espacio de separación entre el jueves, viernes y sábado */
}

/* Quitamos el margen a la última imagen (sábado) para no dejar espacio extra al final */
.agenda-desktop img:last-child {
    margin-bottom: 0;
}


/* --- ESTILOS AGENDA PARA MÓVILES (Hasta 720px) --- */

@media (max-width: 720px) {
    .agenda-desktop {
        display: none;
    }

    .agenda-mobile {
        display: block; 
        text-align: center;
    }

    .agenda-mobile img {
        width: 100%;
        height: auto; /* En móviles dejamos que la altura fluya naturalmente */
        margin: 0 auto;
    }
}