:root {
    --hab-bg: #ffffff;
    --hab-surface: #fffdf8;
    --hab-ink: #1f2937;
    --hab-muted: #4b5563;
    --hab-line: #e8dbc1;
    --hab-gold: #d7b344;
    --hab-wine: #761b05;
    --hab-shadow: 0 14px 32px rgba(118, 27, 5, 0.08);
}

#s-banner.b-interno {
    position: relative;
    min-height: 56vh;
    isolation: isolate;
    display: grid;
    place-items: center;
    overflow: hidden;
}

#s-banner.b-interno img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#s-banner.b-interno::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.56));
    z-index: 1;
}

#s-banner.b-interno h2 {
    position: relative;
    z-index: 2;
    color: #fff;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    text-wrap: balance;
    font-size: clamp(2rem, 5vw, 3.3rem);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.42);
}

.svg-cafe,
.svg-amarillo {
    display: none;
}

#content-eventos,
#content-info-hab {
    width: min(1160px, calc(100% - 32px));
    margin-inline: auto;
}

#content-eventos {
    background: var(--hab-bg);
    margin-top: -40px;
    border-radius: 20px;
    border: 1px solid var(--hab-line);
    box-shadow: var(--hab-shadow);
    padding: 34px;
    position: relative;
    z-index: 3;
}

#content-eventos > p {
    margin: 0;
    max-width: 78ch;
    color: var(--hab-muted);
    font-size: 1.08rem;
    line-height: 1.78;
}

#content-eventos > .content-fechas-tem-alta {
    padding: 24px 26px;
    background:
        linear-gradient(90deg, rgba(215, 179, 68, 0.1), rgba(215, 179, 68, 0.02) 18%, rgba(255, 255, 255, 0) 45%),
        var(--hab-surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

#content-eventos > .content-fechas-tem-alta h3 {
    margin-bottom: 18px;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

#content-eventos > .content-fechas-tem-alta h3 > span {
    flex: 0 1 auto;
}

#content-eventos > .content-fechas-tem-alta .season-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(215, 179, 68, 0.28);
    color: var(--hab-wine);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

#content-eventos > .content-fechas-tem-alta > div > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

#content-eventos > .content-fechas-tem-alta > div > ul li {
    min-height: 0;
    padding: 6px 0 6px 16px;
    border: 0;
    border-left: 3px solid rgba(215, 179, 68, 0.5);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    align-items: center;
    gap: 12px;
}

#content-eventos > .content-fechas-tem-alta > div > ul li svg {
    width: 14px;
    height: 14px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
    flex: 0 0 auto;
    opacity: 0.9;
}

#content-eventos > .content-fechas-tem-alta > div > ul li span {
    font-weight: 600;
    color: var(--hab-ink);
    line-height: 1.45;
}

.content-fechas-tem-alta {
    margin-top: 24px;
    background: var(--hab-surface);
    border: 1px solid var(--hab-line);
    border-radius: 16px;
    padding: 22px 24px;
}

.content-fechas-tem-alta h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--hab-wine);
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.content-fechas-tem-alta h3 svg {
    width: 20px;
    height: 20px;
    fill: var(--hab-gold);
    flex: 0 0 auto;
}

.content-fechas-tem-alta ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.content-fechas-tem-alta li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #334155;
    line-height: 1.58;
}

.content-fechas-tem-alta li svg {
    width: 18px;
    height: 18px;
    fill: var(--hab-gold);
    margin-top: 2px;
    flex: 0 0 auto;
}

#content-info-hab {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 32px;
    margin-top: 34px;
    margin-bottom: 64px;
    align-items: start;
}

#content-servs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    position: sticky;
    top: 104px;
}

#content-servs .content-fechas-tem-alta {
    margin-top: 0;
    padding: 20px 20px 18px;
    background:
        linear-gradient(180deg, rgba(215, 179, 68, 0.08), rgba(255, 255, 255, 0)),
        var(--hab-surface);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

#content-servs .content-fechas-tem-alta h3 {
    margin-bottom: 8px;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#content-servs .content-fechas-tem-alta h3 > span {
    flex: 1 1 auto;
}

#content-servs .content-fechas-tem-alta .service-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(118, 27, 5, 0.08);
    color: var(--hab-wine);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

#content-servs .content-fechas-tem-alta .service-card-note {
    margin: 0 0 14px;
    color: var(--hab-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

#content-servs .content-fechas-tem-alta ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    justify-items: center;
}

#content-servs .content-fechas-tem-alta li {
    position: relative;
    width: 100%;
    max-width: 56px;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid var(--hab-line);
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: help;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#content-servs .content-fechas-tem-alta li:hover,
#content-servs .content-fechas-tem-alta li:focus-visible {
    transform: translateY(-2px);
    border-color: var(--hab-gold);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
    outline: none;
}

#content-servs .content-fechas-tem-alta li svg,
#content-servs .content-fechas-tem-alta li i {
    width: 20px;
    height: 20px;
    margin-top: 0;
    color: var(--hab-gold);
    fill: currentColor;
    font-size: 1rem;
    line-height: 1;
    flex: 0 0 auto;
}

#content-servs .content-fechas-tem-alta li span {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    min-width: 180px;
    max-width: min(240px, 70vw);
    padding: 10px 12px;
    border-radius: 12px;
    background: #1f2937;
    color: #fff;
    font-size: 0.84rem;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

#content-servs .content-fechas-tem-alta li span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 10px;
    height: 10px;
    background: #1f2937;
    transform: translateX(-50%) rotate(45deg);
}

#content-servs .content-fechas-tem-alta li:hover span,
#content-servs .content-fechas-tem-alta li:focus-visible span {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#content-gal-hab {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

/* Prevent initial layout jump before JS applies gallery classes. */
#content-gal-hab > a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--hab-line);
    background: linear-gradient(180deg, #faf8f3 0%, #f3ede2 100%);
    padding: 6px;
}

#content-gal-hab > a > img {
    display: block;
    width: 100%;
    height: 104px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.hab-gallery-feature {
    grid-column: 1 / -1;
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--hab-line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    background: #fff;
    margin-bottom: 8px;
}

.hab-gallery-feature img {
    width: 100%;
    height: 420px !important;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.hab-gallery-feature.is-portrait {
    background: linear-gradient(180deg, #faf8f3 0%, #f3ede2 100%);
}

.hab-gallery-feature.is-portrait img {
    object-fit: contain;
    padding: 14px;
}

.hab-gallery-expand {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(0, 0, 0, 0.34);
    color: #fff;
    display: grid;
    place-items: center;
    z-index: 2;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hab-gallery-expand:hover {
    background: rgba(0, 0, 0, 0.52);
    transform: translateY(-1px);
}

.hab-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.34);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hab-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.5);
}

.hab-gallery-nav.prev {
    left: 12px;
}

.hab-gallery-nav.next {
    right: 12px;
}

#content-gal-hab a.hab-gallery-thumb {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--hab-line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#content-gal-hab a.hab-gallery-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(118, 27, 5, 0.12);
}

#content-gal-hab a.hab-gallery-thumb.is-active {
    border-color: var(--hab-gold);
    box-shadow: 0 0 0 2px rgba(215, 179, 68, 0.32);
}

#content-gal-hab a.hab-gallery-thumb img {
    display: block;
    width: 100%;
    height: 104px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.btn-hab,
#s-reserva a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #c99e2a;
    background: var(--hab-gold);
    color: #1f1f1f;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hab:hover,
#s-reserva a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(118, 27, 5, 0.24);
}

@media (max-width: 980px) {
    #content-info-hab {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    #content-eventos > .content-fechas-tem-alta > div > ul {
        grid-template-columns: 1fr;
    }

    #content-servs,
    #content-gal-hab {
        grid-template-columns: 1fr 1fr;
    }

    #content-servs {
        position: static;
    }

    #content-servs .content-fechas-tem-alta ul {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hab-gallery-feature {
        grid-column: 1 / -1;
    }

    .hab-gallery-feature img {
        height: 320px;
    }

    #content-gal-hab a.hab-gallery-thumb img {
        height: 110px;
    }

    /* Mobile/tablet: keep only the main carousel image to avoid a crowded gallery */
    #content-gal-hab a.hab-gallery-thumb {
        display: none;
    }

    #content-eventos {
        margin-top: -38px;
        padding: 24px;
    }
}

@media (max-width: 640px) {
    #s-banner.b-interno {
        min-height: 44vh;
    }

    #content-eventos,
    #content-info-hab {
        width: min(1160px, calc(100% - 20px));
    }

    #content-eventos > .content-fechas-tem-alta {
        padding: 20px 18px;
    }

    #content-eventos > .content-fechas-tem-alta > div > ul li {
        padding: 4px 0 4px 14px;
    }

    #content-servs,
    #content-gal-hab {
        grid-template-columns: 1fr;
    }

    #content-servs .content-fechas-tem-alta ul {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    #content-servs .content-fechas-tem-alta li {
        max-width: 48px;
        border-radius: 10px;
    }

    #content-servs .content-fechas-tem-alta li span {
        min-width: 150px;
        max-width: min(220px, 72vw);
        font-size: 0.8rem;
    }

    #content-servs .content-fechas-tem-alta .service-card-note {
        font-size: 0.82rem;
    }

    #content-info-hab {
        margin-top: 24px;
        margin-bottom: 48px;
    }

    .hab-gallery-feature img {
        height: 240px;
    }

    #content-gal-hab a.hab-gallery-thumb img {
        height: 180px;
    }
}
