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

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    /* Evita scroll horizontal */
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;

    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

/* ===== CADA SECCIÓN OCUPA 100vh ===== */
.page {
    position: relative;
    height: 100vh;
    padding: 2rem 1rem 4rem;
    /* espacio arriba, laterales, y más abajo para el cintillo */
    background: #f9f9f9;
    scroll-snap-align: start;
    /* para scroll suave por secciones */
}

/* ===== CONTENIDO PRINCIPAL ===== */
.content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    padding-bottom: 3rem;
    /* espacio antes del cintillo */
}

/* ===== HEADER CON TÍTULO Y LOGO PEQUEÑO ===== */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    text-decoration: underline;
}

.logo-small {
    height: 50px;
}






/* ===== TEXTO (4/5 DEL ANCHO) ===== */
.text-section {
    width: 70%;
    /* 4/5 */
    text-align: justify;
    font-size: 1.1rem;
    line-height: 1.6;
}

#p1r1{
    
} 

#p1{
    display: grid;
    gap : 5px
}




/* ===== GRID DE IMÁGENES ===== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    height: 100vh;
    padding: 1rem;
    width: 80%;
    margin: auto;
}

.tres-imgs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    width: 80%;
    min-height: 30%;
    margin-left: 10%;
    margin-bottom: 20px;
    overflow: hidden;
}



.tres-imgs>div>div {
    
    height: 100%;

}

.text-sectionp2 {
    width: 70%;
    text-align: justify;
    margin-left: 20%;
    height: 45%;
}

textx-sectionp2-txt {
    display: flex;
    align-items: center;
    justify-content: flex-end;

}

#p3r1 {
    display: flex;
    justify-content: space-between;
    height: 45%;
    overflow: hidden;
    column-gap: 5%
}

#p3r2,
#p4r1, #p4r2, #p5r1, #p5r2 {
    display: flex;
    justify-content: space-around;
    min-height: 50%;
    overflow: hidden;
    column-gap: 5%;
    max-width: 80%;
    width: 80%;
  
}

#p4r2c1 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#imgEsmerilado{
    width: 20svh;
}

#p4r1c1 img {
    max-width: 15svh;
    aspect-ratio: 1 / 1;
}

#p4r1c2, #p4r1c3{
  gap : 8px;
}
#txtEspeciales {
    max-width: 15svh;
}

#p4r1>div {
    display: flex
}

#p3r2>div {    
    min-width: 30vh
}

#p3r2 img {
    min-height: 35vh;

}

#banderas {
    display: flex
}

.image-item {
    aspect-ratio: 1 / 1;
    min-width: 100px;
    overflow: hidden;
    border-radius: 8px;
    /* opcional, para estilo */
}

#logoDerecha {
    width: 90%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;

}

#a1 {
    background-image: url('../img/ada-000.webp');
}

#a2 {
    background-image: url('../img/ada-001.webp');
}

#a3 {
    background-image: url('../img/ada-002.webp');
}

#a4 {
    background-image: url('../img/ada-003.webp');
}

#a5 {
    background-image: url('../img/ada-004.webp');
}

#a6 {
    background-image: url('../img/ada-005.webp');
}

#a7 {
    background-image: url('../img/ada-006.webp');
}

#a8 {
    background-image: url('../img/ada-007.webp');
}



/* Móvil: 2 columnas */
.image-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Tablet: 3 columnas */
@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tres-imgs {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* Desktop: 5 columnas */
@media (min-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.tres-imgs {
    grid-template-columns: repeat(3, 1fr);
    max-height: 30%;
}

.image-item img {

    max-height: 30vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== CINTILLO DE CONTACTO (FIJO ABAJO) ===== */
.contact-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    z-index: 10;
}

/* ===== ANIMACIÓN DEL LOGO DE PORTADA ===== */
.logo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeOut 2s forwards 1s;
    /* se desvanece después de 1s */
}

.logo {
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }
}

/* ===== SCROLL SUAVE POR SECCIONES (OPCIONAL) ===== */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* ===== PARA ESCRITORIOS MUY GRANDES (opcional: más ancho de texto o imágenes) ===== */
@media (min-width: 1440px) {

    .text-section,
    .text-sectionp2 {
        width: 70%;
        /* texto más centrado en pantallas ultra anchas */
        font-size: 1.2rem;
    }

    .image-item img {
        border-radius: 12px;
        /* más elegante en pantallas grandes */
    }

    .header {
        padding: 0 5rem;
    }
}