/* ==========================================================================
   Yeni temaların ortak temeli: sıfırlama, erişilebilirlik, galeri/lightbox mekaniği.
   Renk ve yazı tipleri her temanın kendi dosyasındaki değişkenlerden gelir.
   ========================================================================== */

:root {
  --t-bg: #fff;
  --t-text: #222;
  --t-accent: #12234A;
  --t-font: system-ui, sans-serif;
  --t-font-display: var(--t-font);
  --t-container: 1200px;
  --t-gutter: 24px;
  --t-header-h: 0px;

  /* Lightbox */
  --lb-bg: rgba(6, 10, 24, .97);
  --lb-accent: var(--t-accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--t-header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--t-bg);
  color: var(--t-text);
  font-family: var(--t-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; }

.container {
  width: 100%;
  max-width: var(--t-container);
  margin: 0 auto;
  padding: 0 var(--t-gutter);
}

.sr-only, .field-label.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  padding: 10px 16px;
  background: #fff; color: #111; font-weight: 600;
}
.skip-link:focus { top: 8px; }
.anchor-alias { position: absolute; top: 0; }
.icon { width: 1em; height: 1em; flex-shrink: 0; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Mühür logosu: beyaz PNG'yi maske olarak kullanıp istenen renge boyar */
.seal {
  display: block;
  aspect-ratio: 260 / 240;
  background: currentColor;
  -webkit-mask: url("../img/logo-header.png") center / contain no-repeat;
          mask: url("../img/logo-header.png") center / contain no-repeat;
}

/* ---------- Mobil menü (ortak davranış) ---------- */
.menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
}

/* ---------- Galeri mekaniği ---------- */
.gallery-section { --g-visible: 3; --g-gap: 24px; }
.gallery-viewport { position: relative; }
.gallery-track {
  display: flex;
  align-items: flex-start;
  gap: var(--g-gap);
  margin: 0;
  padding: 4px 2px 20px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 calc((100% - (var(--g-visible) - 1) * var(--g-gap)) / var(--g-visible));
  scroll-snap-align: start;
}
.gallery-card { display: flex; flex-direction: column; overflow: hidden; }
.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.gallery-item img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.gallery-item.is-landscape img { object-fit: contain; object-position: center; }
.gallery-blur {
  position: absolute; inset: -20px;
  background: center / cover no-repeat;
  filter: blur(18px) brightness(.7);
}
.gallery-zoom {
  position: absolute; z-index: 1;
  top: 50%; left: 50%;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  margin: -24px 0 0 -24px;
  font-size: 20px;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .25s, transform .25s;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.04); }
.gallery-item:hover .gallery-zoom, .gallery-item:focus-visible .gallery-zoom { opacity: 1; transform: scale(1); }
.gallery-caption { display: flex; flex-direction: column; gap: 8px; }
.gallery-caption-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-more {
  align-self: flex-start;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.gallery-arrow {
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  cursor: pointer;
  font-size: 20px;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.gallery-arrow[disabled] { opacity: .3; cursor: default; }

/* ---------- Akordeon işareti ---------- */
.accordion-item summary { list-style: none; cursor: pointer; user-select: none; }
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-sign { position: relative; width: 12px; height: 12px; flex-shrink: 0; }
.accordion-sign::before, .accordion-sign::after { content: ""; position: absolute; background: currentColor; }
.accordion-sign::before { left: 0; right: 0; top: 5px; height: 2px; }
.accordion-sign::after { top: 0; bottom: 0; left: 5px; width: 2px; transition: transform .25s; }
.accordion-item[open] .accordion-sign::after { transform: scaleY(0); }
.accordion-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.brand-logo { display: flex; align-items: center; justify-content: center; }
.brand-logo img { max-height: 96px; width: auto; max-width: 100%; object-fit: contain; }
.brand-logo a { display: block; transition: opacity .2s, transform .2s; }
.brand-logo a:hover { opacity: .85; }

/* ---------- Formlar (ortak) ---------- */
.site-form { display: flex; flex-direction: column; gap: 14px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: 1 / -1; }
.field input { width: 100%; font: inherit; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin: 0; }
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  align-self: flex-start;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-block { align-self: stretch; }
.form-message { margin: 0; min-height: 1.5em; font-size: 15px; }
.form-notice { max-width: 760px; margin: 0 auto 28px; padding: 14px 20px; text-align: center; }
.form-notice.is-success { background: #e7f4ea; color: #14532d; }
.form-notice.is-error { background: #fbeaea; color: #7f1d1d; }

/* ---------- Lightbox ---------- */
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--lb-bg);
  color: #fff;
  font-family: var(--t-font);
}
.lightbox[hidden] { display: none; }
.lightbox-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; }
.lightbox-title { flex: 1; font-family: var(--t-font-display); font-size: 17px; }
.lightbox-counter { font-size: 14px; opacity: .75; font-variant-numeric: tabular-nums; }
.lightbox-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: #fff;
  font-size: 26px;
  cursor: pointer;
  transition: background-color .2s;
}
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255, 255, 255, .14); }
.lightbox-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-close { width: 44px; height: 44px; }
.lightbox-nav { align-self: center; justify-self: center; width: 52px; height: 52px; }
.lightbox-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; margin: 0; padding: 0 0 24px; }
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
  width: auto; height: auto;
  object-fit: contain;
  user-select: none;
}
.lightbox-caption {
  max-width: 760px; max-height: 120px;
  margin-top: 16px;
  padding: 12px 20px;
  overflow-y: auto;
  border-left: 3px solid var(--lb-accent);
  background: rgba(255, 255, 255, .07);
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-line;
}
.lightbox-caption[hidden] { display: none; }

@media (max-width: 1024px) {
  .gallery-section { --g-visible: 2; --g-gap: 16px; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 767px) {
  :root { --t-gutter: 18px; }
  .gallery-section { --g-visible: 1.15; --g-gap: 12px; }
  .gallery-zoom { display: none; }
  .field-grid { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: minmax(0, 1fr); }
  .lightbox-stage { grid-column: 1; grid-row: 2; padding: 0 12px 16px; }
  .lightbox-img { max-height: calc(100dvh - 240px); }
  .lightbox-nav { grid-column: 1; grid-row: 2; z-index: 1; width: 44px; height: 44px; background: rgba(0, 0, 0, .35); }
  .lightbox-prev { justify-self: start; margin-left: 6px; }
  .lightbox-next { justify-self: end; margin-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .gallery-track { scroll-behavior: auto; }
}
