/* R4Craft — fotografii din sezonul anterior */
.cherry{color:#f5a4cb}
.builds-header{text-align:center;margin:0 auto 30px;max-width:44rem}
.builds-header .tag{margin-bottom:10px}
.builds-header .h2{margin-bottom:18px}
.builds-intro{color:var(--muted);font-size:1rem;line-height:1.7}
.builds-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.build-tile{
  position:relative;display:block;min-width:0;aspect-ratio:4/3;overflow:hidden;
  border:2px solid #315462;background:var(--panel-2);color:#fff;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.build-tile-featured{grid-column:1/-1;aspect-ratio:2/1}
.build-tile img{display:block;width:100%;height:100%;object-fit:cover;image-rendering:auto}
.build-tile::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,transparent 40%,rgba(3,14,21,.12) 60%,rgba(3,14,21,.9) 100%);
}
.build-number{
  position:absolute;z-index:1;top:14px;left:14px;padding:4px 8px;
  background:rgba(3,14,21,.78);color:#e6f4f7;font-size:.72rem;font-weight:600;letter-spacing:.08em;line-height:1.6;
}
.build-zoom{
  position:absolute;z-index:1;top:12px;right:12px;display:grid;place-items:center;width:38px;height:38px;
  color:#fff;background:rgba(3,14,21,.78);border:1px solid rgba(230,244,247,.28);
  transition:background-color .18s ease,border-color .18s ease;
}
.build-zoom svg{width:18px;height:18px;image-rendering:auto}
.build-caption{position:absolute;z-index:1;left:18px;right:18px;bottom:16px;display:block}
.build-title{display:block;color:#fff;font-size:1rem;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.build-description{display:block;margin-top:7px;max-width:36rem;color:#e6f4f7;font-size:.95rem;line-height:1.6;overflow-wrap:anywhere}
.build-tile-featured .build-caption{left:26px;right:26px;bottom:24px}
.build-tile-featured .build-title{font-size:clamp(1.25rem,2.5vw,1.75rem);font-weight:700}
.build-tile:hover{border-color:var(--aqua);box-shadow:0 0 0 1px rgba(68,209,219,.3)}
.build-tile:hover .build-zoom,.build-tile:focus-visible .build-zoom{background:var(--btn);border-color:var(--aqua-light)}
.build-tile:focus-visible{outline:3px solid var(--aqua-light);outline-offset:4px;border-color:var(--aqua-light)}

/* Native dialog: toolbar and navigation stay outside the flexible photo area. */
body.gallery-open{overflow:hidden}
.gallery-dialog{
  width:min(1100px,calc(100vw - 32px));height:min(880px,calc(100vh - 32px));height:min(880px,calc(100dvh - 32px));
  max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
  margin:auto;padding:0;overflow:hidden;border:2px solid #315462;border-radius:0;
  background:#0b2331;color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.5);
  font-family:"Segoe UI",Arial,sans-serif;
}
.gallery-dialog[open]{display:flex;flex-direction:column}
.gallery-dialog::backdrop{background:rgba(2,12,18,.88)}
.gallery-dialog [hidden]{display:none!important}
.gallery-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;
  padding:12px 18px;border-bottom:1px solid #315462;background:#0b2331;
}
.gallery-season{min-width:0;color:var(--muted);font-size:.8rem;font-weight:600;line-height:1.5;letter-spacing:.04em;overflow-wrap:anywhere}
.gallery-dialog button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:44px;
  padding:10px 14px;border:1px solid #456876;border-radius:0;background:#163644;color:var(--text);
  font-family:inherit;font-size:.9rem;font-weight:600;line-height:1.4;cursor:pointer;
  transition:background-color .18s ease,border-color .18s ease;
}
.gallery-dialog button:hover{background:#204859;border-color:var(--aqua)}
.gallery-dialog button:focus-visible{outline:3px solid var(--aqua-light);outline-offset:3px}
.gallery-dialog button:disabled{opacity:.5;cursor:default}
.gallery-dialog button svg{flex:none;width:18px;height:18px;image-rendering:auto}
.gallery-controls button{min-width:0;flex:0 1 auto}
.gallery-controls button span{min-width:0;overflow-wrap:anywhere}
.gallery-dialog .gallery-close{padding:10px 12px}
.gallery-figure{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;margin:0}
.gallery-stage{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;min-width:0;overflow:hidden;background:#06121a}
.gallery-stage img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;image-rendering:auto}
.gallery-dialog[data-state="loading"] .gallery-stage::after{content:"Se încarcă imaginea…";padding:20px;color:var(--muted);font-size:.9rem;text-align:center}
.gallery-error{flex:none;margin:0;padding:12px 18px;color:#ffdf9a;font-size:.9rem;line-height:1.5;background:var(--panel-2)}
.gallery-stage .gallery-error{width:min(100%,36rem);text-align:center;background:transparent}
.gallery-caption{flex:none;padding:16px 22px;border-top:1px solid #315462}
.gallery-caption h3{font-size:1.15rem;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
.gallery-caption p{margin-top:5px;color:var(--muted);font-size:.9rem;line-height:1.55;overflow-wrap:anywhere}
.gallery-caption p:empty{display:none}
.gallery-controls{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;
  padding:12px 18px;border-top:1px solid #315462;background:var(--panel-2);
}
#galleryCounter{flex:none;color:var(--muted);font-size:.85rem;font-variant-numeric:tabular-nums;line-height:1.4;white-space:nowrap}
.gallery-announcement{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.gallery-hint{margin-top:18px;text-align:center;color:var(--muted);font-size:.85rem;line-height:1.5}
.gallery-dialog .gallery-hint{flex:none;margin:0;padding:0 18px 12px;background:var(--panel-2);font-size:.75rem}

@media (max-width:760px){
  .builds-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .build-tile-featured{aspect-ratio:16/10}
  .build-tile-featured .build-caption{left:20px;right:20px;bottom:18px}
}
@media (max-width:520px){
  .builds-grid{grid-template-columns:minmax(0,1fr);gap:16px}
  .builds-header{margin-bottom:24px}
  .build-tile,.build-tile-featured{aspect-ratio:4/3}
  .build-caption,.build-tile-featured .build-caption{left:16px;right:16px;bottom:16px}
  .build-description{font-size:.85rem;line-height:1.5}
  .build-tile-featured .build-title{font-size:1.15rem}
  .build-number{top:12px;left:12px}
  .gallery-dialog{
    width:calc(100vw - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);
    max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);
  }
  .gallery-toolbar{padding:8px 10px;gap:8px}
  .gallery-season{font-size:.72rem;letter-spacing:.01em}
  .gallery-dialog button{padding:10px 9px;gap:5px;font-size:.78rem}
  .gallery-dialog .gallery-close{padding:10px 9px}
  .gallery-dialog button svg{width:16px;height:16px}
  .gallery-caption{padding:12px 14px}
  .gallery-caption h3{font-size:1rem}
  .gallery-caption p{font-size:.85rem}
  .gallery-controls{padding:9px 10px;gap:7px}
  #galleryCounter{font-size:.78rem}
  .gallery-dialog .gallery-hint{padding:0 12px 9px;font-size:.7rem}
}
@media (max-height:500px){
  .gallery-toolbar{padding-top:6px;padding-bottom:6px}
  .gallery-caption{padding-top:8px;padding-bottom:8px}
  .gallery-caption p{display:none}
  .gallery-controls{padding-top:6px;padding-bottom:6px}
  .gallery-dialog .gallery-hint{display:none}
}
@media (prefers-reduced-motion:reduce){
  .build-tile,.build-zoom,.gallery-dialog button{transition:none}
}
