/* ── Chat247 custom theme CSS ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1e293b;
  background: #fff;
}

/* Solid brand accent text */
.text-gradient {
  background: none;
  -webkit-text-fill-color: #025280;
  color: #025280;
}

/* Cards */
.card-light {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.22s ease;
}
.card-light:hover {
  border-color: #b8dcef;
  box-shadow: 0 6px 20px rgba(2,82,128,0.12);
  transform: translateY(-2px);
}

/* Feature cards: four per row on desktop, centered when the final row is short. */
.feature-card-grid > .feature-card {
  flex: 0 1 calc((100% - 3.75rem) / 4);
  max-width: 18.75rem;
  min-width: 0;
}
@media (max-width: 1023px) {
  .feature-card-grid > .feature-card {
    flex-basis: calc((100% - 1.25rem) / 2);
    max-width: 30rem;
  }
}
@media (max-width: 639px) {
  .feature-card-grid > .feature-card {
    flex-basis: 100%;
  }
}

/* Primary button */
.btn-primary {
  position: relative;
  display: inline-block;
  background: #ce2030;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.625rem;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #a91829;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(206,32,48,0.42); transform: translateY(-1px); }
.btn-primary span { position: relative; z-index: 1; }

/* Secondary button */
.btn-secondary {
  display: inline-block;
  background: #fff;
  color: #1e293b !important;
  border: 1.5px solid #e2e8f0;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.625rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: #025280; color: #025280 !important; }

/* Fade-in scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: none; }
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* Navbar */
#chat247-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}
#chat247-nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  border-bottom: 1px solid rgba(226,232,240,0.8);
}
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; }

/* Pricing toggle */
.pricing-period-btn {
  padding: 0.375rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background 0.18s, color 0.18s;
}
.pricing-period-btn.active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.pricing-period-mobile { display: none; }

@media (max-width: 767px) {
  .pricing-period-desktop { display: none !important; }
  .pricing-period-mobile {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.25rem;
    margin: 0 0 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
  }
  .pricing-plan-card.plan-featured .pricing-period-mobile {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.26);
  }
  .pricing-period-mobile-btn {
    min-height: 2.75rem;
    padding: 0.35rem 0.25rem;
    border: none;
    border-radius: 0.55rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
  }
  .pricing-plan-card.plan-featured .pricing-period-mobile-btn { color: #fff; }
  .pricing-period-mobile-btn.active {
    background: #ce2030;
    color: #fff;
    box-shadow: 0 1px 4px rgba(206,32,48,0.3);
  }
  .pricing-period-mobile-btn span {
    display: block;
    margin-top: 0.15rem;
    color: #16a34a;
    font-size: 0.625rem;
  }
  .pricing-plan-card.plan-featured .pricing-period-mobile-btn span { color: #86efac; }
  .pricing-period-mobile-btn.active span { color: #fff; }
}

/* Pricing card featured */
.plan-featured {
  background: #025280;
  color: #fff;
}

/* FAQ accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.32s ease, opacity 0.28s ease;
}
.faq-answer.open {
  max-height: 500px;
  opacity: 1;
}
.faq-chevron { transition: transform 0.3s ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-item.open { border-color: #b8dcef !important; box-shadow: 0 2px 12px rgba(2,82,128,0.1) !important; }

/* Carousel */
.carousel-slide { transition: opacity 0.32s ease, transform 0.32s ease; }
.carousel-dot {
  height: 0.625rem; border-radius: 9999px;
  background: #cbd5e1; border: none; cursor: pointer;
  transition: width 0.3s, background 0.3s;
  width: 0.625rem;
}
.carousel-dot.active { width: 1.5rem; background: #ce2030; }

/* Contact form */
.form-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-input:focus { border-color: #025280; box-shadow: 0 0 0 3px rgba(2,82,128,0.12); }

/* Comparison table */
.compare-table th, .compare-table td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.6;
}
.compare-table thead th { font-weight: 700; background: #f8fafc; }
