/*
 Theme Name:   Maturidilik Child
 Theme URI:    https://www.maturidilik.org
 Description:  Tessera child tema — Maturidilik Araştırma Platformu
 Author:       Dr. Abdullah Demir
 Author URI:   https://www.maturidilik.org
 Template:     tessera
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 Text Domain:  maturidilik-child
*/

/* ===================================================
   BÖLÜM 1 — TASARIM TOKEN'LARI (CSS Custom Properties)
   =================================================== */

:root {
  /* Ana renkler */
  --mat-primary:        #1f788c;   /* Teal — mevcut marka rengi */
  --mat-primary-dark:   #124f5e;   /* Koyu teal — header, heading */
  --mat-primary-light:  #e8f4f7;   /* Açık teal — arka plan aksan */
  --mat-accent:         #c8902a;   /* Altın — akademik vurgu */
  --mat-accent-light:   #f5ead8;   /* Açık altın — vurgu arka planı */

  /* Metin renkleri */
  --mat-text:           #2c3e50;   /* Koyu lacivert — body text */
  --mat-text-light:     #5d6d7e;   /* Gri — meta, ikincil */
  --mat-text-muted:     #95a5a6;   /* Açık gri — placeholder */

  /* Yüzey renkleri */
  --mat-bg:             #ffffff;
  --mat-bg-soft:        #f8fbfc;   /* Çok açık teal — kart arka planı */
  --mat-bg-section:     #f0f7f9;   /* Bölüm ayırıcı */
  --mat-border:         #d5e8ed;   /* Çerçeve */

  /* Tipografi */
  --mat-font-heading:   'Lora', Georgia, serif;
  --mat-font-body:      'Source Serif 4', 'Georgia', serif;
  --mat-font-ui:        'Open Sans', sans-serif;
  --mat-font-arabic:    'Noto Naskh Arabic', 'Traditional Arabic', serif;

  /* Boyutlar */
  --mat-radius:         6px;
  --mat-radius-lg:      12px;
  --mat-shadow-sm:      0 1px 4px rgba(31,120,140,.10);
  --mat-shadow:         0 4px 16px rgba(31,120,140,.14);
  --mat-shadow-lg:      0 8px 32px rgba(31,120,140,.18);

  /* Geçişler */
  --mat-transition:     all .2s ease;
}

/* ===================================================
   BÖLÜM 2 — GOOGLE FONTS YÜKLEME
   =================================================== */
/* fonts.php üzerinden enqueue edilir — burada yalnızca fallback */

/* ===================================================
   BÖLÜM 3 — TEMEL TİPOGRAFİ
   =================================================== */

body {
  font-family: var(--mat-font-body);
  color: var(--mat-text);
  font-size: 17px;
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mat-font-heading);
  color: var(--mat-primary-dark);
  line-height: 1.3;
}

h1 { font-size: 2.2rem;  font-weight: 700; }
h2 { font-size: 1.7rem;  font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

/* Arapça metinler */
[lang="ar"],
.arabic-text,
.mat-arabic {
  font-family: var(--mat-font-arabic);
  direction: rtl;
  text-align: right;
  line-height: 2;
}

/* UI elementleri — Open Sans kalır */
.navbar-nav,
.btn,
.widget-title,
.meta-info,
input,
textarea,
select,
label,
.breadcrumb,
.pagination {
  font-family: var(--mat-font-ui);
}

/* Makale içi paragraflar */
.entry-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.4em;
  color: var(--mat-text);
}

/* ===================================================
   BÖLÜM 4 — HEADER & NAVİGASYON
   =================================================== */

#tessera-header-menu {
  background: var(--mat-primary-dark);
  border-bottom: 2px solid var(--mat-accent);
}

#tessera-header-menu .navbar-brand {
  font-family: var(--mat-font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .02em;
}

#tessera-header-menu .navbar-brand span {
  color: #ffffff;
}

/* Navbar link hover */
#tessera-header-menu .navbar-nav .nav-link:hover {
  color: var(--mat-accent) !important;
  opacity: 1;
}

/* Aktif menü öğesi */
#tessera-header-menu .navbar-nav .current-menu-item > .nav-link,
#tessera-header-menu .navbar-nav .current-menu-ancestor > .nav-link {
  color: var(--mat-accent) !important;
  border-bottom: 2px solid var(--mat-accent);
}

/* Dropdown menü */
#tessera-header-menu .dropdown-menu {
  background: var(--mat-primary-dark);
  border: 1px solid rgba(200,144,42,.3);
  border-top: 2px solid var(--mat-accent);
  border-radius: 0 0 var(--mat-radius) var(--mat-radius);
  box-shadow: var(--mat-shadow);
}

#tessera-header-menu .dropdown-menu .nav-link {
  font-size: .88rem;
  padding: .45rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ===================================================
   BÖLÜM 5 — BREADCRUMB
   =================================================== */

.mat-breadcrumb {
  background: var(--mat-bg-soft);
  border-bottom: 1px solid var(--mat-border);
  padding: .6rem 0;
  font-family: var(--mat-font-ui);
  font-size: .82rem;
  color: var(--mat-text-light);
}

.mat-breadcrumb .container {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.mat-breadcrumb a {
  color: var(--mat-primary);
  text-decoration: none;
}

.mat-breadcrumb a:hover {
  color: var(--mat-accent);
  text-decoration: underline;
}

.mat-breadcrumb .separator {
  color: var(--mat-text-muted);
}

.mat-breadcrumb .current {
  color: var(--mat-text);
  font-weight: 500;
}

/* ===================================================
   BÖLÜM 6 — MAKALE KARTI (arşiv, listeleme)
   =================================================== */

.tessera-post-card,
article.type-post {
  border: 1px solid var(--mat-border);
  border-radius: var(--mat-radius-lg);
  background: var(--mat-bg);
  transition: var(--mat-transition);
  overflow: hidden;
}

.tessera-post-card:hover,
article.type-post:hover {
  box-shadow: var(--mat-shadow);
  transform: translateY(-2px);
  border-color: var(--mat-primary);
}

/* Kategori rozeti */
.mat-cat-badge {
  display: inline-block;
  background: var(--mat-primary-light);
  color: var(--mat-primary-dark);
  font-family: var(--mat-font-ui);
  font-size: .73rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ===================================================
   BÖLÜM 7 — MAKALE DETAY SAYFASI (single.php)
   =================================================== */

/* Meta bilgi satırı */
.mat-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-family: var(--mat-font-ui);
  font-size: .85rem;
  color: var(--mat-text-light);
  margin: .8rem 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--mat-border);
}

.mat-article-meta .mat-read-time {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: var(--mat-primary);
  font-weight: 500;
}

/* Okuma progress bar */
.mat-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mat-primary), var(--mat-accent));
  width: 0%;
  z-index: 9999;
  transition: width .1s linear;
}

/* İçindekiler tablosu */
.mat-toc {
  background: var(--mat-bg-soft);
  border: 1px solid var(--mat-border);
  border-left: 4px solid var(--mat-primary);
  border-radius: var(--mat-radius);
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--mat-font-ui);
  font-size: .9rem;
}

.mat-toc h4 {
  font-family: var(--mat-font-ui);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mat-text-light);
  margin: 0 0 .8rem;
}

.mat-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.mat-toc li {
  margin: .3rem 0;
}

.mat-toc a {
  color: var(--mat-primary);
  text-decoration: none;
}

.mat-toc a:hover {
  color: var(--mat-accent);
}

/* Makale içi başlıklar — anchor ID */
.entry-content h2,
.entry-content h3 {
  scroll-margin-top: 80px; /* sticky header yüksekliği */
}

/* Kaynakça bölümü */
.mat-references {
  border-top: 2px solid var(--mat-border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: .92rem;
}

.mat-references h3 {
  font-size: 1rem;
  font-family: var(--mat-font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mat-text-light);
  margin-bottom: 1rem;
}

/* ===================================================
   BÖLÜM 8 — SIDEBAR
   =================================================== */

.widget {
  margin-bottom: 2rem;
  border: 1px solid var(--mat-border);
  border-radius: var(--mat-radius-lg);
  overflow: hidden;
}

.widget-title,
.widgettitle {
  background: var(--mat-primary-dark);
  color: #fff;
  font-family: var(--mat-font-ui);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .7rem 1.2rem;
  margin: 0;
}

.widget .widget-body,
.widget > ul,
.widget > div:not(.widget-title):not(.widgettitle) {
  padding: 1rem 1.2rem;
}

/* Sidebar kategori listesi */
.widget_categories ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.widget_categories ul li {
  padding: .35rem 0;
  border-bottom: 1px solid var(--mat-bg-soft);
  font-size: .9rem;
}

.widget_categories ul li a {
  color: var(--mat-text);
  text-decoration: none;
}

.widget_categories ul li a:hover {
  color: var(--mat-primary);
}

/* ===================================================
   BÖLÜM 9 — FOOTER
   =================================================== */

#tessera-footer {
  background: var(--mat-primary-dark);
  color: rgba(255,255,255,.85);
}

#tessera-footer h4,
#tessera-footer .widgettitle {
  background: transparent;
  color: var(--mat-accent);
  font-family: var(--mat-font-ui);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 0 0 .5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: .8rem;
}

#tessera-footer a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
}

#tessera-footer a:hover {
  color: var(--mat-accent);
}

#tessera-footer-bottom {
  background: rgba(0,0,0,.2);
  font-family: var(--mat-font-ui);
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}

/* ===================================================
   BÖLÜM 10 — GENEL UI ELEMENTLERİ
   =================================================== */

/* Butonlar */
.btn-primary,
.wpcf7-submit,
button[type="submit"] {
  background: var(--mat-primary);
  border-color: var(--mat-primary);
  font-family: var(--mat-font-ui);
  font-weight: 600;
  letter-spacing: .03em;
  border-radius: var(--mat-radius);
  transition: var(--mat-transition);
}

.btn-primary:hover,
.wpcf7-submit:hover {
  background: var(--mat-primary-dark);
  border-color: var(--mat-primary-dark);
}

/* Akademik vurgu butonu */
.btn-accent {
  background: var(--mat-accent);
  border-color: var(--mat-accent);
  color: #fff;
}

.btn-accent:hover {
  background: #a97425;
  border-color: #a97425;
  color: #fff;
}

/* Scroll-to-top */
#mat-scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--mat-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--mat-shadow);
  transition: var(--mat-transition);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#mat-scroll-top:hover {
  background: var(--mat-primary-dark);
  transform: translateY(-2px);
}

#mat-scroll-top.visible {
  display: flex;
}

/* ===================================================
   BÖLÜM 11 — YAZDIRMA STİLLERİ
   =================================================== */

@media print {
  #tessera-header-menu,
  .sidebar,
  #mat-scroll-top,
  .mat-reading-progress,
  .related-posts,
  #tessera-footer { display: none !important; }

  body {
    font-family: Georgia, serif;
    font-size: 11pt;
    color: #000;
  }

  .entry-content {
    max-width: 100% !important;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: .8em;
  }
}

/* ===================================================
   BÖLÜM 12 — ERİŞİLEBİLİRLİK
   =================================================== */

/* Odak göstergesi — klavye kullanıcıları */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--mat-accent);
  outline-offset: 2px;
}

/* Yüksek kontrast mod */
@media (prefers-contrast: high) {
  :root {
    --mat-primary: #005f73;
    --mat-text:    #000000;
  }
}

/* Hareketi azalt */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ===================================================
   FAZ 2 — MAKALe DETAY SAYFASI (single.php)
   =================================================== */

/* --- 2.1 Makale iskelet layout --- */
.single-post .content-area {
  max-width: 780px;     /* 65-70 karakter/satır okunabilirlik */
  margin: 0 auto;
}

.single-post .entry-header {
  margin-bottom: 1.8rem;
}

.single-post .entry-title {
  font-size: 2rem;
  line-height: 1.25;
  color: var(--mat-primary-dark);
  margin-bottom: .6rem;
}

/* --- 2.2 Öne çıkan görsel --- */
.single-post .post-thumbnail {
  margin: 0 0 2rem;
  border-radius: var(--mat-radius-lg);
  overflow: hidden;
}

.single-post .post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- 2.3 Makale gövde tipografi --- */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--mat-text);
}

.entry-content > * + * {
  margin-top: 1.2em;
}

.entry-content h2 {
  font-size: 1.55rem;
  margin: 2.4rem 0 .8rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--mat-border);
  color: var(--mat-primary-dark);
}

.entry-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 .6rem;
  color: var(--mat-primary);
}

.entry-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.6rem 0 .5rem;
  color: var(--mat-text);
  font-family: var(--mat-font-ui);
}

/* Bağlantılar */
.entry-content a {
  color: var(--mat-primary);
  text-decoration: underline;
  text-decoration-color: rgba(31,120,140,.35);
  text-underline-offset: 2px;
  transition: var(--mat-transition);
}

.entry-content a:hover {
  color: var(--mat-accent);
  text-decoration-color: var(--mat-accent);
}

/* --- 2.4 Alıntı blokları (blockquote) --- */
.entry-content blockquote,
.wp-block-quote {
  margin: 2rem 0;
  padding: 1.4rem 1.8rem 1.4rem 1.5rem;
  background: var(--mat-bg-soft);
  border-left: 4px solid var(--mat-primary);
  border-radius: 0 var(--mat-radius) var(--mat-radius) 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--mat-text);
  position: relative;
}

.entry-content blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 14px;
  font-size: 4rem;
  color: var(--mat-primary);
  opacity: .2;
  font-family: Georgia, serif;
  line-height: 1;
}

.entry-content blockquote p { margin: 0; }

.entry-content blockquote cite,
.wp-block-quote cite {
  display: block;
  margin-top: .8rem;
  font-style: normal;
  font-size: .85rem;
  color: var(--mat-text-light);
  font-family: var(--mat-font-ui);
}

/* Akademik alıntı (Arapça) */
.entry-content blockquote[lang="ar"],
.mat-quote-arabic {
  border-left: none;
  border-right: 4px solid var(--mat-accent);
  border-radius: var(--mat-radius) 0 0 var(--mat-radius);
  direction: rtl;
  text-align: right;
  font-family: var(--mat-font-arabic);
  font-size: 1.15rem;
  line-height: 2.2;
  font-style: normal;
}

/* --- 2.5 Dipnotlar --- */
.entry-content sup a,
.entry-content .footnote-ref {
  font-size: .7em;
  font-family: var(--mat-font-ui);
  color: var(--mat-primary);
  text-decoration: none;
  background: var(--mat-primary-light);
  padding: 0 3px;
  border-radius: 3px;
  transition: var(--mat-transition);
}

.entry-content sup a:hover {
  background: var(--mat-primary);
  color: #fff;
}

.entry-content .footnotes,
.entry-content ol.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mat-border);
  font-size: .88rem;
  color: var(--mat-text-light);
}

.entry-content .footnotes li {
  margin-bottom: .6rem;
  line-height: 1.6;
}

/* --- 2.6 Listeler --- */
.entry-content ul,
.entry-content ol {
  padding-left: 1.8rem;
  margin: 1.2rem 0;
}

.entry-content li {
  margin-bottom: .5rem;
  line-height: 1.75;
}

.entry-content ul > li::marker {
  color: var(--mat-primary);
}

.entry-content ol > li::marker {
  color: var(--mat-primary);
  font-weight: 700;
}

/* --- 2.7 Tablo --- */
.entry-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: .92rem;
  font-family: var(--mat-font-ui);
}

.entry-content th {
  background: var(--mat-primary-dark);
  color: #fff;
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .03em;
}

.entry-content td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--mat-border);
  vertical-align: top;
}

.entry-content tr:nth-child(even) td {
  background: var(--mat-bg-soft);
}

.entry-content tr:hover td {
  background: var(--mat-primary-light);
}

/* --- 2.8 Görsel caption --- */
.entry-content figure {
  margin: 2rem 0;
  text-align: center;
}

.entry-content figure img {
  border-radius: var(--mat-radius);
  max-width: 100%;
  height: auto;
}

.entry-content figcaption,
.wp-block-image figcaption {
  margin-top: .6rem;
  font-size: .82rem;
  color: var(--mat-text-muted);
  font-family: var(--mat-font-ui);
  font-style: italic;
}

/* --- 2.9 Makale meta redesign --- */
.mat-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  align-items: center;
  font-size: .84rem;
  font-family: var(--mat-font-ui);
  color: var(--mat-text-light);
  background: var(--mat-bg-soft);
  border: 1px solid var(--mat-border);
  border-radius: var(--mat-radius-lg);
  padding: .8rem 1.2rem;
  margin-bottom: 2rem;
}

.mat-article-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.mat-article-meta .mat-read-time {
  color: var(--mat-primary);
  font-weight: 600;
}

.mat-article-meta .mat-meta-cats a {
  color: var(--mat-primary);
  text-decoration: none;
  font-weight: 500;
}

.mat-article-meta .mat-meta-cats a:hover {
  color: var(--mat-accent);
}

/* --- 2.10 TOC redesign --- */
.mat-toc {
  background: var(--mat-bg-soft);
  border: 1px solid var(--mat-border);
  border-left: 4px solid var(--mat-primary);
  border-radius: 0 var(--mat-radius-lg) var(--mat-radius-lg) 0;
  padding: 1.2rem 1.6rem;
  margin: 2rem 0 2.5rem;
}

.mat-toc h4 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--mat-primary);
  margin: 0 0 .9rem;
  font-family: var(--mat-font-ui);
}

.mat-toc ol {
  margin: 0;
  padding-left: 1.4rem;
  counter-reset: none;
}

.mat-toc li {
  margin: .35rem 0;
  font-size: .9rem;
  line-height: 1.5;
}

.mat-toc a {
  color: var(--mat-text);
  text-decoration: none;
  transition: var(--mat-transition);
}

.mat-toc a:hover {
  color: var(--mat-primary);
  padding-left: 3px;
}

.mat-toc .mat-toc-sub {
  margin-left: 1rem;
  font-size: .85rem;
}

.mat-toc .mat-toc-sub a {
  color: var(--mat-text-light);
}

/* --- 2.11 İlgili makaleler redesign --- */
.mat-related-posts {
  margin: 3.5rem 0 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--mat-border);
}

.mat-related-posts h3 {
  font-size: .78rem;
  font-family: var(--mat-font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--mat-text-light);
  margin-bottom: 1.4rem;
}

.mat-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mat-related-card {
  border: 1px solid var(--mat-border);
  border-radius: var(--mat-radius-lg);
  overflow: hidden;
  text-decoration: none !important;
  transition: var(--mat-transition);
  background: var(--mat-bg);
  display: flex;
  flex-direction: column;
}

.mat-related-card:hover {
  box-shadow: var(--mat-shadow);
  border-color: var(--mat-primary);
  transform: translateY(-3px);
}

.mat-related-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.mat-related-placeholder {
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, var(--mat-primary-light), var(--mat-bg-section));
}

.mat-related-card span {
  padding: .75rem 1rem .9rem;
  font-family: var(--mat-font-heading);
  font-size: .88rem;
  color: var(--mat-text);
  line-height: 1.45;
  flex: 1;
}

/* --- 2.12 Scroll-to-top --- */
#mat-scroll-top {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 44px;
  height: 44px;
  background: var(--mat-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--mat-shadow);
  transition: var(--mat-transition);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 998;
  line-height: 1;
}

#mat-scroll-top:hover {
  background: var(--mat-primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--mat-shadow-lg);
}

#mat-scroll-top.visible { display: flex; }

/* --- 2.13 Okuma progress bar --- */
.mat-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mat-primary) 0%, var(--mat-accent) 100%);
  width: 0%;
  z-index: 9999;
  transition: width .15s linear;
  pointer-events: none;
}

/* ===================================================
   FAZ 3 — ALİM PROFİL SAYFASI
   =================================================== */

/* --- 3.1 Profil hero --- */
.mat-alim-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--mat-border);
}

.mat-alim-portrait {
  width: 180px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--mat-radius-lg);
  box-shadow: var(--mat-shadow);
  border: 3px solid var(--mat-border);
}

.mat-alim-portrait-placeholder {
  width: 180px;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--mat-primary-light) 0%, var(--mat-bg-section) 100%);
  border-radius: var(--mat-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border: 3px solid var(--mat-border);
}

.mat-alim-info h1 {
  font-size: 2rem;
  color: var(--mat-primary-dark);
  margin-bottom: .3rem;
}

.mat-alim-name-ar {
  font-family: var(--mat-font-arabic);
  font-size: 1.5rem;
  color: var(--mat-text-light);
  direction: rtl;
  display: block;
  margin-bottom: 1rem;
}

.mat-alim-dates {
  font-family: var(--mat-font-ui);
  font-size: .9rem;
  color: var(--mat-text-light);
  margin-bottom: 1.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.mat-alim-dates span {
  background: var(--mat-bg-soft);
  border: 1px solid var(--mat-border);
  padding: .25rem .7rem;
  border-radius: 20px;
  font-size: .82rem;
}

/* --- 3.2 Alim metadata grid --- */
.mat-alim-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  margin-top: 1rem;
}

.mat-alim-meta-item {
  display: flex;
  gap: .5rem;
  font-size: .85rem;
  font-family: var(--mat-font-ui);
}

.mat-alim-meta-label {
  color: var(--mat-text-muted);
  min-width: 80px;
  font-weight: 600;
}

.mat-alim-meta-value a {
  color: var(--mat-primary);
  text-decoration: none;
}

/* --- 3.3 Dış kaynak rozetleri (VIAF, ISNI, Wikidata) --- */
.mat-authority-links {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.mat-authority-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .8rem;
  border-radius: 20px;
  font-family: var(--mat-font-ui);
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: var(--mat-transition);
}

.mat-badge-viaf {
  background: #e8f0fe;
  color: #1a56db;
  border: 1px solid #c7d9fc;
}

.mat-badge-isni {
  background: #fef3e2;
  color: #b45309;
  border: 1px solid #fcd9a0;
}

.mat-badge-wikidata {
  background: #f0faf0;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.mat-badge-davet {
  background: var(--mat-primary-light);
  color: var(--mat-primary-dark);
  border: 1px solid var(--mat-border);
}

.mat-authority-badge:hover {
  filter: brightness(.93);
  transform: translateY(-1px);
}

/* --- 3.4 Profil sekmeleri (tabs) --- */
.mat-profile-tabs {
  border-bottom: 2px solid var(--mat-border);
  display: flex;
  gap: 0;
  margin: 2.5rem 0 0;
  overflow-x: auto;
}

.mat-profile-tab {
  padding: .75rem 1.3rem;
  font-family: var(--mat-font-ui);
  font-size: .88rem;
  font-weight: 600;
  color: var(--mat-text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: var(--mat-transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.mat-profile-tab:hover {
  color: var(--mat-primary);
}

.mat-profile-tab.active {
  color: var(--mat-primary);
  border-bottom-color: var(--mat-primary);
}

.mat-tab-panel {
  padding: 2rem 0;
  display: none;
}

.mat-tab-panel.active { display: block; }

/* ===================================================
   FAZ 4 — KATEGORİ ARŞİV SAYFASI
   =================================================== */

/* --- 4.1 Kategori hero --- */
.mat-archive-hero {
  background: linear-gradient(135deg, var(--mat-primary-dark) 0%, var(--mat-primary) 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2.5rem;
}

.mat-archive-hero h1 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: .5rem;
}

.mat-archive-hero .mat-archive-desc {
  font-size: 1rem;
  opacity: .85;
  max-width: 600px;
  font-family: var(--mat-font-body);
}

.mat-archive-hero .mat-archive-count {
  display: inline-block;
  background: rgba(255,255,255,.15);
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-family: var(--mat-font-ui);
  margin-top: .6rem;
}

/* --- 4.2 Alt kategoriler şeridi --- */
.mat-subcats {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: .8rem 0 0;
}

.mat-subcat-link {
  padding: .3rem .9rem;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  font-size: .8rem;
  font-family: var(--mat-font-ui);
  color: rgba(255,255,255,.9);
  text-decoration: none;
  transition: var(--mat-transition);
}

.mat-subcat-link:hover {
  background: rgba(255,255,255,.3);
  color: #fff;
}

/* --- 4.3 Makale kart listesi --- */
.mat-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.mat-post-card {
  background: var(--mat-bg);
  border: 1px solid var(--mat-border);
  border-radius: var(--mat-radius-lg);
  overflow: hidden;
  transition: var(--mat-transition);
  display: flex;
  flex-direction: column;
}

.mat-post-card:hover {
  box-shadow: var(--mat-shadow);
  transform: translateY(-4px);
  border-color: var(--mat-primary);
}

.mat-post-card-img {
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mat-primary-light), var(--mat-bg-section));
  display: flex;
  align-items: center;
  justify-content: center;
}

.mat-post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.mat-post-card:hover .mat-post-card-img img {
  transform: scale(1.04);
}

.mat-post-card-body {
  padding: 1.1rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mat-post-card-cat {
  display: inline-block;
  font-family: var(--mat-font-ui);
  font-size: .71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--mat-primary);
  margin-bottom: .6rem;
}

.mat-post-card-title {
  font-family: var(--mat-font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--mat-text);
  line-height: 1.45;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: .8rem;
}

.mat-post-card-title:hover { color: var(--mat-primary); }

.mat-post-card-meta {
  font-family: var(--mat-font-ui);
  font-size: .78rem;
  color: var(--mat-text-muted);
  display: flex;
  gap: .8rem;
  margin-top: auto;
  border-top: 1px solid var(--mat-bg-section);
  padding-top: .8rem;
}

/* --- 4.4 Kronolojik alimler listesi --- */
.mat-alim-timeline {
  position: relative;
  padding-left: 2rem;
}

.mat-alim-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--mat-primary), var(--mat-accent));
}

.mat-alim-timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.mat-alim-timeline-item::before {
  content: '';
  position: absolute;
  left: -1.56rem;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--mat-accent);
  border-radius: 50%;
  border: 2px solid var(--mat-bg);
  box-shadow: 0 0 0 2px var(--mat-accent);
}

.mat-alim-timeline-period {
  font-family: var(--mat-font-ui);
  font-size: .78rem;
  color: var(--mat-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .3rem;
}

.mat-alim-timeline-name {
  font-family: var(--mat-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mat-primary-dark);
  text-decoration: none;
}

.mat-alim-timeline-name:hover { color: var(--mat-primary); }

.mat-alim-timeline-desc {
  font-size: .88rem;
  color: var(--mat-text-light);
  margin-top: .2rem;
  line-height: 1.6;
}

/* ===================================================
   FAZ 5 — ANASAYFA
   =================================================== */

/* --- 5.1 Hero section --- */
.mat-home-hero {
  background: linear-gradient(150deg, var(--mat-primary-dark) 0%, #0d4a5a 50%, var(--mat-primary) 100%);
  padding: 5rem 0 4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.mat-home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M0 0h80v80H0z' fill='none'/%3E%3Ccircle cx='40' cy='40' r='35' stroke='rgba(255,255,255,.03)' stroke-width='1' fill='none'/%3E%3C/svg%3E") repeat;
  background-size: 80px;
  pointer-events: none;
}

.mat-home-hero h1 {
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 700;
}

.mat-home-hero h1 em {
  color: var(--mat-accent);
  font-style: normal;
}

.mat-home-hero .mat-hero-subtitle {
  font-size: 1.15rem;
  opacity: .88;
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* --- 5.2 İstatistik sayaçları --- */
.mat-stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--mat-border);
  padding: 1.2rem 0;
}

.mat-stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.mat-stat-item {
  text-align: center;
  min-width: 100px;
}

.mat-stat-number {
  display: block;
  font-family: var(--mat-font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--mat-primary);
  line-height: 1.1;
}

.mat-stat-label {
  font-family: var(--mat-font-ui);
  font-size: .75rem;
  color: var(--mat-text-light);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .2rem;
  display: block;
}

/* --- 5.3 Bölüm başlıkları --- */
.mat-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.mat-section-eyebrow {
  font-family: var(--mat-font-ui);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--mat-primary);
  margin-bottom: .4rem;
  display: block;
}

.mat-section-title {
  font-family: var(--mat-font-heading);
  font-size: 1.9rem;
  color: var(--mat-primary-dark);
  margin: 0;
}

.mat-section-title + p {
  color: var(--mat-text-light);
  font-size: .95rem;
  margin-top: .6rem;
}

/* --- 5.4 Öne çıkan makale kartı --- */
.mat-featured-post {
  background: var(--mat-bg);
  border: 1px solid var(--mat-border);
  border-radius: var(--mat-radius-lg);
  overflow: hidden;
  box-shadow: var(--mat-shadow-sm);
  transition: var(--mat-transition);
}

.mat-featured-post:hover {
  box-shadow: var(--mat-shadow);
  transform: translateY(-4px);
}

.mat-featured-post-img {
  height: 220px;
  overflow: hidden;
}

.mat-featured-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.mat-featured-post:hover .mat-featured-post-img img {
  transform: scale(1.04);
}

.mat-featured-post-body {
  padding: 1.5rem;
}

.mat-featured-post-body h3 {
  font-size: 1.15rem;
  margin-bottom: .6rem;
}

.mat-featured-post-body h3 a {
  color: var(--mat-text);
  text-decoration: none;
}

.mat-featured-post-body h3 a:hover {
  color: var(--mat-primary);
}

/* ===================================================
   FAZ 6 — MOBİL & RESPONSIVE
   =================================================== */

@media (max-width: 992px) {
  .mat-post-grid { grid-template-columns: repeat(2, 1fr); }
  .mat-related-grid { grid-template-columns: repeat(2, 1fr); }
  .mat-alim-hero { grid-template-columns: 140px 1fr; gap: 1.5rem; }
  .mat-alim-portrait { width: 140px; }
}

@media (max-width: 768px) {
  .single-post .entry-title { font-size: 1.6rem; }
  .mat-post-grid { grid-template-columns: 1fr; }
  .mat-related-grid { grid-template-columns: 1fr; }
  .mat-alim-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mat-alim-portrait,
  .mat-alim-portrait-placeholder {
    width: 120px;
    margin: 0 auto;
  }
  .mat-alim-meta-grid { grid-template-columns: 1fr; }
  .mat-authority-links { justify-content: center; }
  .mat-profile-tabs { font-size: .82rem; }
  .mat-home-hero h1 { font-size: 2rem; }
  .mat-home-hero { padding: 3rem 0 2.5rem; }
  .mat-stats-row { gap: 1.5rem; }
  .mat-archive-hero h1 { font-size: 1.7rem; }
  .mat-article-meta { font-size: .8rem; gap: .4rem .9rem; }
  #mat-scroll-top { bottom: 1rem; right: 1rem; width: 38px; height: 38px; }
}

@media (max-width: 480px) {
  .entry-content { font-size: 1rem; }
  .mat-post-card-img { height: 130px; }
  .mat-toc { padding: 1rem; }
  .mat-related-grid { grid-template-columns: 1fr; }
}

/* ===================================================
   GENEL İYİLEŞTİRMELER
   =================================================== */

/* Tessera varsayılan padding override */
#tessera-content-wrapper {
  padding-top: 0;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Seçim rengi */
::selection {
  background: var(--mat-primary-light);
  color: var(--mat-primary-dark);
}

/* Görsel lazy load geçişi */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity .4s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"][src] {
  opacity: 1;
}

/* Tessera navbar z-index — breadcrumb üstünde kalır */
#tessera-header-menu { z-index: 100; }
.mat-breadcrumb       { z-index: 99; }
.mat-reading-progress { z-index: 9999; }
#mat-scroll-top       { z-index: 998; }

/* ===================================================
   DESIGN SYSTEM — RENK UYUM OVERRİDE'LARI
   Kaynak: Tüm #009ffd, #2e5d9f, rgba(4,53,101) →
   --mat-primary (#1f788c) ve --mat-primary-dark (#124f5e)
   =================================================== */

/* ── 1. TESSERA HOMEPAGE SECTION ── */
#tessera-homepage,
#tessera-homepage-bg,
[id*="tessera-homepage"],
.tessera-homepage-section {
  background-color: var(--mat-primary-dark) !important;
  background-image: linear-gradient(
    150deg,
    var(--mat-primary-dark) 0%,
    var(--mat-primary) 60%,
    #2a9aad 100%
  ) !important;
}

/* ── 2. ELEMENTOR — Mavi/Lacivert bölümleri teal'e çek ── */
/* Hero / ilk full-width section */
.elementor-section.elementor-top-section:first-of-type,
.e-con.e-parent:first-of-type {
  background-color: var(--mat-primary-dark) !important;
}

/* Elementor'un #009ffd parlak mavi rengi */
[style*="#009ffd"],
[style*="009ffd"] {
  background-color: var(--mat-primary) !important;
  color: #fff !important;
}

/* Elementor'un rgba(4,53,101) lacivert rengi */
[style*="rgba(4,53,101"],
[style*="rgba(4, 53, 101"] {
  background-color: var(--mat-primary-dark) !important;
}

/* Elementor #2e5d9f orta mavi */
[style*="#2e5d9f"],
[style*="2e5d9f"] {
  background-color: var(--mat-primary) !important;
}

/* ── 3. ELEMENTOR GLOBAL KIT — Sistem renkleri ── */
:root {
  /* Elementor'un kendi değişkenlerini override et */
  --e-global-color-primary:    #1f788c !important;
  --e-global-color-secondary:  #124f5e !important;
  --e-global-color-text:       #2c3e50 !important;
  --e-global-color-accent:     #c8902a !important;
  /* Elementor varsayılan "Accent" mavi rengi teal'e */
  --e-global-color-4f206b6:    #1f788c !important;
  --e-global-color-3e89fd5:    #124f5e !important;
}

/* ── 4. TESSERA LOGIN BUTONU ── */
#tessera-top-bar-btn,
a#tessera-top-bar-btn,
.tessera-login-btn {
  background: transparent !important;
  border: 2px solid rgba(255,255,255,.55) !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: .3rem 1rem !important;
  font-family: var(--mat-font-ui) !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
  transition: var(--mat-transition) !important;
}

#tessera-top-bar-btn:hover {
  background: rgba(255,255,255,.15) !important;
  border-color: rgba(255,255,255,.8) !important;
}

/* ── 5. HEADER TUTARLILIK ── */
#tessera-header-menu {
  background: var(--mat-primary-dark) !important;
  border-bottom: 2px solid var(--mat-accent) !important;
}

/* Aktif menü öğesi vurgu */
#tessera-header-menu .current-menu-item > .nav-link,
#tessera-header-menu .current_page_item > .nav-link {
  color: var(--mat-accent) !important;
  border-bottom: 2px solid var(--mat-accent) !important;
}

/* Dropdown arka planı */
#tessera-header-menu .dropdown-menu {
  background: var(--mat-primary-dark) !important;
  border-top: 2px solid var(--mat-accent) !important;
}

/* ── 6. TESSERA BAR (üst çubuk varsa) ── */
#tessera-bar-wrapper,
#tessera-bar {
  background: var(--mat-primary-dark) !important;
}

/* ── 7. CAROUSEL / SLIDER BÖLÜMLERİ ── */
.slick-slide,
.tessera-carousel-item {
  /* Slayt arka planları beyaz kalır */
}

.slick-dots li button:before,
.slick-arrow {
  color: var(--mat-primary) !important;
}

/* ── 8. SAYFA İÇİ BÖLÜM AYIRICI ── */
.elementor-shape-bottom .elementor-shape-fill,
.elementor-shape-top .elementor-shape-fill {
  fill: var(--mat-primary) !important;
}

/* ── 9. BUTTON OVERRİDE ── */
.elementor-button.elementor-button-link,
.elementor-widget-button .elementor-button {
  background: var(--mat-primary) !important;
  border-color: var(--mat-primary) !important;
  color: #fff !important;
  font-family: var(--mat-font-ui) !important;
  font-weight: 600 !important;
  border-radius: var(--mat-radius) !important;
  transition: var(--mat-transition) !important;
}

.elementor-button.elementor-button-link:hover,
.elementor-widget-button .elementor-button:hover {
  background: var(--mat-primary-dark) !important;
  border-color: var(--mat-primary-dark) !important;
}

/* Accent (altın) buton varyantı */
.elementor-button.mat-btn-accent {
  background: var(--mat-accent) !important;
  border-color: var(--mat-accent) !important;
}

/* ── 10. ELEMENTOR HEADING RENKLERİ ── */
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3 {
  font-family: var(--mat-font-heading) !important;
}

/* Koyu arka plan üzerindeki başlıklar beyaz kalır */
.elementor-section[style*="background-color:#1f788c"] .elementor-widget-heading h1,
.elementor-section[style*="background-color:#124f5e"] .elementor-widget-heading h1 {
  color: #ffffff !important;
}

/* ── 11. FOOTER RENK UYUMU ── */
#tessera-footer,
footer#tessera-footer {
  background: var(--mat-primary-dark) !important;
}

#tessera-footer .widget-title,
#tessera-footer .widgettitle {
  color: var(--mat-accent) !important;
  border-bottom: 1px solid rgba(255,255,255,.15) !important;
}

#tessera-footer-bottom {
  background: rgba(0,0,0,.25) !important;
}

/* ── 12. SEARCH BOX UYUMU ── */
#tessera-search input[type="search"],
.tessera-search-input,
input.search-field {
  border: 2px solid rgba(255,255,255,.3) !important;
  border-radius: 30px !important;
  background: rgba(255,255,255,.95) !important;
  padding: .6rem 1.2rem !important;
  font-family: var(--mat-font-ui) !important;
}

/* ── 13. PAGINATION ── */
.pagination .page-numbers,
.nav-links a {
  color: var(--mat-primary) !important;
  font-family: var(--mat-font-ui) !important;
}

.pagination .current,
.page-numbers.current {
  background: var(--mat-primary) !important;
  color: #fff !important;
  border-radius: 4px !important;
}

/* ── 14. RENK PALETI ÖZET (CSS Docs için) ──
   Primary:      #1f788c — ana teal
   Primary Dark: #124f5e — header/footer/vurgu
   Primary Light:#e8f4f7 — açık arka plan
   Accent:       #c8902a — altın/vurgu
   Text:         #2c3e50 — koyu lacivert
   ───────────────────────────────────────── */

/* ===================================================
   DİL SEÇİCİ & ÇOK DİL STİLLERİ
   =================================================== */

/* ── Dil seçici widget ── */
.mat-lang-switcher {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-left: 1rem;
  position: relative;
}

.mat-lang-current {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: rgba(255,255,255,.85);
  font-family: var(--mat-font-ui);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  padding: .3rem .6rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 5px;
  transition: var(--mat-transition);
  background: transparent;
  user-select: none;
}

.mat-lang-current:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.mat-lang-current .mat-lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.mat-lang-current .mat-lang-arrow {
  font-size: .6rem;
  opacity: .7;
  transition: transform .2s;
}

.mat-lang-switcher.open .mat-lang-arrow {
  transform: rotate(180deg);
}

/* Dropdown listesi */
.mat-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--mat-primary-dark);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--mat-radius);
  box-shadow: var(--mat-shadow-lg);
  min-width: 190px;
  z-index: 1000;
  overflow: hidden;
}

.mat-lang-switcher.open .mat-lang-dropdown {
  display: block;
}

.mat-lang-dropdown a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .9rem;
  color: rgba(255,255,255,.8) !important;
  font-family: var(--mat-font-ui);
  font-size: .82rem;
  text-decoration: none !important;
  transition: var(--mat-transition);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.mat-lang-dropdown a:last-child {
  border-bottom: none;
}

.mat-lang-dropdown a:hover {
  background: rgba(255,255,255,.1);
  color: #fff !important;
}

.mat-lang-dropdown a.pll-parent-menu-item,
.mat-lang-dropdown a[class*="lang-item-tr"],
.mat-lang-dropdown a.current-lang {
  background: rgba(200,144,42,.15);
  color: var(--mat-accent) !important;
  font-weight: 600;
}

.mat-lang-flag-img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
}

/* Polylang widget override */
.widget.polylang,
.pll-parent-menu-item {
  display: none !important; /* Varsayılan menü widget'ını gizle */
}

/* ── Arapça RTL genel stiller ── */
[lang="ar"] body,
body.lang-ar {
  direction: rtl;
  text-align: right;
}

body.lang-ar .entry-content {
  direction: rtl;
  text-align: right;
}

body.lang-ar .mat-article-meta {
  direction: rtl;
}

body.lang-ar .mat-breadcrumb .container {
  flex-direction: row-reverse;
}

body.lang-ar blockquote {
  border-left: none;
  border-right: 4px solid var(--mat-primary);
  padding: 1.4rem 1.5rem 1.4rem 1.8rem;
}

body.lang-ar .mat-toc {
  border-left: none;
  border-right: 4px solid var(--mat-primary);
  border-radius: var(--mat-radius-lg) 0 0 var(--mat-radius-lg);
}

/* ── Arapça font zorunlu ── */
body.lang-ar,
body.lang-ar .entry-content,
body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3 {
  font-family: var(--mat-font-arabic), var(--mat-font-body);
}

/* ===================================================
   MEGA MENU — 79 öğeli menü için dropdown iyileştirme
   =================================================== */

/* Dropdown genişliği ve konumu */
#tessera-header-menu .navbar-nav .dropdown-menu {
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  padding: .4rem 0;
}

/* Üçüncü seviye (nested dropdown) */
#tessera-header-menu .dropdown-menu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  border-top: 2px solid var(--mat-accent);
}

/* Menü öğesi hover göstergesi */
#tessera-header-menu .dropdown-menu .nav-link {
  position: relative;
  transition: background .18s, padding-left .18s;
}

#tessera-header-menu .dropdown-menu .nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--mat-accent);
  transition: width .18s;
}

#tessera-header-menu .dropdown-menu .nav-link:hover {
  background: rgba(200,144,42,.08) !important;
  padding-left: 1.6rem;
}

#tessera-header-menu .dropdown-menu .nav-link:hover::before {
  width: 3px;
}

/* Alimler dropdown → kronolojik liste görünümü */
#tessera-header-menu li.menu-item.alimler-dropdown > .dropdown-menu,
#tessera-header-menu li[id*="1009"] > .dropdown-menu {
  columns: 2;
  column-gap: 0;
  min-width: 380px;
}

/* Kelâmî Görüşler dropdown → 2 sütun */
#tessera-header-menu li[id*="1010"] > .dropdown-menu {
  columns: 2;
  column-gap: 0;
  min-width: 340px;
}

/* Mobil menü düzeltme */
@media (max-width: 991px) {
  #tessera-main-menu {
    max-height: 80vh;
    overflow-y: auto;
  }
  #tessera-header-menu .dropdown-menu {
    columns: 1 !important;
    min-width: 100% !important;
    border-left: 3px solid var(--mat-accent);
    margin-left: 1rem;
    border-top: none;
  }
}

/* Scrollbar minimal stil */
#tessera-header-menu .dropdown-menu::-webkit-scrollbar {
  width: 4px;
}
#tessera-header-menu .dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(200,144,42,.4);
  border-radius: 2px;
}

/* ===================================================
   TASARIM PROTOTİP — Akademik font + token iyileştirme
   =================================================== */

/* Cormorant Garamond başlıklar için */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.mat-article-meta,
.mat-related-posts h3 {
  font-family: 'Cormorant Garamond', var(--mat-font-heading);
}

/* Akademik alıntı — gold sol çizgi */
.entry-content blockquote {
  border-left: 4px solid var(--mat-accent);
  background: var(--mat-accent-light);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--mat-radius) var(--mat-radius) 0;
  font-style: italic;
}

/* Makale başlık altı dekoratif çizgi */
.entry-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--mat-accent);
  margin-top: .6rem;
}

/* Kategori arşiv başlıkları */
.mat-archive-hero h1,
.archive .page-header h1 {
  font-family: 'Cormorant Garamond', var(--mat-font-heading);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

/* Alim profil başlığı */
.mat-alim-info h1 {
  font-family: 'Cormorant Garamond', var(--mat-font-heading);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

/* Tessera ana sayfa başlığı */
#tessera-page-title h1 {
  font-family: 'Cormorant Garamond', var(--mat-font-heading);
  letter-spacing: -.01em;
}

/* Arapça metinler için Amiri */
.entry-content [lang="ar"],
.entry-content .arabic,
.sch-name-ar,
.pq-ar,
.hero-bismillah {
  font-family: 'Amiri', var(--mat-font-arabic);
}

/* Kart hover altın vurgu */
.mat-post-card:hover,
.art-card:hover,
.mat-related-card:hover {
  border-color: var(--mat-accent) !important;
}

/* Footer marka adı */
#tessera-footer .footer-brand-name,
.footer-brand-name {
  font-family: 'Cormorant Garamond', var(--mat-font-heading);
  letter-spacing: .14em;
  text-transform: uppercase;
}
