/* ConsultaDentária.pt — Shared Components v1.0
   All reusable UI components: nav, hero, cards, FAQ, CTA, footer, cookie.
   Load after cd-base.css on every page. */

/* ── NAV ────────────────────────────────────── */
.nav {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  min-height: 76px;
  padding: 14px var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-strong);
  font-size: 23px;
  letter-spacing: -.035em;
}
.logo span { color: var(--color-secondary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  padding: 10px 14px;
  border-radius: 999px;
  transition: background-color .15s, color .15s, transform .15s;
}
.nav-link:hover,
.nav-link:focus {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  outline: none;
  transform: translateY(-1px);
}
.nav-urgent {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border: 1px solid #ffd0cc;
}
.nav-urgent:hover,
.nav-urgent:focus {
  background: #ffe4e1;
  color: #a93631;
}

/* ── HERO (secondary pages — single column) ── */
.hero {
  border-bottom: 1px solid var(--color-border-subtle);
  background: linear-gradient(135deg, #ffffff 0%, #eef8fb 56%, #f9fbff 100%);
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-md) 52px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.9);
  border: 1px solid #cfe8ef;
  border-radius: 999px;
  padding: 8px 14px;
  color: #31576a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -.04em;
  margin: 0 0 var(--space-md);
  color: var(--color-text-strong);
  max-width: 720px;
}
.hero h1 span { color: var(--color-secondary); }
.hero-intro {
  max-width: 620px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── LAYOUT ─────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-xxl);
}
.section { margin-bottom: var(--space-xxl); }
.section-head { margin-bottom: var(--space-lg); }
.section-head h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.18;
  margin: 0 0 8px;
  color: var(--color-text-strong);
  letter-spacing: -.03em;
}
.section-head p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 16px;
  max-width: 620px;
}

/* ── PROSE ──────────────────────────────────── */
.prose { max-width: 760px; }
.prose p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 var(--space-md);
}
.prose p:last-child { margin: 0; }
.prose strong { color: var(--color-text-strong); }
.prose a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── GRID ───────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── CARDS ──────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xs);
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  margin: 0 0 10px;
  color: var(--color-text-strong);
  letter-spacing: -.02em;
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.65;
}
.card a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── NOTICE / INFO BOXES ────────────────────── */
.notice-box {
  background: var(--color-accent-soft);
  border: 1px solid #ffe2a8;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-width: 760px;
}
.notice-box p {
  margin: 0;
  color: #5a420a;
  font-size: 15px;
  line-height: 1.65;
}
.notice-box p + p { margin-top: 10px; }
.notice-box strong { color: #3d2d07; }
.notice-box a {
  color: #8a5a00;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-box {
  background: var(--color-primary-soft);
  border: 1px solid #cfe8ef;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-width: 760px;
}
.info-box p {
  margin: 0;
  color: #1a3f5c;
  font-size: 15px;
  line-height: 1.65;
}
.info-box strong { color: #0f2a3d; }
.info-box a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── TRUST LIST / CHECK / CROSS ─────────────── */
.trust-list { list-style: none; padding: 0; margin: 0; }
.trust-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #e8eef2;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.trust-list li:last-child { border-bottom: 0; }
.check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eaf7ef;
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}
.cross {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-danger-soft);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── STEP SUB-ELEMENTS (shared across pages) ─ */
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid #e8eef2;
}
.step-item:last-child { border-bottom: 0; }
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.step-body { flex: 1; }

/* ── REF LIST ───────────────────────────────── */
.ref-list { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.ref-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e8eef2;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.6;
}
.ref-list li:last-child { border-bottom: 0; }
.ref-list strong { color: var(--color-text-strong); }

/* ── FAQ (secondary pages, .faq-wrap) ───────── */
.faq-wrap {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}
.faq-wrap h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: -.03em;
  margin: 0 0 var(--space-md);
  color: var(--color-text-strong);
}
.faq-item { border-top: 1px solid #e8eef2; }
.faq-item:first-of-type { border-top: 0; }
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: var(--color-text-strong);
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-body);
}
.faq-q:focus {
  outline: 3px solid rgba(20,121,189,.18);
  border-radius: var(--radius-sm);
}
.faq-q span:last-child {
  color: var(--color-primary);
  font-size: 22px;
  flex-shrink: 0;
}
.faq-a {
  display: none;
  color: var(--color-text-muted);
  padding: 0 0 18px;
  max-width: 820px;
  font-size: 15px;
  line-height: 1.7;
}
.faq-a a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-a.open { display: block; }

/* ── CTA BLOCK ──────────────────────────────── */
.cta-block {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.cta-block > * { position: relative; }
.cta-block h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.18;
  margin: 0 0 var(--space-sm);
  color: #fff;
  letter-spacing: -.03em;
}
.cta-block p {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 16px;
}
.cta-block a {
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(15,23,42,.18);
  white-space: nowrap;
  transition: transform .15s;
}
.cta-block a:hover,
.cta-block a:focus {
  transform: translateY(-1px);
  outline: none;
}

/* ── FOOTER ─────────────────────────────────── */
.footer {
  background: #111827;
  color: #d9e2ec;
  padding: 48px var(--space-md) 30px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, .55fr));
  gap: 28px;
  align-items: start;
}
.footer-brand p {
  margin-top: 10px;
  color: #bcccdc;
  font-size: 14px;
  line-height: 1.6;
}
.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -.01em;
}
.footer-col a {
  display: block;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1120px;
  margin: 28px auto 0;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: #aebbd0; margin: 0; }

/* ── COOKIE BANNER ──────────────────────────── */
.cookie {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 16px;
  max-width: 900px;
  margin: auto;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 100;
}
.cookie.show { display: flex; }
.cookie p { margin: 0; color: var(--color-text-muted); font-size: 14px; }
.cookie a { color: var(--color-primary); text-decoration: underline; }
.cookie button {
  border: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* ── TREATMENT PAGE COMPONENTS ───────────────── */

/* 2-col hero (modifier class on .hero for treatment pages) */
.hero--treatment .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: 44px;
  align-items: start;
}
.hero--treatment h1 {
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.hero p.lead {
  max-width: 600px;
  font-size: 20px;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-primary);
  text-decoration: none;
  transition: background-color .15s, transform .15s;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  outline: none;
}
.btn-light {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 999px;
  padding: 14px 22px;
  background: #fff;
  color: var(--color-text);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: border-color .15s, color .15s, transform .15s;
}
.btn-light:hover, .btn-light:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
  outline: none;
}

/* Summary panel (hero right column on treatment pages) */
.summary-panel {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
}
.summary-panel-head {
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
}
.summary-panel-head h2 {
  font-family: var(--font-heading);
  font-size: 19px;
  margin: 0 0 4px;
  letter-spacing: -.02em;
  color: #fff;
}
.summary-panel-head p { font-size: 14px; color: rgba(255,255,255,.85); margin: 0; }
.summary-panel-body { padding: 4px 24px 20px; }
.fact-list { list-style: none; padding: 0; margin: 0; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #e8eef2;
  font-size: 15px;
  line-height: 1.45;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-label { color: var(--color-text-muted); }
.fact-value { color: var(--color-text-strong); font-weight: 700; text-align: right; flex-shrink: 0; }

/* Card-wrapped ordered step list (treatment pages — <ol class="step-card">) */
.step-card {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-lg);
  box-shadow: var(--shadow-xs);
  max-width: 760px;
}

/* Price section (treatment pages) */
.price-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 760px;
  box-shadow: var(--shadow-xs);
}
.price-wrap h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: -.025em;
  margin: 0 0 var(--space-md);
  color: var(--color-text-strong);
}
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: var(--space-md);
}
.price-table td {
  padding: 13px 0;
  font-size: 16px;
  vertical-align: top;
  border-bottom: 1px solid #e8eef2;
}
.price-table tr:last-child td { border-bottom: 0; }
.price-table td:first-child { color: var(--color-text-strong); }
.price-table td:last-child {
  text-align: right;
  color: var(--color-secondary);
  font-weight: 700;
  white-space: nowrap;
  padding-left: var(--space-md);
}

/* Question checklist (treatment pages) */
.question-list { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.question-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid #e8eef2;
}
.question-item:last-child { border-bottom: 0; }
.question-item input[type=checkbox] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.question-item label { font-size: 16px; line-height: 1.55; color: var(--color-text); cursor: pointer; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .nav-actions .nav-link:not(.nav-urgent) { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .cta-block { grid-template-columns: 1fr; }
  .cta-block a { display: inline-flex; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero--treatment .hero-inner { grid-template-columns: 1fr; }
  .summary-panel { max-width: 520px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-inner { min-height: 68px; padding: 12px 16px; }
  .logo { font-size: 20px; }
  .hero-inner { padding: 42px 16px 40px; }
  .hero h1 { font-size: 26px; }
  .hero-intro { font-size: 17px; }
  .container { padding: 30px 16px 56px; }
  .section-head h2 { font-size: 22px; }
  .faq-wrap, .cta-block { border-radius: 22px; }
  .cta-block { padding: 24px; }
  .footer-inner { grid-template-columns: 1fr; }
  .cookie { flex-direction: column; align-items: flex-start; }
  .cookie button { width: 100%; }
  .hero p.lead { font-size: 18px; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-light { justify-content: center; text-align: center; }
  .price-table td:last-child { white-space: normal; }
}
