/* ═══════════════════════════════════════════════════
   ACS Gallery Wall Block
   3-column photo grid with caption overlays + modal
   ═══════════════════════════════════════════════════ */

.acs-gw__container {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ── Intro ────────────────────────────────────────── */
.acs-gw__intro {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Grid ─────────────────────────────────────────── */
.acs-gw__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ── Card ─────────────────────────────────────────── */
.acs-gw__card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #e8e4de;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.2s, transform 0.2s;
}

.acs-gw__card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

.acs-gw__card:focus-visible {
    outline: 2px solid #404075;
    outline-offset: 2px;
}

/* Card image wrapper — 4:3 ratio */
.acs-gw__card-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.acs-gw__card-img picture,
.acs-gw__card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;      /* photos fill the frame — contrast with floorplans which use contain */
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.acs-gw__card:hover .acs-gw__card-img img {
    transform: scale(1.04);
}

/* ── Zoom Icon ────────────────────────────────────── */
.acs-gw__zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.acs-gw__zoom svg {
    width: 15px;
    height: 15px;
    stroke: #404075;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.acs-gw__card:hover .acs-gw__zoom {
    opacity: 1;
}

/* ── Caption Overlay ──────────────────────────────── */
/* Same gradient treatment as gallery-band */
.acs-gw__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}

.acs-gw__card:hover .acs-gw__caption {
    opacity: 1;
}

/* ══════════════════════════════════════════════════
   Modal — mirrors acs-floorplans__modal exactly,
   scoped under .acs-gw prefix
══════════════════════════════════════════════════ */
.acs-gw__modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.acs-gw__modal.is-open {
    opacity: 1;
    pointer-events: all;
}

.acs-gw__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 14, 0.80);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.acs-gw__modal-box {
    position: relative;
    z-index: 2;
    background: #1a1614;   /* dark surround for photos — contrast with floorplans' white */
    border-radius: 16px;
    overflow: hidden;
    max-width: 960px;       /* slightly wider than floorplans — photos benefit from more space */
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.acs-gw__modal.is-open .acs-gw__modal-box {
    transform: scale(1);
}

/* Close button — dark purple pill, top right */
.acs-gw__modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #404075;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    padding: unset;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.acs-gw__modal-close:hover {
    background: #2c2851;
}

.acs-gw__modal-close svg {
    width: 14px;
    height: 14px;
}

/* Modal image area — dark bg, photo centered */
.acs-gw__modal-img {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.acs-gw__modal-img img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    display: block;
}

/* Modal footer — only renders when caption exists */
.acs-gw__modal-footer {
    padding: 14px 24px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1614;
    flex-shrink: 0;
}

.acs-gw__modal-caption {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════
   Responsive
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .acs-gw__headline {
        font-size: 30px;
    }
}

@media (max-width: 860px) {
    .acs-gw {
        padding: 56px 0;
    }

    .acs-gw__container {
        padding: 0 24px;
        gap: 36px;
    }

    .acs-gw__headline {
        font-size: 26px;
    }

    .acs-gw__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Captions always visible on touch — no hover available */
    .acs-gw__caption {
        opacity: 1;
    }

    .acs-gw__modal {
        padding: 0;
        align-items: flex-end;
    }

    .acs-gw__modal-box {
        border-radius: 16px 16px 0 0;
        max-height: 88vh;
    }
}

@media (max-width: 480px) {
    .acs-gw__grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .acs-gw__container {
        padding: 0 16px;
    }
}
