/**
 * Home: media queries y hero generico.
 */
@media (max-width: 47.99rem) {
    .home-splash {
        padding: 0.75rem;
    }

    .home-splash-frame {
        max-width: 100%;
        max-height: min(92vh, 560px);
    }

    .home-splash-img {
        max-height: min(88vh, 520px);
        filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.2));
    }
}

@media (min-width: 62rem) {
    .home-splash-frame {
        max-width: 580px;
        max-height: min(92vh, 660px);
    }

    .home-splash-img {
        max-height: min(88vh, 620px);
    }
}
@media (min-width: 62rem) {
    .home-section-title {
        margin-bottom: 2rem;
    }
}
/* Utilidad: ocultar separador en movil */
@media (max-width: 47.99rem) {
    .home-nav-sep {
        display: none;
    }
}

/* Pantallas muy estrechas: logo y texto en una linea sin cortar */
@media (max-width: 25rem) {
    .home-logo {
        gap: 0.35rem;
        font-size: 0.875rem;
    }

    .home-logo-img {
        max-height: 1.75rem;
    }

    .home-logo-text {
        font-size: 0.6875rem;
    }
}

/* Responsive: mobile-first */
@media (max-width: 47.99rem) {
    :root {
        --home-header-height: auto;
        --home-hero-carousel-height: min(50vh, 420px);
    }

    .home-hero-body {
        min-height: 35vh;
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .home-section {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }

    .home-card-img-wrap {
        min-height: 200px;
    }

    .home-header-fila-inner--contacto {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .home-header-fila--contacto .home-header-meta-link span {
        font-size: 0.78rem;
    }

    .home-header-fila-inner--nav {
        flex-wrap: nowrap;
    }

    .home-header--filas .home-logo-text {
        font-size: 0.72rem;
        max-width: 9.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-header--filas .home-nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .home-header-nav-bloque {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0.5rem 0 0.85rem;
        background: var(--home-surface-elevated, #fff);
        box-shadow: var(--home-shadow-lg);
        border-top: 1px solid var(--home-card-border);
        z-index: 100;
    }

    .home-header--filas.home-header--nav-open .home-header-nav-bloque {
        display: flex;
    }

    .home-header--filas .home-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    .home-header--filas .home-nav-link {
        padding: 0.7rem 1rem;
        border-bottom: 1px solid var(--home-card-border);
    }

    .home-header--filas .home-header-acciones {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem 0;
        border-left: 0;
        border-top: 1px solid color-mix(in srgb, var(--home-ambar, #c47a2c) 30%, #e5e7eb);
    }

    .home-header--filas .home-nav-cta-pill,
    .home-header--filas .home-header-intranet-pill {
        width: 100%;
        justify-content: center;
    }

    .home-header-fila-inner--acciones {
        display: none;
    }

    .home-logo {
        flex-wrap: nowrap;
        gap: 0.5rem;
        font-size: 1rem;
        min-width: 0;
    }

    .home-logo-img {
        max-height: 2rem;
        flex-shrink: 0;
    }
}

@media (min-width: 48rem) {
    .home-header--filas .home-nav-toggle {
        display: none;
    }
}

@media (min-width: 48rem) {
    .home-card-img-wrap {
        min-height: 200px;
    }
}

@media (min-width: 62rem) {
    .home-card-img-wrap {
        min-height: 200px;
    }
}

/* =========================================
   GENERIC PAGE HERO & CTA UPDATES
   ========================================= */

/* 1. Generic Page Hero Definitions */
.home-page-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Header sticky ya ocupa espacio en flujo: sin margin extra (imagen mas arriba) */
    margin-top: 0;
    background-color: var(--home-section-alt);
}

.home-page-hero--contacto {
    height: clamp(28rem, 52vh, 36rem);
    align-items: flex-start;
    padding-top: clamp(3.5rem, 8vh, 5.5rem);
}

.home-page-hero--contacto .home-page-hero-content {
    text-align: center;
}

.home-page-hero--contacto .home-page-hero-overlay {
    background:
        linear-gradient(
            160deg,
            rgba(var(--home-color1-rgb, 102, 20, 20), 0.72) 0%,
            rgba(77, 15, 15, 0.45) 42%,
            rgba(20, 12, 12, 0.55) 100%
        ),
        linear-gradient(
            180deg,
            rgba(247, 243, 232, 0.12) 0%,
            rgba(102, 20, 20, 0.2) 55%,
            rgba(31, 30, 30, 0.5) 100%
        );
}

.home-page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    z-index: 0;
}

.home-page-hero--contacto .home-page-hero-bg {
    background-position: center 18%;
    transform: scale(1.02);
}

.home-page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.home-page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.home-page-hero-title {
    font-family: var(--home-font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Despues de .home-page-hero-title para ganar cascada (misma especificidad) */
.home-page-hero-title.home-page-hero-title--acento {
    color: #fff;
    font-weight: 800;
    font-size: clamp(2.75rem, 6.5vw, 4.75rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-transform: none;
    text-shadow: none;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #ffe9cf 48%,
        var(--home-ambar, #d99a56) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45))
        drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .home-page-hero-title.home-page-hero-title--acento {
        color: #fff;
        -webkit-text-fill-color: #fff;
        background: none;
        filter: none;
        text-shadow:
            0 2px 4px rgba(0, 0, 0, 0.45),
            0 8px 24px rgba(0, 0, 0, 0.35);
    }
}

.home-page-hero-breadcrumb--sobre-degradado {
    color: rgba(255, 255, 255, 0.92);
}

.home-page-hero-breadcrumb--sobre-degradado a:hover {
    color: #ffd7a8;
}

.home-page-hero-subtitulo {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.home-page-hero-subtitulo--sobre-degradado {
    color: rgba(255, 255, 255, 0.95);
}

.home-page-hero--contacto::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3.25rem;
    z-index: 3;
    pointer-events: none;
    background: var(--home-bg-cream, #F7F3E8);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    opacity: 0.95;
}

.home-page-hero-breadcrumb {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.home-page-hero-breadcrumb a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.home-page-hero-breadcrumb a:hover {
    color: var(--home-color1);
}

/* 2. CTA Section with Background Image Support */
.home-cta-section.home-cta-section-bg {
    background: none;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.home-cta-section-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform 10s ease;
    /* Subtle zoom effect option */
}

/* Optional: animate background on hover if desired, or keep static */
/* .home-cta-section:hover .home-cta-section-bg-img { transform: scale(1.1); } */

.home-cta-section-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.home-cta-section-bg .container {
    position: relative;
    z-index: 2;
}
