html {
    scroll-behavior: smooth;
}

/* Home (front-page) */
body.home {
    overflow-x: hidden;
    /* evita scroll horizontal */
    overflow-y: auto;
    /* permite scroll vertical */
    height: auto;
    /* deja que el documento crezca */
    min-height: 100vh;
    /* al menos la altura de la ventana */
    background: var(--color-back);
}

/* Contenedor de la escena */
.home-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* antes era height:100vh; usa min-height para que la página pueda crecer */
    height: auto;
    /* libera altura fija */
    background: var(--home-bg, --color-back) no-repeat center center / cover;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Botones como imágenes PNG */
.home-buttons {
    position: absolute;
    bottom: clamp(10%, 16vh, 22%);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(12px, 3.2vw, 28px);
    z-index: 20;
}

.img-btn {
    display: inline-block;
    line-height: 0;
    border-radius: 14px;
    /* por si tus PNG tienen esquinas */
    transition: transform .18s ease, filter .18s ease;
    outline: none;
}

.img-btn:focus-visible {
    outline: 2px dashed #20e0ff;
    outline-offset: 4px;
}

.img-btn img {
    width: var(--btn-w, clamp(120px, 14vw, 180px));
    /* tamaño responsive */
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .25));
}

.img-btn:hover {
    transform: translateY(-2px) scale(1.04);
}

.img-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Footer por debajo de botones */
.site-footer {
    z-index: 10;
}

.home-wrapper .site-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #00434ca8;
    backdrop-filter: blur(1px);
    z-index: 10;
}


/* Accesibilidad: oculto visual pero disponible a lectores */
.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Footer transparente en el home */
body.home .site-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #00434ca8;
    /* semitransparente */
    backdrop-filter: blur(1px);
}

body.home>.site-footer {
    position: static;
    color: #fff;
    background: #00434ca8;
    font-family: var(--font-body);
    /* ajusta a tu tema */
    background: #00434ca8;
    /* semitransparente */
    backdrop-filter: blur(1px);
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: clamp(12px, 3vh, 24px);
    transform: translateX(-50%);
    text-decoration: none;
    font-size: clamp(18px, 2.6vw, 28px);
    line-height: 1;
    color: #fff;
    opacity: 0.9;
    z-index: 25;
    transition: transform .2s ease, opacity .2s ease;
}

.scroll-cue:hover {
    transform: translateX(-50%) translateY(-2px);
    opacity: 1;
}

/* === Estilos base para las NUEVAS secciones === */

/* Contenedor general (si no tienes uno, define este) */
.container {
    width: min(1100px, 92vw);
    margin-inline: auto;
    padding-inline: clamp(12px, 3vw, 24px);
}

/* Intro (3 párrafos) */
.home-intro {
    padding-block: clamp(32px, 6vw, 72px);
    background: var(--color-back);

}

.home-intro__title {
    font-family: var(--font-title);
    font-size: clamp(42px, 6vw, 64px);
    line-height: 1.05;
    color: #163c3a;
    margin: 8px 0 6px;
}

.home-intro__text p {
    margin: 0 0 1.1em;
    font-size: clamp(15px, 1.1vw + 12px, 18px);
    font-family: var(--font-body);
    line-height: 1.7;
    color: #004f40;
}

/* Contacto + Mapa */
.home-contacto {
    padding-block: clamp(36px, 7vw, 84px);
    background: var(--color-back);
    font-family: var(--font-body);
    line-height: 1.7;
    color: #004f40;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.home-contacto__grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: clamp(16px, 3vw, 28px);
    align-items: start;
}

.home-contacto h2 {
    margin: 0 0 .6em;

}

.home-contacto__item {
    margin: 0 0 .5em;
    font-size: clamp(14px, 1vw + 11px, 18px);
}

.home-contacto__item a {
    font-family: var(--font-body);
    line-height: 1.7;
    color: #004f40;
    text-decoration: none;
    border-bottom: none;
}

.home-contacto__item a:hover {
    border-bottom-style: solid;
}

/* Mapa */
.home-contacto__mapa iframe,
.home-contacto__mapa .mapa-fallback {
    width: 100%;
    height: min(56vh, 440px);
    border: 0;
    border-radius: 12px;
    background: #111;
    display: block;
}

.mapa-fallback {
    display: grid;
    place-items: center;
    color: #ccc;
    font-size: 14px;
}

/* Responsivo */
@media (max-width: 768px) {
    .home-buttons {
        bottom: 14%;
    }
}

@media (min-width: 769px) {
    body.home {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .home-buttons {
        bottom: 10%;
    }

    .home-buttons .btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Responsivo */
@media (max-width: 900px) {
    .home-contacto__grid {
        grid-template-columns: 1fr;
    }

    .home-buttons {
        bottom: 14%;
    }
}

@media (max-width: 520px) {
    .home-buttons {
        bottom: 10%;
    }
}

/* Accesibilidad (ya lo tenías, lo dejo por si no está al final) */
.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* --- HOME: dos columnas fijas (3 izq / 3 der) --- */
.home-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    align-items: start;
    /* <- NO 'end' */
    justify-items: start;
    /* por defecto izquierda */
    row-gap: clamp(14px, 3vh, 24px);
    column-gap: clamp(32px, 8vw, 140px);
    width: min(1200px, 92vw);
    margin: 0 auto;
}

/* asignación explícita de filas/columnas */
.home-buttons .img-btn:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.home-buttons .img-btn:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
}

.home-buttons .img-btn:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
}

.home-buttons .img-btn:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

.home-buttons .img-btn:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

.home-buttons .img-btn:nth-child(6) {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
}

/* tamaño de los botones */
.home-buttons .img-btn {
    display: block;
    line-height: 0;
    /* evita espacios fantasma */
}

.home-buttons .img-btn img {
    width: clamp(150px, 18vw, 220px);
    height: auto;
    display: block;
}

/* responsive: apilar centrados en móvil */
@media (max-width: 720px) {
    .home-buttons {
        grid-template-columns: 1fr;
        justify-items: center;
        column-gap: 0;
    }

    .home-buttons .img-btn:nth-child(n) {
        grid-column: 1;
        justify-self: center;
    }

    .home-buttons .img-btn img {
        width: clamp(160px, 58vw, 240px);
    }
}