*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: #e7e1d5;
  color: #3d2e1d;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 1000px;
  max-width: 96%;
  margin: 16px auto;
}

.logo {
  text-align: center;
}

.logo img {
  width: 200px;
  max-width: 80%;
  height: auto;
  object-fit: contain;
  display: inline-block;
}

.sub {
  font-family: "Cinzel", serif;
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  color: #5c4a30;
  margin-top: 6px;
}

.bar {
  height: 14px;
  margin: 18px 0;
  background: repeating-linear-gradient(
    90deg,
    #8a6b3b 0 8px,
    transparent 8px 14px,
    #8a6b3b 14px 22px,
    transparent 22px 28px
  );
  opacity: 0.55;
}

.paper {
  background-color: #f2ecdf;
  border: 4px double #8a6b3b;
  padding: 40px 32px 100px 32px;
  box-shadow: inset 0 0 28px rgba(120, 90, 40, 0.08);
}

h1, h2 {
  font-family: "Cinzel", serif;
  color: #5f431d;
  font-weight: 700;
}

h1 {
  text-align: center;
  font-size: 2.25rem;
  line-height: 1.25;
}

.tag {
  text-align: center;
  font-size: 0.875rem;
  letter-spacing: 0.25em;
  color: #6d5b3d;
  margin: 6px 0 22px;
}

h2 {
  font-size: 1.5rem;
  margin: 20px 0 12px;
  line-height: 1.35;
}

p {
  text-align: justify;
  word-break: break-word;
}

.UYARI {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ff0000;
}

hr {
  border: 0;
  border-top: 1px dashed #b49b74;
  margin: 20px 0;
}

.button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  background-color: #dbc6a2;
  border: 3px double #8a6b3b;
  color: #3b2812;
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover, .button:focus {
  background-color: #cdb48b;
  color: #1a0f05;
  outline: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  z-index: 10000;
  max-width: 960px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f2ecdf;
  border: 4px double #8a6b3b;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10001;
  background: #dbc6a2;
  border: 2px solid #8a6b3b;
  color: #3b2812;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #cdb48b;
}

.pdf-box {
  margin-top: 15px;
  width: 100%;
  height: 92vh;
  min-height: 1080px;
  border: 3px double #8a6b3b;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.pdf-box[hidden] {
  display: none !important;
}

.pdf-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
}

.pdf-fallback {
  text-align: center;
  padding: 10px;
  background-color: #f2ecdf;
  border-top: 1px dashed #8a6b3b;
  flex-shrink: 0;
}

.pdf-fallback a {
  color: #5f431d;
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.footer {
  text-align: center;
  font-size: 0.9375rem;
  color: #5c4d39;
  margin: 24px 0;
}

.footer a {
  color: #3d2e1d;
  text-decoration: underline;
}

.footer p {
  text-align: center;
}

.footer a:hover, .footer a:focus {
  color: #000;
}

.motto {
  font-family: "Cinzel", serif;
  font-size: 0.875rem;
  letter-spacing: 0.25em;
  margin: 12px 0;
}

.footer-images {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-images img {
  height: auto;
  max-width: 100%;
}

@media screen and (max-width: 600px) {
  .paper {
    padding: 50px 18px 75px 18px;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  p {
    text-align: left;
  }

  .pdf-container {
    height: 420px;
  }
}

/* ==========================================================================
   1. KOLEKSİYONERLİK BELGESİ (ŞİFRELİ MODAL) STİLLERİ
   ========================================================================== */
.modal-content img.blurred {
  filter: blur(12px);
  pointer-events: none;
  transition: filter 0.4s ease;
}

.password-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  background: rgba(242, 236, 223, 0.96);
  border: 2px solid #8a6b3b;
  padding: 18px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  width: calc(100% - 32px);
  max-width: 420px;
  box-sizing: border-box;
}

.password-overlay form {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.password-input {
  padding: 8px 12px;
  border: 1px solid #8a6b3b;
  background: #fff;
  color: #3d2e1d;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  flex: 1;
  min-width: 160px;
}

/* ==========================================================================
   2. GENEL FOTOĞRAF GALERİSİ STİLLERİ (HİBRİT ZOOM & YÜKSEK NETLİK)
   ========================================================================== */
.responsive-gallery-box {
  width: 100%;
  margin: 16px 0;
  overflow: hidden;
}

.zoom-trigger-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  border: 2px solid #8a6b3b;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.zoom-trigger-img:hover {
  filter: brightness(1.05);
}

.g-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.g-modal.active {
  visibility: visible;
  opacity: 1;
}

.g-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
}

.g-modal-content {
  position: relative;
  z-index: 100000;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.g-modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100001;
  background-color: #dbc6a2;
  border: 2px solid #8a6b3b;
  color: #3b2812;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.g-modal-close:hover {
  background-color: #cdb48b;
  color: #1a0f05;
}

.g-img-wrapper {
  width: 90vw;
  height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.g-modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  /* Mobilde pikselleşmeyi önleyen yüksek netlik ayarları */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}

.g-modal-img.is-zoomed {
  cursor: grab;
}

.g-img-wrapper.is-dragging .g-modal-img.is-zoomed {
  cursor: grabbing;
}

/* ==========================================================================
   3. MOBİL UYUMLULUK
   ========================================================================== */
@media screen and (max-width: 600px) {
  .modal-content {
    aspect-ratio: auto;
    min-height: 280px;
  }

  .password-overlay form {
    flex-direction: column;
  }

  .password-input,
  .password-overlay .button {
    width: 100%;
  }

  .g-modal-close {
    top: 15px;
    left: 15px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .g-img-wrapper {
    width: 95vw;
    height: 80vh;
  }
}
