/* CRAFTINGBITS — Legal pages: header/footer oscuros (header_footer.css) + contenido claro,
   formato apps/blog. Cargar SOLO en páginas legales (LegalPage.astro). */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
  color: #333333;
  font-family: 'SpaceGrotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1;
}

/* ══════════════════════════════
   LEGAL PAGES
══════════════════════════════ */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 56px) 24px 48px;
}

.legal-page h1 {
  font-family: 'SpaceGrotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  color: #222222;
  margin-bottom: 8px;
}

.legal-page .legal-date {
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.08em;
  margin-bottom: 48px;
  display: block;
}

.legal-page h2 {
  font-family: 'SpaceGrotesk', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--orange);
  margin-top: 36px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.legal-page h3 {
  font-family: 'SpaceGrotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #333333;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p,
.legal-page li {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: #4b5563;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-page a {
  color: var(--orange);
  text-decoration: none;
}

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

.legal-page strong {
  color: #111111;
  font-weight: 500;
}

.legal-page code {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  color: #b45309;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 26px;
  transition: color 0.3s;
}

.legal-back:hover {
  color: var(--orange);
}

.legal-page img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 12px;
}

/* Plantilla de correo para soporte */
.legal-template {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0 20px;
}

.legal-template-pre {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'SpaceGrotesk', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.8;
  color: #333333;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.legal-template .copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  align-self: flex-start;
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  background: var(--orange);
  color: #ffffff;
  font-family: 'SpaceGrotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s, transform 0.1s, opacity 0.25s;
}

.legal-template .copy-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.legal-template .copy-btn:hover {
  filter: brightness(1.06);
}

.legal-template .copy-btn:active {
  transform: scale(0.97);
}

.legal-template .copy-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.legal-template .copy-btn.copy-success {
  background: #16a34a;
}

/* Texto justificado en páginas legales y soporte */
.legal-page p,
.legal-page li {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}