/* ==========================================================================
   Dr. Bayatian — Before / After Care page
   Built from Figma export. RTL, Persian (Yekan Bakh).
   ========================================================================== */

:root {
  /* palette (sampled from the Figma export) */
  --navy-950: #131c33;
  --navy-900: #1a2647;
  --navy-800: #223261;
  --navy-700: #2c3f77;
  --navy-600: #3c548f;
  --navy-ink: #1e2a4a;
  --gold-500: #cda15a;
  --gold-400: #ddb977;
  --gold-300: #e8ce9e;
  --bg-page: #ffffff;
  --bg-panel: #f3f5fa;
  --bg-panel-2: #eef1f8;
  --bg-icon-circle: #dce6fb;
  --border-soft: #e8ecf5;
  --text-heading: #1c2a4d;
  --text-body: #5b6785;
  --text-muted: #8891a8;
  --shadow-soft: 0 20px 45px -20px rgba(30, 42, 90, 0.25);
  --shadow-card: 0 12px 30px -14px rgba(30, 42, 90, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-fallback: "YekanBakh", "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  direction: rtl;
  font-family: var(--font-fallback);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: none;
  stroke: currentColor;
}

/* ---------- decorative sparkle bullet ---------- */
.spark {
  color: var(--gold-500);
  width: 16px;
  height: 16px;
  flex: none;
}

/* ==========================================================================
   Scroll reveal animation
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-right { transform: translateX(36px); }
.reveal-right.is-visible { transform: translateX(0); }
.reveal-left { transform: translateX(-36px); }
.reveal-left.is-visible { transform: translateX(0); }
.reveal-scale { transform: scale(.92); }
.reveal-scale.is-visible { transform: scale(1); }

.stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-right, .reveal-left, .reveal-scale {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }

.btn--navy {
  background: linear-gradient(100deg, #93a5dc 0%, #5a6b9c 45%, #2f3b62 100%);
  color: #fff;
  padding: 15px 34px;
  font-size: 14.5px;
  font-weight: 400;
  box-shadow: 0 14px 26px -14px rgba(30, 42, 90, .5);
}
.btn--navy .icon { width: 18px; height: 18px; }

.btn--pill-sm {
  background: linear-gradient(100deg, #93a5dc 0%, #5a6b9c 45%, #2f3b62 100%);
  color: #fff;
  padding: 6px 22px;
  font-size: 12.5px;
  font-weight: 400;
}

/* ==========================================================================
   Section heading badge (navy pill with sparkles) — used by section titles
   ========================================================================== */
.badge-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 16px 36px;
  position: relative;
  isolation: isolate;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.badge-heading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 18px;
  background: linear-gradient(100deg, #93a5dc 0%, #6b7cab 40%, #2f3b62 100%);
  box-shadow: 0 18px 30px -16px rgba(30, 42, 90, .45);
  transform: perspective(90px) rotateX(-7deg);
  transform-origin: center;
}
.testimonials__banner .badge-heading::before,
.faq .badge-heading::before { display: none; }
.badge-heading .spark { color: var(--gold-300); }

.section-head {
  display: flex;
  justify-content: center;
  margin-bottom: 44px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 56px 0 30px;
  text-align: center;
  overflow: hidden;
}

.hero__blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 50% 44%, rgba(176, 194, 248, 0.6), transparent 72%),
    radial-gradient(360px 280px at 30% 65%, rgba(205, 161, 90, 0.1), transparent 70%);
}
.hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(120, 140, 200, 0.18);
  inset: 0;
  margin: auto;
}
.hero__ring--1 { width: 620px; height: 620px; animation: spin-slow 60s linear infinite; }
.hero__ring--2 { width: 460px; height: 460px; animation: spin-slow 46s linear infinite reverse; }

@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 140px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 92%);
}
.hero__inner { position: relative; z-index: 1; }

.hero__stage {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 44px 0 46px;
}

.hero__content { position: relative; z-index: 1; text-align: center; }

.hero__badges {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  position: relative;
  z-index: 3;
}
.hero__pill {
  background: #fff;
  border: 1px solid #cfdcf8;
  border-radius: 999px;
  padding: 12px 34px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--navy-ink);
  box-shadow: 0 12px 26px -16px rgba(80, 110, 200, .45);
  white-space: nowrap;
}
.hero__pill b { color: #8f97b3; font-weight: 500; }

/* decorative scattered stars — shown only on desktop (see media query) */
.hero__deco-star {
  display: block;
  position: absolute;
  z-index: 3;
  width: 38px;
  height: 38px;
  animation: twinkle 2.6s ease-in-out infinite;
}
.hero__deco-star--1 { top: 2px; left: 8%; width: 34px; height: 34px; }
.hero__deco-star--2 { bottom: 0; right: 8%; width: 40px; height: 40px; animation-delay: 1.1s; }

.hero__title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 500;
  color: #2b3658;
  line-height: 1.3;
}
.hero__title-spark {
  display: none;
  width: clamp(20px, 3vw, 34px);
  height: clamp(20px, 3vw, 34px);
  animation: twinkle 2.6s ease-in-out infinite;
}
.hero__title-spark:last-child { animation-delay: 1.1s; }

@keyframes twinkle {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero__subtitle {
  display: block;
  margin: 18px auto 0;
  max-width: 560px;
  font-size: 17px;
  font-weight: 400;
  color: #3d4766;
}

.hero__cta { margin-top: 34px; }

/* ==========================================================================
   Icon nav (procedure shortcuts)
   ========================================================================== */
.icon-nav { padding: 60px 0 20px; }

.icon-nav__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px 18px;
}

.icon-nav__list > li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; }
.icon-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.icon-nav__label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy-ink);
}

.icon-nav__card {
  position: relative;
  width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
}
.icon-nav__card::before {
  content: "";
  position: absolute;
  top: 44px;
  bottom: 12px;
  left: 6px;
  right: 6px;
  border-radius: 26px;
  background: #c9dcfd;
  transition: transform .35s var(--ease);
}
.icon-nav__circle {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #f5f9ff, #e8f0fa 70%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 8px 22px -12px rgba(60, 90, 160, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s var(--ease);
}
.icon-nav__circle img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(24%) sepia(38%) saturate(1250%) hue-rotate(196deg) brightness(92%);
}
.icon-nav__card .btn--pill-sm {
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 18px -8px rgba(30, 42, 90, .55);
}
.icon-nav__item:hover .icon-nav__circle { transform: translateY(-6px); }


/* ==========================================================================
   Care sections (5 procedures, each with a قبل/بعد subsection)
   ========================================================================== */
.care { padding: 40px 0; }

.procedure-title {
  text-align: center;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--navy-ink);
  margin-bottom: 28px;
}

.care__panel {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 46px 22px;
  position: relative;
  overflow: hidden;
}
.care__panel::before,
.care__panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(140, 158, 210, .22);
}
.care__panel::before { width: 340px; height: 340px; inset-inline-start: -140px; bottom: -160px; }
.care__panel::after { width: 220px; height: 220px; inset-inline-start: -80px; bottom: -110px; }

.care .section-head { margin-bottom: 34px; }

.care__groups {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
}

.care__group { min-width: 0; }
.care__group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-700);
  margin-bottom: 12px;
}

.care__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.care__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-body);
}
.care__list .spark { margin-top: 6px; }

/* ==========================================================================
   Testimonials — auto sliding
   ========================================================================== */
.testimonials { padding: 70px 0 90px; }

.testimonials__banner {
  position: relative;
  padding: 44px 0 10px;
  text-align: center;
}
.testimonials__banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 210px;
  border-radius: 44px 44px 50% 50% / 44px 44px 34px 34px;
  background: linear-gradient(100deg, #94a6dc 0%, #6b7cab 45%, #2f3b62 100%);
  z-index: 0;
}
.testimonials__banner .section-head { position: relative; z-index: 1; }
.testimonials__banner .badge-heading {
  background: none;
  border: none;
  box-shadow: none;
  font-size: 22px;
  gap: 22px;
}
.testimonials__banner .badge-heading .spark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .7));
}

.testimonials__viewport {
  position: relative;
  z-index: 1;
  isolation: isolate;
  margin-top: 26px;
  padding: 16px 0 70px;
  overflow: hidden;
}

.testimonials__track {
  display: flex;
  transition: transform .7s var(--ease);
  will-change: transform;
}

.t-card {
  flex: 0 0 100%;
  padding: 0 8px;
}
.t-card__inner {
  background: #fff;
  border-radius: 20px;
  padding: 16px 22px 20px;
  text-align: right;
  box-shadow: 0 24px 50px -22px rgba(30, 42, 90, .35);
}
.t-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #eceef4;
}
.t-card__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-icon-circle), #f3f6fd);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-700);
  font-weight: 800;
  overflow: hidden;
}
.t-card__name { font-size: 15px; font-weight: 500; color: var(--navy-ink); }
.t-card__role { font-size: 11.5px; color: #a0a6b5; margin-top: 2px; }
.t-card__quote { font-size: 12.5px; line-height: 2; color: #9aa0b0; }
.t-card__quote-icon { display: none; }

.testimonials__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.testimonials__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d5d9e6;
  border: none;
  padding: 0;
  transition: all .3s var(--ease);
}
.testimonials__dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: var(--gold-400);
}

.testimonials__arrows {
  display: none;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.testimonials__arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.testimonials__arrow:hover { background: rgba(255, 255, 255, .2); transform: scale(1.06); }
.testimonials__arrow .icon { width: 18px; height: 18px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { padding: 60px 0 110px; }

.faq__tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  margin-bottom: 30px;
  scrollbar-width: none;
}
.faq__tabs::-webkit-scrollbar { display: none; }

.faq__tab {
  flex: none;
  border: none;
  background: #f5f6f9;
  color: #a3a9b8;
  border-radius: 14px;
  padding: 11px 20px;
  font-size: 12.5px;
  font-weight: 500;
  transition: all .25s var(--ease);
}
.faq__tab:hover { color: var(--navy-700); }
.faq__tab.is-active {
  background: linear-gradient(120deg, #7f92c9, var(--navy-800));
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(44, 63, 119, .55);
}

.faq__list { display: flex; flex-direction: column; gap: 16px; padding-right: 22px; }

.faq__item {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px -16px rgba(30, 42, 90, .22);
}
.faq__q {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 52px 22px 22px;
  background: none;
  border: none;
  text-align: right;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-ink);
}
.faq__q-left { display: flex; align-items: center; }
.faq__num {
  position: absolute;
  right: -24px;
  top: 50%;
  width: 56px;
  height: 56px;
  margin-top: -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  color: #fff;
  z-index: 1;
}
.faq__num::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 14px;
  transform: rotate(45deg);
  background: linear-gradient(160deg, #a27031, #ead07c);
  box-shadow: 0 8px 18px -6px rgba(162, 112, 49, .55);
  z-index: -1;
}
.faq .section-head .badge-heading .spark { width: 38px; height: 38px; filter: drop-shadow(0 4px 8px rgba(215, 183, 104, .45)); }
.faq__chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform .35s var(--ease);
  flex: none;
}
.faq__item.is-open .faq__chevron { transform: rotate(180deg); color: var(--navy-700); }

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
}
.faq__a p {
  padding: 0 52px 22px 22px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-body);
}

/* ==========================================================================
   Desktop layout (≥ 1000px)
   ========================================================================== */
@media (min-width: 1000px) {
  .hero { padding: 120px 0 70px; }
  .hero__subtitle { font-size: 18px; }

  /* scattered badges + decorative stars, matching the Figma hero.
     NOTE: top/bottom use px, not %, on purpose — .hero__stage has no
     explicit height, and percentage top/bottom on an absolutely
     positioned element inside an auto-height container resolves to
     "auto" (falls back to static position) per spec, which is why
     these were collapsing together before. */
  .hero__stage { padding: 78px 0 0; }
  .hero__badges { position: static; }
  .hero__pill--1 { position: absolute; top: 2px; right: 66%; z-index: 3; }
  .hero__pill--2 { position: absolute; top: 40px; right: 14%; z-index: 3; }

  .hero__title-spark { display: none; }


  .hero__deco-star--1 { width: 56px; height: 56px; top: 82px; left: auto; right: 90%; }
  .hero__deco-star--2 { width: 66px; height: 66px; top: 212px; bottom: auto; right: 8%; animation-delay: 1.1s; }

  .icon-nav__list > li:last-child:nth-child(odd) { grid-column: auto; justify-self: stretch; }
  .icon-nav__list {
    grid-template-columns: repeat(5, 1fr);
    gap: 22px 14px;
  }

  .care__panel { padding: 64px 60px; }

  .t-card { flex: 0 0 33.3333%; padding: 0 12px; }
  .t-card__inner { transition: transform .5s var(--ease), opacity .5s var(--ease); }
  .t-card:not(.is-center) .t-card__inner {
    transform: scale(.94) translateY(-14px);
    background: #fff;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
    box-shadow: none;
  }
  .t-card.is-center .t-card__inner { transform: scale(1.08) translateY(16px); position: relative; z-index: 2; box-shadow: 0 26px 36px -26px rgba(30, 42, 90, .28); }

  .faq__tabs { justify-content: center; overflow: visible; flex-wrap: wrap; }
}

@media (min-width: 1280px) {
  .container { padding: 0 40px; }
}

/* ==========================================================================
   Scroll cue, back-to-top, justified body copy
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-950));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px -10px rgba(19, 28, 51, .6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { filter: brightness(1.12); }
.back-to-top .icon { width: 22px; height: 22px; }

.care__list li span,
.t-card__quote,
.faq__a p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* concentric ring backdrop for the panel-less care sections (as in Figma):
   drawn on the section box itself and masked on every edge so nothing is cut */
.care--plain { position: relative; overflow: hidden; }
.care--plain > .container { position: relative; z-index: 1; }
.care--plain::before,
.care--plain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.care--plain::before {
  background: repeating-radial-gradient(circle at 0% 38%, transparent 0 58px, rgba(140, 158, 210, .3) 59px 60px);
  -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 46%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, transparent 46%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 72%, transparent 100%);
}
.care--plain::after {
  background: repeating-radial-gradient(circle at 100% 100%, transparent 0 40px, rgba(140, 158, 210, .26) 41px 42px);
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 28%), linear-gradient(to bottom, transparent 40%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to left, #000 0%, transparent 28%), linear-gradient(to bottom, transparent 40%, #000 80%, transparent 100%);
}
.care--plain:nth-of-type(4n)::before {
  background: repeating-radial-gradient(circle at 100% 38%, transparent 0 58px, rgba(140, 158, 210, .3) 59px 60px);
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 46%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to left, #000 0%, transparent 46%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 72%, transparent 100%);
}
.care--plain:nth-of-type(4n)::after {
  background: repeating-radial-gradient(circle at 0% 100%, transparent 0 40px, rgba(140, 158, 210, .26) 41px 42px);
  -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 28%), linear-gradient(to bottom, transparent 40%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, transparent 28%), linear-gradient(to bottom, transparent 40%, #000 80%, transparent 100%);
}
