/* ============================================================
   HEALTH ANALYSIS PORTAL — Design System v2.0
   Editorial Health Portal — NerveCalm Review
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

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

:root {
  --green-dark:   #0D3D40;
  --green-mid:    #1a5c60;
  --green-light:  #e8f4f4;
  --gold:         #D4A017;
  --gold-bright:  #E8C840;
  --gold-pale:    #fdf8e8;
  --text-dark:    #1a1a2e;
  --text-body:    #2d3748;
  --text-muted:   #718096;
  --border:       #e2e8f0;
  --bg-off:       #f8f9fa;
  --bg-white:     #ffffff;
  --red:          #c0392b;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --radius:       8px;
  --radius-lg:    14px;
  --serif:        'Playfair Display', Georgia, serif;
  --sans:         'DM Sans', system-ui, -apple-system, sans-serif;
  --max-w:        760px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-white);
}

body.modal-open { overflow: hidden; }

/* ── Reading Progress Bar ─────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%; height: 3px;
  background: var(--gold);
  z-index: 9999;
  transition: width .1s linear;
}

/* ── GDPR Modal (preservado intacto) ──────────────────────── */
.gdpr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 24px;
}

.gdpr-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.gdpr-text {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 20px;
}

.gdpr-buttons { display: flex; gap: 12px; justify-content: center; }

.gdpr-btn {
  padding: 11px 28px;
  border-radius: 50px;
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.gdpr-btn:hover { opacity: .88; transform: translateY(-1px); }

.gdpr-btn-accept { background: var(--green-dark); color: #fff; }
.gdpr-btn-reject { background: var(--bg-off); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Portal Header ────────────────────────────────────────── */
.portal-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.portal-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.portal-logo-icon {
  width: 32px; height: 32px;
  background: var(--green-dark);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}

.portal-logo-icon svg { width: 18px; height: 18px; fill: #fff; }

.portal-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.2;
}

.portal-tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.portal-badge {
  font-size: 11px;
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid #b2d8d8;
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Hero Banner ──────────────────────────────────────────── */
.hero-banner {
  background: var(--green-dark);
  color: #fff;
  text-align: center;
  padding: 14px 24px;
  font-size: 13px;
  letter-spacing: .3px;
}

.hero-banner strong { color: var(--gold-bright); }

.banner-cta-btn {
  display: inline-block;
  /* 3D Capsule: gradient simulating top light source */
  background: linear-gradient(180deg, #f5d848 0%, #c89010 100%);
  /* Elevation: top highlight + base shadow */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -2px 0 rgba(0,0,0,.18),
    0 3px 8px rgba(0,0,0,.30),
    0 1px 2px rgba(0,0,0,.20);
  color: #3a2800;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 20px;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 10px;
  vertical-align: middle;
  /* Subtle text depth */
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
  transition: box-shadow .15s, transform .15s, background .15s;
  border: none;
  cursor: pointer;
  letter-spacing: .2px;
}

.banner-cta-btn:hover {
  /* Lift on hover */
  background: linear-gradient(180deg, #fce55a 0%, #d4a017 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -2px 0 rgba(0,0,0,.15),
    0 5px 14px rgba(0,0,0,.32),
    0 2px 4px rgba(0,0,0,.18);
  transform: translateY(-1px);
}

.banner-cta-btn:active {
  /* Press-down: button sinks */
  background: linear-gradient(180deg, #c89010 0%, #f5d848 100%);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.25),
    0 1px 2px rgba(0,0,0,.20);
  transform: translateY(1px);
}

@media (max-width: 600px) {
  .banner-cta-btn {
    display: block;
    margin: 10px auto 0;
    text-align: center;
    width: fit-content;
  }
}

.skip-cta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 4px;
  font-style: italic;
  line-height: 1.5;
}

.skip-cta a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}

.skip-cta a:hover { color: var(--green-mid); }

/* ── Main Wrapper ─────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ── Article Meta ─────────────────────────────────────────── */
.article-meta {
  padding: 32px 0 0;
}

.category-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -.3px;
}

.article-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  font-weight: 400;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.byline-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--green-light);
}

.byline-info { flex: 1; min-width: 160px; }
.byline-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.byline-role { font-size: 12px; color: var(--text-muted); }

.byline-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.byline-meta span { display: flex; align-items: center; gap: 5px; }
.byline-meta span::before { content: '•'; margin-right: 2px; }
.byline-meta span:first-child::before { display: none; }

/* ── Hero Image ───────────────────────────────────────────── */
.hero-img-wrap {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.hero-img-caption {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--bg-off);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ── Summary / Verdict Box ────────────────────────────────── */
.verdict-box {
  border: 1px solid #b2d8d8;
  border-left: 5px solid var(--green-dark);
  border-radius: var(--radius);
  background: var(--green-light);
  padding: 24px 28px;
  margin: 28px 0;
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.verdict-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-dark);
}

.stars-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star-icon {
  width: 18px; height: 18px;
  fill: var(--gold);
}

.star-icon.half { fill: url(#halfGrad); }

.star-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.verdict-list {
  list-style: none;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) { .verdict-list { grid-template-columns: 1fr; } }

.verdict-list li {
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-body);
  line-height: 1.4;
}

.verdict-list li .vi { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.verdict-list li.pro .vi { color: #2e7d32; }
.verdict-list li.con .vi { color: #e65100; }

.verdict-bottom {
  padding-top: 16px;
  border-top: 1px solid #b2d8d8;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.55;
}

.verdict-bottom strong { color: var(--green-dark); }

/* ── Article Body ─────────────────────────────────────────── */
.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 26px);
  color: var(--text-dark);
  font-weight: 700;
  margin: 40px 0 14px;
  line-height: 1.25;
  border-bottom: 2px solid var(--green-light);
  padding-bottom: 10px;
}

.article-body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

.article-body h2 a:hover { color: var(--green-dark); }

.article-body p {
  margin-bottom: 18px;
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.8;
}

.article-body strong { color: var(--text-dark); font-weight: 600; }

/* ── Lead Pain Section ────────────────────────────────────── */
.pain-intro {
  background: linear-gradient(135deg, #fff9f0 0%, #fff3e0 100%);
  border: 1px solid #ffe0b2;
  border-left: 5px solid #e65100;
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 24px 0 32px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-body);
}

/* ── Product Image ────────────────────────────────────────── */
.product-img {
  display: block;
  max-width: 340px;
  width: 100%;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.12));
  transition: transform .3s ease;
}

.product-img:hover { transform: scale(1.02); }

.label-img {
  display: block;
  max-width: 520px;
  width: 100%;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ── Ingredients Grid ─────────────────────────────────────── */
.ingredients {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 20px 0 24px;
}

.ingredient {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green-dark);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.6;
  transition: background .2s;
}

.ingredient:hover { background: var(--green-light); }
.ingredient strong { color: var(--green-dark); font-weight: 700; }

/* ── CTA Button (pulsing gold) ────────────────────────────── */
@keyframes cta-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,160,23,.6), 0 4px 18px rgba(0,0,0,.18); transform: scale(1); }
  50%  { box-shadow: 0 0 0 14px rgba(212,160,23,0), 0 6px 24px rgba(0,0,0,.22); transform: scale(1.025); }
  100% { box-shadow: 0 0 0 0 rgba(212,160,23,0), 0 4px 18px rgba(0,0,0,.18); transform: scale(1); }
}

.cta-btn, .hero-cta-btn {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 28px auto;
  padding: 18px 32px;
  background: linear-gradient(135deg, #E8C840 0%, #D4A017 100%);
  color: var(--text-dark);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  animation: cta-pulse 2.4s ease-in-out infinite;
  letter-spacing: .3px;
}

.cta-btn:hover, .hero-cta-btn:hover {
  animation: none;
  background: linear-gradient(135deg, #f0d050 0%, #e0b020 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(212,160,23,.45);
  transition: transform .2s, box-shadow .2s;
}

.cta-subtext {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -16px;
  margin-bottom: 24px;
}

/* ── Reviews Grid ─────────────────────────────────────────── */
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.reviews-aggregate {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reviews-big-score {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.reviews-count {
  font-size: 13px;
  color: var(--text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 580px) { .reviews-grid { grid-template-columns: 1fr; } }

.review {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.review:hover { box-shadow: var(--shadow-md); }

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--green-light);
}

.review-author {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
}

.review-badge {
  font-size: 11px;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 3px;
  display: inline-block;
  font-weight: 600;
}

.review-stars { margin-bottom: 8px; }
.review-stars .stars .star-icon { width: 14px; height: 14px; }

.review p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
  margin: 0;
}

.review-timeline {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── FAQ Accordion ────────────────────────────────────────── */
.faq-section { margin: 36px 0; }

.faq-section h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 26px);
  color: var(--text-dark);
  margin-bottom: 18px;
  border-bottom: 2px solid var(--green-light);
  padding-bottom: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-off);
  transition: background .2s;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--green-dark);
  flex-shrink: 0;
  transition: transform .25s;
}

.faq-item[open] summary {
  background: var(--green-light);
  color: var(--green-dark);
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  background: #fff;
  border-top: 1px solid var(--border);
}

/* ── Red Line / Alert ─────────────────────────────────────── */
.red-line {
  background: #fff5f5;
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 18px;
  color: #7b1a1a;
  font-size: 15px;
  margin: 18px 0;
}

/* ── Trust Badges ─────────────────────────────────────────── */
.trust-strip {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 28px 0;
  padding: 20px;
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.trust-badge .badge-icon {
  font-size: 28px;
  line-height: 1;
}

/* ── Disclaimer ───────────────────────────────────────────── */
.disclaimer {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 36px 0 24px;
}

.disclaimer p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Footer ───────────────────────────────────────────── */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.footer-links a:hover { color: var(--green-dark); text-decoration: underline; }

.footer-copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-bottom: 20px;
}

/* ── Sticky CTA Bar ───────────────────────────────────────── */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--green-dark);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 800;
  box-shadow: 0 -3px 16px rgba(0,0,0,.18);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}

.sticky-cta.visible { transform: translateY(0); }

.sticky-cta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sticky-cta-stars { display: flex; gap: 2px; }
.sticky-cta-stars .star-icon { width: 13px; height: 13px; fill: var(--gold-bright); }

.sticky-cta-text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-cta-text span {
  color: var(--gold-bright);
}

.sticky-cta-btn {
  background: linear-gradient(135deg, #E8C840 0%, #D4A017 100%);
  color: var(--text-dark);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  animation: cta-pulse 2.4s ease-in-out infinite;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .portal-tagline { display: none; }
  .verdict-box { padding: 18px 16px; }
  .article-title { font-size: 26px; }
  .trust-strip { gap: 16px; }
  .sticky-cta-text { display: none; }
  .sticky-cta { justify-content: center; }
  .sticky-cta-btn { width: 100%; max-width: 300px; text-align: center; }
}
