/* ============================================================
   Template 4 — Vega Noir (dark luxury)
   All rules scoped under body[data-template-id="template_4"]
   so the rest of the site (other templates) is unaffected.
   ============================================================ */

/* Globals.css forces body/html/h2 to light-mode colors via !important.
   We must counter those with our own !important inside template_4. */
html:has(body[data-template-id="template_4"]) {
  background-color: #0a0a0a !important;
  color: #f5f5f5 !important;
}
body[data-template-id="template_4"] {
  background-color: #0a0a0a !important;
  color: #f5f5f5 !important;
}
body[data-template-id="template_4"] h1,
body[data-template-id="template_4"] h2,
body[data-template-id="template_4"] h3,
body[data-template-id="template_4"] h4 {
  color: #f5f5f5 !important;
}
body[data-template-id="template_4"] p {
  color: var(--paper-muted, #a8a8a8);
}
/* Neutralise the global `* { border-color: #f1f5f9 }` inside dark template */
body[data-template-id="template_4"] * {
  border-color: rgba(255, 255, 255, 0.07);
}

/* Rich text (BBCode) content on any template_4 page — sections, about, etc.
   RichText ships light-theme colors; re-tone them for the dark template. */
body[data-template-id="template_4"] .rich-text { color: var(--paper-muted, #a8a8a8); }
body[data-template-id="template_4"] .rich-text strong,
body[data-template-id="template_4"] .rich-text b { color: #f5f5f5; }
body[data-template-id="template_4"] .rich-text a { color: var(--tpl4-accent, #f0c987); }
body[data-template-id="template_4"] .rich-text a:hover { color: #ffffff; }

body[data-template-id="template_4"] {
  /* Keep tenant --primary intact (driven by API). For dark surfaces
     we derive a legibility-safe accent: same hue family, mixed with
     near-white to guarantee min luminance. This way dark tenant
     colors (e.g. #3b3b3b) become a readable tint on dark surfaces
     while still belonging to the brand. */
  /* Preserve tenant hue. Blend with a near-white cream so the
     accent is brighter on dark surfaces without losing brand identity.
     For colorful primaries this stays vivid; for grayscale primaries
     it picks up a subtle warm cast. */
  --tpl4-accent: color-mix(in srgb, var(--primary) 55%, #fdebc8);
  --ink: #0a0a0a;
  --ink-soft: #111111;
  --ink-card: #161616;
  --ink-card-2: #1e1e1e;
  --rule: rgba(255, 255, 255, 0.07);
  --rule-strong: rgba(255, 255, 255, 0.14);
  --paper: #f5f5f5;
  --paper-soft: #d4d4d4;
  --paper-muted: #a8a8a8;
  --paper-subtle: #666666;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --halo: radial-gradient(circle at center,
    rgba(var(--primary-rgb), 0.32) 0%,
    rgba(var(--primary-rgb), 0.06) 38%,
    transparent 70%);
  background: var(--ink);
  color: var(--paper);
}

/* ─── Header overrides ─────────────────────────────────────── */
body[data-template-id="template_4"] header > div:first-child {
  background: #000000 !important;
  border-bottom: 1px solid var(--rule);
  color: rgba(255,255,255,0.6);
}
body[data-template-id="template_4"] header > div:first-child a:hover { color: var(--paper); }
body[data-template-id="template_4"] header > div:nth-child(2) {
  background: rgba(10, 10, 10, 0.85) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
body[data-template-id="template_4"] header nav a,
body[data-template-id="template_4"] header [class*="text-slate-600"],
body[data-template-id="template_4"] header [class*="text-slate-950"] {
  color: var(--paper-muted) !important;
}
body[data-template-id="template_4"] header nav a:hover { color: var(--paper) !important; }
body[data-template-id="template_4"] header [class*="text-slate-400"] { color: var(--paper-subtle) !important; }
body[data-template-id="template_4"] header button[aria-label] {
  background: rgba(255,255,255,0.05) !important;
  border-color: var(--rule-strong) !important;
  color: var(--paper) !important;
}

/* ─── Mobile drawer (lives inside Header) ─────────────────── */
body[data-template-id="template_4"] header [class*="bg-white"] {
  background-color: var(--ink-card) !important;
}
body[data-template-id="template_4"] header [class*="bg-slate-50"] {
  background-color: rgba(255,255,255,0.05) !important;
}
body[data-template-id="template_4"] header [class*="bg-slate-950"] {
  background-color: rgba(0,0,0,0.7) !important;
}
body[data-template-id="template_4"] header [class*="text-slate-900"],
body[data-template-id="template_4"] header [class*="text-slate-950"] {
  color: var(--paper) !important;
}
body[data-template-id="template_4"] header [class*="border-slate-"] {
  border-color: var(--rule) !important;
}
body[data-template-id="template_4"] header [class*="shadow"] {
  --tw-shadow-color: rgba(0,0,0,0.6);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8) !important;
}
body[data-template-id="template_4"] header .accent-subtitle {
  color: var(--tpl4-accent) !important;
}
/* Drawer's primary "Hemen Arayın" button — make sure it has visible
   contrast even when tenant --primary is dim. */
body[data-template-id="template_4"] header a[style*="--primary"],
body[data-template-id="template_4"] header a[style*="var(--primary)"] {
  background-color: var(--tpl4-accent) !important;
  color: #0a0a0a !important;
}

/* ─── Footer overrides ─────────────────────────────────────── */
body[data-template-id="template_4"] footer {
  background: var(--ink-soft) !important;
  color: var(--paper) !important;
  border-top: 1px solid var(--rule);
}
body[data-template-id="template_4"] footer * {
  border-color: var(--rule) !important;
}
body[data-template-id="template_4"] footer [class*="text-slate-"],
body[data-template-id="template_4"] footer [class*="text-gray-"],
body[data-template-id="template_4"] footer [class*="text-zinc-"] {
  color: var(--paper-muted) !important;
}
body[data-template-id="template_4"] footer [class*="bg-white"],
body[data-template-id="template_4"] footer [class*="bg-slate-50"] {
  background: var(--ink-card) !important;
}

/* ─── Template 4 page wrapper ──────────────────────────────── */
.tpl4 {
  background: var(--ink);
  color: var(--paper);
  font-family: "Outfit", "Inter", system-ui, sans-serif;
}
.tpl4 .tpl4-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .tpl4 .tpl4-container { padding: 0 56px; }
}

/* Align Tailwind .container used by Header/Footer with Template4's wider container */
body[data-template-id="template_4"] .container {
  max-width: 1440px !important;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 768px) {
  body[data-template-id="template_4"] .container {
    padding-left: 56px;
    padding-right: 56px;
  }
}

.tpl4 h1, .tpl4 h2, .tpl4 h3, .tpl4 h4 {
  font-weight: 900;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--paper);
  margin: 0;
}
.tpl4 p { color: var(--paper-muted); line-height: 1.7; margin: 0; }

.tpl4 .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--tpl4-accent);
}
.tpl4 .eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--tpl4-accent);
}

.tpl4 .topline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: flex-end;
  margin-bottom: 56px;
}
.tpl4 .topline h2 { font-size: clamp(28px, 4vw, 56px); max-width: 16ch; }
.tpl4 .topline p { font-size: 15px; max-width: 38em; }

@media (max-width: 768px) {
  .tpl4 .topline {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
  }
  /* Hide auxiliary right-side paragraphs on mobile to avoid clutter */
  .tpl4 .topline > p,
  .tpl4 .topline > div + p {
    display: none;
  }
  /* Stretch right-side CTAs (e.g. "Tüm Yazılar") to full width so the
     wide button doesn't push the viewport beyond 100vw. */
  .tpl4 .topline > a.btn4 {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Buttons ──────────────────────────────────────────────── */
.tpl4 .btn4 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 30px;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-radius: 9999px;
  cursor: pointer;
  border: 0;
  line-height: 1;
  transition: all 0.5s var(--ease);
  white-space: nowrap;
  color: inherit;
}
.tpl4 .btn4-primary {
  background: var(--primary);
  color: var(--primary-foreground, #fff);
  box-shadow:
    0 12px 36px -8px rgba(var(--primary-rgb), 0.55),
    0 0 0 1px rgba(var(--primary-rgb), 0.35);
}
.tpl4 .btn4-primary:hover { transform: scale(1.04); }
.tpl4 .btn4-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  border: 1px solid var(--rule-strong);
  backdrop-filter: blur(10px);
}
.tpl4 .btn4-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.tpl4 .btn4-wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, 0.55);
}

/* ─── Hero ──────────────────────────────────────────────────── */
.tpl4-hero {
  position: relative;
  min-height: 720px;
  height: 92vh;
  background: var(--ink);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 768px) {
  .tpl4-hero { min-height: 520px; height: 78vh; }
  .tpl4-hero-inner { padding-top: 80px; padding-bottom: 60px; }
  .tpl4-section { padding: 64px 0; }
  .tpl4 { overflow-x: hidden; }
  .tpl4-marquee-track { gap: 36px; }
  .tpl4-marquee-item { font-size: 14px; }
}
.tpl4-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s var(--ease);
  filter: grayscale(0.4) contrast(1.15) saturate(0.85);
}
.tpl4-hero-img.on {
  opacity: 0.55;
  animation: tpl4HeroZoom 14s ease-out forwards;
}
@keyframes tpl4HeroZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.15); }
}
.tpl4-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, transparent 0%, rgba(10,10,10,0.6) 50%, rgba(10,10,10,0.96) 100%),
    linear-gradient(180deg, rgba(10,10,10,0.85) 0%, transparent 25%, transparent 70%, rgba(10,10,10,0.8) 100%);
  pointer-events: none;
}
.tpl4-hero-halo {
  position: absolute;
  width: 900px;
  height: 900px;
  left: 55%;
  top: 50%;
  background: var(--halo);
  pointer-events: none;
  opacity: 0.85;
  animation: tpl4HaloDrift 18s ease-in-out infinite;
}
@keyframes tpl4HaloDrift {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
  50%  { transform: translate(-45%, -53%) scale(1.08); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
}
.tpl4-hero-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 100px;
}
.tpl4-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--paper-muted);
}
.tpl4-hero-meta .dot {
  width: 6px;
  height: 6px;
  background: var(--tpl4-accent);
  border-radius: 9999px;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.22);
  animation: tpl4DotPulse 2.4s ease-in-out infinite;
}
@keyframes tpl4DotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.22); }
  50%      { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0.05); }
}
.tpl4-hero h1 {
  font-size: clamp(36px, 5.5vw, 84px);
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 1000px;
  color: var(--paper);
  text-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  padding-top: 0.08em;
}
.tpl4-hero h1 em {
  font-style: normal;
  color: var(--tpl4-accent);
  padding-left: 12px;
}
.tpl4-hero-lower {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 32px;
}
.tpl4-hero-lower p {
  color: var(--paper-muted);
  font-size: 17px;
  max-width: 38em;
}
.tpl4-hero-ctas {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.tpl4-hero-dots {
  position: absolute;
  left: 24px;
  bottom: 36px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 768px) { .tpl4-hero-dots { left: 56px; } }
.tpl4-hero-dot {
  width: 2px;
  height: 24px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--paper-subtle);
  border-radius: 2px;
  transition: all 0.5s var(--ease);
  opacity: 0.6;
}
.tpl4-hero-dot.on {
  height: 56px;
  background: var(--tpl4-accent);
  opacity: 1;
  width: 3px;
}
.tpl4-hero-counter {
  position: absolute;
  right: 24px;
  bottom: 36px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  color: var(--paper);
}
@media (min-width: 768px) { .tpl4-hero-counter { right: 56px; } }
.tpl4-hero-counter .num { font-size: 32px; letter-spacing: -0.02em; color: var(--tpl4-accent); }
.tpl4-hero-counter .sep { width: 32px; height: 1px; background: var(--paper-subtle); }
.tpl4-hero-counter .tot { font-size: 13px; color: var(--paper-subtle); letter-spacing: 0.12em; }

/* ─── Marquee ──────────────────────────────────────────────── */
.tpl4-marquee {
  padding: 22px 0;
  background: var(--ink-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
}
/* Fade edges so the loop never looks like it starts/stops abruptly */
.tpl4-marquee::before,
.tpl4-marquee::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 120px;
  z-index: 2; pointer-events: none;
}
.tpl4-marquee::before { left: 0;  background: linear-gradient(90deg, var(--ink-soft), transparent); }
.tpl4-marquee::after  { right: 0; background: linear-gradient(270deg, var(--ink-soft), transparent); }

.tpl4-marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: tpl4slide 40s linear infinite;
}
.tpl4-marquee:hover .tpl4-marquee-track { animation-play-state: paused; }

.tpl4-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--paper-muted);
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
  padding: 4px 0;
}
.tpl4-marquee-item:hover { color: var(--tpl4-accent); transform: translateY(-1px); }
.tpl4-marquee-item:hover .m-dot { transform: scale(1.4); }
.tpl4-marquee-item .m-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--tpl4-accent);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}
@keyframes tpl4slide {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ─── Fast buttons ─────────────────────────────────────────── */
.tpl4-fast { padding: 48px 0; background: var(--ink); }
.tpl4-fast-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) { .tpl4-fast-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tpl4-fast-grid { grid-template-columns: 1fr; } }
.tpl4-fast-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  background: var(--ink-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
  color: inherit;
}
.tpl4-fast-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.tpl4-fast-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), 0.5);
}
.tpl4-fast-card:hover::before { opacity: 1; }
.tpl4-fast-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--tpl4-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease);
}
.tpl4-fast-card:hover .tpl4-fast-ico {
  background: var(--primary);
  color: var(--primary-foreground, #fff);
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: 0 10px 24px -6px rgba(var(--primary-rgb), 0.45);
}
.tpl4-fast-text { flex: 1; }
.tpl4-fast-title {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: var(--paper);
  text-transform: uppercase;
}
.tpl4-fast-sub { font-size: 12px; color: var(--paper-muted); margin-top: 4px; }
.tpl4-fast-arrow { color: var(--paper-subtle); transition: all 0.4s var(--ease); }
.tpl4-fast-card:hover .tpl4-fast-arrow { color: var(--tpl4-accent); transform: translateX(4px); }

/* ─── Section padding ──────────────────────────────────────── */
.tpl4-section { padding: 128px 0; background: var(--ink); position: relative; }
.tpl4-section.alt { background: var(--ink-soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ─── Services showcase ───────────────────────────────────── */
.tpl4-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) { .tpl4-showcase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tpl4-showcase-grid { grid-template-columns: 1fr; } }
.tpl4-scard {
  position: relative;
  background: var(--ink-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 340px;
  overflow: hidden;
  transition: all 0.5s var(--ease);
  color: inherit;
}
.tpl4-scard::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 280px;
  height: 280px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.tpl4-scard:hover {
  border-color: rgba(var(--primary-rgb), 0.5);
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -20px rgba(var(--primary-rgb), 0.22);
}
.tpl4-scard:hover::before { opacity: 1; }
.tpl4-scard-num {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--paper-subtle);
  position: relative;
}
.tpl4-scard-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(var(--primary-rgb), 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tpl4-accent);
  position: relative;
  font-size: 22px;
  font-weight: 900;
  transition: all 0.5s var(--ease);
}
.tpl4-scard:hover .tpl4-scard-ico {
  background: var(--primary);
  color: var(--primary-foreground, #fff);
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  body[data-template-id="template_4"] * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
.tpl4-scard h3 { color: var(--paper); position: relative; font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; }
.tpl4-scard p { font-size: 13px; line-height: 1.6; color: var(--paper-muted); position: relative; flex: 1; }
.tpl4-scard-link {
  margin-top: auto;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--tpl4-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* ─── Featured inventory ──────────────────────────────────── */
.tpl4-car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) { .tpl4-car-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tpl4-car-grid { grid-template-columns: 1fr; } }
.tpl4-car {
  position: relative;
  background: var(--ink-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  color: inherit;
}
.tpl4-car:hover {
  border-color: rgba(var(--primary-rgb), 0.5);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(var(--primary-rgb), 0.28);
}
.tpl4-car-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #000;
  filter: grayscale(0.3);
  transition: filter 0.5s var(--ease);
}
.tpl4-car:hover .tpl4-car-cover { filter: grayscale(0); }
.tpl4-car-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.65) 100%);
}
.tpl4-car-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--rule-strong);
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  z-index: 2;
}
.tpl4-car-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.tpl4-car-brandrow {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-subtle);
}
.tpl4-car-title {
  font-size: 15px;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--paper);
  font-weight: 900;
  min-height: 36px;
}
.tpl4-car-price {
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.015em;
  color: var(--tpl4-accent);
  margin-top: auto;
}
.tpl4-car-specs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-subtle);
}

/* ─── FAQ ──────────────────────────────────────────────────── */
.tpl4-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: flex-start;
}
@media (max-width: 1100px) { .tpl4-faq-grid { grid-template-columns: 1fr; gap: 32px; } }
.tpl4-faq-intro h2 { font-size: clamp(32px, 4vw, 56px); margin-bottom: 22px; }
.tpl4-faq-list { display: flex; flex-direction: column; gap: 10px; }
.tpl4-faq-item {
  background: var(--ink-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s var(--ease);
  cursor: pointer;
}
.tpl4-faq-item.open {
  border-color: rgba(var(--primary-rgb), 0.6);
  box-shadow: 0 20px 48px -16px rgba(var(--primary-rgb), 0.28);
}
.tpl4-faq-summary {
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: var(--paper-muted);
}
.tpl4-faq-item.open .tpl4-faq-summary { color: var(--paper); }
.tpl4-faq-toggle {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.5s var(--ease);
  font-weight: 900;
}
.tpl4-faq-item.open .tpl4-faq-toggle {
  background: var(--primary);
  color: var(--primary-foreground, #fff);
  transform: rotate(180deg);
}
.tpl4-faq-answer {
  padding: 0 28px 26px;
  font-size: 14px;
  color: var(--paper-muted);
  line-height: 1.7;
}
.tpl4-faq-answer::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  margin-bottom: 18px;
}

/* ─── News grid ────────────────────────────────────────────── */
.tpl4-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) { .tpl4-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tpl4-news-grid { grid-template-columns: 1fr; } }
.tpl4-news-card {
  background: var(--ink-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.5s var(--ease);
  padding-bottom: 24px;
  color: inherit;
}
.tpl4-news-card:hover { border-color: rgba(var(--primary-rgb), 0.5); transform: translateY(-4px); }
.tpl4-news-cover {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.3);
  transition: filter 0.5s var(--ease);
}
.tpl4-news-card:hover .tpl4-news-cover { filter: grayscale(0); }
.tpl4-news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.tpl4-news-cat { color: var(--tpl4-accent); }
.tpl4-news-date { color: var(--paper-subtle); }
.tpl4-news-title {
  padding: 0 24px;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--paper);
  line-height: 1.3;
  font-weight: 900;
  text-transform: none;
}
.tpl4-news-excerpt { padding: 0 24px; font-size: 13px; color: var(--paper-muted); line-height: 1.6; }
.tpl4-news-link {
  padding: 0 24px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--tpl4-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* ─── References ───────────────────────────────────────────── */
.tpl4-refs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .tpl4-refs-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .tpl4-refs-grid { grid-template-columns: repeat(2, 1fr); } }
.tpl4-ref {
  padding: 28px 18px;
  background: var(--ink-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  text-align: center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-muted);
  text-transform: uppercase;
  transition: all 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 140px;
  text-decoration: none;
}
.tpl4-ref:hover {
  color: var(--paper);
  border-color: rgba(var(--primary-rgb), 0.4);
  transform: translateY(-2px);
}
.tpl4-ref img {
  max-height: 56px;
  max-width: 80%;
  object-fit: contain;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.4s var(--ease);
}
.tpl4-ref:hover img { transform: scale(1.04); }
.tpl4-ref-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: inherit;
}

/* ─── Contact band ─────────────────────────────────────────── */
.tpl4-contact {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  border-top: 1px solid var(--rule);
  padding: 100px 0;
}
.tpl4-contact-halo {
  position: absolute;
  right: -200px;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.20) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.tpl4-contact-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1100px) { .tpl4-contact-grid { grid-template-columns: 1fr; } }
.tpl4-contact h2 { font-size: clamp(32px, 4vw, 56px); }
.tpl4-cf {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 20px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
a.tpl4-cf:hover .tpl4-cf-val { color: var(--paper); }
a.tpl4-cf:hover .tpl4-cf-ico { transform: translateX(2px); }
.tpl4-cf-ico { transition: transform 0.3s var(--ease); }
.tpl4-cf:last-child { border-bottom: 0; }
.tpl4-cf-ico { color: var(--tpl4-accent); padding-top: 4px; font-size: 18px; }
.tpl4-cf-lbl {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-subtle);
  margin-bottom: 6px;
}
.tpl4-cf-val { font-size: 16px; font-weight: 600; color: var(--paper-muted); line-height: 1.5; }
.tpl4-cf-val.strong { font-weight: 900; font-size: 19px; color: var(--paper); letter-spacing: -0.015em; }

/* ─── Floating action ─────────────────────────────────────── */
.tpl4 .accent-bar {
  height: 4px;
  width: 56px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 18px;
}

/* ─── Home content sections (place === 'home') ──────────────── */
.tpl4 .tpl4-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.tpl4 .tpl4-content.rev .tpl4-content-media { order: 2; }
.tpl4 .tpl4-content--solo {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.tpl4 .tpl4-content--solo .accent-bar { margin-left: auto; margin-right: auto; }
.tpl4 .tpl4-content-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--ink-card);
}
.tpl4 .tpl4-content-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease);
}
.tpl4 .tpl4-content-media:hover img { transform: scale(1.06); }
.tpl4 .tpl4-content-body h2 {
  font-size: clamp(26px, 3.4vw, 44px);
  margin-top: 14px;
  line-height: 1.08;
}
.tpl4 .tpl4-content-body p { font-size: 16px; margin-top: 18px; }
.tpl4 .tpl4-content-body p + p { margin-top: 14px; }
.tpl4 .tpl4-inline-link {
  color: var(--tpl4-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Rich text inside template_4 content sections */
.tpl4 .tpl4-content-body .rich-text { font-size: 16px; }
.tpl4 .rich-text.rt-dark a { color: var(--tpl4-accent); }
.tpl4 .rich-text.rt-dark a:hover { color: #ffffff; }

@media (max-width: 768px) {
  .tpl4 .tpl4-content { grid-template-columns: 1fr; gap: 28px; }
  .tpl4 .tpl4-content.rev .tpl4-content-media { order: 0; }
  .tpl4 .tpl4-content-media { aspect-ratio: 16 / 10; }
}

/* ============================================================
   Sub-pages (araclar, blog, hizmetler, hakkimizda, iletişim …)
   Dark-mode adaptation of shared light components.
   ============================================================ */
body[data-template-id="template_4"] main {
  background: var(--ink) !important;
  color: var(--paper);
}

/* Big page bgs */
body[data-template-id="template_4"] main [class*="bg-white"],
body[data-template-id="template_4"] main [class*="bg-slate-50"],
body[data-template-id="template_4"] main [class*="bg-gray-50"],
body[data-template-id="template_4"] main [class*="bg-zinc-50"] {
  background-color: var(--ink) !important;
}
body[data-template-id="template_4"] main [class*="bg-slate-100"],
body[data-template-id="template_4"] main [class*="bg-gray-100"] {
  background-color: var(--ink-soft) !important;
}

/* Card backgrounds (small surfaces become ink-card) */
body[data-template-id="template_4"] main article[class*="bg-white"],
body[data-template-id="template_4"] main div[class*="rounded"][class*="bg-white"],
body[data-template-id="template_4"] main div[class*="shadow"][class*="bg-white"] {
  background-color: var(--ink-card) !important;
  border: 1px solid var(--rule);
}

/* Text */
body[data-template-id="template_4"] main [class*="text-slate-900"],
body[data-template-id="template_4"] main [class*="text-slate-950"],
body[data-template-id="template_4"] main [class*="text-gray-900"],
body[data-template-id="template_4"] main [class*="text-zinc-900"],
body[data-template-id="template_4"] main [class*="text-black"] {
  color: var(--paper) !important;
}
body[data-template-id="template_4"] main [class*="text-slate-700"],
body[data-template-id="template_4"] main [class*="text-slate-800"],
body[data-template-id="template_4"] main [class*="text-gray-700"],
body[data-template-id="template_4"] main [class*="text-gray-800"] {
  color: var(--paper-soft) !important;
}
body[data-template-id="template_4"] main [class*="text-slate-500"],
body[data-template-id="template_4"] main [class*="text-slate-600"],
body[data-template-id="template_4"] main [class*="text-gray-500"],
body[data-template-id="template_4"] main [class*="text-gray-600"] {
  color: var(--paper-muted) !important;
}
body[data-template-id="template_4"] main [class*="text-slate-400"],
body[data-template-id="template_4"] main [class*="text-gray-400"] {
  color: var(--paper-subtle) !important;
}

/* Borders */
body[data-template-id="template_4"] main [class*="border-slate-"],
body[data-template-id="template_4"] main [class*="border-gray-"],
body[data-template-id="template_4"] main [class*="border-zinc-"],
body[data-template-id="template_4"] main [class*="divide-slate-"],
body[data-template-id="template_4"] main [class*="divide-gray-"] {
  border-color: var(--rule) !important;
}

/* Inputs / selects */
body[data-template-id="template_4"] main input:not([type="checkbox"]):not([type="radio"]),
body[data-template-id="template_4"] main select,
body[data-template-id="template_4"] main textarea {
  background: var(--ink-card) !important;
  border-color: var(--rule-strong) !important;
  color: var(--paper) !important;
}
body[data-template-id="template_4"] main input::placeholder,
body[data-template-id="template_4"] main textarea::placeholder {
  color: var(--paper-subtle) !important;
}

/* Buttons preserving primary still readable; tone-down outline ones */
body[data-template-id="template_4"] main button[class*="bg-slate-"],
body[data-template-id="template_4"] main button[class*="bg-gray-"] {
  background-color: var(--ink-card) !important;
  color: var(--paper) !important;
  border-color: var(--rule-strong) !important;
}

/* Hover surfaces in sub-pages */
body[data-template-id="template_4"] main [class*="hover:bg-white"]:hover,
body[data-template-id="template_4"] main [class*="hover:bg-slate-50"]:hover,
body[data-template-id="template_4"] main [class*="hover:bg-gray-50"]:hover {
  background-color: var(--ink-card-2) !important;
}

/* Section dividers / accent bars stay primary (already correct) */

/* Eyebrows / accent subtitles already use --primary — make sure
   they have a min visible contrast over dark; outline shadow helps. */
body[data-template-id="template_4"] main .accent-subtitle,
body[data-template-id="template_4"] main [class*="text-primary"] {
  color: var(--tpl4-accent) !important;
}

/* Loading skeletons */
body[data-template-id="template_4"] main [class*="bg-slate-200"],
body[data-template-id="template_4"] main [class*="bg-gray-200"] {
  background-color: var(--ink-card-2) !important;
}

/* Premium card / glass panel / premium buttons (globals.css utility classes) */
body[data-template-id="template_4"] .premium-card {
  background-color: var(--ink-card) !important;
  border-color: var(--rule) !important;
  box-shadow: 0 24px 48px -16px rgba(0,0,0,0.6) !important;
}
body[data-template-id="template_4"] .premium-card:hover {
  box-shadow: 0 30px 60px -15px rgba(var(--primary-rgb), 0.25) !important;
  border-color: rgba(var(--primary-rgb), 0.4) !important;
}
body[data-template-id="template_4"] .premium-card h1,
body[data-template-id="template_4"] .premium-card h2,
body[data-template-id="template_4"] .premium-card h3,
body[data-template-id="template_4"] .premium-card h4 { color: var(--paper) !important; }
body[data-template-id="template_4"] .premium-card p { color: var(--paper-muted) !important; }

body[data-template-id="template_4"] .glass-panel,
body[data-template-id="template_4"] .glass-nav {
  background-color: rgba(20, 20, 20, 0.7) !important;
  border-color: var(--rule) !important;
  color: var(--paper) !important;
}

body[data-template-id="template_4"] .premium-btn-outline {
  background-color: transparent !important;
  color: var(--paper) !important;
  border-color: var(--rule-strong) !important;
}
body[data-template-id="template_4"] .premium-btn-outline:hover {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}

/* Icon containers in service cards */
body[data-template-id="template_4"] .premium-card [class*="bg-slate-50"] {
  background-color: rgba(255, 255, 255, 0.04) !important;
}
