/* ====================================================
   legal.css — Estilos específicos para la página legal
   ==================================================== */

/* Hero legal */
.legal-hero {
  padding: min(14vh, 110px) 0 56px;
  text-align: center;
}
.legal-hero h1 {
  font-family: Montserrat, Poppins, sans-serif;
  font-size: clamp(26px, 4vw, 40px);
  margin: 0 0 .4rem;
}
.legal-hero-sub {
  color: var(--muted);
  font-size: .95rem;
  margin: 0;
}

/* Sticky section tabs */
.legal-tabs-wrap {
  position: sticky;
  top: 56px; /* height of the site-header */
  z-index: 40;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: .15rem 0;
}
.legal-tabs {
  display: flex;
  gap: .5rem;
  padding: .35rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.legal-tabs::-webkit-scrollbar { display: none; }
.ltab {
  text-decoration: none;
  color: var(--muted);
  padding: .45rem .9rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.ltab:hover,
.ltab.active {
  background: linear-gradient(90deg, rgba(11,121,208,.12), rgba(12,194,122,.12));
  color: var(--brand);
  border-color: rgba(11,121,208,.18);
}

/* Legal body */
.legal-body {
  padding: 56px 0 80px;
  max-width: 820px;
}

/* Sections */
.legal-section {
  scroll-margin-top: 130px; /* account for sticky header + tabs */
}
.legal-section h2 {
  font-family: Montserrat, Poppins, sans-serif;
  font-size: clamp(20px, 2.8vw, 28px);
  margin: 0 0 .2rem;
  color: var(--brand);
}
.legal-section h3 {
  font-family: Montserrat, Poppins, sans-serif;
  font-size: 1rem;
  margin: 1.6rem 0 .3rem;
  color: var(--text);
}
.legal-section p,
.legal-section li {
  color: #3a4452;
  font-size: .95rem;
  line-height: 1.75;
}
.legal-section ul {
  padding-left: 1.4rem;
  margin: .4rem 0 .8rem;
}
.legal-section ul li {
  margin: .3rem 0;
}
.legal-section a {
  color: var(--brand);
  text-decoration: none;
}
.legal-section a:hover {
  text-decoration: underline;
}
.legal-updated {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.legal-note {
  font-size: .82rem;
  color: var(--muted);
  background: rgba(11,121,208,.07);
  border-left: 3px solid var(--brand);
  padding: .5rem .8rem;
  border-radius: 0 8px 8px 0;
  margin: .6rem 0 1rem;
}

/* Tables */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: .6rem 0 1rem;
  font-size: .88rem;
}
.legal-table th,
.legal-table td {
  padding: .55rem .8rem;
  border: 1px solid rgba(0,0,0,.09);
  vertical-align: top;
  text-align: left;
}
.legal-table thead tr {
  background: linear-gradient(90deg, rgba(11,121,208,.08), rgba(12,194,122,.06));
}
.legal-table tbody tr:nth-child(odd) {
  background: rgba(11,121,208,.03);
}
.legal-table th {
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
  width: 34%;
}
.cookies-table th {
  width: auto;
  white-space: normal;
}
.legal-table code {
  background: rgba(11,121,208,.08);
  padding: .1em .4em;
  border-radius: 4px;
  font-size: .82rem;
}

/* Divider */
.legal-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,.08);
  margin: 3rem 0;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 -8px 32px rgba(0,0,0,.08);
  padding: 1rem 0;
  display: none; /* shown by JS when no consent stored */
}
.cookie-banner.visible {
  display: block;
}
.cookie-banner-inner {
  width: min(1100px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-banner-inner p {
  flex: 1 1 300px;
  margin: 0;
  font-size: .88rem;
  color: #3a4452;
  line-height: 1.6;
}
.cookie-banner-inner p a {
  color: var(--brand);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

/* Footer legal links */
.footer {
  background: rgba(255,255,255,.7);
  border-top: 1px solid rgba(0,0,0,.06);
  text-align: center;
  padding: 1.4rem 1rem;
  font-size: .82rem;
  color: var(--muted);
}
.footer p {
  margin: 0 0 .3rem;
}
.footer-legal {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: .4rem;
}
.footer-legal a {
  color: var(--brand);
  text-decoration: none;
  font-size: .82rem;
}
.footer-legal a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .legal-hero { padding: 100px 0 40px; }
  .legal-table th { width: auto; }
  .cookies-table { display: block; overflow-x: auto; }
  .cookie-banner-inner { flex-direction: column; }
}
