/* =========================================================
   ALOJ-0001A-06
   GALERÍA DE ALOJAMIENTOS
   ========================================================= */

.aloj-galeria {
    width: 100%;
    padding: 85px 28px 100px;
    background: #ffffff;
}

.aloj-galeria__inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.aloj-galeria__heading {
    text-align: center;
    margin-bottom: 45px;
}

.aloj-galeria__eyebrow {
    display: block;
    margin-bottom: 12px;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.2px;

    color: #b47c32;
}

.aloj-galeria__heading h2 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 4vw, 52px);
    line-height: 1.1;
    font-weight: 400;

    color: #20351f;
}


/* =========================================================
   GRILLA
   ========================================================= */

.aloj-galeria__grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   FOTOGRAFÍA
   ========================================================= */

.aloj-galeria__item {
    position: relative;

    display: block;

    width: 100%;
    height: 0;

    padding: 0;
    padding-bottom: 125%;

    overflow: hidden;

    border: 0;
    border-radius: 12px;

    background: #eeeeea;

    cursor: pointer;

    appearance: none;
}

.aloj-galeria__item img {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.45s ease,
        filter 0.45s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

@media (hover: hover) {

    .aloj-galeria__item:hover img {
        transform: scale(1.035);
        filter: brightness(0.92);
    }

}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.aloj-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    background: rgba(10, 12, 10, 0.94);
}

.aloj-lightbox.is-open {
    display: flex;
}


/* =========================================================
   PARTE SUPERIOR
   ========================================================= */

.aloj-lightbox__top {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    color: #ffffff;

    z-index: 3;
}

.aloj-lightbox__counter {
    font-size: 15px;
    letter-spacing: 0.5px;

    color: rgba(255,255,255,0.85);
}

.aloj-lightbox__close {
    width: 48px;
    height: 48px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #ffffff;

    font-size: 42px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   IMAGEN AMPLIADA
   ========================================================= */

.aloj-lightbox__stage {
    width: calc(100% - 180px);
    height: calc(100% - 110px);

    display: flex;
    align-items: center;
    justify-content: center;
}

.aloj-lightbox__image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.35);
}


/* =========================================================
   FLECHAS
   ========================================================= */

.aloj-lightbox__nav {
    position: absolute;

    top: 50%;

    width: 58px;
    height: 70px;

    transform: translateY(-50%);

    border: 0;

    background: rgba(255,255,255,0.08);

    color: #ffffff;

    font-size: 54px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition: background 0.2s ease;

    z-index: 3;
}

.aloj-lightbox__nav:hover {
    background: rgba(255,255,255,0.16);
}

.aloj-lightbox__nav--prev {
    left: 22px;
}

.aloj-lightbox__nav--next {
    right: 22px;
}


/* =========================================================
   BLOQUEO DEL SCROLL
   ========================================================= */

body.aloj-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .aloj-galeria {
        padding:
            70px 24px
            80px;
    }

    .aloj-galeria__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    .aloj-galeria {
        padding:
            60px 20px
            70px;
    }

    .aloj-galeria__heading {
        margin-bottom: 30px;
    }

    .aloj-galeria__heading h2 {
        font-size: 38px;
    }

    .aloj-galeria__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .aloj-galeria__item {
        border-radius: 8px;
    }


    /* LIGHTBOX MÓVIL */

    .aloj-lightbox__top {
        height: 60px;
        padding: 0 16px;
    }

    .aloj-lightbox__stage {
        width: calc(100% - 30px);
        height: calc(100% - 120px);
    }

    .aloj-lightbox__nav {
        top: auto;
        bottom: 22px;

        width: 52px;
        height: 52px;

        transform: none;

        border-radius: 50%;

        background: rgba(255,255,255,0.12);

        font-size: 40px;
    }

    .aloj-lightbox__nav--prev {
        left: calc(50% - 70px);
    }

    .aloj-lightbox__nav--next {
        right: calc(50% - 70px);
    }

}

