/* ==========================================================================
   TeleHealthRanks — global stylesheet
   Design language: premium dark theme matched to the TeleHealthRanked
   YouTube channel — deep navy, electric blue, generous white space,
   pill buttons, editorial typography. Built on top of Bootstrap 5.
   ========================================================================== */

:root {
  --thr-paper: #0a1524;          /* deep navy page background */
  --thr-panel: #101f33;          /* raised card navy */
  --thr-panel-deep: #16283f;
  --thr-line: #1e3350;           /* subtle borders */
  --thr-ink: #edf4fb;            /* near-white text */
  --thr-ink-soft: #aabfd6;
  --thr-ink-faint: #6d86a3;
  --thr-accent: #2e9bff;         /* electric blue */
  --thr-accent-deep: #1e88f2;
  --thr-accent-soft: #102c4c;    /* dark blue chip background */
  --thr-accent-text: #7cc1ff;    /* light blue text on dark chips */
  --thr-gold: #f2b01e;
  --thr-dark: #060e1a;           /* footer / deepest band */
  --thr-radius: 20px;
  --thr-radius-sm: 12px;
}

/* ---------- Base ---------- */

body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--thr-ink);
  background: var(--thr-paper);
  font-size: 1.0rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--thr-ink);
  line-height: 1.18;
}

h1 { font-weight: 700; }

a { color: var(--thr-accent); text-decoration: none; }
a:hover { color: #6fbcff; text-decoration: underline; }

.text-soft { color: var(--thr-ink-soft); }
.text-faint { color: var(--thr-ink-faint); }

.section-pad { padding: 4.5rem 0; }
@media (max-width: 767px) { .section-pad { padding: 3rem 0; } }

.bg-panel { background: #0d1a2d; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--thr-accent);
  margin-bottom: 0.75rem;
}

/* Two-tone editorial headline: bright lead + muted tail */
.headline-duo .muted { color: var(--thr-ink-faint); }

/* ---------- Navbar ---------- */

.thr-navbar {
  background: rgba(8, 17, 30, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--thr-line);
}

.thr-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--thr-ink);
}

.thr-navbar .navbar-brand .brand-mark {
  color: var(--thr-accent);
}

.thr-navbar .nav-link {
  color: var(--thr-ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.thr-navbar .nav-link:hover,
.thr-navbar .nav-link.active { color: #fff; }

.thr-navbar .navbar-toggler {
  border-color: var(--thr-line);
}

.thr-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23aabfd6' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.thr-navbar .dropdown-menu {
  background: #0f2036;
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius-sm);
  overflow: hidden;
}

.thr-navbar .dropdown-item { color: var(--thr-ink-soft); }
.thr-navbar .dropdown-item:hover,
.thr-navbar .dropdown-item:focus { background: #16304e; color: #fff; }

/* ---------- Buttons ---------- */

.btn-thr {
  background: #fff;
  color: #0a1524;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #fff;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-thr:hover { background: #d9e7f5; border-color: #d9e7f5; color: #0a1524; }

.btn-thr-outline {
  background: transparent;
  color: var(--thr-ink);
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #3a557a;
}
.btn-thr-outline:hover { background: #fff; border-color: #fff; color: #0a1524; }

.btn-thr-accent {
  background: var(--thr-accent-deep);
  color: #fff;
  border-radius: 999px;
  padding: 0.95rem 2.2rem;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  border: 1px solid var(--thr-accent-deep);
  box-shadow: 0 6px 26px rgba(30, 136, 242, 0.45);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-thr-accent:hover {
  background: #3ea1ff;
  border-color: #3ea1ff;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(30, 136, 242, 0.6);
}

/* ---------- Hero ---------- */

.hero {
  padding: 5.5rem 0 4rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 18ch;
}

.hero .lead-copy {
  font-size: 1.15rem;
  color: var(--thr-ink-soft);
  max-width: 54ch;
}

.hero-meta {
  font-size: 0.88rem;
  color: var(--thr-ink-faint);
}

/* ---------- Ranking cards ---------- */

.rank-card {
  background: var(--thr-panel);
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius);
  padding: 2rem;
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border-color: #2a4468;
}

.rank-card.rank-featured {
  border: 2px solid var(--thr-accent);
  box-shadow: 0 0 0 1px rgba(46, 155, 255, 0.15), 0 16px 48px rgba(0, 0, 0, 0.3);
}

.rank-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--thr-panel-deep);
  color: var(--thr-ink);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-card.rank-featured .rank-badge {
  background: var(--thr-accent-deep);
  color: #fff;
}

.pick-label {
  position: absolute;
  top: -13px;
  left: 2rem;
  background: var(--thr-accent-deep);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
}

.score-pill {
  background: var(--thr-accent-soft);
  color: var(--thr-accent-text);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  white-space: nowrap;
}

.rank-facts {
  font-size: 0.92rem;
  color: var(--thr-ink-soft);
}

.rank-facts .fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--thr-ink-faint);
  display: block;
}

.rank-facts .fact-value {
  font-weight: 600;
  color: var(--thr-ink);
}

/* ---------- Pros / cons ---------- */

.pros-cons { font-size: 0.95rem; }

.pros-cons ul { list-style: none; padding-left: 0; margin-bottom: 0; }

.pros-cons li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.45rem;
}

.pros-cons .pro li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.95em;
  height: 0.95em;
  background: var(--thr-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pros-cons .con li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.95em;
  height: 0.95em;
  background: var(--thr-ink-faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 7h10a1 1 0 1 1 0 2H3a1 1 0 1 1 0-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 7h10a1 1 0 1 1 0 2H3a1 1 0 1 1 0-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Comparison table ---------- */

.thr-table {
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius-sm);
  overflow: hidden;
}

/* pages add .bg-white on the wrapper — neutralize it in dark theme */
.thr-table.bg-white { background-color: var(--thr-panel) !important; }

.thr-table table {
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-color: var(--thr-ink-soft);
}

.thr-table thead th {
  background: var(--thr-panel-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--thr-ink-soft);
  font-weight: 600;
  border-bottom: 1px solid var(--thr-line);
  padding: 0.9rem 1rem;
  white-space: nowrap;
}

.thr-table tbody td {
  padding: 0.95rem 1rem;
  vertical-align: middle;
  font-size: 0.93rem;
  color: var(--thr-ink-soft);
  border-color: var(--thr-line);
}

.thr-table tbody td:first-child { font-weight: 600; color: var(--thr-ink); }

/* ---------- Article / review layout ---------- */

.article-header { padding: 4rem 0 2.5rem; }

.article-header h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); max-width: 24ch; }

.article-body {
  font-size: 1.05rem;
  color: #c6d5e4;
  max-width: 46rem;
}

.article-body h2 {
  font-size: 1.55rem;
  margin-top: 2.8rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body p { margin-bottom: 1.15rem; }

.article-body ul, .article-body ol { margin-bottom: 1.15rem; }

.verdict-box {
  background: var(--thr-panel);
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius);
  padding: 2rem;
}

.verdict-box .display-score {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--thr-accent);
}

.callout {
  background: var(--thr-accent-soft);
  border: 1px solid #1b4470;
  border-radius: var(--thr-radius-sm);
  padding: 1.25rem 1.5rem;
  font-size: 0.98rem;
}

.callout-neutral {
  background: var(--thr-panel);
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius-sm);
  padding: 1.25rem 1.5rem;
  font-size: 0.98rem;
}

/* ---------- Star rating ---------- */

.stars { color: var(--thr-gold); letter-spacing: 0.1em; font-size: 0.95rem; }

/* ---------- TOC / sidebar ---------- */

.toc-card {
  background: var(--thr-panel);
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius-sm);
  padding: 1.5rem;
  font-size: 0.92rem;
  position: sticky;
  top: 90px;
}

.toc-card .toc-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--thr-ink-faint);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.toc-card a {
  display: block;
  color: var(--thr-ink-soft);
  padding: 0.3rem 0;
}
.toc-card a:hover { color: #fff; text-decoration: none; }

/* ---------- FAQ ---------- */

.accordion-thr .accordion-item {
  border: none;
  border-bottom: 1px solid var(--thr-line);
  background: transparent;
}

.accordion-thr .accordion-button {
  background: transparent;
  font-weight: 600;
  color: var(--thr-ink);
  padding: 1.25rem 0;
  font-size: 1.02rem;
  box-shadow: none;
}

.accordion-thr .accordion-button:not(.collapsed) { color: var(--thr-accent-text); }

.accordion-thr .accordion-button::after {
  filter: invert(0.8) brightness(1.8);
}

.accordion-thr .accordion-body {
  padding: 0 0 1.25rem;
  color: var(--thr-ink-soft);
}

/* ---------- Forms (contact page) ---------- */

.form-control, .form-select {
  background-color: var(--thr-panel-deep);
  border: 1px solid var(--thr-line);
  color: var(--thr-ink);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}

.form-control:focus, .form-select:focus {
  background-color: var(--thr-panel-deep);
  border-color: var(--thr-accent);
  color: var(--thr-ink);
  box-shadow: 0 0 0 0.2rem rgba(46, 155, 255, 0.15);
}

.form-control::placeholder { color: var(--thr-ink-faint); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23aabfd6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}

.form-label { color: var(--thr-ink); }

/* ---------- Video embed ---------- */

.video-frame {
  border-radius: var(--thr-radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--thr-panel-deep);
  border: 1px solid var(--thr-line);
}

.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Disclosure & footer ---------- */

.disclosure-bar {
  font-size: 0.82rem;
  color: var(--thr-ink-faint);
  background: var(--thr-panel);
  border: 1px solid var(--thr-line);
  border-radius: var(--thr-radius-sm);
  padding: 0.75rem 1.25rem;
}

.thr-footer {
  background: var(--thr-dark);
  border-top: 1px solid var(--thr-line);
  color: #93a7bd;
  padding: 3.5rem 0 2rem;
  font-size: 0.92rem;
}

.thr-footer h6 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.thr-footer a { color: #93a7bd; }
.thr-footer a:hover { color: #fff; }

.thr-footer .footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: #64798f;
}

/* ---------- Dark band section (kept for future use) ---------- */

.section-dark {
  background: var(--thr-dark);
  color: #b9c8d8;
}

.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }

.section-dark .dark-card {
  background: transparent;
  border: 1px solid #16334f;
  border-radius: var(--thr-radius);
  padding: 1.75rem;
  height: 100%;
}

.section-dark .dark-card h3 { font-size: 1.05rem; }

.section-dark a { color: #4dabff; }
.section-dark a:hover { color: #8ec8ff; }

/* ---------- Misc ---------- */

.divider { border-top: 1px solid var(--thr-line); }

.updated-tag {
  font-size: 0.82rem;
  color: var(--thr-ink-faint);
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--thr-ink-soft);
}

/* ---------- Sticky CTA bar ---------- */

body.has-sticky-cta { padding-bottom: 96px; }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: rgba(8, 17, 30, 0.97);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--thr-accent-deep);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
  padding: 0.9rem 0;
}

.sticky-cta .sticky-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.sticky-cta .sticky-cta-text {
  font-size: 0.95rem;
  color: var(--thr-ink-soft);
  min-width: 0;
}

.sticky-cta .sticky-cta-text strong { color: #fff; }

.sticky-cta .sticky-cta-deal {
  color: var(--thr-accent-text);
  font-weight: 600;
}

.sticky-cta .btn-thr-accent {
  padding: 0.8rem 2rem;
  font-size: 1.05rem;
  white-space: nowrap;
  flex-shrink: 0;
  animation: cta-pulse 2.4s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 6px 26px rgba(30, 136, 242, 0.45); }
  50% { box-shadow: 0 6px 34px rgba(30, 136, 242, 0.85); }
}

@media (max-width: 575px) {
  .sticky-cta .sticky-cta-text { font-size: 0.82rem; }
  .sticky-cta .btn-thr-accent { padding: 0.7rem 1.4rem; font-size: 0.98rem; }
  body.has-sticky-cta { padding-bottom: 104px; }
}

.author-chip .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--thr-accent-soft);
  color: var(--thr-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
