/* ============================================
   BestVoIPProvider.com - Main Stylesheet
   ============================================ */

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

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #10b981;
  --secondary-dark: #0b8a5f;
  --accent: #f59e0b;
  --dark: #14162b;
  --dark-2: #1e2142;
  --ink: #262a41;
  --gray-700: #565b78;
  --gray-500: #7c819c;
  --gray-300: #d9dce8;
  --gray-100: #f3f4fa;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(20, 22, 43, 0.08);
  --shadow-md: 0 4px 14px rgba(20, 22, 43, 0.1);
  --shadow-lg: 0 8px 26px rgba(20, 22, 43, 0.14);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1160px;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background: var(--white);
  font-size: 16.5px;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dark);
  color: #fff;
  padding: 8px 14px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============ Header / Nav ============ */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 20px;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo span { color: #8b83f6; }
.logo:hover { color: #fff; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-menu > li { position: relative; }
.nav-menu a {
  display: block;
  color: #c6c9e2;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 20px 13px;
}
.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: #fff;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 250px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 110;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: block; }
.dropdown-content a {
  color: var(--ink);
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 500;
}
.dropdown-content a:hover { background: var(--gray-100); color: var(--primary); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark-2) 45%, #35317c 100%);
  color: #fff;
  padding: 72px 20px 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0 auto 18px;
}
.hero p {
  font-size: 19px;
  color: #c9cce8;
  max-width: 66ch;
  margin: 0 auto 30px;
}
.hero .eyebrow {
  display: inline-block;
  background: rgba(139, 131, 246, 0.18);
  border: 1px solid rgba(139, 131, 246, 0.45);
  color: #cdc9ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Page-title hero (inner pages) */
.page-hero {
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark-2) 60%, #35317c 100%);
  color: #fff;
  padding: 52px 20px 46px;
}
.page-hero h1 {
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  max-width: 26ch;
}
.page-hero p { font-size: 18px; color: #c9cce8; max-width: 70ch; margin: 0; }
.page-hero .crumbs {
  font-size: 13.5px;
  color: #9da2c8;
  margin-bottom: 16px;
}
.page-hero .crumbs a { color: #9da2c8; text-decoration: none; }
.page-hero .crumbs a:hover { color: #fff; text-decoration: underline; }
.page-hero .rating-line { margin-top: 16px; font-size: 16px; color: #e8e9f7; }
.page-hero .rating-line .stars { margin-right: 8px; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-green { background: var(--secondary); color: #fff; }
.btn-green:hover { background: var(--secondary-dark); color: #fff; }
.btn-white { background: #fff; color: var(--dark); }
.btn-white:hover { background: var(--gray-100); color: var(--dark); }
.btn-outline { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 14.5px; }

/* ============ Stats bar ============ */
.stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  background: var(--dark-2);
  color: #fff;
  padding: 22px 12px;
}
.stat-item { text-align: center; padding: 8px 38px; }
.stat-number { font-size: 30px; font-weight: 800; color: #8b83f6; }
.stat-label { font-size: 13.5px; color: #b9bcda; text-transform: uppercase; letter-spacing: 0.05em; }

/* ============ Sections ============ */
.section { padding: 60px 0; }
.section.alt { background: var(--gray-100); }
.section-header { text-align: center; max-width: 74ch; margin: 0 auto 38px; }
.section-header h2 {
  font-size: clamp(25px, 3.4vw, 34px);
  color: var(--dark);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-header p { color: var(--gray-700); font-size: 17px; }
.section-header.left { text-align: left; margin-left: 0; }

/* ============ Comparison table ============ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: #fff;
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 15px;
}
table.compare th, table.compare td {
  padding: 14px 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray-300);
  vertical-align: top;
}
table.compare thead th {
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare tbody tr:hover { background: #f8f8fd; }
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--dark);
  font-weight: 800;
  font-size: 14px;
}
tr.top-pick { background: #fffcf3; }
tr.top-pick .rank { background: var(--accent); color: #fff; }
.provider-name { font-weight: 800; color: var(--dark); white-space: nowrap; }
.provider-name a { color: var(--dark); text-decoration: none; }
.provider-name a:hover { color: var(--primary); text-decoration: underline; }
.score { font-weight: 800; color: var(--dark); white-space: nowrap; }
.stars { color: var(--accent); letter-spacing: 1.5px; font-size: 13.5px; white-space: nowrap; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-pick { background: #fef3c7; color: #92400e; }
.badge-value { background: #d1fae5; color: #065f46; }
.badge-home { background: #e0e7ff; color: #3730a3; }
.badge-solo { background: #fce7f3; color: #9d174d; }

/* ============ Cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card .card-icon { font-size: 30px; margin-bottom: 12px; }
.card h3 { font-size: 19.5px; color: var(--dark); margin-bottom: 8px; letter-spacing: -0.01em; }
.card h3 a { color: var(--dark); text-decoration: none; }
.card h3 a:hover { color: var(--primary); }
.card p { color: var(--gray-700); font-size: 15px; margin-bottom: 14px; }
.card .card-cta {
  margin-top: auto;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* ============ Review blocks (mini reviews on hub pages) ============ */
.review {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  margin-bottom: 26px;
}
.review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.review-head h3 { font-size: 23px; color: var(--dark); letter-spacing: -0.01em; }
.review-head h3 a { color: var(--dark); text-decoration: none; }
.review-head h3 a:hover { color: var(--primary); }
.review .tagline { color: var(--gray-500); font-size: 15px; margin-bottom: 16px; }
.review .verdict { margin-bottom: 4px; }

.pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 18px 0;
}
.pros-cons h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.pros h4 { color: var(--secondary-dark); }
.cons h4 { color: #b91c1c; }
.pros-cons ul { list-style: none; padding: 0; font-size: 15px; }
.pros-cons li { padding-left: 24px; position: relative; margin-bottom: 7px; }
.pros li::before { content: "✓"; position: absolute; left: 2px; color: var(--secondary); font-weight: 800; }
.cons li::before { content: "✕"; position: absolute; left: 2px; color: #dc2626; font-weight: 800; }
.review-cta { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.review-cta .more-link { font-weight: 700; font-size: 15px; }

/* Spec table (detail pages) */
table.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  margin: 20px 0;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
}
table.specs th, table.specs td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-300);
  text-align: left;
}
table.specs tr:last-child th, table.specs tr:last-child td { border-bottom: none; }
table.specs th {
  background: var(--gray-100);
  color: var(--dark);
  width: 220px;
  font-weight: 700;
  vertical-align: top;
}

/* ============ Steps ============ */
.steps { counter-reset: step; list-style: none; display: grid; gap: 18px; }
.steps li {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 22px 24px 22px 70px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { font-size: 18px; color: var(--dark); margin-bottom: 6px; }
.steps p { color: var(--gray-700); font-size: 15.5px; }

/* ============ FAQ ============ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--dark);
  padding: 16px 46px 16px 20px;
  list-style: none;
  position: relative;
  font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--primary);
}
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 20px 18px; color: var(--gray-700); font-size: 15.5px; }
.faq .faq-body p { margin-bottom: 10px; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ============ Prose / article pages ============ */
.prose { max-width: 780px; }
.prose h2 { color: var(--dark); margin: 38px 0 14px; font-size: 27px; letter-spacing: -0.01em; }
.prose h3 { color: var(--dark); margin: 28px 0 10px; font-size: 20.5px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 26px; margin-bottom: 16px; }
.prose li { margin-bottom: 7px; }
.prose table { font-size: 15px; }

/* ============ Callouts ============ */
.callout {
  border-left: 4px solid var(--primary);
  background: var(--gray-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15.5px;
}
.callout.green { border-left-color: var(--secondary); }
.callout.amber { border-left-color: var(--accent); }
.callout p { margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

/* ============ CTA band ============ */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
}
.cta-band h2 { font-size: 28px; margin-bottom: 10px; letter-spacing: -0.01em; }
.cta-band p { color: #ddddfb; max-width: 62ch; margin: 0 auto 24px; }

/* ============ Disclosure note ============ */
.disclosure-note {
  font-size: 13.5px;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 20px;
}
.disclosure-note a { color: var(--gray-500); }

/* ============ Footer ============ */
.site-footer {
  background: var(--dark);
  color: #b3b7d4;
  padding: 48px 0 30px;
  margin-top: 70px;
  font-size: 14.5px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 30px;
}
.site-footer h4 {
  color: #fff;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #b3b7d4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-about .logo { font-size: 19px; display: inline-block; margin-bottom: 10px; }
.footer-about p { max-width: 46ch; margin-bottom: 10px; }
.footer-disclosure { font-size: 13px; color: #8d92b5; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #8d92b5;
}

/* ============ 404 ============ */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-size: 68px; color: var(--dark); margin-bottom: 8px; }
.error-page p { color: var(--gray-700); margin-bottom: 24px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .hamburger { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 16px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
  }
  .nav-menu.active { display: flex; }
  .nav-menu a { padding: 12px 24px; }
  .dropdown-content {
    display: block;
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0 0 4px;
    min-width: 0;
  }
  .dropdown-content a { color: #9da2c8; padding: 8px 40px; font-size: 14px; }
  .dropdown-content a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
}

@media (max-width: 720px) {
  .footer-cols { grid-template-columns: 1fr; }
  .hero { padding: 52px 20px 46px; }
  .section { padding: 46px 0; }
  .review { padding: 22px; }
  .stat-item { padding: 8px 20px; }
  table.specs th { width: 140px; }
}
