/* Crowndown SiteOrigin Widgets — supplemental styles */
/* Inherits all design tokens from theme.css */

/* ═══════════════════════════════════════════
   CD: SECTION HEADER WIDGET
═══════════════════════════════════════════ */
.cd-section-header {
  margin-bottom: 2.5rem;
}
.cd-section-header--center {
  text-align: center;
}
.cd-section-header--left {
  text-align: left;
}
.cd-section-header h2 {
  margin: 0.75rem 0 1rem;
}
.cd-section-header .dark-body {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.cd-section-header--left .dark-body {
  margin-left: 0;
}
.cd-section-header--dark h2 {
  color: #fff;
}
.cd-section-header--dark .section-desc {
  color: rgba(255,255,255,0.65);
}
.cd-section-header .blue-rule {
  width: 48px;
  height: 3px;
  background: var(--blue-500);
  border-radius: 2px;
  margin: 0.75rem auto 1rem;
}
.cd-section-header--left .blue-rule {
  margin-left: 0;
}
.text-green-600 { color: var(--green-600); }

/* ═══════════════════════════════════════════
   CD: STATS BAR WIDGET
═══════════════════════════════════════════ */
.cd-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.cd-stats-bar--centered {
  justify-content: center;
}
.cd-stats-bar--light {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.cd-stats-bar--dark {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.cd-stats-bar .hero-stat {
  padding: 0.5rem 1.5rem;
  text-align: center;
  flex: 1 1 auto;
}
.cd-stats-bar .hero-stat--highlight {
  background: rgba(245,165,36,0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(245,165,36,0.25);
  padding: 0.625rem 1.5rem;
}
.cd-stats-bar .hstat-val {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
}
.cd-stats-bar--light .hstat-val {
  color: var(--blue-600);
}
.cd-stats-bar--light .hero-stat--highlight .hstat-val {
  color: var(--gold);
}
.cd-stats-bar .hstat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}
.cd-stats-bar--dark .hstat-label  { color: rgba(255,255,255,0.55); }
.cd-stats-bar--light .hstat-label { color: var(--gray-500); }
.cd-stats-bar .hstat-divider {
  width: 1px;
  height: 40px;
  flex-shrink: 0;
  align-self: center;
}
.cd-stats-bar--dark  .hstat-divider { background: rgba(255,255,255,0.1); }
.cd-stats-bar--light .hstat-divider { background: var(--gray-200); }

/* ═══════════════════════════════════════════
   CD: FEATURE CARDS WIDGET
═══════════════════════════════════════════ */
.cd-feature-cards {
  display: grid;
  gap: 1.25rem;
}
.cd-feature-cards--cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); }
.cd-feature-cards--cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.cd-feature-cards--cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }

.cd-fcard {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cd-fcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Default: dark card */
.cd-fcard--default {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.cd-fcard--default .cd-fcard__title { color: #fff; }
.cd-fcard--default .cd-fcard__body  { color: rgba(255,255,255,0.65); }

/* Problem card */
.cd-fcard--problem {
  background: var(--red-50);
  border: 1px solid var(--red-200);
}
.cd-fcard--problem .cd-fcard__title { color: var(--gray-900); }
.cd-fcard--problem .cd-fcard__body  { color: var(--gray-500); }

/* Solution card */
.cd-fcard--solution {
  background: var(--green-50);
  border: 1px solid var(--green-200);
}
.cd-fcard--solution .cd-fcard__title { color: var(--gray-900); }
.cd-fcard--solution .cd-fcard__body  { color: var(--gray-500); }

/* Light card */
.cd-fcard--light {
  background: #fff;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.cd-fcard--light .cd-fcard__title { color: var(--gray-900); }
.cd-fcard--light .cd-fcard__body  { color: var(--gray-500); }

.cd-fcard__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: rgba(59,130,246,0.12);
  color: var(--blue-400);
  margin-bottom: 1rem;
}
.cd-fcard--light .cd-fcard__icon,
.cd-fcard--problem .cd-fcard__icon,
.cd-fcard--solution .cd-fcard__icon {
  background: rgba(59,130,246,0.08);
  color: var(--blue-600);
}
.cd-fcard__icon svg { width: 20px; height: 20px; }

.cd-fcard__stat {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.cd-fcard__stat--green { color: var(--green-600); }
.cd-fcard--light   .cd-fcard__stat { color: var(--blue-600); }
.cd-fcard--problem .cd-fcard__stat { color: var(--red-600); }

.cd-fcard__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.cd-fcard__body {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.problem-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-600);
  background: var(--red-100);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* ═══════════════════════════════════════════
   CD: COMPARISON TABLE WIDGET
═══════════════════════════════════════════ */
.cd-widget-comparison {
  overflow-x: auto;
}
.cd-comparison-headline {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* ═══════════════════════════════════════════
   CD: TESTIMONIALS WIDGET
═══════════════════════════════════════════ */
.cd-testi-heading {
  text-align: center;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.cd-testi-heading--dark { color: #fff; }

.cd-testi-grid {
  display: grid;
  gap: 1.25rem;
}
.cd-testi-grid--cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); }
.cd-testi-grid--cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }

.about-tcard--dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.about-tcard--dark p,
.about-tcard--dark strong { color: rgba(255,255,255,0.9); }
.tcard-quote--blue { color: var(--blue-500); }

/* ═══════════════════════════════════════════
   CD: CTA BANNER WIDGET
═══════════════════════════════════════════ */
.cd-cta-banner {
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
}
.cd-cta-banner--dark {
  background: linear-gradient(135deg, var(--dark-800) 0%, var(--dark-600) 100%);
  color: #fff;
}
.cd-cta-banner--light {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-900);
}
.cd-cta-banner--blue {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
  color: #fff;
}
.cd-cta-banner__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.cd-cta-banner__headline {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.cd-cta-banner--light .cd-cta-banner__headline { color: var(--gray-900); }
.cd-cta-banner__sub {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.75;
}
.cd-cta-banner--light .cd-cta-banner__sub { opacity: 1; color: var(--gray-500); }
.cd-cta-banner__btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.cd-cta-banner__note {
  font-size: 0.8125rem;
  opacity: 0.5;
  margin: 0;
}
.cd-cta-banner--light .cd-cta-banner__note { color: var(--gray-500); opacity: 1; }
/* btn-outline-light on light backgrounds */
.cd-cta-banner--light .btn-outline-light {
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}
.cd-cta-banner--light .btn-outline-light:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

/* ═══════════════════════════════════════════
   CD: FAQ WIDGET
═══════════════════════════════════════════ */
.cd-faq-widget {
  max-width: 860px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   CD: CONTACT FORM WIDGET
═══════════════════════════════════════════ */
.cd-contact-widget {
  max-width: 680px;
  margin: 0 auto;
}
.cd-contact-widget--with-aside {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .cd-contact-widget--with-aside {
    grid-template-columns: 1fr;
  }
}
/* Contact form card in widget context */
.cd-contact-widget .contact-form-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.cd-contact-widget .contact-form-card h3 {
  color: var(--gray-900);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.cd-contact-widget .contact-form-card > p {
  color: var(--gray-500);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .cd-stats-bar {
    gap: 0.5rem;
    flex-direction: column;
  }
  .cd-stats-bar .hstat-divider {
    width: 80px;
    height: 1px;
  }
  .cd-cta-banner {
    padding: 2rem 1.25rem;
  }
}
