/* Reset CSS básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ajustar el modelo de caja al modelo de caja de borde */
}

body{
    font-family: "Karla", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-size: 16pt;
    background-color: #232d38;
}

h1{
    font-family: "Outfit", sans-serif;
    font-optical-sizing: auto;
    font-size: 52pt;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 3px 5px #007a75;
}

h2{
    font-family: "Outfit", sans-serif;
    color:#5bcc35;
    font-size: 48pt;
    font-weight: 500;
}

h3{
    font-family: "Outfit", sans-serif;
    font-size: 32pt;
    font-weight: 100;
    color:#ffffff;
}

.menu{
    display: flex;
    align-items: center;
    height: 60px;
    padding-inline: 20px;
    background-color: #232d38; /* *Agregué color de fondo para que se note */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 0 30px #000000;
}

.logo{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40%;
    height: auto;
    object-fit: contain;
}

.logo img{
    max-height: 45px;
}

.botones{
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 60%;
    transition: max-height 0.3s ease-out; /* *Preparado para animación */
}

.botones a{
    padding: 10px 30px 10px 30px;
    color: #ffffff;
    font-family: "Outfit", sans-serif;
    text-decoration: none;
    border-radius: 5px;
    white-space: nowrap; /* *Evita que el texto se rompa */
}

.botones a:hover{
    background-color: #5bcc35;
    color: #232d38;
}

.cover{
    display: flex;
    align-items: center;
    justify-content:center;
    text-align: center;
    height: 100%;
    padding-inline: 50px;
    background-image: url("../srcs/ilust/hdr_ilust.png");
    background-size: cover;
    height: 300px;
    color: white; /* *Asegura que el texto se vea si no carga la img */
    margin-top: 60px;
}

/* 1. Ocultar elementos del menú móvil en Escritorio */
.menu-checkbox {
    display: none;
}
.menu-icon {
    display: none; /* Oculto por defecto */
}

/* --- TU CSS ORIGINAL (Con ligeros ajustes) --- */

.galeria {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cont_galeria {
    /* CAMBIO: Usar max-width y width 100% hace que no se rompa en móviles */
    max-width: 1200px; 
    width: 100%;
}

.apartado {
    padding: 10px 0 10px;
    text-align: center;
}

.grid {
    display: grid;
    /* CAMBIO: Esto hace que la grilla sea responsiva automáticamente (3 columnas en PC, menos en móvil) */
    grid-template-columns: auto auto auto; 
    gap: 5px;
}

.thumb {
    aspect-ratio: 1/1;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer; /* CAMBIO: Agrega la manito para indicar que es clickeable */
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: 1.01;
    transition: .3s;
}

.thumb img:hover {
    scale: 1.1;
}

/* --- CÓDIGO NUEVO: ESTILOS DEL LIGHTBOX --- */

/* Clase utilitaria para bloquear el scroll del body */
body.no-scroll {
    overflow: hidden;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Contenedor Principal (Fondo oscuro) */
.lightbox {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro semitransparente */
    
    /* Centrado de la imagen */
    justify-content: center;
    align-items: center;
    
    /* Animación de entrada del fondo */
    animation: fadeIn 0.3s ease-out;
}

/* La Imagen Grande */
.lightbox-imagen {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain; /* Asegura que la imagen completa se vea sin recortes */
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    
    /* Animación de entrada de la imagen */
    animation: zoomIn 0.3s ease-out;
}

/* Botón Cerrar (X) */
.cerrar {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    padding: 10px; /* Área de toque más grande para móviles */
    line-height: 1;
    transition: color 0.3s;
    user-select: none;
}

.cerrar:hover {
    color: #ccc;
}

.secciones{
    background-image: linear-gradient(to bottom, #bfe57e, #5bcc35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-inline: 10px;
}

.secciones h2{
    color: #232d38;
}

.conoce{
    margin: 20px 0 10px 0;
}

.cont_secciones{
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    height: 350px;
    max-width: 1200px;
    margin: 10px 0 20px 0;
}

.cont_secciones a{
    background-color: #007a75;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25%;
    height: 100%;
    margin-inline: 5px;
    border-radius: 15px;
    overflow: hidden;
}

.cont_secciones img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: 1.01;
    transition: .3s;
}

.cont_secciones img:hover{
    scale: 1.1;
}

.cont_secciones_mobile{
    display: none;
}

footer{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}

footer img{
    display: flex;
    height: 40%;
}

@media screen and (max-width: 1200px) {

    .cont_secciones{
        height: 250px;
    }

    .cont_galeria{
        width: 95%;
    }


}

@media screen and (max-width: 800px) {

    h1{
        font-size: 48px;
    }
    
    h2 {
        font-size: 32pt;
    }

    h3{
        font-size: 24pt;
    }

/* 1. Ajustar la barra de navegación principal */
    .menu {
        justify-content: space-between; /* Logo a la izq, Botón a la der */
    }

    /* 2. Ajustar el logo para que no ocupe tanto espacio */
    .logo {
        width: auto; /* Ya no es 40%, solo lo que mida la imagen */
        justify-content: flex-start; /* Alinear a la izquierda */
    }

    /* 3. Mostrar y estilizar el botón Sándwich (X animada) */
    .menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        cursor: pointer;
        z-index: 101; /* Encima del menú desplegable */
    }

    .menu-icon span {
        width: 100%;
        height: 3px;
        background-color: white;
        border-radius: 3px;
        transition: all 0.3s;
    }

    /* Animación de Sándwich a X */
    .menu-checkbox:checked ~ .menu-icon span:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }
    .menu-checkbox:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    .menu-checkbox:checked ~ .menu-icon span:nth-child(3) {
        transform: translateY(-9.5px) rotate(-45deg);
    }

    /* 4. Transformar .botones en el menú desplegable vertical */
    .botones {
        position: absolute;
        top: 100%; /* Justo debajo de la barra .menu */
        left: 0;
        width: 100%;
        background-color: #232d38; /* Mismo color del header */
        flex-direction: column; /* Botones uno debajo del otro */
        align-items: center;
        max-height: 0; /* Oculto inicialmente */
        overflow: hidden; /* Esconde el contenido */
        padding: 0; /* Reseteamos padding */
        z-index: 100; /* Encima del .cover */
    }

    /* Estilo de los enlaces en móvil */
    .botones a {
        width: 100%; /* Botón ancho completo */
        text-align: center;
        padding: 30px 0;
        border-bottom: 1px solid #3a4b5c; /* Línea separadora sutil */
        display: block;
    }

    /* 5. ABRIR EL MENÚ cuando el checkbox está marcado */
    .menu-checkbox:checked ~ .botones {
        max-height: 500px; /* Altura suficiente para ver los enlaces */
    }

    .secciones{
        padding-inline: 0;
        padding-bottom: 20px;
    }

    .cont_secciones{
        display: none;
    }

    .cont_secciones_mobile{
        display: block;
        display: flex;
        flex-direction: column;
        width: 100%;
        justify-content: center;
        align-items: center;
        height: auto;
        width: 100%;
    }

    .cont_secciones_mobile img{
        width: 100%;
        min-height: 100%;
        object-fit: cover;
    }

    .cont_secciones_mobile a{
        height: 120px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 15px;
        margin: 5px;
        max-width: 500px;
    }

    .cont_secciones_mobile img:hover{
    scale: 1.1;
    transition: .1s;
    }

    footer img{
        width: 60%;
        height: auto;
    }

}