/* ===================================================================
   SourceValidate Marketing Website — Design System & Shared Styles
   =================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --color-maroon: #691c32;
  --color-maroon-dark: #511526;
  --color-maroon-light: #8a2845;
  --color-gold: #b38e5d;
  --color-green: #1a7a2e;
  --color-green-dark: #15612a;
  --color-bg: #f0f0f0;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-text-muted: #888888;
  --color-border: #e0e0e0;
  --font-primary: 'Montserrat', Arial, Helvetica, sans-serif;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-maroon); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-maroon-dark); }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Spacing --- */
.section {
  padding: 80px 0;
}
.section-sm {
  padding: 48px 0;
}

/* --- Section Headers --- */
.section-title {
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-maroon);
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 48px;
}

/* =================================================================
   NAVIGATION
   ================================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-maroon);
}
.navbar-logo .logo-icon {
  width: 36px;
  height: 36px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-light);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-maroon);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-maroon);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-maroon);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 40px;
  gap: 24px;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 12px 0;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--color-maroon);
}

/* Spacer for fixed navbar */
.nav-spacer { height: 72px; }

/* =================================================================
   BUTTONS
   ================================================================= */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.btn-primary {
  background: var(--color-maroon);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-maroon-dark);
  color: var(--color-white);
}
.btn-secondary {
  background: var(--color-green);
  color: var(--color-white);
}
.btn-secondary:hover {
  background: var(--color-green-dark);
  color: var(--color-white);
}
.btn-outline {
  background: transparent;
  color: var(--color-maroon);
  border: 2px solid var(--color-maroon);
}
.btn-outline:hover {
  background: var(--color-maroon);
  color: var(--color-white);
}
.btn-nav {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* =================================================================
   HERO
   ================================================================= */
.hero {
  background: linear-gradient(135deg, var(--color-maroon) 0%, var(--color-maroon-dark) 100%);
  color: var(--color-white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 50%;
}
.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  color: var(--color-white);
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero .btn-outline {
  border-color: var(--color-white);
  color: var(--color-white);
}
.hero .btn-outline:hover {
  background: var(--color-white);
  color: var(--color-maroon);
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-illustration {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}
.hero-illustration svg {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

/* Gold accent bar */
.gold-bar {
  height: 4px;
  background: var(--color-gold);
}

/* Hero pre-headline */
.hero-pre-headline {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 12px;
}

/* Problem section dark bg */
.problem-section {
  background: #1a1a2e;
  color: var(--color-white);
}
.problem-section .section-title {
  color: var(--color-white);
}
.problem-section .section-subtitle {
  color: rgba(255,255,255,0.8);
}
.problem-section .card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.problem-section .card:hover {
  background: rgba(255,255,255,0.1);
}
.problem-section .card h3 {
  color: #e74c3c;
}
.problem-section .card p {
  color: rgba(255,255,255,0.8);
}

/* =================================================================
   PAGE HERO (inner pages)
   ================================================================= */
.page-hero {
  background: linear-gradient(135deg, var(--color-maroon) 0%, var(--color-maroon-dark) 100%);
  color: var(--color-white);
  padding: 64px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  color: var(--color-white);
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
}

/* =================================================================
   CARDS
   ================================================================= */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-maroon), var(--color-maroon-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--color-white);
  stroke: var(--color-white);
}
.card h3 {
  margin-bottom: 12px;
  color: var(--color-maroon);
}
.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* =================================================================
   STEPS
   ================================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}
.step {
  text-align: center;
  position: relative;
}
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-maroon);
  color: var(--color-white);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step h4 {
  margin-bottom: 8px;
  color: var(--color-maroon);
}
.step p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Step connector lines */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 36px);
  width: calc(100% - 72px);
  height: 2px;
  background: var(--color-border);
}

/* =================================================================
   STATS BANNER
   ================================================================= */
.stats-banner {
  background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
  color: var(--color-white);
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}
.stat-item h3 {
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: 8px;
}
.stat-item p {
  opacity: 0.9;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* 4-column variant */
.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.stats-grid-4 .stat-item h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

/* =================================================================
   CTA SECTION
   ================================================================= */
.cta-section {
  background: var(--color-maroon);
  color: var(--color-white);
  padding: 72px 0;
  text-align: center;
}
.cta-section h2 {
  color: var(--color-white);
  margin-bottom: 12px;
}
.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
}
.cta-section .btn-secondary {
  font-size: 1.05rem;
  padding: 16px 40px;
}

/* =================================================================
   FEATURE DETAIL (alternating rows)
   ================================================================= */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 48px 0;
}
.feature-row:nth-child(even) .feature-text {
  order: 2;
}
.feature-row:nth-child(even) .feature-visual {
  order: 1;
}
.feature-text h3 {
  color: var(--color-maroon);
  margin-bottom: 16px;
  font-size: 1.5rem;
}
.feature-text p {
  color: var(--color-text-light);
  margin-bottom: 12px;
}
.feature-text ul {
  list-style: none;
  padding: 0;
}
.feature-text ul li {
  padding: 6px 0 6px 28px;
  position: relative;
  color: var(--color-text-light);
  font-size: 0.95rem;
}
.feature-text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 16px;
  height: 16px;
  background: var(--color-green);
  border-radius: 50%;
  opacity: 0.8;
}
.feature-text ul li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: rotate(-45deg);
}
.feature-visual {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.feature-visual svg {
  width: 100%;
  max-width: 240px;
}

/* =================================================================
   CONTACT
   ================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
.contact-card h3 {
  color: var(--color-maroon);
  margin-bottom: 24px;
}
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.contact-item-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, var(--color-maroon), var(--color-maroon-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-item-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-white);
  stroke: var(--color-white);
}
.contact-item h4 {
  margin-bottom: 4px;
  color: var(--color-text);
}
.contact-item p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}
.contact-item a {
  color: var(--color-maroon);
  font-weight: 600;
}

/* =================================================================
   ABOUT
   ================================================================= */
.about-mission {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.about-mission p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  line-height: 1.8;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.about-card {
  text-align: center;
}
.about-card .card-icon {
  margin: 0 auto 20px;
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
  background: var(--color-maroon-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 12px;
}
.footer h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: var(--color-gold);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* =================================================================
   PRICING
   ================================================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}
.pricing-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  border-top: 4px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.pricing-card.featured {
  border-top-color: var(--color-maroon);
  box-shadow: var(--shadow-elevated);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-maroon);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 20px;
}
.pricing-tier {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-maroon);
  margin-bottom: 8px;
}
.pricing-price {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.1;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}
.pricing-desc {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin-bottom: 32px;
  flex: 1;
}
.pricing-features li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--color-text-light);
  font-size: 0.9rem;
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 16px;
  height: 16px;
  background: var(--color-green);
  border-radius: 50%;
  opacity: 0.8;
}
.pricing-features li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: rotate(-45deg);
}
.pricing-card .btn {
  width: 100%;
  text-align: center;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 48px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}
.comparison-table th {
  background: var(--color-maroon);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.comparison-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
}
.comparison-table tbody tr:nth-child(even) {
  background: rgba(105, 28, 50, 0.03);
}
.comparison-table tbody tr:hover {
  background: rgba(105, 28, 50, 0.06);
}
.check {
  color: var(--color-green);
  font-weight: 700;
  font-size: 1.1rem;
}
.dash {
  color: var(--color-text-muted);
}

/* =================================================================
   FAQ
   ================================================================= */
.faq-category {
  margin-bottom: 40px;
}
.faq-category h3 {
  color: var(--color-maroon);
  margin-bottom: 16px;
  font-size: 1.3rem;
}
.faq-item {
  background: var(--color-white);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  transition: color var(--transition);
}
.faq-question:hover {
  color: var(--color-maroon);
}
.faq-question .faq-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-maroon);
  transition: transform var(--transition), background var(--transition);
}
.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
  background: var(--color-maroon);
  color: var(--color-white);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--color-text-light);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* =================================================================
   404 PAGE
   ================================================================= */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-code {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--color-maroon);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.15;
}
.error-page h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}
.error-page p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 32px;
}
.error-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.error-links a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* =================================================================
   SCROLL ANIMATION
   ================================================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================================================================
   CHAT WIDGET
   ================================================================= */

/* --- Toggle Button --- */
#jv-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--color-maroon);
  color: var(--color-white);
  cursor: pointer;
  box-shadow: var(--shadow-elevated);
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
#jv-chat-toggle:hover {
  background: var(--color-maroon-dark);
  transform: scale(1.05);
}
#jv-chat-toggle svg {
  width: 24px;
  height: 24px;
}
#jv-chat-toggle .jv-chat-icon-close {
  display: none;
}
#jv-chat-toggle.jv-open .jv-chat-icon-open {
  display: none;
}
#jv-chat-toggle.jv-open .jv-chat-icon-close {
  display: block;
}

/* --- Chat Panel --- */
#jv-chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9998;
  width: 380px;
  max-height: 520px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
#jv-chat-panel.jv-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* --- Header --- */
.jv-chat-header {
  background: var(--color-maroon);
  color: var(--color-white);
  padding: 14px 16px;
  display: flex;
  align-items: center;
}
.jv-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}
.jv-chat-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* --- Messages Area --- */
#jv-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  max-height: 360px;
  background: var(--color-bg);
}

/* --- Message Bubbles --- */
.jv-msg {
  max-width: 85%;
  line-height: 1.5;
}
.jv-msg p {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.jv-msg-assistant {
  align-self: flex-start;
}
.jv-msg-assistant p {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 2px;
}
.jv-msg-user {
  align-self: flex-end;
}
.jv-msg-user p {
  background: var(--color-maroon);
  color: var(--color-white);
  border-bottom-right-radius: 2px;
}

/* --- Typing Indicator --- */
.jv-typing-dots {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-bottom-left-radius: 2px;
  width: fit-content;
}
.jv-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: jvBounce 1.2s infinite;
}
.jv-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.jv-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes jvBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* --- Input Form --- */
#jv-chat-form {
  display: flex;
  border-top: 1px solid var(--color-border);
  padding: 10px;
  gap: 8px;
  background: var(--color-white);
}
#jv-chat-input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}
#jv-chat-input:focus {
  border-color: var(--color-maroon);
}
#jv-chat-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  background: var(--color-maroon);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
#jv-chat-send:hover {
  background: var(--color-maroon-dark);
}
#jv-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#jv-chat-send svg {
  width: 18px;
  height: 18px;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  #jv-chat-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
    max-height: 70vh;
  }
  #jv-chat-toggle {
    bottom: 16px;
    right: 16px;
  }
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 12px 12px; }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-illustration { max-width: 280px; padding: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-grid-4 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row:nth-child(even) .feature-text { order: 0; }
  .feature-row:nth-child(even) .feature-visual { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 56px 0; }
  .page-hero { padding: 48px 0; }
}
