/* =========================
   habitaciones.css
   Estilos específicos de habitaciones.html
   Extiende: style.css (global)
   ========================= */

/* =========================
   1. Hero — Inicio
   ========================= */

.hab-hero {
    position: relative;
    width: 100%;
    min-height: 40dvh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hab-hero__bg {
    position: absolute;
    inset: 0;
    z-index: var(--z-base);
}

.hab-hero__bg picture,
.hab-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hab-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 24, 0.3) 0%,
        rgba(26, 26, 24, 0.75) 100%
    );
}

.hab-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hab-hero__subtitulo {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: var(--text-xs);
    color: var(--tertiary-light);
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.hab-hero__titulo {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--blanco);
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hab-hero__descripcion {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--neutral-dark);
    line-height: 1.7;
    max-width: 36em;
}

/* =========================
   1. Hero — Fin
   ========================= */

/* =========================
   2. Filtro fechas — Inicio
   ========================= */

.hab-filtro {
    width: 100%;
    background: var(--fondo-card);
    border-bottom: 1px solid var(--gris-border);
    padding: var(--space-md);
    position: sticky;
    top: 4em;
    z-index: var(--z-sticky);
    box-shadow: var(--sombra-sm);
}

.hab-filtro__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 80em;
    margin: 0 auto;
}

.hab-filtro__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.hab-filtro__field label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: var(--text-xs);
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hab-filtro__field input {
    border: 1px solid var(--gris-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--negro);
    background: var(--blanco);
    outline: none;
    transition: border-color var(--trans-fast);
}

.hab-filtro__field input:focus {
    border-color: var(--primary);
}

.hab-filtro__btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
}

/* =========================
   2. Filtro fechas — Fin
   ========================= */

/* =========================
   3. Listado — Inicio
   ========================= */

.hab-listado {
    width: 100%;
    padding: var(--space-2xl) 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* =========================
   3. Listado — Fin
   ========================= */

/* =========================
   4. Hab Item — Inicio
   ========================= */

.hab-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--fondo-principal);
    border-bottom: 1px solid var(--gris-border);
}

.hab-item:nth-child(even) {
    background: var(--neutral-dark);
}

.hab-item__media {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.hab-item__media picture,
.hab-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--trans-slow);
}

.hab-item:hover .hab-item__media img {
    transform: scale(1.03);
}

.hab-item__content {
    width: 100%;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-xl);
}

.hab-item__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hab-item__nombre {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--negro);
    line-height: 1.2;
}

.hab-item__descripcion {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--negro-suave);
    line-height: 1.7;
}

/* Amenities */

.hab-item__amenities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.hab-amenity {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--negro-suave);
}

.hab-amenity img {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Meta info */

.hab-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--gris-border);
}

.hab-item__meta-info {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--gris);
}

.hab-item__meta-info img {
    opacity: 0.6;
    flex-shrink: 0;
}

/* Footer del item */

.hab-item__footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gris-border);
}

.hab-item__precio {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.hab-item__precio-desde {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--gris);
}

.hab-item__precio-valor {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary);
}

.hab-item__precio-noche {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--gris);
}

.hab-item__footer .btn {
    width: 100%;
    text-align: center;
}

/* =========================
   4. Hab Item — Fin
   ========================= */

/* ========================================
   MQ1: Tablets / Móviles grandes
   ======================================== */
@media only screen and (min-width: 481px) and (max-width: 768px) {

    .hab-hero__titulo {
        font-size: var(--text-4xl);
    }

    .hab-filtro__inner {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hab-filtro__field {
        flex: 1 1 45%;
    }

    .hab-filtro__btn {
        flex: 1 1 100%;
    }

    .hab-item__content {
        padding: var(--space-xl) var(--space-lg);
    }

    .hab-item__footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hab-item__footer .btn {
        width: auto;
    }
}

/* ========================================
   MQ2: Tablets Pro vertical
   ======================================== */
@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: portrait) {

    .hab-hero {
        min-height: 50dvh;
    }

    .hab-hero__content {
        padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    }

    .hab-hero__titulo {
        font-size: var(--text-5xl);
    }

    .hab-filtro {
        top: 5em;
    }

    .hab-filtro__inner {
        flex-direction: row;
        align-items: flex-end;
        gap: var(--space-md);
    }

    .hab-filtro__field {
        flex: 1;
    }

    .hab-filtro__btn {
        flex-shrink: 0;
        width: auto;
        align-self: flex-end;
    }

    .hab-item {
        flex-direction: row;
        min-height: 28em;
    }

    .hab-item--reverse {
        flex-direction: row-reverse;
    }

    .hab-item__media {
        width: 45%;
        aspect-ratio: unset;
        flex-shrink: 0;
    }

    .hab-item__content {
        width: 55%;
        padding: var(--space-2xl) var(--space-xl);
    }

    .hab-item__nombre {
        font-size: var(--text-3xl);
    }

    .hab-item__footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hab-item__footer .btn {
        width: auto;
        white-space: nowrap;
    }
}

/* ========================================
   MQ3: Laptops pequeñas / Tablets horizontal
   ======================================== */
@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {

    .hab-hero {
        min-height: 45dvh;
    }

    .hab-hero__content {
        padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    }

    .hab-hero__titulo {
        font-size: var(--text-5xl);
    }

    .hab-filtro {
        top: 5em;
    }

    .hab-filtro__inner {
        flex-direction: row;
        align-items: flex-end;
        gap: var(--space-md);
    }

    .hab-filtro__field {
        flex: 1;
    }

    .hab-filtro__btn {
        flex-shrink: 0;
        width: auto;
        align-self: flex-end;
    }

    .hab-item {
        flex-direction: row;
        min-height: 26em;
    }

    .hab-item--reverse {
        flex-direction: row-reverse;
    }

    .hab-item__media {
        width: 45%;
        aspect-ratio: unset;
        flex-shrink: 0;
    }

    .hab-item__content {
        width: 55%;
        padding: var(--space-2xl) var(--space-xl);
    }

    .hab-item__footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hab-item__footer .btn {
        width: auto;
        white-space: nowrap;
    }
}

/* ========================================
   MQ4: Escritorio / Monitores grandes
   ======================================== */
@media only screen and (min-width: 1280px) {

    .hab-hero {
        min-height: 55dvh;
    }

    .hab-hero__content {
        padding: var(--space-section) 5dvw var(--space-3xl);
        max-width: 70em;
    }

    .hab-hero__titulo {
        font-size: var(--text-hero);
    }

    .hab-hero__descripcion {
        font-size: var(--text-lg);
    }

    .hab-filtro {
        top: 5em;
        padding: var(--space-md) 5dvw;
    }

    .hab-filtro__inner {
        flex-direction: row;
        align-items: flex-end;
        gap: var(--space-lg);
    }

    .hab-filtro__field {
        flex: 1;
    }

    .hab-filtro__btn {
        flex-shrink: 0;
        width: auto;
        align-self: flex-end;
        padding: var(--space-sm) var(--space-2xl);
    }

    .hab-listado {
        padding: var(--space-3xl) 0;
    }

    .hab-item {
        flex-direction: row;
        min-height: 32em;
    }

    .hab-item--reverse {
        flex-direction: row-reverse;
    }

    .hab-item__media {
        width: 45%;
        aspect-ratio: unset;
        flex-shrink: 0;
    }

    .hab-item__content {
        width: 55%;
        padding: var(--space-3xl) 5dvw;
    }

    .hab-item__nombre {
        font-size: var(--text-4xl);
    }

    .hab-item__descripcion {
        font-size: var(--text-lg);
    }

    .hab-item__footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hab-item__footer .btn {
        width: auto;
        white-space: nowrap;
        padding: var(--space-sm) var(--space-2xl);
    }

    .hab-item__precio-valor {
        font-size: var(--text-3xl);
    }
}
