:root{--gallery-gap:10px}.project-gallery{min-width:0}.project-gallery__heading{display:flex;justify-content:space-between;gap:20px;align-items:baseline;margin-bottom:18px}.project-gallery__heading p{font-family:var(--display);font-size:clamp(16px,1.6vw,24px);letter-spacing:-.05em}.project-gallery__count{font-size:11px}.project-gallery__filters{display:flex;flex-wrap:wrap;gap:7px;border-bottom:1px solid #1112;padding-bottom:20px;margin-bottom:18px}.project-gallery__filters button{background:transparent;border:1px solid #777;padding:8px 10px;font:600 11px var(--text)}.project-gallery__filters button.is-active,.project-gallery__filters button:hover{background:var(--ink);border-color:var(--ink);color:#fff}.project-gallery__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gallery-gap)}.project-gallery__item{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;border:0;border-radius:2px;background:#d8d8dc;padding:0;text-align:left;color:inherit}.project-gallery__item img{display:block;width:100%;height:100%;object-fit:cover;object-position:center top}.project-gallery__item-label{position:absolute;inset:auto 0 0;padding:22px 9px 8px;background:linear-gradient(transparent,#111b);color:#fff;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.project-gallery__play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:48px;height:48px;border:1px solid #fff;border-radius:50%;background:#111d;color:#fff}.project-gallery__play svg,.project-lightbox__control-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.project-gallery__fallback{display:none;height:100%;padding:16px;background:#111;color:#fff;align-content:end;font-size:12px;font-weight:700}.project-gallery__item.is-fallback img{display:none}.project-gallery__item.is-fallback .project-gallery__fallback{display:grid}.project-lightbox{width:min(1100px,calc(100vw - 24px));height:min(900px,calc(100dvh - 24px));box-sizing:border-box;border:0;background:#111;color:#fff;padding:14px}.project-lightbox::backdrop{background:#111d;backdrop-filter:blur(8px)}.project-lightbox[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px}.project-lightbox__top{display:flex;align-items:center;gap:15px;min-width:0;min-height:44px}.project-lightbox__caption,.project-lightbox__count,[data-lightbox-caption],[data-lightbox-count]{margin:0;font-size:12px}.project-lightbox__caption,[data-lightbox-caption]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-lightbox__youtube,[data-youtube-link]{font-size:12px;color:inherit;text-decoration:underline;text-underline-offset:4px;white-space:nowrap}.project-lightbox__close,[data-lightbox-close]{display:grid;place-items:center;flex:0 0 auto;margin-left:auto;width:44px;height:44px;border:1px solid #777;border-radius:50%;background:transparent;color:#fff}.project-lightbox__stage{position:relative;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden}.project-lightbox__stage--scroll{overflow:auto;overscroll-behavior:contain;scrollbar-color:#777 #111}.project-lightbox__stage--scroll img{display:block;width:min(100%,1000px);height:auto;max-width:100%;margin:0 auto;object-fit:contain}.project-lightbox__stage--fit{display:grid;place-items:center;overflow:hidden}.project-lightbox__stage--fit img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}.project-lightbox__stage--video{display:grid;place-items:center;overflow:hidden}.project-lightbox__video{display:block;box-sizing:border-box;max-width:100%;max-height:100%;border:0;background:#000}.project-lightbox__controls{position:fixed;inset:0;z-index:2;pointer-events:none}.project-lightbox__nav{position:fixed;top:50%;z-index:3;display:grid;place-items:center;transform:translateY(-50%);width:44px;height:44px;border:1px solid #aaa;border-radius:50%;background:#111d;color:#fff;box-shadow:0 1px 8px #0009;backdrop-filter:blur(5px);pointer-events:auto}.project-lightbox__prev{left:max(8px,calc((100vw - 1100px)/2 - 58px))}.project-lightbox__next{right:max(8px,calc((100vw - 1100px)/2 - 58px))}.project-lightbox__count,[data-lightbox-count]{text-align:center;color:#ccc}@media(max-width:850px){.project-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.project-gallery__grid{grid-template-columns:1fr}.project-gallery__item{max-height:330px}.project-lightbox{width:calc(100vw - 16px);height:calc(100dvh - 16px);padding:10px}.project-lightbox__top{gap:8px}.project-lightbox__youtube,[data-youtube-link]{max-width:120px;overflow:hidden;text-overflow:ellipsis}.project-lightbox__caption,[data-lightbox-caption]{font-size:11px}}


/* Prueba 1: main preview + four-column selector. Lightbox rules stay unchanged. */
.project-gallery--preview .project-gallery__grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(6px,1vw,10px)}
.project-gallery--preview .project-gallery__filters[hidden]{display:none}
.project-gallery__preview{margin-bottom:14px}
.project-gallery__preview[hidden]{display:none}
.project-gallery__main{position:relative;display:block;width:100%;aspect-ratio:4/3;border:0;border-radius:2px;overflow:hidden;background:#f2f2f2;color:#fff;padding:0;cursor:zoom-in}
.project-gallery__main>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:center}
.project-gallery__main--scroll>img{object-fit:cover;object-position:center top}
.project-gallery__main.is-fallback>img{display:none}
.project-gallery__main.is-fallback .project-gallery__fallback{display:grid;position:absolute;inset:0}
.project-gallery__zoom{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #fff;border-radius:50%;background:#111d;color:#fff}
.project-gallery__zoom svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.project-gallery__preview-controls{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:12px;margin-top:10px}
.project-gallery__arrow{display:grid;place-items:center;width:44px;height:44px;border:1px solid #666;border-radius:2px;background:transparent;color:var(--ink)}
.project-gallery__arrow:hover:not(:disabled){background:var(--ink);color:#fff}
.project-gallery__arrow:disabled{opacity:.35;cursor:default}
.project-gallery__position{margin:0;text-align:center;font:500 12px var(--text);font-variant-numeric:tabular-nums;color:#555}
.project-gallery--preview .project-gallery__item{width:100%;min-width:0;max-height:none}
.project-gallery--preview .project-gallery__item>img{position:absolute;inset:0}
.project-gallery--preview .project-gallery__item.is-fallback .project-gallery__fallback{position:absolute;inset:0}
.project-gallery--preview .project-gallery__item.is-selected::after{content:'';position:absolute;inset:0;border:3px solid var(--blue);border-radius:2px;box-shadow:inset 0 0 0 2px #fff;pointer-events:none}
.project-gallery--preview .project-gallery__item-label{display:none}
.project-gallery--preview .project-gallery__item .project-gallery__play{width:26px;height:26px}
.project-gallery--preview .project-gallery__item .project-gallery__play svg{width:14px;height:14px}
.project-gallery--preview .project-gallery__item .project-gallery__fallback{padding:4px;font-size:9px}
.project-gallery__main:focus-visible,.project-gallery__arrow:focus-visible,.project-gallery--preview .project-gallery__item:focus-visible{outline:3px solid var(--amber,#ffb000);outline-offset:3px}

.project-gallery:not(.project-gallery--preview) .project-gallery__filters{display:none}
.project-lightbox__youtube .site-navigation-icon{display:inline-block;vertical-align:middle;width:16px;height:16px}
