/* =========================================================
   Nanodent Centre Turkey — Tedavi sayfaları ek stilleri
   style.css SONRASINDA yüklenir; yalnızca treatments sayfaları.
   Palet kilitli: mevcut token'lar (--gold, --black, --white, --green).
   ========================================================= */

/* ---------- Tedavi detay makalesi ---------- */
.treatment-sec { background: var(--white); padding: 10px 0 64px; }

.treatment-article {
  max-width: 860px;
  margin: 26px auto 0;
  font-size: 17px;
  color: var(--gray);
  text-align: left;
}

.treatment-article .treatment-hero-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 30px;
}

.treatment-article h2 {
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
  margin: 42px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
}

.treatment-article h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--dark);
  margin: 30px 0 10px;
}

.treatment-article h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin: 24px 0 8px;
}

.treatment-article p { margin: 0 0 16px; line-height: 1.75; }

.treatment-article strong { color: var(--dark-2); }

.treatment-article a {
  color: var(--gold-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.treatment-article a:hover { color: var(--gold); }

/* style.css genel ul reset'ini makale içinde geri aç */
.treatment-article ul,
.treatment-article ol {
  margin: 0 0 18px;
  padding-left: 26px;
}
.treatment-article ul { list-style: disc; }
.treatment-article ol { list-style: decimal; }
.treatment-article li { margin-bottom: 9px; line-height: 1.7; }
.treatment-article li::marker { color: var(--gold); font-weight: 700; }

.treatment-article img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px auto;
}

.treatment-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 15px;
}
.treatment-article th,
.treatment-article td {
  border: 1px solid var(--input-border);
  padding: 10px 12px;
  text-align: left;
}
.treatment-article th { background: var(--off-white); color: var(--dark); }

/* ---------- Tedavi listesi (treatments.html) kartları ---------- */
.treatments-list-sec { background: var(--white); padding: 10px 0 70px; }

.tlist-intro {
  max-width: 760px;
  margin: 28px auto 0;
  text-align: center;
  color: var(--gray);
  font-size: 17px;
  line-height: 1.7;
}

.treatments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 40px;
}

.tcard {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tcard:hover { transform: translateY(-4px); }

.tcard img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.tcard-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 22px 24px 26px;
  text-align: left;
}

.tcard-body h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.25;
}

.tcard-body p {
  margin: 0;
  flex: 1;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.65;
}

.tcard-body .btn { align-self: flex-start; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .treatments-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .treatments-grid { grid-template-columns: 1fr; gap: 18px; }
  /* Tek sütunda 16/7 çok yayvandı → diş fotoğrafları kırpılıp kötü duruyordu.
     Daha doğal 3/2 oran + üst hizalı odak (dişler genelde üstte) fotoğrafı düzeltir. */
  .tcard img { aspect-ratio: 3 / 2; max-height: 260px; object-position: center 35%; }
  .tcard-body { padding: 16px 18px 20px; gap: 9px; }
  .tcard-body h2 { font-size: 19px; }
  .tcard-body p { font-size: 14.5px; line-height: 1.6; }
  .treatment-article { font-size: 16px; }
}

/* =========================================================
   DENTAL IMPLANTS — yeniden tasarım (.ti-)
   Yalnızca treatments/dental-implants.html kullanır.
   ========================================================= */

/* --- Tanıtım açılışı --- */
.ti-intro { background: var(--white); padding: 58px 0 48px; }
.ti-intro-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.ti-lead {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.28;
  letter-spacing: -.4px;
  margin: 16px 0 16px;
  text-wrap: balance;
}
.ti-lead em { color: var(--gold-dark); font-style: normal; }
.ti-sub {
  color: var(--gray);
  font-size: 16.5px;
  line-height: 1.75;
  margin: 0 0 26px;
  max-width: 56ch;
}
.ti-intro-media { margin: 0; position: relative; }
.ti-intro-media img { border-radius: 14px; box-shadow: var(--shadow); }
.ti-intro-media::after {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 2px solid rgba(214, 161, 46, .38);
  border-radius: 14px;
  z-index: -1;
}

/* --- Bir bakışta şeridi (siyah + altın) --- */
.ti-facts {
  background: var(--black);
  padding: 36px 0;
  border-top: 1px solid rgba(214, 161, 46, .28);
  border-bottom: 1px solid rgba(214, 161, 46, .28);
}
.ti-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.ti-facts-grid li { border-left: 2px solid var(--gold); padding-left: 16px; }
.ti-facts-grid .k {
  display: block;
  color: var(--gold);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .2px;
}
.ti-facts-grid p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 13.5px;
  line-height: 1.6;
}

/* --- Bölümlü rehber + yapışkan navigasyon --- */
.ti-body { background: var(--white); padding: 62px 0 54px; }
.ti-body-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 58px;
  align-items: start;
  text-align: left;
}
.ti-nav { position: sticky; top: 96px; }
.ti-nav-title {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gray-light);
  margin: 0 0 10px;
}
.ti-nav ul { display: flex; flex-direction: column; }
.ti-nav ul a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0 9px 14px;
  border-left: 2px solid #ececec;
  color: var(--gray);
  font-size: 14px;
  font-weight: 600;
  transition: color .18s ease, border-color .18s ease;
}
.ti-nav ul a .no { display: none; }
.ti-nav ul a:hover { color: var(--dark); }
.ti-nav ul a.on { border-left-color: var(--gold); color: var(--dark); font-weight: 800; }
.ti-nav .btn { margin-top: 22px; width: 100%; justify-content: center; }

.ti-chapter { margin-bottom: 46px; font-size: 16.5px; color: var(--gray); scroll-margin-top: 84px; }
.ti-chapter:last-child { margin-bottom: 0; }
.ti-chapter h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(23px, 2.6vw, 29px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
  margin: 0 0 16px;
}
.ti-chapter h2 .ch-no { display: none; }
.ti-chapter p { margin: 0 0 15px; line-height: 1.78; }
.ti-chapter strong { color: var(--dark-2); }
.ti-chapter a { color: var(--gold-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ti-chapter a:hover { color: var(--gold); }
.ti-chapter a.btn, .ti-chapter a.btn:hover { color: var(--white); text-decoration: none; }

.ti-figure { margin: 22px 0; }
.ti-figure img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; }

/* Kenara yaslanan görseller — metin yanından akar */
.ti-fl-r { float: right; width: min(36%, 310px); margin: 6px 0 18px 28px; }
.ti-fl-l { float: left;  width: min(36%, 310px); margin: 6px 28px 18px 0; }
.ti-chapter::after { content: ""; display: block; clear: both; } /* float bölüm dışına taşmasın */
@media (max-width: 760px) {
  /* Mobilde float kalkıyor ama tam genişlik görsel ekranı kaplıyordu — ortalanmış ve alçaltıldı */
  .ti-fl-r, .ti-fl-l {
    float: none;
    width: min(72%, 300px);
    margin: 18px auto;
  }
}

.ti-quote {
  margin: 0 0 18px;
  padding: 16px 22px;
  background: #fbfaf7;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  font-size: 18.5px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.5;
}

.ti-check { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 8px; }
.ti-check li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.65;
}
.ti-check li::before {
  content: "\2713";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(214, 161, 46, .14);
  color: var(--gold-dark);
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.ti-faq details {
  background: #fbfaf7;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.ti-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  font-weight: 800;
  color: var(--dark);
}
.ti-faq summary::-webkit-details-marker { display: none; }
.ti-faq summary::after {
  content: "+";
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transition: transform .2s ease;
}
.ti-faq details[open] summary::after { transform: rotate(45deg); }
.ti-faq .ans { padding: 0 18px 15px; margin: 0; }
.ti-faq .ti-close { margin-top: 22px; }

/* --- Responsive --- */
@media (max-width: 1000px) {
  .ti-body-grid { grid-template-columns: 1fr; gap: 30px; }
  .ti-nav { position: static; }
  .ti-nav ul { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .ti-nav ul a { border: 1px solid #e6e6e6; border-radius: 999px; padding: 8px 14px; font-size: 13px; }
  .ti-nav ul a.on { border-color: var(--gold); background: rgba(214, 161, 46, .1); }
  .ti-nav .btn { width: auto; }
}
@media (max-width: 900px) {
  .ti-intro-grid { grid-template-columns: 1fr; gap: 30px; }
  .ti-intro-media::after { display: none; }
  .ti-facts-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 520px) {
  .ti-facts-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   MOBIL AKORDEON — bölüm başlıkları kulakçık olur (≤760px)
   Masaüstünde hiçbir şey değişmez; içerik her zaman DOM'da (SEO/AIO korunur).
   ========================================================= */
/* Masaüstü / akordeon kapalı: panel içeriği normal akar */
.ti-acc-panel { display: block; }
.ti-acc-inner { display: contents; }

@media (max-width: 760px) {
  /* Sayfa içi bölüm çipleri mobilde de görünür: yatay kaydırılabilir şerit.
     Bir çipe dokununca ilgili bölüm açılır (nav.js) ve oraya yumuşakça kayılır. */
  .ti-body .ti-nav {
    display: block;
    position: static;
    margin: 0 0 24px;
  }
  /* Çipler yan yana ve alt alta sarsın (yatay kaydırma yok) */
  .ti-body .ti-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ti-body .ti-nav ul a {
    flex: 0 0 auto;
    white-space: nowrap;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
  }
  .ti-body .ti-nav ul a.on {
    border-color: var(--gold);
    background: rgba(214, 161, 46, .12);
    color: var(--gold-dark);
  }
  .ti-body .ti-nav .btn { display: none; }   /* çip şeridinde sidebar CTA'sı gereksiz */

  .ti-chapters.ti-acc-on .ti-chapter {
    margin-bottom: 0;
    border-bottom: 1px solid #ececec;
  }
  .ti-chapters.ti-acc-on .ti-chapter:first-child { border-top: 1px solid #ececec; }

  /* Başlık = kulakçık tetikleyicisi */
  .ti-chapters.ti-acc-on .ti-chapter > h2 {
    cursor: pointer;
    margin: 0;
    padding: 18px 38px 18px 0;
    position: relative;
    font-size: 18px;
    line-height: 1.35;
    -webkit-tap-highlight-color: transparent;
  }
  .ti-chapters.ti-acc-on .ti-chapter > h2::after {
    content: "";
    position: absolute;
    right: 6px; top: 24px;
    width: 9px; height: 9px;
    border-right: 2px solid var(--gold-dark);
    border-bottom: 2px solid var(--gold-dark);
    transform: rotate(45deg);
    transition: transform .25s ease;
  }
  .ti-chapters.ti-acc-on .ti-chapter.is-open > h2::after {
    transform: rotate(-135deg);
  }

  /* Panel — grid-rows 0fr↔1fr ile her yükseklikte pürüzsüz aç/kapa */
  .ti-chapters.ti-acc-on .ti-acc-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .32s ease;
  }
  .ti-chapters.ti-acc-on .ti-chapter.is-open > .ti-acc-panel {
    grid-template-rows: 1fr;
  }
  .ti-chapters.ti-acc-on .ti-acc-inner {
    display: block;
    overflow: hidden;
    min-height: 0;
  }
  .ti-chapters.ti-acc-on .ti-chapter.is-open > .ti-acc-panel > .ti-acc-inner {
    padding-bottom: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ti-chapters.ti-acc-on .ti-acc-panel { transition: none; }
}

/* =========================================================
   İSTEK: Mobilde tedavi bölümleri KULAKÇIKSIZ olacak.
   Bölüm başlıkları (Dental Implant vb.) artık aç/kapa değil; tüm içerik
   her zaman açık görünür. Kulakçık (aç/kapa) YALNIZCA FAQ (.ti-faq details)
   içinde kalır. İçerik hep DOM'da → SEO / GEO / AIO korunur.
   Bu blok, yukarıdaki .ti-acc-on akordeon stillerini geçersiz kılar.
   ========================================================= */
@media (max-width: 760px) {
  /* Başlık artık tetikleyici değil: ok işareti yok, tıklama etkisiz, normal başlık */
  .ti-chapters.ti-acc-on .ti-chapter > h2 {
    cursor: default;
    pointer-events: none;
    padding: 0;
    margin: 0 0 16px;
    position: static;
  }
  .ti-chapters.ti-acc-on .ti-chapter > h2::after {
    content: none !important;
    display: none !important;
  }
  /* Bölümler arasında akordeon çizgileri değil, normal boşluk.
     :first-child de burada sıfırlanmalı — yukarıdaki akordeon bloğundaki
     ".ti-chapter:first-child { border-top: 1px }" kuralı :first-child
     özgüllüğü sayesinde aksi halde kazanıyor ve ilk başlığın (ör. Full Mouth
     Implants Turkey) üstünde tek başına bir ayraç çizgisi bırakıyordu. */
  .ti-chapters.ti-acc-on .ti-chapter,
  .ti-chapters.ti-acc-on .ti-chapter:first-child {
    margin-bottom: 40px;
    border-top: 0;
    border-bottom: 0;
  }
  /* Paneller her zaman açık — grid animasyonu yerine normal akış */
  .ti-chapters.ti-acc-on .ti-acc-panel {
    display: block;
    grid-template-rows: none;
  }
  .ti-chapters.ti-acc-on .ti-acc-inner {
    display: block;
    overflow: visible;
  }
  .ti-chapters.ti-acc-on .ti-chapter.is-open > .ti-acc-panel > .ti-acc-inner,
  .ti-chapters.ti-acc-on .ti-acc-inner { padding-bottom: 0; }

  /* FAQ kulakçığı korunur: .ti-faq summary tıklanabilir kalsın (h2 değil, summary) */
  .ti-chapters.ti-acc-on .ti-faq summary { pointer-events: auto; cursor: pointer; }
}

/* =========================================================
   "ON THIS PAGE" ÇİP ŞERİDİ — mobilde kulakçık (≤760px)
   Şerit filtre gibi duruyordu ve sayfanın üstünde sabit yer kaplıyordu.
   Artık varsayılan KAPALI; başlığa dokununca açılıyor, çipler açıkken
   seçilebiliyor ve seçimden sonra kendiliğinden kapanıyor.
   Kulakçık .ti-nav.is-open ile sürülür (js/nav.js).
   Linkler her zaman DOM'da kalır → SEO / GEO / AIO korunur.
   ========================================================= */
@media (max-width: 760px) {
  .ti-body .ti-nav {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    margin: 0 0 24px;
  }
  /* Başlık = kulakçık tetikleyicisi */
  .ti-body .ti-nav-title {
    position: relative;
    margin: 0;
    padding: 14px 42px 14px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  /* Ok işareti — sayfadaki diğer kulakçıklarla aynı dil */
  .ti-body .ti-nav-title::after {
    content: "";
    position: absolute;
    right: 18px; top: 50%;
    margin-top: -7px;
    width: 8px; height: 8px;
    border-right: 2px solid var(--gold-dark);
    border-bottom: 2px solid var(--gold-dark);
    transform: rotate(45deg);
    transition: transform .25s ease, margin-top .25s ease;
  }
  .ti-body .ti-nav.is-open .ti-nav-title::after {
    transform: rotate(-135deg);
    margin-top: -3px;
  }
  /* Çip listesi — .dropdown ile aynı max-height tekniği */
  .ti-body .ti-nav ul {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: max-height .3s ease, padding .3s ease;
  }
  .ti-body .ti-nav.is-open ul {
    max-height: 460px;
    padding: 2px 16px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ti-body .ti-nav ul,
  .ti-body .ti-nav-title::after { transition: none; }
}
