/* ===========================
   Legal Pages – Shared Styles
   (privacy-policy, terms, cookies)
   =========================== */

/* ---------- Hero Banner ---------- */
.legal-hero {
  background: linear-gradient(135deg, #0b2339 0%, var(--primary) 50%, var(--primary-2) 100%);
  color: #fff;
  padding: 5.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 80%, rgba(244, 162, 97, 0.18), transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.legal-hero .container {
  position: relative;
  z-index: 1;
}

.legal-hero-inner {
  max-width: 720px;
}

.legal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.legal-hero-badge svg {
  flex-shrink: 0;
}

.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 1rem;
  letter-spacing: -0.5px;
}

.legal-hero-sub {
  font-size: 1.08rem;
  line-height: 1.7;
  color: #c9dff5;
  margin: 0 0 1.4rem;
  max-width: 600px;
}

.legal-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #a8c4df;
}

.legal-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legal-hero-meta svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ---------- Layout: Sidebar + Content ---------- */
.legal-body {
  padding: 3.5rem 0 4rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---------- Table of Contents Sidebar ---------- */
.legal-toc {
  position: sticky;
  top: 110px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.2rem;
  box-shadow: 0 4px 18px rgba(13, 59, 102, 0.06);
}

.legal-toc-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.legal-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.legal-toc-list a {
  display: block;
  padding: 0.48rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.legal-toc-list a:hover,
.legal-toc-list a.active {
  background: #eef5fc;
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ---------- Content Area ---------- */
.legal-content {
  max-width: 780px;
}

.legal-section {
  margin-bottom: 2.8rem;
  scroll-margin-top: 110px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.6rem;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.legal-section h2 .section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef5fc, #dce9f6);
  flex-shrink: 0;
}

.legal-section h2 .section-icon svg {
  color: var(--primary);
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.6rem 0 0.5rem;
  line-height: 1.35;
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #3d4a5c;
  margin: 0 0 0.9rem;
}

.legal-section ul,
.legal-section ol {
  margin: 0.3rem 0 1rem 1.2rem;
  padding: 0;
}

.legal-section li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #3d4a5c;
  margin-bottom: 0.35rem;
}

.legal-section li::marker {
  color: var(--primary-2);
}

.legal-section a {
  color: var(--primary-2);
  font-weight: 600;
  border-bottom: 1px dashed rgba(29, 95, 150, 0.35);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-section a:hover {
  color: var(--primary);
  border-bottom-style: solid;
  border-bottom-color: var(--primary);
}

/* Info cards inside sections */
.legal-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.legal-info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.legal-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 59, 102, 0.08);
}

.legal-info-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef5fc, #dce9f6);
  margin-bottom: 0.7rem;
}

.legal-info-card-icon svg {
  color: var(--primary);
}

.legal-info-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.legal-info-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* Highlight box / callout */
.legal-callout {
  background: linear-gradient(135deg, #f0f7ff, #e8f1fb);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.2rem 1.4rem;
  margin: 1.2rem 0;
}

.legal-callout p {
  margin: 0;
  color: #1a3a5c;
  font-size: 0.92rem;
}

.legal-callout strong {
  color: var(--primary);
}

/* Cookie table */
.legal-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table th {
  background: #f0f5fb;
  font-weight: 700;
  color: var(--primary);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.legal-table td {
  padding: 0.7rem 1rem;
  color: #3d4a5c;
  border-bottom: 1px solid #f0f3f7;
  line-height: 1.6;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: #f8fbff;
}

/* Contact / Questions card */
.legal-contact-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.legal-contact-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.legal-contact-card-icon svg {
  color: #fff;
}

.legal-contact-card-text {
  flex: 1;
  min-width: 200px;
}

.legal-contact-card-text strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.legal-contact-card-text p {
  margin: 0;
  font-size: 0.92rem;
  color: #c9dff5;
  line-height: 1.6;
}

.legal-contact-card-text a {
  color: var(--accent-2);
  font-weight: 600;
  border-bottom: 1px dashed rgba(255, 214, 165, 0.5);
}

.legal-contact-card-text a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* Related pages links */
.legal-related {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.legal-related-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.legal-related-link:hover {
  background: #eef5fc;
  border-color: #b8cee3;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 59, 102, 0.08);
}

.legal-related-link svg {
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal-toc {
    position: static;
    margin-bottom: 2rem;
    border-radius: var(--radius-sm);
  }

  .legal-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .legal-toc-list a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .legal-toc-list a:hover,
  .legal-toc-list a.active {
    border-left: none;
    border-bottom-color: var(--primary);
  }
}

@media (max-width: 760px) {
  .legal-hero {
    padding: 4rem 0 3rem;
  }

  .legal-hero h1 {
    font-size: 1.6rem;
  }

  .legal-body {
    padding: 2rem 0 2.5rem;
  }

  .legal-section h2 {
    font-size: 1.2rem;
  }

  .legal-info-cards {
    grid-template-columns: 1fr;
  }

  .legal-contact-card {
    padding: 1.4rem;
    flex-direction: column;
    text-align: center;
  }

  .legal-related {
    justify-content: center;
  }

  .legal-table {
    font-size: 0.82rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.55rem 0.7rem;
  }
}
