/**
 * CLANDESTINOS — Hojas de Estilo para Páginas Legales y Contacto
 * Estilo visual editorial, sobrio, responsive y perfectamente integrado con la identidad de marca
 */

.legal-page {
  background-color: #ffffff;
  color: var(--color-brand-dark, #2c2e35);
  font-family: var(--font-primary, system-ui, -apple-system, sans-serif);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====================================================
   HERO EDITORIAL LEGAL
   ==================================================== */
.legal-hero {
  position: relative;
  padding: 130px 0 45px;
  background: #fbfbfa;
  border-bottom: 1px solid #edebe8;
  overflow: hidden;
}

.legal-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #78716c;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.legal-breadcrumbs a {
  color: var(--color-brand-dark, #2c2e35);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-breadcrumbs a:hover {
  color: var(--color-brand-earth, #1f93a8);
}

.legal-breadcrumbs-sep {
  color: #a8a29e;
}

.legal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background-color: #f1f0ee;
  color: var(--color-brand-dark, #2c2e35);
  border: 1px solid #e5e5e3;
  margin-bottom: 1rem;
}

.legal-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-brand-earth, #1f93a8);
}

.legal-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-brand-dark, #2c2e35);
  margin: 0 0 1rem;
}

.legal-subtitle {
  font-size: 1.0625rem;
  color: #57534e;
  max-width: 680px;
  margin: 0;
  font-weight: 400;
  line-height: 1.6;
}

.legal-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e7e5e4;
  font-size: 0.8125rem;
  color: #78716c;
}

.legal-meta-item strong {
  color: var(--color-brand-dark, #2c2e35);
}

/* ====================================================
   BARRA DE NAVEGACIÓN LEGAL RÁPIDA
   ==================================================== */
.legal-quick-nav {
  background: #ffffff;
  border-bottom: 1px solid #edebe8;
  position: sticky;
  top: var(--header-h, 72px);
  z-index: 40;
}

.legal-quick-nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.legal-quick-nav-inner::-webkit-scrollbar {
  display: none;
}

.legal-quick-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #57534e;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.legal-quick-link:hover {
  background-color: #f5f5f4;
  color: var(--color-brand-dark, #2c2e35);
}

.legal-quick-link.active {
  background-color: #2c2e35;
  color: #ffffff;
}

/* ====================================================
   CUERPO DEL DOCUMENTO LEGAL
   ==================================================== */
.legal-body {
  flex: 1;
  padding: 40px 0 80px;
}

.legal-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.legal-section {
  margin-bottom: 2.75rem;
}

.legal-section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-brand-dark, #2c2e35);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.legal-section h2 .sec-num {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-brand-earth, #1f93a8);
  background: #eef8fa;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid #d4eff4;
}

.legal-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1c1917;
  margin: 1.5rem 0 0.6rem;
}

.legal-section p {
  margin: 0 0 1rem;
  color: #44403c;
  font-size: 0.9625rem;
  line-height: 1.75;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
  color: #44403c;
  font-size: 0.9625rem;
}

.legal-section li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.legal-section strong {
  color: #1c1917;
}

/* Cajas informativas y placeholders oficiales */
.legal-callout {
  background: #fbfbfa;
  border: 1px solid #e7e5e4;
  border-left: 4px solid var(--color-brand-earth, #1f93a8);
  border-radius: 6px;
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
  font-size: 0.9125rem;
  color: #44403c;
}

.legal-callout strong {
  color: #1c1917;
}

.legal-placeholder {
  display: inline-block;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px dashed #f59e0b;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Tablas legales */
.legal-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  background: #ffffff;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.legal-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
  line-height: 1.55;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* Tarjeta de Contacto */
.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.contact-card {
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.contact-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.contact-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-brand-earth, #1f93a8);
  margin-bottom: 0.4rem;
}

.contact-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 0.5rem;
}

.contact-card-desc {
  font-size: 0.875rem;
  color: #57534e;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.contact-card-action a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: underline;
  word-break: break-all;
}

.contact-card-action a:hover {
  color: var(--color-brand-earth, #1f93a8);
}

/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */
@media (max-width: 768px) {
  .legal-hero {
    padding: 110px 0 35px;
  }
  
  .legal-title {
    font-size: 1.85rem;
  }
  
  .legal-body {
    padding: 30px 0 60px;
  }
  
  .legal-section h2 {
    font-size: 1.25rem;
  }
}
