/* ==========================================================================
   JULIA — SISTEMA DE ESTILOS PARA PÁGINAS JURÍDICAS
   Design Neobrutalista Premium / Foco em Leitura
   ========================================================================== */

:root {
  --color-bg-light: #FFF8F1;
  --color-bg-nude: #ECE4D9;
  --color-white: #FFFFFF;
  --color-text: #1C2B26;
  --color-text-muted: #5A6964;
  --color-primary: #315C50;
  --color-accent: #FFCF21;
  --color-border: #161616;
  --radius-md: 20px;
  --radius-pill: 9999px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg-light);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 1rem;
  padding: 40px 20px;
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: 6px 6px 0px var(--color-border);
}

/* Header & Navigation Buttons */
.legal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.legal-brand {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-actions {
  display: flex;
  gap: 12px;
}

.btn-legal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--color-border);
  transition: all 0.2s ease;
}

.btn-legal:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px var(--color-border);
  background: var(--color-bg-light);
}

.btn-back {
  background: var(--color-accent);
}

.btn-back:hover {
  background: #ffd643;
}

/* Titles and Meta */
.legal-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--color-text);
}

.legal-meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-weight: 500;
}

/* Navigation Document Switcher Links */
.document-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: var(--color-bg-nude);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 36px;
}

.switcher-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-text);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.switcher-link:hover {
  background: rgba(49, 92, 80, 0.1);
}

.switcher-link.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Sumário / Table of Contents */
.legal-toc {
  background: var(--color-bg-light);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 40px;
}

.toc-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.toc-list a:hover {
  text-decoration: underline;
}

/* Legal Content styling */
.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 40px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--color-border);
  padding-bottom: 8px;
  scroll-margin-top: 24px;
}

.legal-content p {
  margin-bottom: 18px;
  color: var(--color-text);
}

.legal-content ul, .legal-content ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  font-weight: 700;
}

/* Tabela de Bases Legais */
.legal-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
}

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

.legal-table th, .legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-table th {
  background: var(--color-bg-nude);
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}

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

/* Destaques e Avisos (Alerts) */
.legal-alert {
  background: #FFE899;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
  margin: 28px 0;
  box-shadow: 3px 3px 0px var(--color-border);
}

.legal-alert-danger {
  background: #FFCDD2;
}

.alert-title {
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Contact channel block */
.legal-contact-block {
  background: var(--color-bg-nude);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 48px;
}

.contact-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 20px 10px;
  }

  .legal-container {
    padding: 24px 16px;
  }

  .legal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .legal-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Print CSS Styles overrides */
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }

  .legal-container {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .legal-actions, .document-switcher, .btn-legal, .cookie-banner, .social-proof-toast {
    display: none !important;
  }

  .legal-content h2 {
    page-break-after: avoid;
  }
}
