/* Public gallery: compact editorial mosaic inspired by the riad's architecture. */

.gallery-page-shell {
    background:
        radial-gradient(circle at 50% 16%, rgba(193, 143, 72, 0.13), transparent 28%),
        linear-gradient(180deg, #fffdf9 0%, #f8f0e5 55%, #fffdfa 100%);
    color: #14233a;
}

.gallery-page-main {
    overflow: hidden;
}

.gallery-hero-section {
    position: relative;
    padding: clamp(44px, 5vw, 72px) 0 clamp(18px, 2.6vw, 30px);
    background:
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0.94) 0%, rgba(255, 251, 245, 0.73) 56%, rgba(250, 242, 231, 0.78) 100%),
        repeating-radial-gradient(circle at 50% 40%, rgba(12, 53, 75, 0.065) 0 1px, transparent 1px 38px);
}

.gallery-hero-copy {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.gallery-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 12px;
    color: #647082;
    font-size: 0.78rem;
    font-weight: 700;
}

.gallery-breadcrumb a,
.gallery-breadcrumb span {
    color: #25364b;
}

.gallery-breadcrumb i {
    color: #a9a092;
    font-style: normal;
}

.gallery-breadcrumb strong {
    color: #bd8240;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.gallery-hero-copy h1 {
    margin: 0;
    color: #0b2b4f;
    font-family: "Lora", Georgia, serif;
    font-size: clamp(3rem, 5.6vw, 4.65rem);
    line-height: 1;
}

.gallery-hero-copy h1::after {
    content: "";
    display: block;
    width: 116px;
    height: 16px;
    margin: 8px auto 0;
    background:
        linear-gradient(#c58d48, #c58d48) left center / 45px 1px no-repeat,
        linear-gradient(#c58d48, #c58d48) right center / 45px 1px no-repeat;
}

.gallery-hero-copy h1::before {
    content: "✦";
    position: absolute;
    left: 50%;
    margin-top: calc(1em + 9px);
    color: #c58d48;
    font-family: Georgia, serif;
    font-size: 0.8rem;
    transform: translateX(-50%);
}

.gallery-hero-copy p {
    max-width: 690px;
    margin: 10px auto 0;
    color: #4a5b70;
    font-size: clamp(0.96rem, 1.3vw, 1.05rem);
    line-height: 1.65;
}

.gallery-filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.gallery-filter-bar button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 1px solid rgba(13, 40, 68, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.82);
    color: #26384d;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(30, 39, 53, 0.08);
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.gallery-filter-bar button:hover,
.gallery-filter-bar button:focus,
.gallery-filter-bar button.is-active {
    border-color: #c58d48;
    outline: 0;
    background: linear-gradient(135deg, #d8a35d, #b7772d);
    color: #fff;
    box-shadow: 0 12px 22px rgba(177, 114, 42, 0.24);
    transform: translateY(-1px);
}

.gallery-container {
    width: calc(100% - 40px);
    max-width: 1350px;
    padding: clamp(20px, 2.7vw, 34px) 0 clamp(32px, 4vw, 54px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: clamp(160px, 11.5vw, 184px);
    gap: 16px;
}

.gallery-item,
.gallery-item.is-wide,
.gallery-item.is-landscape,
.gallery-item.is-tall,
.gallery-item.is-portrait {
    position: relative;
    min-width: 0;
    height: auto;
    margin: 0;
    grid-column: span 1;
    grid-row: span 1;
    border-radius: 14px;
    box-shadow: none;
}

.gallery-item.is-hero,
.gallery-grid.is-filtered .gallery-item.is-filter-lead {
    grid-row: span 2;
}

.gallery-item[hidden] {
    display: none !important;
}

.gallery-card-link {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(11, 35, 65, 0.08);
    border-radius: 14px;
    background: #e9dfd1;
    box-shadow: 0 12px 28px rgba(38, 37, 31, 0.14);
    isolation: isolate;
}

.gallery-card-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
    transition: transform 360ms ease, filter 360ms ease;
}

.gallery-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(7, 17, 26, 0.82) 100%);
    opacity: 0.9;
    transition: opacity 220ms ease;
}

.gallery-overlay {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 13px;
    left: 14px;
    display: grid;
    gap: 2px;
    color: #fff;
}

.gallery-overlay span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 900;
}

.gallery-overlay small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-item.is-hero .gallery-overlay,
.gallery-item.is-filter-lead .gallery-overlay {
    right: 18px;
    bottom: 18px;
    left: 18px;
}

.gallery-item.is-hero .gallery-overlay span,
.gallery-item.is-filter-lead .gallery-overlay span {
    font-size: 0.86rem;
}

.gallery-card-link:hover img,
.gallery-card-link:focus img {
    filter: saturate(1.06) contrast(1.04);
    transform: scale(1.055);
}

.gallery-card-link:hover::after,
.gallery-card-link:focus::after {
    opacity: 1;
}

.gallery-empty-state {
    padding: 56px 24px;
    border: 1px dashed rgba(11, 35, 65, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.gallery-empty-state h2,
.gallery-room-copy h2 {
    color: #0b2b4f;
    font-family: "Lora", Georgia, serif;
}

.gallery-empty-state p {
    margin: 8px 0 0;
    color: #59677a;
}

.gallery-room-invitation {
    border-top: 1px solid rgba(13, 40, 68, 0.07);
    background: rgba(255, 253, 249, 0.72);
    text-align: center;
}

.gallery-divider {
    width: min(1100px, calc(100% - 30px));
    height: clamp(112px, 14vw, 178px);
    margin: -4px auto -10px;
    overflow: hidden;
}

.gallery-divider img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 51%;
    mix-blend-mode: multiply;
}

.gallery-room-copy {
    padding: 0 20px 44px;
}

.gallery-room-copy > span {
    color: #bd8240;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.gallery-room-copy h2 {
    margin: 4px 0 5px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.gallery-room-copy p {
    margin: 0;
    color: #536176;
}

.gallery-room-copy a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    padding-bottom: 4px;
    border-bottom: 1px solid #b7772d;
    color: #0b2b4f;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .gallery-container {
        width: calc(100% - 32px);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: clamp(170px, 22vw, 215px);
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .gallery-hero-section {
        padding: 34px 0 20px;
    }

    .gallery-hero-copy {
        padding: 0 15px;
    }

    .gallery-breadcrumb strong,
    .gallery-breadcrumb i:last-of-type {
        display: none;
    }

    .gallery-hero-copy h1 {
        font-size: clamp(2.7rem, 14vw, 3.6rem);
    }

    .gallery-hero-copy p {
        font-size: 0.92rem;
        line-height: 1.58;
    }

    .gallery-filter-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        margin-right: -15px;
        margin-left: -15px;
        padding: 2px 15px 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .gallery-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter-bar button {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 16px;
        scroll-snap-align: center;
    }

    .gallery-container {
        width: calc(100% - 24px);
        padding-top: 16px;
    }

    .gallery-grid {
        grid-auto-rows: 152px;
        gap: 10px;
    }

    .gallery-item.is-hero,
    .gallery-grid.is-filtered .gallery-item.is-filter-lead {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-overlay {
        right: 10px;
        bottom: 10px;
        left: 10px;
    }

    .gallery-overlay small {
        display: none;
    }

    .gallery-divider {
        width: calc(100% - 16px);
        height: 108px;
    }

    .gallery-room-copy {
        padding-bottom: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-card-link img,
    .gallery-filter-bar button {
        transition: none;
    }
}
