/* ==========================================================
   KTE — Unified site chrome (shared by all 8 pages)
   Standalone CSS: independent from each page's Tailwind config
   ========================================================== */

:root {
  --kte-red: #b70011;
  --kte-red-dark: #8f000d;
  --kte-red-bright: #dc2626;
  --kte-ink: #1c1b1b;
  --kte-muted: #554f4f;
  --kte-line: #ebe6e6;
  --kte-soft: #fdf1f1;
  --kte-hdr-h: 92px;
}

html {
  scroll-padding-top: calc(var(--kte-hdr-h) + 16px);
  scrollbar-width: thin;
  scrollbar-color: var(--kte-red) #f3eded;
}

/* ---------- Themed page scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f3eded; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--kte-red-bright), var(--kte-red-dark));
  border-radius: 999px;
  border: 2px solid #f3eded;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--kte-red), #6d0009); }
::-webkit-scrollbar-corner { background: #f3eded; }

.kte-hdr {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

.kte-hdr * { box-sizing: border-box; }

/* ---------- Header shell ---------- */
.kte-hdr {
  position: fixed;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--kte-line);
  box-shadow: 0 4px 24px rgba(28, 27, 27, .08);
}

.kte-hdr__inner {
  max-width: 1440px;
  margin: 0 auto;
  height: var(--kte-hdr-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ---------- Brand ---------- */
.kte-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--kte-ink);
}

.kte-brand__mark {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(183, 0, 17, .18));
  transition: transform .25s ease;
}

.kte-brand:hover .kte-brand__mark { transform: scale(1.06) rotate(-2deg); }

.kte-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  white-space: nowrap;
}

.kte-brand__text strong {
  font-size: 18.5px;
  font-weight: 900;
  letter-spacing: -.2px;
  color: var(--kte-ink);
}

.kte-brand__text small {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--kte-red);
}

/* ---------- Single-line navigation ---------- */
.kte-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}

.kte-nav::-webkit-scrollbar { display: none; }

.kte-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 11px 13px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--kte-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.kte-nav__link::after {
  content: "";
  position: absolute;
  right: 13px;
  left: 13px;
  bottom: 5px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--kte-red-bright), var(--kte-red-dark));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.kte-nav__link:hover {
  color: var(--kte-red);
  background: var(--kte-soft);
  transform: translateY(-1px);
}

.kte-nav__link:hover::after { transform: scaleX(1); }

.kte-nav__link.is-active {
  color: var(--kte-red);
  font-weight: 900;
  background: var(--kte-soft);
}

.kte-nav__link.is-active::after { transform: scaleX(1); }

/* ---------- Actions ---------- */
.kte-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kte-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--kte-red-bright), var(--kte-red) 60%, var(--kte-red-dark));
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(183, 0, 17, .25);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.kte-cta:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(183, 0, 17, .35);
}

.kte-cta svg,
.kte-burger svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kte-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--kte-line);
  border-radius: 12px;
  background: #fff;
  color: var(--kte-ink);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

.kte-burger:hover { border-color: var(--kte-red); color: var(--kte-red); }

/* ---------- Mobile / compact menu ---------- */
.kte-mobile { display: none; }

.kte-mobile.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 12px 20px 18px;
  border-top: 1px solid #f2eeee;
  background: #fff;
  max-height: calc(100vh - var(--kte-hdr-h));
  overflow-y: auto;
}

.kte-mobile__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #faf7f7;
  color: #403b3b;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.kte-mobile__link:hover { background: var(--kte-soft); color: var(--kte-red); }

.kte-mobile__link.is-active {
  background: var(--kte-soft);
  color: var(--kte-red);
  box-shadow: inset 0 0 0 1px #f4cccc;
}

.kte-mobile__link::after { content: "‹"; font-size: 16px; opacity: .45; }

@media (max-width: 1279px) {
  .kte-nav { display: none; }
  .kte-burger { display: inline-flex; }
}

@media (max-width: 640px) {
  :root { --kte-hdr-h: 76px; }
  .kte-hdr__inner { padding: 0 12px; gap: 8px; }
  .kte-brand__mark { width: 44px; height: 44px; }
  .kte-brand__text strong { font-size: 15px; }
  .kte-brand__text small { display: none; }
  .kte-cta { padding: 11px; }
  .kte-cta span { display: none; }
  .kte-mobile.is-open { grid-template-columns: 1fr; padding: 10px 12px 16px; }
}

/* Farabar's dark status strip sits below the fixed header */
.kte-topbar { margin-top: var(--kte-hdr-h); }

/* ---------- Floating action buttons ---------- */
.kte-fab {
  position: fixed;
  bottom: 26px;
  z-index: 40;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, opacity .25s ease, visibility .25s ease;
}

.kte-fab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kte-fab--contact {
  right: 24px;
  background: linear-gradient(135deg, var(--kte-red-bright), var(--kte-red) 60%, var(--kte-red-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(183, 0, 17, .35);
}

.kte-fab--contact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(220, 38, 38, .55);
  animation: kteFabRing 2.6s cubic-bezier(.4, 0, .6, 1) infinite;
  pointer-events: none;
}

@keyframes kteFabRing {
  0% { transform: scale(1); opacity: .8; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}

.kte-fab--contact:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(183, 0, 17, .45);
  color: #fff;
}

.kte-fab--top {
  left: 24px;
  background: #fff;
  color: var(--kte-red);
  border: 1.5px solid #f0d3d3;
  box-shadow: 0 6px 20px rgba(28, 27, 27, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

.kte-fab--top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.kte-fab--top:hover {
  background: var(--kte-soft);
  border-color: var(--kte-red);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(183, 0, 17, .22);
}

@media (max-width: 640px) {
  .kte-fab { width: 47px; height: 47px; bottom: 18px; }
  .kte-fab svg { width: 21px; height: 21px; }
  .kte-fab--contact { right: 14px; }
  .kte-fab--top { left: 14px; }
}