/* طب تو — صفحه اصلی (لندینگ) */
:root {
  --home-ink: #06111f;
  --home-ink-soft: #0c1c2e;
  --home-mist: #dceaf4;
  --home-sky: #5eb3d4;
  --home-teal: #2a9d8f;
  --home-teal-deep: #1a6b62;
  --home-paper: #f4f8fb;
  --home-line: rgba(94, 179, 212, 0.22);
  --home-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.teb-app.teb-has-bottom-nav.teb-home {
  padding-top: 0;
  overflow-x: clip;
  background: var(--home-paper);
  color: var(--home-ink);
  font-family: var(--teb-font, 'Vazirmatn', system-ui, sans-serif);
}

/* ——— Navbar (لغو گرادیان سبز ثابت design-system) ——— */
.teb-home .teb-site-navbar,
.teb-home .site-navbar {
  background: transparent !important;
  box-shadow: none;
  border-bottom: 1px solid transparent;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  transition: background 0.35s var(--home-ease), border-color 0.35s ease, box-shadow 0.35s ease;
}

.teb-home .teb-site-navbar.is-scrolled,
.teb-home .site-navbar.is-scrolled {
  background: rgba(15, 118, 110, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(13, 84, 78, 0.28);
}

.teb-home .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.teb-home .navbar-brand .brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  padding: 3px;
  box-shadow: 0 6px 18px rgba(6, 17, 31, 0.28);
}

.teb-home .navbar-brand .brand-text {
  font-size: 1.15rem;
  color: #fff;
}

.teb-home .nav-link {
  font-weight: 600;
  opacity: 0.88;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.teb-home .nav-link:hover,
.teb-home .nav-link.active {
  opacity: 1;
  color: #fff !important;
}

/* ——— Hero (فشرده — نه تمام‌صفحه) ——— */
.home-hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 5.25rem 0 2.25rem;
  color: #fff;
  background:
    radial-gradient(ellipse 90% 70% at 85% 15%, rgba(94, 234, 212, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 60% at 10% 80%, rgba(45, 212, 191, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(15, 118, 110, 0.4), transparent 70%),
    linear-gradient(165deg, #0a3d38 0%, #0f5f56 38%, #0d9488 72%, #115e59 100%);
  overflow: hidden;
}

.home-hero__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
  opacity: 0.55;
}

.home-hero__glow {
  position: absolute;
  width: 36vw;
  height: 36vw;
  max-width: 360px;
  max-height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153, 246, 228, 0.22), transparent 68%);
  top: 6%;
  left: 10%;
  filter: blur(8px);
  pointer-events: none;
  animation: homeGlowPulse 8s ease-in-out infinite;
}

@keyframes homeGlowPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.home-hero__vectors {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.home-vec {
  position: absolute;
  color: rgba(220, 234, 244, 0.72);
  opacity: 0.72;
  will-change: transform;
}

.home-vec svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-vec--fill svg {
  fill: currentColor;
  stroke: none;
  opacity: 0.85;
}

.home-vec--a { width: 56px; top: 18%; right: 6%; animation: homeFloatA 11s ease-in-out infinite; }
.home-vec--b { width: 70px; top: 28%; left: 5%; animation: homeFloatB 13s ease-in-out infinite; color: rgba(94, 179, 212, 0.7); }
.home-vec--c { width: 42px; top: 62%; right: 10%; animation: homeFloatC 10s ease-in-out infinite; color: rgba(94, 179, 212, 0.55); }
.home-vec--d { width: 52px; bottom: 22%; left: 10%; animation: homeFloatA 14s ease-in-out infinite 0.5s; color: rgba(42, 157, 143, 0.75); }
.home-vec--e { width: 48px; top: 42%; right: 22%; animation: homeFloatB 12s ease-in-out infinite 0.8s; }
.home-vec--f { width: 54px; top: 14%; left: 24%; animation: homeFloatC 15s ease-in-out infinite; color: rgba(220, 234, 244, 0.5); }
.home-vec--g { width: 40px; bottom: 30%; right: 28%; animation: homeFloatA 9s ease-in-out infinite 1s; }
.home-vec--h { width: 44px; top: 68%; left: 32%; animation: homeFloatB 11s ease-in-out infinite 0.3s; }
.home-vec--i { width: 36px; top: 48%; left: 3%; animation: homeFloatC 16s ease-in-out infinite 0.6s; color: rgba(94, 179, 212, 0.55); }
.home-vec--j { width: 48px; top: 12%; right: 30%; animation: homeFloatA 12s ease-in-out infinite 1.2s; }
.home-vec--k { width: 40px; bottom: 16%; right: 5%; animation: homeFloatB 10s ease-in-out infinite; color: rgba(42, 157, 143, 0.55); }
.home-vec--l { width: 52px; top: 58%; left: 18%; animation: homeFloatC 13s ease-in-out infinite 0.4s; }

@keyframes homeFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); }
  50% { transform: translate3d(0, -8px, 0) rotate(2deg); }
}
@keyframes homeFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(2deg); }
  50% { transform: translate3d(6px, -6px, 0) rotate(-3deg); }
}
@keyframes homeFloatC {
  0%, 100% { transform: translate3d(0, 4px, 0) rotate(0deg); }
  50% { transform: translate3d(-5px, -5px, 0) rotate(3deg); }
}

.home-hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.5rem 2rem;
  align-items: center;
}

.home-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.home-hero__brand {
  display: none;
}

.home-hero__video {
  position: relative;
  z-index: 2;
}

.home-hero__video--mobile {
  display: none;
  margin: 0.35rem 0 0.85rem;
}

.home-hero__video--desktop {
  display: block;
}

.hero-video {
  display: block;
  width: 100%;
  max-width: 460px;
  max-height: 260px;
  margin-inline: auto;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.home-hero__headline {
  margin: 0 0 1.1rem;
  padding-bottom: 0.15em;
  font-size: clamp(1.35rem, 3.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: #f4fbff;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  max-width: 22ch;
  animation: homeReveal 0.9s var(--home-ease) both;
  clear: both;
}

.home-hero__lead {
  display: none;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  margin-bottom: 0.75rem;
  animation: homeReveal 0.9s var(--home-ease) 0.32s both;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.25s var(--home-ease), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.home-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.home-btn--primary {
  background: #fff;
  color: var(--home-ink);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.home-btn--primary:hover {
  color: var(--home-ink);
  box-shadow: 0 18px 42px rgba(94, 179, 212, 0.35);
}

.home-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.home-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.home-btn--soft {
  background: linear-gradient(135deg, rgba(94, 179, 212, 0.95), rgba(42, 157, 143, 0.95));
  color: #06111f;
  box-shadow: 0 10px 28px rgba(42, 157, 143, 0.3);
  font-size: 0.84rem;
  padding: 0.55rem 1rem;
}

.home-btn--soft:hover {
  color: #06111f;
}

.home-install {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  animation: homeReveal 0.9s var(--home-ease) 0.42s both;
}

@keyframes homeReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 40px;
  color: var(--home-paper);
  z-index: 3;
  pointer-events: none;
}

.home-hero__wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ——— Services ——— */
.home-services {
  padding: 4.5rem 0 5rem;
  background: var(--home-paper);
  position: relative;
}

.home-section-head {
  text-align: center;
  margin-bottom: 2.75rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.home-section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--home-ink);
}

.home-section-head h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  margin: 0.85rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--home-sky), var(--home-teal));
}

.home-section-head p {
  margin: 0;
  color: #5a6f82;
  line-height: 1.75;
  font-size: 1.02rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.services-row-rule {
  display: none;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0.55rem 0.4rem 0.45rem;
  box-sizing: border-box;
  overflow: hidden;
  background:
    linear-gradient(160deg,
      rgba(209, 250, 229, 0.94) 0%,
      rgba(167, 243, 208, 0.9) 45%,
      rgba(153, 246, 228, 0.92) 100%) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.9) !important;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(110, 231, 183, 0.55),
    0 0 16px rgba(16, 185, 129, 0.45),
    0 0 32px rgba(45, 212, 191, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 22px rgba(6, 78, 59, 0.08) !important;
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.3s var(--home-ease), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
}

.service-card.is-visible,
.service-card.slide-up {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, 1) !important;
  background:
    linear-gradient(160deg,
      rgba(187, 247, 208, 0.98) 0%,
      rgba(134, 239, 172, 0.95) 50%,
      rgba(94, 234, 212, 0.95) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(167, 243, 208, 0.85),
    0 0 22px rgba(16, 185, 129, 0.65),
    0 0 40px rgba(45, 212, 191, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 32px rgba(6, 78, 59, 0.14) !important;
}

.service-card-disabled {
  opacity: 0.72;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.service-icon-wrapper {
  width: 70%;
  max-width: 112px;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  background: transparent !important;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.service-icon-wrapper .service-icon-img {
  width: 100%;
  height: 100%;
  max-width: 112px;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: transparent !important;
  filter: drop-shadow(0 6px 14px rgba(15, 118, 110, 0.18));
}

.service-icon-wrapper .emoji-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.service-card-meta {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.12rem;
  min-height: 2.6em;
  padding: 0 0.15rem;
  box-sizing: border-box;
  z-index: 1;
}

.service-card-disabled .service-card-meta {
  min-height: 3.2em;
}

.service-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #0f3d3a;
  letter-spacing: -0.01em;
  width: 100%;
  max-width: 100%;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.service-disabled-hint {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.15;
  color: #64748b;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}

/* ——— Stats ——— */
.home-stats {
  padding: 3.5rem 0 4rem;
  background:
    linear-gradient(180deg, #e8f2f7 0%, #f4f8fb 100%);
}

.home-stats .home-section-head h2::after {
  background: linear-gradient(90deg, var(--home-teal), var(--home-sky));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-item {
  margin: 0 !important;
}

.about-stats {
  height: 100%;
  padding: 1.6rem 1rem;
  text-align: center;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(12, 28, 46, 0.06);
  box-shadow: 0 10px 28px rgba(6, 17, 31, 0.05);
  transition: transform 0.3s var(--home-ease);
}

.about-stats:hover {
  transform: translateY(-4px);
}

.stat-number {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--home-teal-deep);
  margin-bottom: 0.35rem;
  background: linear-gradient(120deg, #1a6b62, #2a7ea8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5a6f82;
}

/* ——— Partners ——— */
.partners-section {
  padding: 1.5rem 0 2.5rem;
  background: #fff;
  border-top: 1px solid rgba(12, 28, 46, 0.05);
}

.partners-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.partners-track {
  display: flex;
  width: max-content;
  gap: 0.75rem;
  will-change: transform;
}

@keyframes partnersMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.partner-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--home-paper);
  border: 1px solid rgba(12, 28, 46, 0.06);
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}

.partner-icon .emoji-icon {
  font-size: 0.95rem;
}

.emoji-icon {
  display: inline-block;
  line-height: 1;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .teb-install-zone { display: none !important; }
}

@media (max-width: 991.98px) {
  .home-hero {
    min-height: 0;
    padding: 4.75rem 0 1.25rem;
  }

  .home-hero__layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .home-hero__inner {
    max-width: none;
  }

  .home-hero__video--desktop {
    display: none;
  }

  .home-hero__video--mobile {
    display: block;
  }

  .hero-video {
    max-height: 200px;
    max-width: 360px;
  }

  .home-vec--e,
  .home-vec--g,
  .home-vec--l {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid .stat-item:last-child {
    grid-column: 1 / -1;
    max-width: 240px;
    margin-inline: auto !important;
  }
}

@media (max-width: 767.98px) {
  .home-hero {
    padding: 4.5rem 0 1rem;
  }

  .home-services {
    padding: 1.75rem 0 3.25rem;
  }

  .home-section-head {
    margin-bottom: 1.5rem;
  }

  .home-section-head h2 {
    margin-bottom: 0.45rem;
  }

  .home-section-head h2::after {
    margin-top: 0.55rem;
  }

  .teb-home .home-services .services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 0.7rem;
    row-gap: 1.05rem;
  }

  .teb-home .home-services .services-row-rule {
    display: block;
    grid-column: 1 / -1;
    height: 0;
    margin: 0.2rem 0 0.1rem;
    border: 0;
    border-bottom: 1px solid #168F89;
    opacity: 0.28;
  }

  /*
   * موبایل — کاشی حرفه‌ای:
   * باکس فیروزه‌ای آرام · حاشیه #168F89 · سایه نرم · آیکون حداکثر داخل کادر
   */
  .teb-home .home-services .service-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    gap: 0.45rem !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .teb-home .home-services .service-card:hover {
    transform: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .teb-home .home-services .service-icon-wrapper {
    flex: 0 0 auto !important;
    width: 96% !important;
    max-width: 5.65rem !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 16px !important;
    background: linear-gradient(165deg, #a8e8df 0%, #6ed4c8 48%, #3ebfb0 100%) !important;
    border: 1.5px solid #168F89 !important;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.05),
      0 4px 10px rgba(22, 143, 137, 0.12) !important;
  }

  .teb-home .home-services .service-icon-wrapper .service-icon-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    transform: scale(1.08);
    transform-origin: center center;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.08));
  }

  .teb-home .home-services .service-icon-wrapper .emoji-icon {
    font-size: 2.75rem !important;
    line-height: 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }

  .teb-home .home-services .service-card-meta {
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0.1rem !important;
    min-height: 2.7em !important;
    max-height: none !important;
    gap: 0.1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .teb-home .home-services .service-card-disabled .service-card-meta {
    min-height: 2.7em !important;
  }

  .teb-home .home-services .service-title {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
    color: #0f172a !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: none !important;
    width: 100% !important;
    display: -webkit-box !important;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    hyphens: auto;
  }

  .teb-home .home-services .service-disabled-hint {
    display: none !important;
  }

  .teb-home .home-services .service-card-disabled {
    opacity: 0.55;
  }

  .teb-home .home-services .service-card-disabled .service-icon-wrapper {
    filter: grayscale(0.35);
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-btn {
    width: 100%;
  }

  .home-install {
    flex-direction: column;
  }

  .home-vec--f,
  .home-vec--h,
  .home-vec--i {
    opacity: 0.32;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-vec,
  .home-hero__glow,
  .home-hero__brand,
  .home-hero__headline,
  .home-hero__lead,
  .home-hero__actions,
  .home-install {
    animation: none !important;
  }
}
