/* ============================================================
   FarmakoMed — Trust & Privacy page components
   ============================================================ */

/* ── Shared section rhythm ──────────────────────────────────── */
.trust-section-intro {
  max-width: 680px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.trust-section-intro p { margin-top: 0.75rem; font-size: 1.0625rem; }

/* ── Inline note / callout (journal-callout equivalent) ─────── */
.trust-note {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  background: var(--color-primary-soft);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  max-width: 640px;
  margin: 2rem auto 0;
}

.trust-note-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-primary);
  margin-top: 2px;
}

.trust-note p {
  font-size: 0.9375rem;
  color: var(--color-text);
  font-weight: 500;
  margin: 0;
}

/* ── Pipeline flow diagram (Section 1 & 2) ──────────────────── */
.pipeline-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 920px;
  margin: 0 auto;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 130px;
}

.pipeline-step-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.625rem;
}
.pipeline-step-icon svg { width: 24px; height: 24px; }

.pipeline-step-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

.pipeline-step-caption {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  line-height: 1.45;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  color: var(--color-border-strong);
  flex-shrink: 0;
  align-self: center;
  margin-top: -1.75rem;
}
.pipeline-arrow svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .pipeline-flow { flex-direction: column; align-items: center; }
  .pipeline-step { width: 220px; }
  .pipeline-arrow { transform: rotate(90deg); margin-top: 0; }
}

/* ── Comparison grid (Section 2) ─────────────────────────────── */
.compare-architectures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
  align-items: start;
}

.compare-col {
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--color-border);
}

.compare-col.cloud {
  background: var(--color-bg-alt);
}

.compare-col.local {
  background: linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-accent-soft) 100%);
  border-color: var(--color-primary);
}

.compare-col-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  text-align: center;
}

.compare-col .pipeline-flow {
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.compare-col .pipeline-step { width: 100%; }

.compare-col .pipeline-arrow {
  transform: rotate(90deg);
  margin-top: 0;
}

.compare-col .pipeline-step-icon { width: 44px; height: 44px; }
.compare-col .pipeline-step-icon svg { width: 20px; height: 20px; }

.compare-explanation {
  max-width: 680px;
  margin: 2rem auto 0;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

@media (max-width: 700px) {
  .compare-architectures { grid-template-columns: 1fr; }
}

/* ── Expandable card (shared: data locations + evidence) ────── */
.trust-expand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.trust-expand-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-left-color var(--transition), box-shadow var(--transition);
}

.trust-expand-card.open {
  border-left-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.trust-expand-toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.trust-expand-toggle .icon-box { margin-top: 0.125rem; }

.trust-expand-toggle-body { flex: 1; min-width: 0; }

.trust-expand-toggle-body h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--color-text);
}

.trust-expand-badge {
  display: inline-block;
  margin-top: 0.375rem;
}

.trust-expand-toggle-body p {
  font-size: 0.875rem;
  margin-top: 0.375rem;
}

.trust-expand-chevron {
  width: 18px;
  height: 18px;
  min-width: 18px;
  color: var(--color-text-muted);
  transition: transform var(--transition);
  margin-top: 0.375rem;
}

.trust-expand-card.open .trust-expand-chevron { transform: rotate(180deg); }

.trust-expand-detail {
  display: none;
  padding: 0 1.25rem 1.25rem 4.125rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.trust-expand-card.open .trust-expand-detail { display: block; }

.trust-expand-detail a { font-weight: 600; }

@media (max-width: 500px) {
  .trust-expand-detail { padding-left: 1.25rem; }
}

/* ── Architecture Explorer (Section 5) ───────────────────────── */
.explorer {
  max-width: 920px;
  margin: 0 auto;
}

.explorer-nodes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}

.explorer-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.explorer-node:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.explorer-node.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.explorer-node-arrow {
  display: flex;
  align-items: center;
  color: var(--color-border-strong);
}
.explorer-node-arrow svg { width: 16px; height: 16px; }

@media (max-width: 700px) {
  .explorer-node-arrow { display: none; }
}

.explorer-detail-panel {
  margin-top: 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.explorer-detail-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.explorer-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.explorer-detail-field dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.explorer-detail-field dd {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.explorer-detail-field .yes { color: #166534; font-weight: 600; }
.explorer-detail-field .no  { color: var(--color-text); font-weight: 600; }

@media (max-width: 560px) {
  .explorer-detail-grid { grid-template-columns: 1fr; }
}

/* ── Journal preview cards (Section 7) ────────────────────────── */
.journal-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.journal-preview-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  text-decoration: none;
  transition: box-shadow var(--transition), transform var(--transition), border-left-color var(--transition);
}

.journal-preview-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-left-color: var(--color-primary);
  text-decoration: none;
}

.journal-preview-meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.journal-preview-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--color-text);
}

.journal-preview-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.journal-preview-read {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
}

/* ── Verification Center (Section 9) ─────────────────────────── */
.verification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.verification-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-left-color var(--transition), box-shadow var(--transition);
}

.verification-card:hover {
  border-left-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.verification-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--color-text);
}

.verification-card p {
  font-size: 0.875rem;
  flex: 1;
}

.verification-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ── Print styles ─────────────────────────────────────────────── */
@media print {
  .site-nav, .nav-drawer, .site-footer, .skip-link,
  .hero-ctas, .explorer-nodes, .trust-expand-chevron,
  .faq-chevron, .lang-switcher, .nav-toggle {
    display: none !important;
  }

  .trust-expand-detail, .faq-answer, .explorer-detail-panel {
    display: block !important;
  }

  body {
    background: #fff !important;
  }

  .card, .trust-expand-card, .verification-card, .journal-preview-card,
  .faq-item, .privacy-principle, .explorer-detail-panel {
    box-shadow: none !important;
    break-inside: avoid;
  }

  a { text-decoration: underline; color: #000; }

  .compare-architectures, .explorer-detail-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Dark mode (scoped to this page via body.trust-page) ─────── */
@media (prefers-color-scheme: dark) {
  body.trust-page {
    --color-bg: #0B1220;
    --color-bg-alt: #111C2E;
    --color-surface: #131F32;
    --color-primary: #60A5FA;
    --color-primary-dark: #3B82F6;
    --color-primary-soft: rgba(96,165,250,0.16);
    --color-accent: #4ADE80;
    --color-accent-soft: rgba(74,222,128,0.14);
    --color-text: #F1F5F9;
    --color-text-secondary: #CBD5E1;
    --color-text-muted: #94A3B8;
    --color-border: #1F2E45;
    --color-border-strong: #2D3F5B;
    color-scheme: dark;

    background-image:
      radial-gradient(circle, rgba(96,165,250,0.05) 1px, transparent 1px),
      radial-gradient(ellipse 75% 45% at 50% 0%, rgba(96,165,250,0.10) 0%, transparent 60%),
      radial-gradient(ellipse 70% 35% at 60% 100%, rgba(74,222,128,0.06) 0%, transparent 55%),
      linear-gradient(180deg, #0B1220 0%, #0B1220 40%, #0B1220 100%);
  }

  body.trust-page .site-nav {
    background: rgba(11,18,32,0.88);
    border-bottom-color: var(--color-border);
  }

  body.trust-page .section-alt {
    background: rgba(255,255,255,0.03);
  }

  body.trust-page .card,
  body.trust-page .feature-card,
  body.trust-page .privacy-principle,
  body.trust-page .faq-item,
  body.trust-page .trust-expand-card,
  body.trust-page .verification-card,
  body.trust-page .journal-preview-card,
  body.trust-page .explorer-node,
  body.trust-page .explorer-detail-panel {
    background: rgba(19,31,50,0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  body.trust-page .compare-col.cloud { background: rgba(255,255,255,0.03); }

  body.trust-page .btn-outline { color: var(--color-text); }

  body.trust-page .badge-soon { background: #3A2E0F; color: #FBBF24; }

  body.trust-page .check-list li::before {
    background: rgba(74,222,128,0.18);
  }
}
