/* ==========================================================================
   Malacara Esquí — Home 2026/27 (templates/core/home_redesign.html)
   Colores y tipografía de la marca: azul noche, burdeos y naranja; Barlow Condensed
   para títulos y DM Sans para el texto (site-fonts.css, DESIGN.md).
   Móvil primero. Sin animaciones de entrada ni vídeo.
   ========================================================================== */

:root {
    --home-noche: var(--brand-dark, #0f172a);
    --home-burdeos: var(--brand-primary, #800020);
    --home-burdeos-hover: #9e0027;
    /* Naranja de marca oscurecido para que el texto blanco pase AA (≥4,5:1). */
    --home-naranja: #c44a1a;
    --home-naranja-hover: #a93e15;
    --home-naranja-claro: #ffb38f;
    --home-whatsapp: #0f7f39;
    --home-whatsapp-hover: #0c6b30;
    --home-tinta: var(--brand-ink, #1e293b);
    --home-gris: var(--brand-muted, #5c6570);
    --home-suave: #f4f6f9;
    --home-borde: rgba(15, 23, 42, 0.12);
    --home-radio: 14px;
    --home-hueco: clamp(3rem, 7vw, 5rem);
}

.home-pagina {
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--home-tinta);
    overflow-x: clip;
}

.home-pagina h2,
.home-pagina h3 {
    font-family: 'Barlow Condensed', 'DM Sans', sans-serif;
    text-wrap: balance;
}

/* Anclas #servicios, #para-quien y #tipos-clase: el título queda bajo el menú fijo.
   --navbar-h lo fija base.html con la altura real del menú (ResizeObserver). */
.home-ancla {
    scroll-margin-top: calc(var(--navbar-h, 102px) + 1rem);
}

/* --------------------------------------------------------------------------
   Botones y enlaces
   -------------------------------------------------------------------------- */

.home-botones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .home-botones {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.home-botones--centro {
    justify-content: center;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.7rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.home-btn--reservar {
    background: var(--home-naranja);
    color: #fff;
}

.home-btn--reservar:hover {
    background: var(--home-naranja-hover);
    color: #fff;
}

.home-btn--whatsapp {
    background: var(--home-whatsapp);
    color: #fff;
}

.home-btn--whatsapp:hover {
    background: var(--home-whatsapp-hover);
    color: #fff;
}

.home-btn--linea {
    background: #fff;
    color: var(--home-burdeos);
    border-color: var(--home-burdeos);
}

.home-btn--linea:hover {
    background: var(--home-burdeos);
    color: #fff;
}

.home-enlace {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    color: var(--home-burdeos);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-enlace:hover {
    color: var(--home-burdeos-hover);
}

/* Anillo de foco con ≥3:1 contra lo que tiene al lado: burdeos en las secciones claras
   (~10:1 sobre blanco; el naranja de marca da 2,8:1) y naranja sobre el azul noche (~6:1). */
.home-pagina a:focus-visible,
.home-pagina summary:focus-visible {
    outline: 3px solid var(--home-burdeos);
    outline-offset: 3px;
    box-shadow: none;
    border-radius: 6px;
}

.home-portada a:focus-visible,
.home-club__caja a:focus-visible,
.home-cierre a:focus-visible {
    outline-color: var(--brand-secondary, #ff6b35);
}

/* --------------------------------------------------------------------------
   Portada: en móvil, texto y botones antes de la foto (4:5); desde 768 px, 16:9;
   desde 992 px el texto a la izquierda sobre la foto, con el profesor a la derecha.
   -------------------------------------------------------------------------- */

.home-portada {
    margin-top: var(--navbar-h, 76px);
    background: var(--home-noche);
    color: #fff;
}

.home-portada__texto {
    max-width: 40rem;
    padding: 1.75rem 16px 2rem;
}

.home-portada__titulo {
    margin: 0 0 0.75rem;
    font-family: 'Barlow Condensed', 'DM Sans', sans-serif;
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    text-wrap: balance;
    color: #fff;
}

.home-portada__frase {
    margin: 0 0 0.75rem;
    font-family: 'Barlow Condensed', 'DM Sans', sans-serif;
    font-size: clamp(1.3rem, 3.5vw, 1.65rem);
    font-weight: 700;
    color: var(--home-naranja-claro);
}

.home-portada__entradilla {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.home-portada__resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.home-portada__resumen li + li::before {
    content: "·";
    margin-right: 0.6rem;
    opacity: 0.7;
}

.home-portada__enlace {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    margin-top: 0.75rem;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-portada__enlace:hover {
    color: var(--home-naranja-claro);
}

.home-portada__ayuda {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
}

.home-portada__foto {
    display: block;
}

.home-portada__foto img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 50%;
}

@media (min-width: 768px) {
    .home-portada__texto {
        padding: 2.5rem 24px;
    }

    .home-portada__foto img {
        aspect-ratio: 16 / 9;
    }
}

@media (min-width: 992px) {
    .home-portada__inner {
        display: grid;
        max-width: 1320px;
        margin: 0 auto;
    }

    .home-portada__texto,
    .home-portada__foto {
        grid-area: 1 / 1;
    }

    .home-portada__foto {
        position: relative;
        justify-self: end;
        align-self: center;
        width: 100%;
        max-width: 1024px;
    }

    /* Contraste del texto sobre la mitad izquierda de la foto. Entre 992 y ~1100 px la foto
       ocupa todo el ancho y el texto llega al 50 % de ella: hasta el 55 % el velo no baja de
       0,85. Con nieve blanca detrás, el fondo efectivo queda en ~rgb(51 58 74): el blanco da
       11,4:1, la línea de ayuda (blanco al 95 %) 10,5:1 y la frase naranja 6,6:1; con el velo
       anterior (0,55 al 50 %) el blanco se quedaba en 4:1. Desde el 78 %, foto limpia. */
    .home-portada__foto::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(90deg,
            var(--home-noche) 0%,
            rgba(15, 23, 42, 0.92) 35%,
            rgba(15, 23, 42, 0.85) 55%,
            rgba(15, 23, 42, 0) 78%);
    }

    .home-portada__texto {
        position: relative;
        z-index: 1;
        align-self: center;
        max-width: min(36rem, 50%);
        padding: 2.5rem 24px;
    }

    .home-portada__titulo {
        font-size: clamp(2.2rem, 3.6vw, 3.1rem);
    }
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */

.home-seccion {
    padding: var(--home-hueco) 0;
}

.home-seccion--suave {
    background: var(--home-suave);
}

.home-cabecera {
    max-width: 46rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.home-cabecera h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--home-burdeos);
}

.home-cabecera p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--home-gris);
}

.home-centrado {
    margin: 1.5rem 0 0;
    text-align: center;
}

.home-etiqueta {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--home-burdeos);
}

.home-precio {
    margin: 0;
    font-family: 'Barlow Condensed', 'DM Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--home-noche);
}

.home-lista {
    margin: 0 0 1.5rem;
    padding-left: 1.2rem;
}

.home-lista li {
    margin-bottom: 0.35rem;
}

.home-enlaces {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Rejillas y tarjetas */
.home-rejilla {
    display: grid;
    gap: 1rem;
}

@media (min-width: 576px) {
    .home-rejilla--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .home-rejilla--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .home-rejilla--3,
    .home-rejilla--modalidades {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-rejilla--modalidades {
        grid-template-columns: 1.3fr 1fr 1fr;
    }
}

.home-tarjeta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--home-borde);
    border-radius: var(--home-radio);
}

.home-tarjeta h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--home-noche);
}

.home-tarjeta p {
    margin: 0;
}

.home-tarjeta__icono {
    font-size: 1.5rem;
    color: var(--home-naranja);
}

.home-tarjeta__acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Confianza: 2 por fila en móvil, una fila de 4 en ordenador
   -------------------------------------------------------------------------- */

.home-confianza__lista {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 992px) {
    .home-confianza__lista {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }
}

.home-confianza__item {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--home-borde);
    border-radius: var(--home-radio);
}

.home-confianza__item i {
    font-size: 1.25rem;
    color: var(--home-naranja);
}

.home-confianza__item h3 {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--home-noche);
}

.home-confianza__item p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--home-gris);
}

/* --------------------------------------------------------------------------
   Club: franja compacta; en móvil texto y botón antes de la foto (4:5)
   -------------------------------------------------------------------------- */

.home-club {
    padding-top: 0;
}

.home-club__caja {
    display: grid;
    overflow: hidden;
    background: var(--home-noche);
    color: #fff;
    border-radius: var(--home-radio);
}

@media (min-width: 768px) {
    .home-club__caja {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }
}

.home-club__texto {
    padding: 1.75rem 1.25rem;
}

@media (min-width: 992px) {
    .home-club__texto {
        padding: 2.5rem;
    }
}

.home-club__texto .home-etiqueta {
    color: var(--home-naranja-claro);
}

.home-club__texto h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.home-club__texto p {
    color: rgba(255, 255, 255, 0.92);
}

.home-club__precio {
    font-family: 'Barlow Condensed', 'DM Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
}

.home-club__foto {
    display: block;
}

.home-club__foto img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 50%;
}

@media (min-width: 768px) {
    .home-club__foto img {
        aspect-ratio: 16 / 9;
    }
}

/* --------------------------------------------------------------------------
   Modalidades: tabla de particulares
   -------------------------------------------------------------------------- */

.home-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.home-tabla caption {
    caption-side: top;
    padding: 0 0 0.4rem;
    font-weight: 700;
    color: var(--home-tinta);
    text-align: left;
}

.home-tabla th,
.home-tabla td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--home-borde);
    text-align: left;
}

.home-tabla thead th {
    font-size: 0.85rem;
    color: var(--home-gris);
}

.home-tabla__nota {
    font-size: 0.92rem;
    color: var(--home-gris);
}

/* --------------------------------------------------------------------------
   Fotos de esquí y snowboard: 1:1, dos columnas iguales; en móvil una tras otra
   -------------------------------------------------------------------------- */

.home-disciplinas {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .home-disciplinas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.home-disciplina {
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--home-borde);
    border-radius: var(--home-radio);
}

.home-disciplina img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: 50% 50%;
}

.home-disciplina figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.home-disciplina h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--home-noche);
}

/* --------------------------------------------------------------------------
   Equipo: dos columnas; foto 4:3
   -------------------------------------------------------------------------- */

.home-equipo {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 992px) {
    .home-equipo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem;
    }
}

.home-equipo__texto h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--home-burdeos);
}

.home-equipo__texto p {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.home-equipo__empleo {
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

.home-equipo__foto {
    margin: 0;
}

.home-equipo__foto img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 50%;
    border-radius: var(--home-radio);
}

/* Plano comprobado del punto de encuentro de Astún */
.home-plano {
    display: block;
    width: 100%;
    max-width: 592px;
    height: auto;
    aspect-ratio: 592 / 427;
    object-fit: contain;
    border-radius: 10px;
    background: var(--home-suave);
}

/* --------------------------------------------------------------------------
   Preguntas frecuentes (details/summary: teclado y lector de pantalla sin JS)
   -------------------------------------------------------------------------- */

.home-faq {
    max-width: 52rem;
    margin: 0 auto;
    border-top: 1px solid var(--home-borde);
}

.home-faq__item {
    border-bottom: 1px solid var(--home-borde);
}

.home-faq__item summary {
    position: relative;
    min-height: 44px;
    padding: 1rem 2.5rem 1rem 0;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--home-noche);
}

.home-faq__item summary::-webkit-details-marker {
    display: none;
}

.home-faq__item summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--home-burdeos);
}

.home-faq__item[open] summary::after {
    content: "−";
}

.home-faq__respuesta p {
    margin: 0 0 1rem;
    line-height: 1.6;
    color: var(--home-tinta);
}

/* --------------------------------------------------------------------------
   Reserva final
   -------------------------------------------------------------------------- */

.home-cierre {
    padding: var(--home-hueco) 0;
    background: var(--home-noche);
    color: #fff;
    text-align: center;
}

.home-cierre h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    font-weight: 800;
    color: #fff;
}

.home-cierre p {
    max-width: 40rem;
    margin: 0 auto 1.5rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.home-cierre__llamar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    margin-top: 1rem;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-cierre__llamar:hover {
    color: var(--home-naranja-claro);
}

@media (prefers-reduced-motion: reduce) {
    .home-btn {
        transition: none;
    }
}
