/* =========================================================
   LEGAL PAGES (VOP / Privacy) – EviPharma
   Scoped do .legal-page, aby to nerozbilo zbytek webu
   ========================================================= */

html { scroll-behavior: smooth; }

.legal-page {
  max-width: 980px;
  margin: 28px auto 40px;
  padding: 0 18px;
}

.legal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.legal-card .card-body {
  padding: 30px 34px;
}

.legal-page h1 {
  margin: 0 0 6px 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #0f172a;
}

.legal-muted {
  margin: 0 0 18px 0;
  color: #6b7280;
  font-size: 0.95rem;
}

/* důležité: někde může být v layoutu centrování, tady to přebijeme */
.legal-page h2 {
  text-align: left !important;
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  margin: 22px 0 10px 0;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.legal-page h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

/* Aby kotva neskončila pod modrou lištou */
.legal-page h2[id] {
  scroll-margin-top: 110px;
  position: relative;
}

.legal-page h2[id]:hover::after {
  content: " #";
  color: #93a4b8;
  font-weight: 700;
}

.legal-page p {
  margin: 0 0 10px 0;
  line-height: 1.65;
  color: #1f2a37;
  font-size: 0.98rem;
}

.legal-page ul,
.legal-page ol {
  margin: 0 0 12px 0;
  padding-left: 20px;
  list-style: disc !important;
}

.legal-page li {
  margin: 6px 0;
  line-height: 1.55;
  color: #1f2a37;
}

.legal-page strong { font-weight: 800; }

.legal-page a {
  color: #005b99;
  text-decoration: none;
  font-weight: 600;
}

.legal-page a:hover { text-decoration: underline; }

.legal-page hr {
  border: 0;
  height: 1px;
  background: #e5e7eb;
  margin: 22px 0;
}

/* =========================
   LEGAL TOC / OBSAH
   ========================= */

.legal-toc {
  margin: 14px 0 22px 0;
  padding: 14px 16px;
  border: 1px solid #e6eef7;
  background: #f6f8fb;
  border-radius: 12px;
}

.legal-toc__title {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  font-size: 1rem;
}

.legal-toc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.legal-toc__grid a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.65);
  color: #005b99;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.legal-toc__grid a:hover {
  border-color: #cfe3f6;
  background: #ffffff;
  text-decoration: none;
}

/* Mobil */
@media (max-width: 640px) {
  .legal-page {
    margin: 18px auto 28px;
    padding: 0 14px;
  }

  .legal-card .card-body {
    padding: 20px 18px;
  }

  .legal-page h1 { font-size: 1.35rem; }

  .legal-page p,
  .legal-page li { font-size: 0.96rem; }

  .legal-toc__grid { grid-template-columns: 1fr; }

  .legal-page h2[id] { scroll-margin-top: 95px; }
}
/* =========================
   Privacy hero + actions
   ========================= */

.legal-hero {
  margin-bottom: 14px;
  padding: 16px 16px 10px;
  border-radius: 12px;
  background: linear-gradient(to right, #005b99, #0080ff);
  color: #ffffff;
}

.legal-hero__icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 6px;
}

.legal-hero h1 {
  color: #ffffff;
}

.legal-hero .legal-muted {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0;
}

/* akce dole */
.legal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* jednoduché button varianty (aby ladily a nic nerozbily) */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
}

.btn--primary {
  background: #005b99;
  color: #ffffff;
}

.btn--primary:hover {
  background: #004c80;
  text-decoration: none;
}

.btn--ghost {
  background: #ffffff;
  color: #005b99 !important;
  border-color: #dbe7f5;
}

.btn--ghost:hover {
  background: #f3f6fb;
  text-decoration: none;
}

@media (max-width: 680px) {
  .legal-actions {
    flex-direction: column;
  }
  .legal-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ===== Fix: ensure primary button text is always visible in legal pages ===== */
.legal-actions a.btn.btn--primary {
  color: #ffffff !important;
}

.legal-actions a.btn.btn--primary:hover,
.legal-actions a.btn.btn--primary:active,
.legal-actions a.btn.btn--primary:visited {
  color: #ffffff !important;
}

.legal-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
