/* ===== benmbs.blog — Braun ilhamlı minimal tema ===== */
:root {
  --accent: #e63946;
  --ink: #16181d;
  --ink-soft: #5b616e;
  --line: #e7e8ec;
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --header-bg: rgba(255,255,255,.85);
  --surface: #ffffff;
  --code-bg: #1a1c22;
  --radius: 14px;
  --maxw: 1180px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Dark tema — göz dostu sıcak kömür (OLED siyahı değil) ===== */
[data-theme="dark"] {
  --ink: #e4e0d8;           /* yumuşak krem metin, saf beyaz değil */
  --ink-soft: #a39e94;      /* düşük kontrast ikincil metin */
  --line: #3c3934;          /* yumuşak sınır */
  --bg: #2a2825;            /* sıcak charcoal arka plan */
  --bg-soft: #34312c;       /* paneller biraz daha açık */
  --header-bg: rgba(42, 40, 37, .92);
  --surface: #34312c;
  --code-bg: #1f1e1b;
  --accent: #f07178;        /* koyu zeminde biraz yumuşatılmış kırmızı */
  color-scheme: dark;
}
[data-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 220, 180, .04), transparent 60%),
    var(--bg);
}
[data-theme="dark"] .btn {
  background: #4a463f;
  color: var(--ink);
}
[data-theme="dark"] .btn:hover { background: #5a554c; }
[data-theme="dark"] .comment-form button { background: var(--accent); color: #1f1e1b; }
[data-theme="dark"] .search-mini input,
[data-theme="dark"] .subscribe-form input,
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .search-full input,
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
  background: #322f2a;
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="dark"] .card-media--placeholder,
[data-theme="dark"] .hero-media--placeholder { background: var(--bg-soft); }
[data-theme="dark"] body.nav-open .main-nav { background: var(--bg); }
[data-theme="dark"] .flash-success { background: #2d3a30; color: #b8d4be; }
[data-theme="dark"] .flash-error { background: #3a2a2a; color: #e8b4b4; }
[data-theme="dark"] .flash-warning { background: #3a3428; color: #e0c98a; }
[data-theme="dark"] .post-content a { color: #e8a0a6; }
[data-theme="dark"] .lightbox { background: rgba(22, 20, 18, .88); }
[data-theme="dark"] .wp-block-gallery > figure,
[data-theme="dark"] .blog-gallery-item { background: #1f1e1b; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 900px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
body { background: var(--bg); color: var(--ink); transition: background .3s, color .3s; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: .95rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:hover { border-color: var(--ink-soft); }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark, :root:not([data-theme="dark"]) .theme-icon-dark { display: none; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand-title { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; letter-spacing: -.02em; }
.main-nav { display: flex; gap: 22px; margin-left: 8px; flex: 1; }
.main-nav a { font-size: .93rem; font-weight: 500; color: var(--ink-soft); transition: color .15s; }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-mini input {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: .88rem; width: 160px; background: var(--bg-soft);
  transition: width .2s, border-color .2s;
}
.search-mini input:focus { outline: none; border-color: var(--accent); width: 210px; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* ===== Hero (öne çıkan) ===== */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px;
  align-items: center; padding: 56px 0; border-bottom: 1px solid var(--line);
}
.hero-media img, .hero-media--placeholder {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius); background: var(--bg-soft);
}
.hero-badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  margin-bottom: 10px;
}
.hero-title { font-family: var(--serif); font-size: 2.6rem; line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 16px; }
.hero-title a:hover { color: var(--accent); }
.hero-excerpt { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 18px; }

/* ===== Grid & cards ===== */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px; padding: 56px 0;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); padding: 24px 0 0; }
.card-media img, .card-media--placeholder {
  width: 100%; aspect-ratio: 3/2; object-fit: cover;
  border-radius: var(--radius); background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
}
.card-media--placeholder span { font-family: var(--serif); font-size: 2rem; color: var(--ink-soft); }
.card-body { padding-top: 16px; }
.card-cat {
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent);
}
.card-title { font-family: var(--serif); font-size: 1.32rem; line-height: 1.25; margin: 8px 0 8px; letter-spacing: -.01em; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--ink-soft); font-size: .95rem; margin: 0 0 12px; }
.card-meta { display: flex; gap: 8px; font-size: .82rem; color: var(--ink-soft); }

/* ===== Archive/page head ===== */
.page-head { padding: 56px 0 8px; text-align: center; }
.page-head h1 { font-family: var(--serif); font-size: 2.4rem; letter-spacing: -.02em; margin: 0 0 8px; }
.page-head p { color: var(--ink-soft); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; font-size: .85rem; color: var(--ink-soft); margin-bottom: 10px; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: .5; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.subcat-chip { display: inline-block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--ink); text-decoration: none; transition: background .15s, color .15s; }
.subcat-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Post ===== */
.post-head { padding: 56px 0 24px; text-align: center; }
.post-title { font-family: var(--serif); font-size: 2.8rem; line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 16px; }
.post-meta { display: flex; gap: 8px; justify-content: center; color: var(--ink-soft); font-size: .9rem; }
.post-cover { margin: 0 0 40px; }
.post-cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }
.post-video { position: relative; padding-bottom: 56.25%; height: 0; margin: 0 0 40px; border-radius: var(--radius); overflow: hidden; background: #000; }
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post-content { font-size: 1.18rem; line-height: 1.85; }
.post-content p { margin: 0 0 1.4em; text-align: justify; text-justify: inter-word; hyphens: auto; }
.post-content h2 { font-family: var(--serif); font-size: 1.7rem; margin: 1.8em 0 .5em; letter-spacing: -.01em; }
.post-content h3 { font-family: var(--serif); font-size: 1.35rem; margin: 1.5em 0 .5em; }
.post-content img { border-radius: var(--radius); margin: 1.5em 0; }
/* Editörden gelen görsel hizalama sınıfları */
.post-content img.img-left, .post-content .img-left { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.post-content img.img-right, .post-content .img-right { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
.post-content img.img-center { display: block; margin-left: auto; margin-right: auto; }
.post-content img.img-full { width: 100%; }
.post-content::after { content: ""; display: block; clear: both; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote {
  border-left: 3px solid var(--accent); margin: 1.6em 0; padding: .3em 0 .3em 1.2em;
  font-family: var(--serif); font-size: 1.3rem; font-style: italic; color: var(--ink);
}
.post-content pre {
  background: var(--code-bg); color: #e6e6e6; padding: 18px 20px;
  border-radius: 10px; overflow-x: auto; font-size: .9rem;
}

/* Görsel yumuşak yükleme (fade-in) */
.post-content img, .post-cover img, .card-media img, .hero-media img {
  opacity: 0; filter: blur(12px); transform: scale(1.01);
  transition: opacity .7s ease, filter .7s ease, transform .7s ease;
}
.post-content img.is-loaded, .post-cover img.is-loaded,
.card-media img.is-loaded, .hero-media img.is-loaded {
  opacity: 1; filter: none; transform: none;
}
/* JS kapalıysa görseller yine görünsün */
.no-js .post-content img, .no-js .post-cover img { opacity: 1; filter: none; }
.post-content code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.post-content ul, .post-content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.post-content iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); border: 0; margin: 1.5em 0; }

.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0; }
.post-tags a { font-size: .85rem; background: var(--bg-soft); padding: 6px 14px; border-radius: 999px; color: var(--ink-soft); transition: .15s; }
.post-tags a:hover { background: var(--accent); color: #fff; }

.author-box { display: flex; gap: 18px; align-items: center; padding: 24px; background: var(--bg-soft); border-radius: var(--radius); margin: 32px 0; }
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-box p { margin: 4px 0 0; color: var(--ink-soft); font-size: .95rem; }

/* ===== Subscribe CTA ===== */
.subscribe-cta { text-align: center; background: var(--bg-soft); border-radius: var(--radius); padding: 40px 28px; margin: 48px 0; }
.subscribe-cta h3 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 6px; }
.subscribe-cta p { color: var(--ink-soft); margin: 0 0 18px; }
.subscribe-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.subscribe-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; font-size: .95rem; }
.subscribe-form input:focus { outline: none; border-color: var(--accent); }
.subscribe-form button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* Yazı içine gömülen abone kutusu */
.subscribe-cta--inline { margin: 40px 0; }
.subscribe-cta--inline p { text-align: center; hyphens: none; }

/* ===== Related & section titles ===== */
.section-title { font-family: var(--serif); font-size: 1.6rem; letter-spacing: -.01em; margin: 56px 0 8px; padding-top: 40px; border-top: 1px solid var(--line); }
.related .section-title { border-top: none; }

/* ===== Yazı dizisi kutusu ===== */
.series-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 48px 0 8px; }
.series-eyebrow { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.series-title { font-family: var(--serif); font-size: 1.5rem; margin: 6px 0 16px; }
.series-title a:hover { color: var(--accent); }
.series-list { list-style: none; counter-reset: s; padding: 0; margin: 0 0 18px; }
.series-list li { counter-increment: s; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
.series-list li::before { content: counter(s); font-family: var(--serif); font-weight: 600; color: var(--ink-soft); min-width: 22px; }
.series-list li.current { font-weight: 600; }
.series-list li em { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }
.series-list a:hover { color: var(--accent); }
.series-next { display: flex; flex-direction: column; gap: 2px; background: var(--accent); color: #fff; padding: 16px 22px; border-radius: 12px; }
.series-next span { font-size: .78rem; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.series-next strong { font-family: var(--serif); font-size: 1.15rem; }
.series-end { text-align: center; color: var(--ink-soft); font-weight: 600; }

/* ===== Comments ===== */
.comments { padding: 24px 0 80px; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment--reply { margin-left: 32px; border-bottom: none; border-left: 2px solid var(--line); padding-left: 18px; }
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.comment-head span { font-size: .8rem; color: var(--ink-soft); }
.comment-body { color: var(--ink); }
.comment-form { margin-top: 32px; }
.comment-form h3 { font-family: var(--serif); font-size: 1.3rem; }
.comment-form .form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-family: inherit; font-size: .95rem; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form button { margin-top: 12px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 12px 28px; font-weight: 600; cursor: pointer; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ===== Galeri (yeni + WordPress'ten aktarılan) ===== */
.blog-gallery,
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 32px 0;
}
.blog-gallery.cols-1, .wp-block-gallery.columns-1 { grid-template-columns: 1fr; }
.blog-gallery.cols-2, .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.blog-gallery.cols-3, .wp-block-gallery.columns-3,
.wp-block-gallery.columns-default { grid-template-columns: repeat(3, 1fr); }
.blog-gallery.cols-4, .wp-block-gallery.columns-4 { grid-template-columns: repeat(4, 1fr); }

.blog-gallery-item,
.wp-block-gallery > .wp-block-image,
.wp-block-gallery > figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  background: #111;
}

.blog-gallery img,
.wp-block-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Tekil görsel altyazıları (galeri dışı) */
.post-content figure.wp-block-image > figcaption,
.post-content figure.wp-block-image > .wp-element-caption {
  position: static;
  display: block;
  margin: 8px 0 1.4em;
  padding: 0;
  background: none;
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.45;
  text-align: center;
}

/* Galeri içi altyazı: küçük karelerde alt şerit — tekil kuralın üstüne yazar */
.blog-gallery figure > figcaption,
.wp-block-gallery figure > figcaption,
.blog-gallery figure > .wp-element-caption,
.wp-block-gallery figure > .wp-element-caption {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  margin: 0 !important;
  padding: 7px 8px !important;
  background: rgba(0, 0, 0, .58) !important;
  color: #fff !important;
  font-size: .7rem !important;
  line-height: 1.3 !important;
  text-align: center !important;
  pointer-events: none;
  display: block !important;
  max-height: 45%;
  overflow: hidden;
}

/* Kapak: asla altyazı overlay'i olmasın */
.post-cover { position: relative; }
.post-cover figcaption { display: none !important; }

/* Dipnot / Atıflar */
sup.fn { font-size: .75em; line-height: 0; }
sup.fn a { color: var(--accent); text-decoration: none; font-weight: 700; padding: 0 .1em; }
sup.fn a:hover { text-decoration: underline; }
.footnotes {
  margin: 48px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.footnotes h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 16px;
}
.footnotes ol {
  margin: 0;
  padding-left: 1.4em;
  color: var(--ink-soft);
  font-size: .92rem;
  line-height: 1.65;
}
.footnotes li { margin-bottom: 8px; }
.footnotes a { color: var(--ink); word-break: break-word; }
.footnotes a:hover { color: var(--accent); }
.footnotes .fn-back {
  margin-left: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .85em;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(10, 10, 12, .92);
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox-inner {
  position: relative; max-width: min(1100px, 100%); max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox-inner img {
  max-width: 100%; max-height: calc(90vh - 48px);
  object-fit: contain; border-radius: 6px;
  opacity: 1 !important; filter: none !important; transform: none !important;
}
.lightbox-caption {
  margin-top: 12px; color: rgba(255,255,255,.85);
  font-size: .9rem; text-align: center; max-width: 40rem;
}
.lightbox-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.4rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.lightbox-btn:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
.lightbox-close {
  position: fixed; top: 18px; right: 22px;
  background: none; border: 0; color: #fff;
  font-size: 2rem; cursor: pointer; line-height: 1;
}
.post-content img { cursor: zoom-in; }
@media (max-width: 800px) {
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* Tek görselli aktarılmış "galeri"yi normal göster */
.wp-block-gallery.has-1 { grid-template-columns: 1fr; }
.wp-block-gallery.has-1 > figure { aspect-ratio: auto; }
.wp-block-gallery.has-1 img { aspect-ratio: auto; max-height: none; }

@media (max-width: 640px) {
  .blog-gallery, .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
}

.ql-editor .blog-gallery,
.ql-editor .wp-block-gallery { outline: 1px dashed var(--line); padding: 4px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; padding: 56px 24px 32px; }
.footer-about h3, .footer-subscribe h3 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 8px; }
.footer-about p, .footer-subscribe p { color: var(--ink-soft); margin: 0 0 14px; }
.social { display: flex; gap: 18px; }
.social a { font-size: .9rem; color: var(--ink-soft); }
.social a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; padding: 20px 24px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .85rem; }

/* ===== Misc ===== */
.flash-wrap { padding: 12px 0; }
.flash { padding: 12px 18px; border-radius: 10px; margin-bottom: 8px; font-size: .92rem; }
.flash-success { background: #e7f6ec; color: #1c7c43; }
.flash-error { background: #fdecec; color: #c0392b; }
.flash-warning { background: #fff6e5; color: #a56a00; }
.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 24px 0 64px; }
.pagination a { font-weight: 600; }
.pagination a:hover { color: var(--accent); }
.pagination-info { color: var(--ink-soft); font-size: .9rem; }
.btn { display: inline-block; background: var(--ink); color: #fff; padding: 12px 26px; border-radius: 999px; font-weight: 600; }
.error-page { text-align: center; padding: 100px 0; }
.error-page h1 { font-family: var(--serif); font-size: 5rem; margin: 0; color: var(--accent); }
.search-full { display: flex; gap: 10px; max-width: 520px; margin: 16px auto 0; }
.search-full input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; }
.search-full button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 600; cursor: pointer; }
.search-count { color: var(--ink-soft); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .hero-media { order: -1; }
  .grid, .grid--3 { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 16px 24px; border-bottom: 1px solid var(--line); }
  body.nav-open .main-nav { display: flex; }
  .nav-toggle { display: block; }
  .search-mini { display: none; }
  .grid, .grid--3 { grid-template-columns: 1fr; }
  .post-title { font-size: 2rem; }
  .hero-title { font-size: 2rem; }
  .comment-form .form-row { flex-direction: column; }
}
