/* ==========================================================================
   EggMaster — Icerik sayfasi sablonu (sticky TOC + editorial makale)
   about.html, privacy.html, terms.html ... hepsi bu sablonu kullanir.
   WordPress'te sadece bu sablonu kullanan sayfalarda enqueue edilir.
   ========================================================================== */

.content-page {
  padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

.content-page__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--em-space-3);
}

/* ==========================================================================
   Makale kabi
   ========================================================================== */
.content-card {
  min-width: 0;
  max-width: 720px;
  padding: clamp(24px, 5vw, 48px);
  background-color: var(--em-surface-lowest);
  border-radius: var(--em-radius-xl);
  box-shadow: var(--em-shadow-warm);
}

.content-header {
  margin-bottom: var(--em-stack-lg);
  padding-bottom: var(--em-space-4);
  border-bottom: 1px solid var(--em-outline-variant);
}

.content-header__lead {
  margin-top: var(--em-stack-md);
  color: var(--em-ink-variant);
}

/* ==========================================================================
   Prose — WP editorunden gelen ham HTML.
   Seciciler :where() ile 0 ozgullukte tutulur; boylece icerige eklenen
   bilesen siniflari (.callout gibi) her zaman ustte kalir.
   ========================================================================== */
.prose { color: var(--em-ink); }

:where(.prose) > * + * { margin-top: var(--em-stack-md); }

:where(.prose) p { line-height: var(--em-body-md-lh); }

:where(.prose) h2 {
  font-size: var(--em-headline-md-size);
  font-weight: 500;
  line-height: var(--em-headline-md-lh);
  margin-top: var(--em-space-6);
  scroll-margin-top: calc(var(--em-header-h) + var(--em-space-3));
}

:where(.prose) h3 {
  font-size: var(--em-headline-sm-size);
  font-weight: 500;
  line-height: var(--em-headline-sm-lh);
  margin-top: var(--em-space-4);
  scroll-margin-top: calc(var(--em-header-h) + var(--em-space-3));
}

:where(.prose) > :is(h2, h3):first-child { margin-top: 0; }

:where(.prose) a {
  color: var(--em-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:where(.prose) a:hover { color: var(--em-secondary); }

:where(.prose) strong { font-weight: 600; }

:where(.prose) :is(ul, ol) {
  padding-left: var(--em-space-3);
  color: var(--em-ink-variant);
}
:where(.prose) ul { list-style: disc; }
:where(.prose) ol { list-style: decimal; }
:where(.prose) li + li { margin-top: var(--em-stack-sm); }
:where(.prose) li strong { color: var(--em-ink); }

:where(.prose) figure { margin: var(--em-space-4) 0; }

:where(.prose) img {
  width: 100%;
  border-radius: var(--em-radius-lg);
}

:where(.prose) figcaption {
  margin-top: var(--em-stack-sm);
  color: var(--em-outline);
  font-size: var(--em-body-sm-size);
}

:where(.prose) blockquote {
  margin: var(--em-space-4) 0;
  padding-left: var(--em-space-3);
  border-left: 3px solid var(--em-yolk-dim);
  font-family: var(--em-font-display);
  font-size: var(--em-headline-sm-size);
  font-style: italic;
  font-weight: 500;
  line-height: var(--em-headline-sm-lh);
  color: var(--em-ink-variant);
}

:where(.prose) hr {
  margin: var(--em-space-6) 0;
  border: 0;
  border-top: 1px solid var(--em-outline-variant);
}

/* ==========================================================================
   Icerik icinde kullanilan bilesenler
   (WP: Group bloguna ek CSS sinifi olarak "callout" verilir)
   ========================================================================== */

/* Vurgu kutusu */
.callout {
  padding: var(--em-space-3);
  background-color: var(--em-surface-low);
  border: 1px solid var(--em-outline-variant);
  border-radius: var(--em-radius-lg);
}

.callout__head {
  display: flex;
  align-items: center;
  gap: var(--em-stack-sm);
  margin-bottom: var(--em-stack-sm);
  color: var(--em-primary);
}
.callout__head svg { width: 20px; height: 20px; flex: none; }

.callout p { color: var(--em-ink-variant); }

/* ==========================================================================
   Masaustu: iki kolon + yapiskan TOC
   ========================================================================== */
@media (min-width: 901px) {
  .content-page__inner {
    grid-template-columns: 256px minmax(0, 720px);
    justify-content: center;
    gap: var(--em-space-5);
  }

  /* Icerikte baslik yoksa makale tek basina ortalanir */
  .content-page__inner:has(> .toc[hidden]) {
    grid-template-columns: minmax(0, 720px);
  }
}
