/* ==========================================================================
   Photo layouts: gallery grid, room strips, editorial collage
   ========================================================================== */

/* --------------------------------------------------------------------------
   Gallery grid
   -------------------------------------------------------------------------- */

/* Row-based masonry: every tile spans a whole number of 200px rows, and
   `dense` back-fills the gaps that mixed portrait/landscape shots leave. */
.photo-grid {
    width: 90%;
    max-width: var(--wrap);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    gap: 14px;
}

.photo-grid a {
    display: block;
    position: relative;
    overflow: hidden;
    grid-row: span 2;
    background-color: var(--cream-deep);
    text-decoration: none;
}

.photo-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.photo-grid a:hover img,
.photo-grid a:focus-visible img {
    transform: scale(1.045);
}

/* Zoom affordance, so it's obvious these open larger */
.photo-grid a::after {
    content: "\f00e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 26, 22, 0.55);
    color: #faf4ea;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-grid a:hover::after,
.photo-grid a:focus-visible::after {
    opacity: 1;
}

.photo-grid .wide {
    grid-column: span 2;
    grid-row: span 2;
}

/* The three portrait-orientation photos get a taller tile so they aren't
   cropped to a letterbox. */
.photo-grid .tall {
    grid-row: span 3;
}

/* --------------------------------------------------------------------------
   Room photo strip — scrolls sideways on phones
   -------------------------------------------------------------------------- */

.photo-strip {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    width: 90%;
    max-width: var(--wrap);
    margin: 0 auto 44px;
}

.photo-strip a {
    display: block;
    position: relative;
    overflow: hidden;
    background-color: var(--cream-deep);
    aspect-ratio: 4 / 3;
}

.photo-strip a:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
    min-height: 100%;
}

.photo-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.photo-strip a:hover img {
    transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   Editorial collage — a text panel sitting alongside two photos
   -------------------------------------------------------------------------- */

.editorial {
    width: 90%;
    max-width: var(--wrap);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: center;

    /* Framed panel, matching the room cards and booking rail */
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    padding: 40px;
}

.editorial + .editorial {
    margin-top: 34px;
}

.editorial-text h2,
.editorial-text h3 {
    font-family: var(--body);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 18px;
}

.editorial-text p {
    line-height: 1.9;
    margin-bottom: 18px;
}

.editorial-media {
    display: grid;
    gap: 12px;
}

.editorial-media.stack-2 {
    grid-template-columns: 1fr 1fr;
}

.editorial-media a {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: var(--cream-deep);
    /* Thin inner frame so each photo reads as a mounted print */
    border: 1px solid var(--rule);
}

.editorial-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.editorial-media a:hover img {
    transform: scale(1.04);
}

/* Alternate which side the photos sit on */
.editorial.reverse .editorial-text {
    order: 2;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
    .editorial,
    .editorial.reverse {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 28px 24px;
    }

    .editorial.reverse .editorial-text {
        order: 0;
    }

    .editorial + .editorial {
        margin-top: 22px;
    }
}

@media (max-width: 700px) {
    /* Strip becomes a swipeable row rather than a cramped grid */
    .photo-strip {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        width: 100%;
        padding: 0 5vw 10px;
        margin-bottom: 34px;
    }

    .photo-strip a,
    .photo-strip a:first-child {
        flex: 0 0 78%;
        aspect-ratio: 4 / 3;
        min-height: 0;
        scroll-snap-align: center;
    }

    /* One column on phones — every photo full width, no clever spans. */
    .photo-grid {
        width: 100%;
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 8px;
    }

    .photo-grid a,
    .photo-grid .wide,
    .photo-grid .tall {
        grid-column: span 1;
        grid-row: auto;
        aspect-ratio: 4 / 3;
    }

    .photo-grid .tall {
        aspect-ratio: 3 / 4;
    }

    /* Touch devices have no hover, so always show the zoom hint */
    .photo-grid a::after {
        opacity: 1;
    }
}
