/* A wall of real memories, with compact adjacent frames and a dedicated viewer. */
.memory-wall { max-width:1280px; margin:32px auto 0; }
.memory-wall-stage { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2.5fr) minmax(0,1fr); align-items:center; gap:clamp(12px,2vw,28px); padding:64px 28px 22px; background:linear-gradient(#181511e8,#181511ef),url('/assets/antigua-ruinas-v7.webp') center/cover; border:1px solid #c8924926; border-radius:8px; }
.memory-wall-stage>.content-slide { grid-column:2; grid-row:1; min-width:0; }
.memory-wall .wall-photo { position:relative;padding:12px 12px 0; background:#e9d7b7; border:8px solid #624327; box-shadow:0 0 0 2px #a67943,0 16px 30px #0008; }
.memory-wall .wall-photo::before,.wall-side::before { content:'';position:absolute;left:50%;top:-27px;width:44px;height:44px;transform:translateX(-50%) rotate(45deg);border-left:2px solid #ad8d61;border-top:2px solid #ad8d61;z-index:-1; }
.memory-wall .wall-photo,.wall-side { isolation:isolate; }
.memory-wall .wall-open { display:block; position:relative; padding:0; width:100%; border:0; cursor:zoom-in; background:transparent; color:#fff; }
.memory-wall .wall-photo .photo-frame { aspect-ratio:4/3 !important; }
.memory-wall .wall-photo img { width:100%;height:100%;object-fit:cover;position:absolute; }
.memory-wall .wall-photo figcaption { color:#33251a; min-height:0; padding:12px 2px; font-size:.9rem; text-align:center; }
.wall-enlarge { position:absolute;right:8px;bottom:8px;background:#151515e8;padding:6px 10px;border-radius:5px;font-size:.8rem; }
.wall-side { position:relative;min-width:0;padding:8px;border:7px solid #57402b;box-shadow:0 0 0 1px #b8925a,0 12px 24px #0008;background:#e9d7b7;cursor:pointer; }
.wall-side img { display:block;width:100%;aspect-ratio:4/3;object-fit:cover; }
.wall-side-previous { grid-column:1;grid-row:1;transform:rotate(-5deg); }
.wall-side-next { grid-column:3;grid-row:1;transform:rotate(5deg); }
.memory-wall .content-controls { margin-top:18px;color:#fff;gap:8px; }
.memory-wall .content-controls button { background:#30251d;border:1px solid #bb925a;color:#fff; }
.memory-wall .content-controls button:hover { background:#624327; }
.memory-wall .content-count { color:#f3e8d6;font-size:.875rem; }
.wall-open:focus-visible,.wall-side:focus-visible { outline:3px solid #eac27e;outline-offset:5px; }
body.gallery-viewer-open { overflow:hidden; }
.gallery-viewer { box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(1280px,96vw);height:94dvh;max-width:96vw;max-height:94dvh;padding:56px 24px 18px;border:1px solid #c89249;border-radius:12px;background:#171513;color:#fff;overflow:hidden; }
.gallery-viewer[open] { display:grid;grid-template-rows:minmax(0,1fr) auto auto;gap:12px; }
.gallery-viewer::backdrop { background:#000e; }
.viewer-image { display:block;position:static;width:100%;height:100%;min-height:0;object-fit:contain; }
.viewer-caption { margin:0;text-align:center;font-size:1rem;line-height:1.4; }
.viewer-close { position:absolute;right:12px;top:8px;width:44px;height:44px;border:1px solid #a58251;border-radius:50%;font-size:1.8rem;background:#30251d;color:#fff;cursor:pointer; }
.viewer-controls { display:flex;align-items:center;justify-content:center;gap:12px; }
.viewer-controls button { min-width:48px;min-height:48px;padding:8px 16px;border:1px solid #c89249;border-radius:24px;background:#e5b568;color:#171513;cursor:pointer;font:600 1rem var(--sans); }
.viewer-controls button:hover { background:#f5d39b; }
.viewer-controls .viewer-prev,.viewer-controls .viewer-next { font-size:1.8rem;padding:0; }
.viewer-count { min-width:56px;text-align:center;font-variant-numeric:tabular-nums; }
.gallery-viewer button:focus-visible { outline:3px solid white;outline-offset:3px; }
@media(max-width:700px) {
 .memory-wall-stage { grid-template-columns:1fr 1fr;gap:36px 18px;padding:42px 16px 20px; }
 .memory-wall-stage>.content-slide { grid-column:1/-1;grid-row:1; }
 .memory-wall .wall-photo { padding:8px 8px 0;border-width:6px; }
 .wall-side-previous { grid-column:1;grid-row:2; }
 .wall-side-next { grid-column:2;grid-row:2; }
 .wall-side { width:100%;padding:5px;border-width:5px; }
 .wall-side img { aspect-ratio:16/9; }
 .gallery-viewer { width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:calc(56px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom)); }
 .viewer-caption { font-size:.9rem; }
 .viewer-controls { gap:8px; }
}

/* Permanent wall: every frame is visible, with the original photo proportions. */
.memory-wall-stage { display:block; columns:4; column-gap:24px; padding:48px 28px 28px; background:linear-gradient(#241b14e8,#17120fee),url('/assets/antigua-ruinas-v7.webp') center/cover; }
.memory-wall-stage>.content-slide { display:block; break-inside:avoid; margin:0 0 36px; padding:0; }
.memory-wall .wall-photo { margin:0; padding:3px; border:5px solid #151311; background:#28211c; box-shadow:inset 0 0 0 1px #594b3e,0 8px 14px #0008; }
.memory-wall .wall-photo::before { top:-18px; width:26px; height:26px; border-color:#806b4e; }
.memory-wall .wall-photo .photo-frame { aspect-ratio:auto !important; overflow:hidden; }
.memory-wall .wall-photo img { display:block; position:static; width:100%;height:auto;object-fit:contain; }
.memory-wall .wall-photo figcaption,.wall-enlarge,.memory-wall .content-controls { display:none; }
.memory-wall-stage>.content-slide:nth-child(3n+1) { transform:rotate(-1.5deg); }
.memory-wall-stage>.content-slide:nth-child(3n+2) { transform:rotate(1.2deg); }
.memory-wall .wall-open { transition:filter .18s; }
.memory-wall .wall-open:hover { filter:brightness(1.12); }
.viewer-caption { display:none; }
.gallery-viewer[open] { grid-template-rows:minmax(0,1fr) auto; }
.instagram-invitation { text-align:center; margin:28px 0 0; font-size:1rem; }
.instagram-invitation a { color:#e4bb77; text-underline-offset:5px; }
@media(max-width:1000px) { .memory-wall-stage { columns:3; } }
@media(max-width:700px) { .memory-wall-stage { columns:2; column-gap:18px; padding:32px 14px 14px; } .memory-wall-stage>.content-slide { margin-bottom:28px; } .memory-wall .wall-photo { padding:2px; border-width:4px; } }
@media(prefers-reduced-motion:reduce) { .memory-wall .wall-open { transition:none; } }

/* Three frames per row on every screen, as requested. */
.memory-wall-stage { columns:auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; gap:36px 24px; }
.memory-wall-stage>.content-slide { grid-column:auto; grid-row:auto; margin:0; min-width:0; }
@media(max-width:700px) { .memory-wall-stage { columns:auto; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px 10px; padding:28px 10px 20px; } .memory-wall-stage>.content-slide { grid-column:auto; grid-row:auto; margin:0; } .memory-wall .wall-photo { padding:1px; border-width:3px; } .memory-wall .wall-photo::before { width:18px; height:18px; top:-13px; } }
