/* E-dergi okuyucu (/dergi/…) — eski sitedeki e-dergi düzeninin yerel karşılığı */
:root {
  --navy: #1b2e60;
  --navy-soft: #eef1f7;
  --red: #c92a2a;
  --yellow: #ffcb05;
  --ink: #3a4664;
  --muted: #7d879e;
  --bg: #e9ebef;
  --bar-h: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
.er { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* Üst çubuk */
.er-bar { position: relative; z-index: 20; flex: 0 0 var(--bar-h); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 18px; background: #fff; box-shadow: 0 1px 0 rgba(27, 46, 96, .08), 0 6px 18px rgba(27, 46, 96, .08); }
.er-left { grid-column: 1; display: flex; align-items: center; gap: 16px; min-width: 0; height: 100%; }
.er-brand { display: flex; align-items: center; height: 100%; flex: 0 0 auto; }
.er-brand img { height: 38px; width: auto; display: block; }
.er-title { min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 16px; border-left: 1px solid #e3e6ee; line-height: 24px; }
.er-tools { grid-column: 2; display: flex; align-items: center; gap: 2px; }
.er-ic { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--navy); cursor: pointer; text-decoration: none; transition: background .16s ease, color .16s ease; }
.er-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.er-ic:hover:not(:disabled) { background: var(--navy-soft); }
.er-ic:disabled { color: #c3c9d6; cursor: default; }
.er-ic[aria-expanded="true"], .er-ic[aria-expanded="true"]:hover:not(:disabled) { background: var(--navy); color: #fff; }
.er-sep { width: 1px; height: 24px; background: #e3e6ee; margin: 0 6px; }
.er-pager { grid-column: 3; justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.er-pager input { width: 52px; height: 34px; border: 1px solid #d9dde7; border-radius: 8px; text-align: center; font: inherit; font-weight: 700; color: var(--navy); background: #f7f8fb; outline: none; transition: border-color .15s, box-shadow .15s; }
.er-pager input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27, 46, 96, .12); background: #fff; }
.er-pager b { color: var(--navy); }

/* Sahne */
.er-stage { position: relative; flex: 1 1 auto; overflow: auto; min-height: 0; background: radial-gradient(ellipse at 50% 40%, #f4f5f8 0%, var(--bg) 70%); }
.er-stage.is-zoomed { cursor: grab; }
.er-stage.is-panning { cursor: grabbing; user-select: none; }
.er-canvas { display: flex; min-width: 100%; min-height: 100%; width: max-content; padding: 22px 76px; }
.er-book { margin: auto; flex: 0 0 auto; }
.er-book .stf__parent { margin: 0 auto; }
.er-book .er-pg { background: #fff; overflow: hidden; }
.er-book .er-pg img { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.er-book .er-pg.is-blank img { visibility: hidden; }
.er-book .er-pg.is-blank::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #e3e6ee; border-top-color: var(--navy); animation: er-spin .9s linear infinite; }
.er-book .stf__block { filter: drop-shadow(0 18px 34px rgba(27, 46, 96, .22)); }
/* Kitap sırtı: çift sayfada iç kenarlarda kıvrım gölgesi (eski e-dergideki gibi) */
.er-book.is-spread .stf__item::before { content: ""; position: absolute; top: 0; bottom: 0; width: 15%; z-index: 2; pointer-events: none; }
.er-book.is-spread .stf__item.--left::before { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .26) 0%, rgba(0, 0, 0, .15) 9%, rgba(0, 0, 0, .07) 28%, rgba(0, 0, 0, .025) 58%, rgba(0, 0, 0, 0) 100%); }
.er-book.is-spread .stf__item.--right::before { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .12) 8%, rgba(0, 0, 0, .05) 26%, rgba(0, 0, 0, .015) 56%, rgba(0, 0, 0, 0) 100%); }
/* Kapak ve arka kapak tek durur: sırt gölgesi hafif */
.er-book.is-spread .stf__item.is-cover::before { width: 4%; opacity: .55; }

/* PDF içi bağlantılar */
.er-link { position: absolute; z-index: 4; display: block; border-radius: 4px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.er-link:hover { background: rgba(255, 203, 5, .18); box-shadow: 0 0 0 2px rgba(255, 203, 5, .85); }

/* Yan oklar */
.er-arrow { position: fixed; top: calc(50% + var(--bar-h) / 2); transform: translateY(-50%); z-index: 15; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: 0 6px 18px rgba(27, 46, 96, .16); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .16s, color .16s, opacity .2s, transform .16s; }
.er-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.er-arrow:hover:not(:disabled) { background: var(--navy); color: #fff; }
.er-arrow:disabled { opacity: 0; pointer-events: none; }
.er-arrow--l { left: 14px; }
.er-arrow--r { right: 14px; }

.er-zoomtag { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 16; padding: 6px 12px; border-radius: 999px; background: rgba(27, 46, 96, .88); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }

/* Kaydırmalı belge görünümü (tek / çok uzun sayfalı PDF: e-bülten) */
.er.is-scroll .er-canvas { flex-direction: column; align-items: center; gap: 22px; padding: 26px 20px 60px; }
.er.is-scroll .er-arrow { display: none; }
.er-sheet { position: relative; background: #fff; box-shadow: 0 10px 30px rgba(27, 46, 96, .16); border-radius: 4px; overflow: hidden; flex: 0 0 auto; }
.er-slice { display: block; width: 100%; background: #fff; }
.er-slice img { display: block; width: 100%; height: 100%; }
.er-slice.is-blank { background: linear-gradient(90deg, #f3f4f7 25%, #fafbfc 50%, #f3f4f7 75%); background-size: 200% 100%; animation: er-shimmer 1.3s linear infinite; }
.er-slice.is-blank img { visibility: hidden; }

/* Küçük resimler */
.er-thumbs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 18; background: rgba(15, 23, 51, .94); backdrop-filter: blur(6px); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); animation: er-up .22s ease; }
.er-thumbs__track { display: flex; gap: 14px; overflow-x: auto; padding: 16px 20px 14px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
.er-th { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; padding: 0; background: none; cursor: pointer; color: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 600; }
.er-th__img { display: flex; gap: 0; height: 128px; border-radius: 3px; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .15s, transform .15s; }
.er-th__img span { height: 100%; aspect-ratio: var(--r, .707); background: #2a3555 center / cover no-repeat; display: block; }
.er-th__img span + span { box-shadow: inset 1px 0 0 rgba(0, 0, 0, .15); }
.er-th:hover .er-th__img { transform: translateY(-3px); }
.er-th.is-current { color: var(--yellow); }
.er-th.is-current .er-th__img { outline-color: var(--yellow); }

/* Yükleniyor */
.er-load { position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); color: var(--muted); font-size: 14px; font-weight: 600; }
.er-load p { margin: 0; }
.er-spin { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #d7dbe5; border-top-color: var(--navy); animation: er-spin .9s linear infinite; }
.er-err { text-align: center; color: var(--ink); line-height: 1.6; }
.er-err strong { display: block; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.er-err a { display: inline-flex; margin-top: 12px; padding: 10px 18px; border-radius: 10px; background: var(--navy); color: #fff; text-decoration: none; }

@keyframes er-spin { to { transform: rotate(360deg); } }
@keyframes er-shimmer { to { background-position: -200% 0; } }
@keyframes er-up { from { transform: translateY(20px); opacity: 0; } }

@media (max-width: 1100px) {
  .er-title { display: none; }
}
@media (max-width: 760px) {
  :root { --bar-h: 56px; }
  .er-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 0 10px; }
  .er-brand img { height: 30px; }
  .er-tools { justify-self: center; gap: 0; }
  .er-ic { width: 36px; height: 36px; }
  .er-hide-sm, .er-sep { display: none; }
  .er-pager input { width: 42px; height: 32px; }
  .er-canvas { padding: 14px 10px; }
  .er-arrow { display: none; }
  .er-th__img { height: 96px; }
}
@media (max-width: 420px) {
  .er-left { display: none; }
  .er-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .er-tools { grid-column: 1; justify-self: start; }
  .er-pager { grid-column: 2; }
}
