/* ============================================
   DENTICARE — UX/UI Engineering Stylesheet
   Principles: Hierarchy · Trust · Feedback
   ============================================ */

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  z-index: 200;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* --- Nav brand logo --- */
.nav {
  justify-content: space-between !important;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__brand-text {
  font-size: .9375rem;
  color: var(--slate-700);
  letter-spacing: .02em;
}
.nav__brand-text strong { color: var(--teal); font-weight: 800; }

/* --- Hamburger menu --- */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background .15s;
}
.nav__hamburger:hover { background: var(--teal-50); }
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--slate-700);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Reveal on scroll animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }
.reveal:nth-child(4) { transition-delay: .3s; }

/* ============================================
   STATS BAR — Social Proof
   ============================================ */
.stats-bar {
  background: var(--white);
  border-top: 1px solid var(--slate-100);
  border-bottom: 1px solid var(--slate-100);
  padding: 36px 0;
}
.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  text-align: center;
  padding: 16px 24px;
  border-right: 1px solid var(--slate-100);
}
.stat:last-child { border-right: none; }
.stat__number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.stat__number--star { color: #D4A017; }
.stat__label {
  font-size: .8125rem;
  color: var(--slate-500);
  font-weight: 500;
  line-height: 1.3;
}

/* ============================================
   TESTIMONIALS — Trust & Social Proof
   ============================================ */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.testi-card {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testi-card::before {
  content: '\201C';
  position: absolute;
  top: 16px; right: 22px;
  font-size: 4rem;
  color: var(--teal-100);
  font-family: Georgia, serif;
  line-height: 1;
}
.testi-card__stars {
  color: #D4A017;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.testi-card__text {
  font-size: .9rem;
  color: var(--slate-700);
  line-height: 1.65;
  margin-bottom: 20px;
  font-style: italic;
}
.testi-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-card__avatar {
  width: 40px; height: 40px;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.testi-card__avatar--b { background: #8B6DC0; }
.testi-card__avatar--c { background: #C06870; }
.testi-card__name { font-size: .875rem; font-weight: 700; color: var(--slate-900); }
.testi-card__service { font-size: .75rem; color: var(--teal); font-weight: 500; }

/* ============================================
   FAQ ACCORDION — Cognitive Load Reduction
   ============================================ */
.faq__wrap { max-width: 760px; }
.faq__list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--white);
  border: 1.5px solid var(--slate-100);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item.open { border-color: var(--teal); box-shadow: 0 4px 16px rgba(107,173,166,.12); }

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--slate-900);
  cursor: pointer;
  transition: color .15s;
}
.faq-item__q:hover { color: var(--teal); }
.faq-item__q::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform .25s;
}
.faq-item.open .faq-item__q::after { transform: rotate(45deg); }

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .32s ease, padding .2s;
}
.faq-item.open .faq-item__a { max-height: 240px; }
.faq-item__a p {
  padding: 0 22px 20px;
  font-size: .9rem;
  color: var(--slate-500);
  line-height: 1.7;
}

/* ============================================
   FORM UX — Feedback & Validation
   ============================================ */
.form-group--error .form-input { border-color: #C06870; background: #FFF5F5; }
.form-group--success .form-input { border-color: var(--teal); }

.form-hint {
  font-size: .75rem;
  color: var(--slate-500);
  margin-top: 4px;
}
.form-hint--error { color: #C06870; }
.form-hint--success { color: var(--teal-dark); }

/* Focus ring for accessibility */
.btn:focus-visible,
.nav__link:focus-visible,
.faq-item__q:focus-visible,
.chat-quick__btn:focus-visible,
.service-btn:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

/* ============================================
   RESPONSIVE UX
   ============================================ */
@media (max-width: 768px) {
  .nav__hamburger { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + 2px);
    left: 0; right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--slate-100);
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
    z-index: 99;
    gap: 4px;
  }
  .nav__links.open { display: flex; }
  .nav__link { justify-content: flex-start; }

  .stats-bar__grid { grid-template-columns: 1fr 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--slate-100); }
  .stat:nth-child(odd) { border-right: 1px solid var(--slate-100); }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: none; }

  .testimonials__grid { grid-template-columns: 1fr; }
  .faq__wrap { max-width: 100%; }
}

@media (max-width: 480px) {
  .stat__number { font-size: 1.75rem; }
  .stats-bar__grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   CTR OPTIMIZATION (Conversion Rate)
   ============================================ */

/* Pulse animation for primary CTA */
@keyframes cta-pulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 173, 166, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(107, 173, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 173, 166, 0); }
}
.btn--pulse {
  animation: cta-pulse 2s infinite;
}

/* Urgency Text under Hero */
.hero__urgency {
  font-size: 0.875rem;
  color: var(--slate-700);
  margin-top: 16px;
  background: var(--teal-50);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px dashed var(--teal-light);
}

/* Floating Mobile CTA */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 32px rgba(107, 173, 166, 0.4);
  z-index: 1000;
  text-decoration: none;
  align-items: center;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  justify-content: center;
  text-align: center;
}
@media (max-width: 768px) {
  .floating-cta {
    display: flex;
    animation: cta-pulse 2s infinite;
  }
  /* Add padding to body so floating button doesn't hide footer content */
  body {
    padding-bottom: 80px;
  }
}

