/* ============= SHARED LEGAL PAGES STYLESHEET ============= */
:root {
  --primary: #b84e3d;
  --primary-dark: #793328;
  --primary-light: #df7d66;
  --dark: #151515;
  --charcoal: #292724;
  --light: #f7f3ec;
  --beige: #e6dece;
  --sage: #60736a;
  --steel: #687782;
  --surface: rgba(255,255,255,0.88);
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --border: rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #fbf8f2 0%, var(--light) 48%, #f1ece2 100%);
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

a { color: var(--primary); text-decoration: underline; }
a:hover { color: var(--primary-dark); }

.container {
  max-width: 920px;
  margin: 0 auto;
  width: min(100% - 48px, 920px);
  padding: 0;
}

/* HEADER */
header {
  background: rgba(21,21,21,0.9);
  padding: 14px 0;
  position: sticky;
  top: 12px;
  z-index: 100;
  margin: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 60px rgba(0,0,0,0.2);
  backdrop-filter: blur(14px);
}
header .container {
  max-width: 1280px;
  width: min(100% - 28px, 1280px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 22px;
  color: white;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.logo span { color: var(--primary-light); }
header nav a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
header nav a:hover { color: white; }

/* MAIN */
.legal-page { padding: clamp(56px, 8vw, 92px) 0; min-height: 70vh; }

.legal-header {
  text-align: center;
  margin-bottom: clamp(38px, 7vw, 64px);
  padding: clamp(34px, 6vw, 54px);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(96,115,106,0.12), rgba(184,78,61,0.08)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(29,25,20,0.08);
}
.section-tag {
  display: inline-block;
  color: var(--sage);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.legal-header h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 16px;
  text-wrap: balance;
}
.last-update {
  color: var(--text-light);
  font-size: 14px;
}

.legal-content {
  font-size: 15.5px;
}
.legal-intro {
  background: var(--surface);
  border-left: 4px solid var(--sage);
  padding: 24px 28px;
  margin-bottom: 50px;
  border-radius: 14px;
  font-size: 15px;
  color: var(--text);
  box-shadow: 0 14px 42px rgba(29,25,20,0.07);
}
.legal-intro p { margin: 0; }

.legal-content h2 {
  font-size: 26px;
  margin-top: 50px;
  margin-bottom: 18px;
  color: var(--dark);
  text-wrap: balance;
  position: relative;
  padding-bottom: 12px;
}
.legal-content h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--sage);
}
.legal-content h3 {
  font-family: 'Inter';
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--dark);
}
.legal-content p, .legal-content li {
  margin-bottom: 12px;
  color: var(--charcoal);
}
.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-content ul ul, .legal-content ol ol {
  margin-top: 8px;
  margin-bottom: 8px;
}
.legal-content strong { color: var(--dark); }

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 42px rgba(29,25,20,0.07);
}
.legal-content thead {
  background: var(--dark);
  color: white;
}
.legal-content th, .legal-content td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.legal-content th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.legal-content tbody tr:hover { background: var(--light); }
@media (max-width: 700px) {
  .legal-content table {
    display: block;
    overflow-x: auto;
    font-size: 13px;
    -webkit-overflow-scrolling: touch;
  }
  .legal-content th, .legal-content td { padding: 10px 12px; }
}

/* CTA */
.legal-cta {
  background: linear-gradient(135deg, var(--sage), var(--primary-dark));
  color: white;
  padding: clamp(30px, 6vw, 52px);
  border-radius: 18px;
  text-align: center;
  margin-top: 80px;
  box-shadow: 0 20px 60px rgba(29,25,20,0.18);
}
.legal-cta h3 {
  font-size: 28px;
  color: white;
  margin-bottom: 12px;
}
.legal-cta p {
  margin-bottom: 24px;
  opacity: 0.95;
  font-size: 16px;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: white !important;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-3px);
}

/* FOOTER */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 40px 0 24px;
  margin-top: 80px;
}
footer .container { max-width: 1280px; width: min(100% - 48px, 1280px); }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 22px;
  color: white;
  letter-spacing: 0.05em;
}
.footer-logo span { color: var(--primary-light); }
.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--primary-light); }
.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 640px) {
  .container,
  footer .container {
    width: min(100% - 28px, 1280px);
  }
  header {
    top: 8px;
    margin: 8px;
    border-radius: 14px;
  }
  header .container {
    width: min(100% - 20px, 1280px);
  }
  .logo { font-size: 18px; }
  .legal-header { text-align: left; padding: 26px 22px; }
  .legal-content { font-size: 15px; }
  .legal-content h2 { font-size: 23px; margin-top: 42px; }
  .legal-intro { padding: 20px; }
  .footer-row { align-items: flex-start; }
  .footer-nav { gap: 16px; }
  .legal-cta h3 { font-size: 24px; }
  .btn-whatsapp { width: 100%; justify-content: center; padding: 14px 18px; }
}

/* Back to top */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-top: 30px;
  font-size: 14px;
}
.back-link:hover { color: var(--primary-dark); }

/* TOC */
.toc {
  background: white;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.toc h2 {
  font-family: 'Inter';
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 0;
}
.toc h2::after { display: none; }
.toc ol {
  columns: 2;
  column-gap: 30px;
  padding-left: 18px;
}
@media (max-width: 600px) { .toc ol { columns: 1; } }
.toc li {
  margin-bottom: 6px;
  font-size: 14px;
  break-inside: avoid;
}
.toc a {
  color: var(--charcoal);
  text-decoration: none;
}
.toc a:hover { color: var(--primary); }
