/* Başkan Mektubu sayfaları (assets/js/letter-render.js çıktısı için).
 *
 * Ölçü: her .lt-page sabit 810×1012 CSS pikselidir; içerik bu ölçüye göre
 * çizilir ve hiçbir zaman yeniden akmaz.
 *
 * Ekranda ölçekleme: kapsayıcı öğe `--lt-scale` değişkenini verir
 * (ör. <div class="lt-pages" style="--lt-scale:.5">). Sayfa `zoom` ile
 * küçültülür. `transform: scale()` yerine `zoom` seçildi, çünkü zoom yerleşim
 * kutusunu da küçültür: sarmalayıcı öğeye ölçü hesaplamak, negatif kenar
 * boşluğu ya da ResizeObserver gerekmez; sayfalar normal akışta alt alta
 * dizilir. (zoom tüm güncel tarayıcılarda desteklenir; Firefox 126+.)
 * Ekran genişliğine uydurmak için: --lt-scale = kapsayıcı genişliği / 810.
 *
 * Yazdırma (PDF): ölçek 1'e döner, her sayfa kendi kâğıdına düşer,
 * gradyanlar print-color-adjust: exact ile korunur.
 */

.lt-page {
  --lt-cranberry: #D41367;
  --lt-deep: #A30C4D;
  --lt-pink: #F07AAE;
  --lt-blush: #F9B3D1;
  --lt-white: #fff;

  position: relative;
  box-sizing: border-box;
  width: 810px;
  height: 1012px;
  overflow: hidden;
  zoom: var(--lt-scale, 1);
  isolation: isolate;
  color: var(--lt-white);
  font-family: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* Örnekteki gibi soldaki koyu kızılcıktan sağdaki açık pembeye. */
  background:
    radial-gradient(120% 70% at 100% 100%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(90% 60% at 0% 0%, rgba(163, 12, 77, .35), transparent 70%),
    linear-gradient(100deg, #D41367 0%, #E2468C 42%, #EE77AB 72%, #F8A9CB 100%);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.lt-page *,
.lt-page *::before,
.lt-page *::after { box-sizing: border-box; }

.lt-page p { margin: 0 0 .85em; }
.lt-page p:last-child { margin-bottom: 0; }
.lt-page h1, .lt-page h2, .lt-page figure, .lt-page ul { margin: 0; padding: 0; }

/* Süslemeler her zaman içeriğin altında kalır. */
.lt-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Altta ortada beyaz logo, örnek mektuptaki gibi (<img>; oran ≈ 3.7:1).
   Kapakta sol üstte, künyede sağ altta (örnekteki gibi). */
.lt-logo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  display: block;
  width: 150px;
  height: 41px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}
.lt-kunye .lt-logo { left: auto; right: 40px; margin: 0; object-position: right center; }

/* ------------------------------------------------------------ ortak öğeler */

.lt-heading {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--lt-white);
  text-shadow: 0 2px 12px rgba(163, 12, 77, .25);
}

/* Uzun metin kutuları: taşan kısım gizlenir, yazı küçültülmez.
   Düzenleyici data-overflow-check olan öğelerde scrollHeight > clientHeight
   karşılaştırmasıyla uyarı rozeti gösterir. */
.lt-text {
  overflow: hidden;
  min-height: 0;
  overflow-wrap: break-word;
  hyphens: manual;
}

/* İmza: sağa yaslı, küçük ve kalın; satırlar beyaz şerit üstünde kızılcık. */
.lt-sig {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-top: 14px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  flex: none;
}
.lt-sig > span {
  display: inline-block;
  padding: 1px 6px;
  background: var(--lt-white);
  color: var(--lt-cranberry);
}
.lt-sig > .lt-sig-name { font-size: 14px; font-weight: 800; }

.lt-sig-plain { align-items: flex-start; text-align: left; font-size: 15px; gap: 0; }
.lt-sig-plain > span { padding: 0; background: none; color: var(--lt-white); }
.lt-sig-plain > .lt-sig-name { font-size: 15px; }

/* Fotoğraf yuvaları. */
.lt-slot { position: relative; overflow: hidden; }
.lt-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Düzenleyicide boş fotoğraf yeri. */
.lt-slot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  outline: 2px dashed rgba(255, 255, 255, .75);
  outline-offset: -8px;
  color: var(--lt-white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
}
.lt-polaroid .lt-slot-empty {
  background: #F6D3E2;
  outline-color: var(--lt-cranberry);
  color: var(--lt-cranberry);
}

/* Düzenleyicide boş metin alanları: alan adı soluk gösterilir. */
.lt-page[data-editable] [data-field]:empty::before {
  content: attr(data-placeholder);
  opacity: .55;
  font-style: italic;
}
.lt-page[data-editable] .lt-text[data-field]:empty { min-height: 3em; }

/* Polaroid: beyaz kenar, kalın alt şerit, hafif dönük, yumuşak gölge. */
.lt-polaroid {
  position: relative;
  flex: none;
  width: 300px;
  padding: 12px 12px 0;
  background: var(--lt-white);
  box-shadow:
    0 1px 2px rgba(80, 0, 35, .18),
    0 14px 30px -10px rgba(80, 0, 35, .45);
}
.lt-polaroid-photo { width: 100%; aspect-ratio: 4 / 3; }
.lt-polaroid-label {
  min-height: 48px;
  padding: 12px 4px 12px;
  color: var(--lt-cranberry);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.lt-tilt-l { transform: rotate(-2.2deg); }
.lt-tilt-r { transform: rotate(2deg); }

/* Fotoğrafsız maddede etiket: beyaz şerit. */
.lt-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 4px 12px;
  background: var(--lt-white);
  color: var(--lt-cranberry);
  font-size: 15px;
  font-weight: 700;
}

/* ------------------------------------------------------------ kapak */

.lt-kapak {
  background:
    radial-gradient(80% 50% at 100% 100%, rgba(255, 255, 255, .18), transparent 65%),
    linear-gradient(100deg, #D41367 0%, #E0408A 45%, #F07CB0 75%, #F9A9CC 100%);
}
.lt-logo-cover {
  top: 46px;
  left: 50px;
  right: auto;
  bottom: auto;
  width: 230px;
  height: 62px;
  margin: 0;
  object-position: left center;
}
.lt-cover-photo {
  position: absolute;
  inset: 0 0 auto 0;
  height: 700px;
  z-index: -2;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.lt-cover-photo .lt-img { opacity: .9; }
.lt-kapak .lt-cover-photo.lt-slot-empty {
  -webkit-mask-image: none;
  mask-image: none;
  inset: 150px 60px auto 60px;
  height: 380px;
  z-index: 0;
}
.lt-cover-text {
  position: absolute;
  right: 54px;
  bottom: 118px;
  left: 54px;
  text-align: right;
  text-shadow: 0 2px 18px rgba(163, 12, 77, .3);
}
.lt-cover-issue {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.lt-cover-period {
  margin-top: 4px;
  font-size: 44px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.lt-cover-title {
  margin-top: 6px;
  font-size: 68px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.03em;
}

/* ------------------------------------------------------------ künye */

.lt-kunye-list {
  position: absolute;
  inset: 46px 220px 40px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.lt-kunye-row { line-height: 1.15; }
.lt-kunye-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.lt-kunye-name {
  margin-top: 3px;
  font-size: 29px;
  font-weight: 300;
  letter-spacing: -.02em;
  white-space: nowrap;
}
/* Az satırda boşluklar aşırı açılmasın. */
.lt-kunye-list:has(> :nth-child(-n + 6):last-child) { justify-content: flex-start; gap: 26px; }

/* ------------------------------------------------------------ içindekiler */

.lt-deco-band { inset: auto 0 auto 0; height: 216px; }
.lt-deco-band-top { top: 0; }
.lt-deco-band-bottom { top: 650px; }
.lt-deco-band-top { -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.lt-deco-band-bottom { -webkit-mask-image: linear-gradient(0deg, #000 60%, transparent); mask-image: linear-gradient(0deg, #000 60%, transparent); }

.lt-toc {
  position: absolute;
  top: 330px;
  left: 60px;
  right: 60px;
}
.lt-toc-heading { font-size: 34px; margin-bottom: 16px; }
.lt-toc-list {
  list-style: none;
  border-left: 2px solid rgba(255, 255, 255, .85);
  padding: 4px 0 4px 18px;
}
.lt-toc-list li {
  position: relative;
  padding: 5px 0 5px 34px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.lt-toc-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -10px;
  border-left: 17px solid var(--lt-white);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  opacity: .92;
}

/* ------------------------------------------------------------ başkan */

.lt-baskan-main {
  position: absolute;
  inset: 52px 56px 112px 56px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.42;
}
.lt-baskan-figure {
  float: left;
  position: relative;
  width: 276px;
  margin: 0 30px 20px 0;
  padding-bottom: 26px; /* rozet portrenin altına taşar */
}
.lt-portrait {
  width: 100%;
  height: 310px;
  border-radius: 2px;
  box-shadow: 0 16px 34px -14px rgba(80, 0, 35, .55);
}
.lt-portrait .lt-img { object-position: 50% 20%; }
.lt-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 3px 12px 5px;
  background: var(--lt-white);
  color: var(--lt-cranberry);
  font-size: 29px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  box-shadow: 0 8px 18px -8px rgba(80, 0, 35, .45);
}
.lt-baskan-figure.lt-no-photo { float: none; width: auto; margin: 0 0 22px; padding: 0; }
.lt-baskan-figure.lt-no-photo .lt-badge { position: static; display: inline-block; }
.lt-baskan-body { text-align: justify; overflow: visible; }
/* Taşmayı ana kutu üstlenir (yüzen portre metni sardığı için). */
.lt-baskan-main .lt-sig { margin-top: 26px; }

/* ------------------------------------------------------------ mesajlar */

.lt-mesaj-2 .lt-heading,
.lt-mesaj-1 .lt-heading { position: absolute; top: 50px; left: 56px; right: 56px; }

.lt-msgs {
  position: absolute;
  inset: 124px 56px 104px 56px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.lt-msg {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.lt-msg-body {
  flex: 0 1 auto;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: justify;
}
/* Tek mesaj: üstte metin ve imza, kalan alanın tamamında görsel. */
.lt-msg-solo {
  position: absolute;
  inset: 124px 56px 104px 56px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.lt-msg-solo .lt-msg { flex: 0 1 auto; max-height: 58%; }
.lt-msg-visual {
  flex: 1 1 0;
  min-height: 260px;
  margin: 0 14px;
}
.lt-msg-visual .lt-img { object-fit: contain; }

/* ------------------------------------------------------------ köşe */

.lt-kose-heading {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 38px;
  font-weight: 300;
}
.lt-kose-heading b { font-weight: 800; }
.lt-kose-cols {
  position: absolute;
  inset: 120px 48px 96px 48px;
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 26px;
}
.lt-kose-rule { background: rgba(255, 255, 255, .7); border-radius: 2px; }
.lt-kose-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.lt-kose-body {
  flex: 0 1 auto;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.lt-kose-col1 .lt-kose-body { text-align: left; }
.lt-kose-col1 .lt-sig { align-items: flex-start; text-align: left; }
.lt-kose-col2 .lt-kose-body { text-align: right; }
.lt-round {
  flex: none;
  width: 156px;
  height: 156px;
  margin-top: 18px;
  border-radius: 50%;
  border: 5px solid var(--lt-white);
  box-shadow: 0 12px 26px -10px rgba(80, 0, 35, .5);
}
.lt-kose-col1 .lt-round { align-self: flex-start; transform: rotate(-3deg); }
.lt-kose-col2 .lt-round { align-self: flex-end; transform: rotate(3deg); }

/* ------------------------------------------------------------ neler yaptık */

.lt-neler-2 .lt-heading,
.lt-neler-1 .lt-heading,
.lt-neler-tam .lt-heading,
.lt-serbest .lt-heading { position: absolute; top: 58px; left: 56px; right: 300px; }

.lt-neler-items {
  position: absolute;
  inset: 128px 56px 116px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 30px;
}
.lt-neler-item {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 50%;
  display: flex;
  align-items: flex-start;
  gap: 34px;
}
.lt-neler-item2 { flex-direction: row-reverse; }
.lt-neler-copy {
  flex: 1 1 0;
  min-width: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}
.lt-neler-body {
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -.005em;
}
.lt-neler-item1 .lt-neler-body { text-align: left; }
.lt-neler-item2 .lt-neler-body { text-align: right; }
.lt-neler-item2 .lt-neler-copy { align-items: flex-end; }
.lt-neler-item2 .lt-tag { align-self: flex-end; }
.lt-neler-item .lt-polaroid { margin-top: 6px; }

.lt-neler-single {
  position: absolute;
  inset: 128px 70px 116px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}
.lt-polaroid-lg { width: 560px; }
.lt-polaroid-lg .lt-polaroid-photo { aspect-ratio: 3 / 2; }
.lt-polaroid-lg .lt-polaroid-label { font-size: 19px; }
.lt-neler-single .lt-neler-copy { align-self: stretch; align-items: center; min-height: 0; }
.lt-neler-single .lt-neler-body { text-align: center; }

/* Tam sayfa ve serbest: üstte metin, altta kolaj. */
.lt-full {
  position: absolute;
  inset: 128px 56px 108px 56px;
  display: flex;
  flex-direction: column;
}
.lt-full-body {
  flex: 0 1 auto;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: justify;
}
.lt-serbest .lt-full { top: 124px; }
.lt-serbest:not(:has(.lt-heading)) .lt-full { top: 60px; }

.lt-collage {
  flex: 1 1 0;
  min-height: 300px;
  margin-top: 28px;
  display: grid;
  gap: 22px;
  align-items: center;
  justify-items: center;
  grid-template-rows: minmax(0, 1fr);
}
.lt-collage .lt-polaroid {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-bottom: 12px;
}
.lt-collage .lt-polaroid-photo { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
.lt-collage.lt-n1 { grid-template-columns: minmax(0, 1fr); padding: 0 80px; }
.lt-collage.lt-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lt-collage.lt-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lt-collage.lt-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.lt-collage.lt-n1 .lt-polaroid,
.lt-collage.lt-n2 .lt-polaroid { max-height: 400px; }
.lt-collage.lt-n3 .lt-polaroid { max-height: 300px; }
.lt-collage .lt-polaroid:nth-child(4n + 1) { transform: rotate(-2.4deg); }
.lt-collage .lt-polaroid:nth-child(4n + 2) { transform: rotate(1.8deg) translateY(10px); }
.lt-collage .lt-polaroid:nth-child(4n + 3) { transform: rotate(1.4deg); }
.lt-collage .lt-polaroid:nth-child(4n + 4) { transform: rotate(-1.6deg) translateY(-6px); }

/* Serbest sayfada düz ızgara: dönmesiz, ince beyaz kenar. */
.lt-grid .lt-polaroid { padding: 8px; transform: none !important; }

/* ------------------------------------------------------------ ekran / yazdırma */

/* İsteğe bağlı kapsayıcı: sayfaları ortalayıp aralıklı dizer. */
.lt-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(28px * var(--lt-scale, 1));
}
.lt-pages > .lt-page { box-shadow: 0 10px 40px -12px rgba(80, 0, 35, .35); }

@page {
  size: 810px 1012px;
  margin: 0;
}

@media print {
  .lt-pages { display: block; gap: 0; }
  .lt-page,
  .lt-pages > .lt-page {
    zoom: 1;
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .lt-page:last-child { break-after: auto; page-break-after: auto; }
  /* Düzenleyici yer tutucuları kâğıda basılmaz. */
  .lt-slot-empty,
  .lt-polaroid-add,
  .lt-polaroid:has(> .lt-slot-empty) { display: none !important; }
}

/* Tam sayfa görsel (PDF'ten aktarılan sayılar) */
.lt-page.lt-gorsel { background: #fff; padding: 0; }
.lt-page-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lt-page-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #A30C4D; margin: 0; }
.lt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
