/* ==========================================================================
   Trust Dent Türkiye — Brand layer (Brandbook v1.0, Ekim 2026)
   Loaded after style.css; overrides tokens and components only.
   p.06 colour · p.07 type · p.08 graphic language · p.10 web rules
   ========================================================================== */

:root {
  /* p.06 — Trust Kırmızı is an accent colour: it carries attention, not surfaces */
  --td-primary: #E51C2D;
  --td-primary-dark: #B0141F;      /* Derin Kırmızı — hover, pressed */
  --td-accent: #B0141F;
  --td-ink: #111111;               /* Mürekkep */
  --td-sand: #F7F4F0;              /* Kum */
  --td-pink: #FCEBEC;              /* Pembe Tül — highlight box */
  --td-graphite: #3A3A3C;          /* body text */
  --td-gray: #5E6166;              /* captions */
  --td-line: #E7E3DE;              /* dividers, borders */
  --td-verified: #1E7F55;          /* only for "verified" */

  --td-text: var(--td-ink);
  --td-text-muted: var(--td-graphite);
  --td-bg: #FFFFFF;
  --td-bg-alt: var(--td-sand);
  --td-border: var(--td-line);

  /* p.07 */
  --td-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --td-font-head: 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* p.08 — corners 12 / 20 / 28, 8 px grid */
  --td-radius-sm: 12px;
  --td-radius-md: 20px;
  --td-radius-lg: 28px;
  --td-shield: 40px 40px 50% 50% / 40px 40px 34% 34%;

  --td-shadow-sm: none;
  --td-shadow-md: 0 1px 0 var(--td-line);
  --td-shadow-lg: 0 24px 48px rgba(17, 17, 17, 0.10);
}

/* Arabic is not covered by Poppins/Manrope: fall back to a native Arabic face */
html[lang="ar"] {
  --td-font: 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif;
  --td-font-head: 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif;
}

body {
  font-family: var(--td-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--td-ink);
}

p { color: var(--td-graphite); }

/* ---------- Typography (p.07 scale) ---------- */
h1, h2, h3, h4, .logo { font-family: var(--td-font-head); color: var(--td-ink); }
h1 { font-weight: 800; font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.12; letter-spacing: -0.015em; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
h4 { font-weight: 700; }

/* "ETİKET · ÜST BAŞLIK": Manrope 800 · 13 · uppercase · +20 % tracking, red, no pill */
.eyebrow {
  background: none;
  padding: 0;
  border-radius: 0;
  font-family: var(--td-font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--td-primary);
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow i { display: none; }
.consult-section .eyebrow, .cta-banner .eyebrow { color: #FF6B76; }

.section-head p { font-size: 1.125rem; font-weight: 500; }

/* ---------- Buttons (p.10): pill, min 48 px, Manrope 700 16, sentence case ---------- */
.btn {
  min-height: 48px;
  padding: 12px 28px;
  font-family: var(--td-font);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: none;
}
.btn-sm { min-height: 44px; padding: 10px 22px; font-size: 0.95rem; }
.btn-primary { background: var(--td-primary); box-shadow: none; }
.btn-primary:hover { background: var(--td-primary-dark); box-shadow: none; transform: none; }
.btn-outline { background: #fff; color: var(--td-ink); border: 2px solid var(--td-ink); }
.btn-outline:hover { background: var(--td-ink); color: #fff; border-color: var(--td-ink); transform: none; }
.btn-ghost-white:hover { color: var(--td-ink); transform: none; }

/* ---------- Header / topbar ---------- */
.topbar { background: var(--td-ink); }
.site-header { border-bottom: 1px solid var(--td-line); }
.logo-image { height: 44px; max-width: 200px; }
.main-nav a { font-family: var(--td-font); font-weight: 600; color: var(--td-ink); }

/* ---------- Hero: sand surface, smile curve under the headline (used once per page) ---------- */
.hero { background: var(--td-sand); }
.hero h1 { position: relative; padding-bottom: 34px; }
.hero h1::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 132px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 22'%3E%3Cpath d='M5 17 C 28 2, 50 2, 68 11 S 108 20, 127 6' fill='none' stroke='%23E51C2D' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / contain;
}
html[dir="rtl"] .hero h1::after { left: auto; right: 2px; transform: scaleX(-1); }

/* Shield frame (p.08): portraits and hero photo are cropped in the logo's shield form */
.hero-media,
.about-media .img-main,
.about-media .img-main img,
.doctor-portrait {
  border-radius: var(--td-shield);
}
.hero-media { box-shadow: none; overflow: visible; }
.hero-media img { border-radius: var(--td-shield); }

/* The search card used to slide up (-34px) over the stat labels; give it its own row */
.hero-trust { margin-bottom: 28px; }
.search-widget { margin-top: 0; border: 1px solid var(--td-line); box-shadow: none; border-radius: var(--td-radius-md); }

.hero-badge, .trust-score-card { border-radius: var(--td-radius-md); box-shadow: var(--td-shadow-lg); }

/* ---------- Cards: white, 1 px line, 20 px corners, flat ---------- */
.quick-card, .treatment-card, .doctor-card, .clinic-card, .why-feature, .testimonial-card, .contact-form-card {
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius-md);
  box-shadow: none;
}
.quick-card:hover, .treatment-card:hover, .doctor-card:hover, .clinic-card:hover, .why-feature:hover, .testimonial-card:hover {
  border-color: #D9D3CC;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.06);
}
.testimonial-card { border-top: 1px solid var(--td-line); }
.doctor-photo-placeholder { background: linear-gradient(160deg, var(--td-sand) 0%, var(--td-pink) 100%); }
.form-field input, .form-field select, .form-field textarea { border-color: var(--td-line); border-radius: var(--td-radius-sm); }
.form-field input, .form-field select { min-height: 52px; }

/* ---------- Patient journey: the "route line" (p.03 / p.08) ----------
   First step red filled, last step ink filled, the ones between red outlined. */
.steps-grid {
  grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr));
  gap: 24px;
}
.steps-grid::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--td-primary);
  z-index: 0;
}
.step-card { text-align: start; padding: 0; }
.step-num {
  width: 80px; height: 80px;
  margin: 0 0 20px;
  background: #fff;
  border: 3px solid var(--td-primary);
  color: var(--td-primary);
  font-family: var(--td-font-head);
  font-size: 1.6rem;
  font-weight: 800;
}
.step-card:first-child .step-num { background: var(--td-primary); color: #fff; }
.step-card:last-child .step-num { background: var(--td-ink); border-color: var(--td-ink); color: #fff; }
.step-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--td-primary);
  margin-bottom: 8px;
}
.step-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
@media (max-width: 991px) {
  .steps-grid { grid-template-columns: 1fr; gap: 0; }
  .steps-grid::before { top: 40px; bottom: 40px; left: 39px; right: auto; width: 3px; height: auto; }
  html[dir="rtl"] .steps-grid::before { left: auto; right: 39px; }
  .step-card { display: grid; grid-template-columns: 80px 1fr; column-gap: 20px; padding-bottom: 28px; }
  .step-card .step-num { grid-row: span 3; margin: 0; }
}

/* ---------- Surfaces: ink 25 %, red 15 % ---------- */
/* Red stays ≤ 15 %: the stats band sits on ink so it never stacks with the red CTA band */
.stats-banner { background: var(--td-ink); }
.stats-banner b, .stats-banner strong { color: #fff; }
.about-media .img-main { box-shadow: none; }
.consult-section, .site-footer { background: var(--td-ink); }
.cta-banner { background: var(--td-primary); }
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner .btn-primary { background: #fff; color: var(--td-primary-dark); }
.cta-banner .btn-primary:hover { background: var(--td-sand); color: var(--td-primary-dark); }
.cta-banner .btn-ghost-white { border: 2px solid #fff; }

/* Red-surface rule (p.06): no thin text on red */
.stats-banner, .cta-banner { font-weight: 600; }

/* ---------- WhatsApp: secondary channel, fixed bottom right (p.10) ---------- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--td-ink);
  border: 2px solid var(--td-ink);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.14);
}
.whatsapp-float i { font-size: 1.35rem; color: #1E7F55; }
.whatsapp-float:hover { background: var(--td-ink); color: #fff; }
.whatsapp-float:hover i { color: #fff; }
html[dir="rtl"] .whatsapp-float { right: auto; left: 24px; }
body.has-whatsapp .back-to-top { bottom: 92px; }
@media (max-width: 575px) {
  .whatsapp-float { right: 16px; bottom: 16px; padding: 0 16px; }
  .whatsapp-float span { display: none; }
}

/* ---------- Legal pages ---------- */
.legal-body h2, .legal-body h3 { font-family: var(--td-font-head); }

/* Arabic is a joined script: tracking breaks the letter connections */
html[lang="ar"] .eyebrow, html[lang="ar"] .step-label { letter-spacing: 0; }

/* ---------- Trust Puanı (TP) breakdown on doctor / clinic pages ---------- */
.tp-panel {
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius-md);
  background: #fff;
  padding: 20px 22px;
  margin-bottom: 28px;
}
.tp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.tp-total {
  flex-shrink: 0;
  font-family: var(--td-font-head);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--td-primary);
}
.tp-total small { font-size: 0.9rem; font-weight: 700; color: var(--td-gray); margin-inline-start: 2px; }
.tp-head div strong { display: block; font-family: var(--td-font-head); color: var(--td-ink); }
.tp-head div span { font-size: 0.85rem; color: var(--td-gray); line-height: 1.45; }
.tp-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tp-panel li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 32px; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--td-graphite); }
.tp-panel li b { text-align: end; color: var(--td-ink); }
.tp-bar { height: 6px; border-radius: 999px; background: var(--td-line); overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: var(--td-primary); border-radius: inherit; }
@media (max-width: 575px) {
  .tp-panel li { grid-template-columns: minmax(0, 1fr) 70px 28px; }
}

/* ---------- TP badge on cards and portraits: ink pill + red shield ---------- */
.trust-badge.tp-badge {
  top: 12px;
  right: 12px;
  gap: 6px;
  height: 30px;
  padding: 0 11px 0 8px;
  background: rgba(17, 17, 17, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.2);
  color: #fff;
  font-family: var(--td-font-head);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}
.tp-badge svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--td-primary); }
.tp-badge.score-good svg { color: #fff; }
.tp-badge small {
  font-family: var(--td-font);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.trust-badge.tp-badge-lg { top: 16px; right: 16px; height: 38px; padding: 0 14px 0 10px; gap: 8px; font-size: 1.05rem; }
.tp-badge-lg svg { width: 20px; height: 20px; }
html[lang="ar"] .tp-badge small { letter-spacing: 0; font-size: 0.72rem; }
html[dir="rtl"] .trust-badge.tp-badge { right: auto; left: 12px; padding: 0 8px 0 11px; }
html[dir="rtl"] .trust-badge.tp-badge-lg { left: 16px; padding: 0 10px 0 14px; }

/* ---------- Doctor / clinic directory (/doktorlar/, /klinikler/) ---------- */
.dir-hero { background: var(--td-sand); padding: 40px 0 36px; }
.dir-hero h1 { margin-bottom: 10px; }
.dir-lead { font-size: 1.1rem; max-width: 640px; margin-bottom: 28px; }
.dir-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
  background: #fff;
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius-md);
  padding: 18px;
}
.dir-filters .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dir-filters label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--td-gray); }
.dir-filters select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius-sm);
  padding: 0 12px;
  background: #fff;
  font: inherit;
  color: var(--td-ink);
}
.dir-filters .btn { width: 100%; }
html[lang="ar"] .dir-filters label { letter-spacing: 0; text-transform: none; }
.dir-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dir-meta strong { font-family: var(--td-font-head); }
.dir-reset { color: var(--td-primary); font-weight: 700; font-size: 0.9rem; }
.dir-empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--td-line); border-radius: var(--td-radius-md); }
.dir-empty h2 { font-size: 1.4rem; margin-bottom: 8px; }
.dir-empty p { margin-bottom: 22px; }
.dir-note { margin-top: 28px; font-size: 0.85rem; color: var(--td-gray); text-align: center; }

/* Hero search: treatment + city + button (the date field never filtered anything) */
.search-widget { grid-template-columns: 1fr 1fr auto; }
@media (max-width: 940px) { .search-widget { grid-template-columns: 1fr 1fr; } .search-widget .btn { grid-column: 1 / -1; } }
@media (max-width: 620px) { .search-widget { grid-template-columns: 1fr; } }

/* About photo filled the column only when the image file was wide enough */
.about-media .img-main img { width: 100%; }

/* ---- Cookie consent banner (includes/analytics.php) ---- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
  max-width: 760px; margin: 0 auto; padding: 18px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  background: #fff; color: var(--td-ink, #1a1a1a); border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.14); font-size: .9rem; line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-text strong { display: block; margin-bottom: 2px; }
.cookie-banner-text a { color: var(--td-primary); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; left: 10px; right: 10px; bottom: 10px; }
  .cookie-banner-actions .btn { flex: 1; }
}
