.photo-gallery {
  --gallery-surface:#fff;
  --gallery-line:color-mix(in srgb,var(--navy) 15%,#fff);
  --gallery-text:var(--navy);
  --gallery-muted:color-mix(in srgb,var(--navy) 78%,#fff);
  --gallery-tint:color-mix(in srgb,var(--blue) 7%,#fff);
  background:linear-gradient(180deg,var(--gallery-tint),var(--paper) 32rem);
  color:var(--gallery-text);
  padding:clamp(6.5rem,9vw,9rem) 0 clamp(3rem,7vw,6rem);
}
.photo-gallery a { text-decoration:none; }
:is(#galeri,#basarilarimiz) .site-header .nav-shell { background:var(--deep); }
.photo-gallery :is(a,button):focus-visible { outline:2px solid var(--blue); outline-offset:4px; }
.photo-gallery-breadcrumb {
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-bottom:1rem;
  font-size:.84rem;
  color:var(--gallery-muted);
}
.photo-gallery-breadcrumb a { color:inherit; }
.photo-gallery-breadcrumb a:hover,.photo-gallery-breadcrumb [aria-current] { color:var(--gallery-text); }
.photo-gallery-breadcrumb .icon { width:.75rem; height:.75rem; }
.photo-gallery-cover {
  display:grid;
  align-items:stretch;
  padding:clamp(.75rem,1.4vw,1.25rem);
  border:1px solid color-mix(in srgb,var(--deep) 82%,#fff);
  border-radius:1.1rem;
  background:var(--deep);
  color:#fff;
}
.photo-gallery-cover.has-featured { grid-template-columns:minmax(0,1fr) minmax(0,1.43fr); }
.photo-gallery-intro {
  display:grid;
  align-content:center;
  gap:.65rem;
  min-width:0;
  padding:clamp(.85rem,2.8vw,2.8rem);
}
.photo-gallery-kicker {
  color:#c8daf1;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.photo-gallery-cover h1 {
  margin:0;
  font-size:clamp(1.9rem,3.55vw,3.65rem);
  line-height:1.08;
  letter-spacing:-.058em;
  overflow-wrap:anywhere;
  text-wrap:balance;
}
.photo-gallery-cover p {
  max-width:55ch;
  margin:0;
  color:#d8e5f5;
  font-size:clamp(.92rem,1.25vw,1.12rem);
  line-height:1.6;
}
.photo-gallery-featured {
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:.55rem;
  min-height:clamp(13rem,20vw,19rem);
}
.photo-gallery-featured > a {
  position:relative;
  display:flex;
  align-items:flex-end;
  min-width:0;
  overflow:hidden;
  isolation:isolate;
  padding:.75rem;
  border:1px solid #ffffff36;
  border-radius:.65rem;
  background:var(--deep);
  color:#fff;
}
.photo-gallery-featured > a:first-child { grid-row:1 / -1; }
.photo-gallery-featured[data-featured-count="1"] { grid-template-columns:minmax(0,1fr); }
.photo-gallery-featured[data-featured-count="2"] > a { grid-row:1 / -1; }
.photo-gallery-featured img,.photo-gallery-featured a::after { position:absolute; inset:0; width:100%; height:100%; }
.photo-gallery-featured img { object-fit:cover; object-position:center 42%; z-index:-2; }
.photo-gallery-featured a::after { content:''; background:linear-gradient(0deg,#07172cea,#07172c55 39%,transparent 70%); z-index:-1; }
.photo-gallery-featured a > span { display:flex; align-items:center; justify-content:space-between; gap:.4rem; width:100%; font-size:.88rem; font-weight:720; line-height:1.2; overflow-wrap:anywhere; }
.photo-gallery-featured .icon { width:15px; height:15px; flex:none; }
.photo-gallery-featured a:focus-visible { outline-color:#c8daf1; }
.photo-gallery-cta {
  display:inline-flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  min-height:46px;
  padding:.65rem .95rem;
  border:1px solid #fff;
  border-radius:.6rem;
  background:#fff;
  color:var(--navy);
  font-size:.84rem;
  font-weight:720;
  margin-top:.4rem;
}
.photo-gallery-cta:hover { background:#e6f0fc; border-color:#e6f0fc; }
.photo-gallery-cta .icon { width:16px; height:16px; }
.photo-gallery-section {
  margin-top:clamp(1.05rem,2vw,1.7rem);
  scroll-margin-top:7rem;
}
.photo-gallery-toolbar {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.65rem 1rem;
  margin-bottom:clamp(.8rem,1.5vw,1.35rem);
  padding:.6rem .75rem;
  border:1px solid var(--gallery-line);
  border-radius:.8rem;
  background:var(--gallery-surface);
}
.photo-gallery-toolbar p { margin:0 0 0 auto; color:var(--gallery-muted); font-size:.82rem; font-variant-numeric:tabular-nums; }
.photo-gallery-filters { display:flex; flex-wrap:wrap; gap:.45rem; }
.photo-gallery-filters[hidden],.photo-gallery-card[hidden] { display:none; }
.photo-gallery-filters button {
  min-height:40px;
  padding:.5rem .95rem;
  border:1px solid var(--gallery-line);
  border-radius:.55rem;
  background:var(--gallery-tint);
  color:var(--gallery-muted);
  font-size:.86rem;
  font-weight:650;
  cursor:pointer;
}
.photo-gallery-filters button:hover { color:var(--gallery-text); border-color:var(--blue); }
.photo-gallery-filters button[aria-pressed="true"] { color:#fff; background:var(--navy); border-color:var(--navy); }
.photo-gallery-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(.7rem,1.5vw,1.35rem); }
.photo-gallery-card {
  min-width:0;
  display:flex;
  flex-direction:column;
  border:1px solid var(--gallery-line);
  border-radius:.85rem;
  overflow:hidden;
  background:var(--gallery-surface);
  color:var(--gallery-text);
  box-shadow:0 8px 22px #102b4e13;
}
.photo-gallery-card:hover { border-color:var(--blue); color:var(--gallery-text); }
.photo-gallery-media { display:block; aspect-ratio:4/4.5; overflow:hidden; background:var(--paper); }
.photo-gallery-media img { display:block; width:100%; height:100%; object-fit:cover; object-position:50% 38%; }
.photo-gallery-card-footer {
  display:flex;
  flex:1;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  padding:.85rem;
  line-height:1.35;
}
.photo-gallery-card-footer > span:first-child { display:grid; gap:.2rem; min-width:0; overflow-wrap:anywhere; }
.photo-gallery-card-footer strong { font-size:.91rem; }
.photo-gallery-card-footer small { color:var(--gallery-muted); font-size:.73rem; }
.photo-gallery-card-icon {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  flex:none;
  background:var(--paper);
  border:1px solid var(--gallery-line);
  border-radius:.45rem;
  color:var(--blue);
}
.photo-gallery-card-icon .icon { width:14px; height:14px; }
.photo-gallery-achievements .photo-gallery-featured img { object-position:center 24%; }
.photo-gallery-achievements .photo-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; margin:0; list-style:none; }
.photo-gallery-achievement {
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--gallery-line);
  border-radius:.9rem;
  background:var(--gallery-surface);
  box-shadow:0 8px 22px #102b4e13;
  scroll-margin-top:7rem;
}
.photo-gallery-achievement:target { border-color:var(--blue); }
.photo-gallery-achievement .photo-gallery-card { position:relative; border:0; border-radius:0; box-shadow:none; }
.photo-gallery-achievement .photo-gallery-card:focus-visible { outline-offset:-4px; z-index:1; }
.photo-gallery-achievement .photo-gallery-media { aspect-ratio:1; background:var(--gallery-tint); }
.photo-gallery-achievement .photo-gallery-media img { object-fit:contain; object-position:center; }
.photo-gallery-achievement .photo-gallery-card-icon { position:absolute; right:.65rem; bottom:.65rem; }
.photo-gallery-achievement-copy { display:grid; align-content:start; justify-items:start; gap:.5rem; padding:clamp(.9rem,2.2vw,1.65rem); }
.photo-gallery-achievement-copy h2 { margin:0; font-size:clamp(1.12rem,2vw,1.55rem); line-height:1.22; letter-spacing:-.035em; overflow-wrap:anywhere; }
.photo-gallery-achievement-copy p { margin:0; color:var(--gallery-muted); font-size:.92rem; line-height:1.55; }
.photo-gallery-achievement-date { padding:.25rem .5rem; border-radius:.35rem; background:var(--gallery-tint); color:var(--navy); font-size:.77rem; font-weight:700; }
.photo-gallery-empty { margin:1rem 0 0; padding:clamp(1.25rem,3vw,2rem); border:1px solid var(--gallery-line); border-radius:.85rem; background:var(--gallery-surface); }
.photo-gallery-empty p { margin:.5rem 0; color:var(--gallery-muted); }
.photo-gallery-empty .photo-gallery-cta { color:#fff; background:var(--navy); border-color:var(--navy); }
.photo-gallery-viewer {
  --gallery-line:#49617b;
  --gallery-muted:#c2d6ef;
  position:fixed;
  inset:0;
  margin:auto;
  width:min(calc(100% - 1.25rem),72rem);
  height:min(calc(100dvh - 1.25rem),58rem);
  max-height:none;
  max-width:none;
  overflow:auto;
  padding:clamp(.65rem,1.8vw,1.2rem);
  border:1px solid var(--gallery-line);
  border-radius:1rem;
  background:var(--deep);
  color:#fff;
}
.photo-gallery-viewer[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:.6rem; }
.photo-gallery-viewer::backdrop { background:#07172ce5; }
.photo-gallery-viewer :is(.photo-gallery-viewer-head,.photo-gallery-viewer-nav) { display:flex; align-items:center; justify-content:space-between; gap:.45rem; }
.photo-gallery-viewer-head p { margin:0; color:var(--gallery-muted); font-size:.85rem; font-variant-numeric:tabular-nums; }
.photo-gallery-viewer figure { display:grid; grid-template-rows:minmax(0,1fr) auto; gap:.5rem; margin:0; min-height:0; }
.photo-gallery-viewer figure img { width:100%; height:100%; object-fit:contain; background:#061020; border-radius:.55rem; }
.photo-gallery-viewer figcaption { text-align:center; font-weight:650; font-size:.9rem; overflow-wrap:anywhere; }
.photo-gallery-viewer button { display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid var(--gallery-line); border-radius:.55rem; background:var(--navy); color:#fff; cursor:pointer; }
.photo-gallery-viewer button:hover:not(:disabled) { background:var(--blue); }
.photo-gallery-viewer button:focus-visible { outline-color:#c2d6ef; }
.photo-gallery-viewer button:disabled { opacity:.4; cursor:default; }
.photo-gallery-viewer button .icon { width:18px; height:18px; }

@media (max-width:62rem) {
  .photo-gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:46rem) {
  .photo-gallery { padding-top:6.25rem; }
  .photo-gallery-cover.has-featured { grid-template-columns:minmax(0,1fr); gap:.55rem; }
  .photo-gallery-intro { padding:.45rem .35rem .8rem; }
  .photo-gallery-featured { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); min-height:clamp(5.8rem,29vw,10rem); gap:.35rem; }
  .photo-gallery-featured[data-featured-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .photo-gallery-featured > a { padding:.4rem; }
  .photo-gallery-featured a > span { font-size:clamp(.64rem,2.8vw,.83rem); }
  .photo-gallery-featured .icon { display:none; }
  .photo-gallery-filters:not([hidden]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .photo-gallery-filters button { padding-inline:.6rem; }
  .photo-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .photo-gallery-card-footer { padding:.6rem; }
  .photo-gallery-card-footer strong { font-size:.81rem; }
  .photo-gallery-card-icon { width:25px; height:25px; }
}
@media (max-width:34rem) {
  .photo-gallery-achievements .photo-gallery-grid { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:no-preference) {
  .photo-gallery-media img,.photo-gallery-featured img { transition:transform .35s ease; }
  .photo-gallery-card:hover img,.photo-gallery-featured a:hover img { transform:scale(1.045); }
  .photo-gallery-achievement .photo-gallery-card:hover img { transform:none; }
}
