:root {
  --ink: #343a40;
  --muted: #6c757d;
  --paper: #e2e9ed;
  --panel: #ffffff;
  --line: #dee2e6;
  --primary: #2c4d5e;
  --primary-mid: #4a6d7e;
  --primary-dark: #1a3645;
  --accent: #09d3d3;
  --accent-deep: #008b98;
  --ok: #28a745;
  --danger: #dc3545;
  --input: #f5f7f8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(44, 77, 94, 0.08);
  --shadow-md: 0 8px 24px rgba(44, 77, 94, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Geist, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--primary-dark);
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  border-bottom: 1px solid var(--primary-dark);
  padding: 14px 24px;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: inherit;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-lgpd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 211, 211, 0.16);
  border: 1px solid rgba(9, 211, 211, 0.4);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
.badge-lgpd::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none !important;
  font-family: inherit;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
  background: rgba(9, 211, 211, 0.18);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.content-area .btn-primary,
.dpo-actions .btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.content-area .btn-primary:hover,
.dpo-actions .btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

.content-area .btn-secondary,
.dpo-actions .btn-secondary {
  background: var(--panel);
  color: var(--primary);
  border-color: var(--line);
}
.content-area .btn-secondary:hover,
.dpo-actions .btn-secondary:hover {
  border-color: var(--accent);
  background: var(--input);
  color: var(--primary-dark);
}

.hero {
  position: relative;
  padding: 48px 24px 36px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-deep);
  background: rgba(9, 211, 211, 0.14);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(9, 211, 211, 0.35);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 780px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.hero-subtitle strong {
  color: var(--primary);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-meta-item strong {
  color: var(--primary);
}

.pillars-grid {
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.pillar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--accent);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(9, 211, 211, 0.14);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
  border: 1px solid rgba(9, 211, 211, 0.3);
}

.pillar-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--primary);
}

.pillar-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}
.pillar-desc strong {
  color: var(--ink);
}

.layout-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.toc-sidebar {
  position: sticky;
  top: 82px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.toc-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  position: relative;
  margin-bottom: 14px;
}
.search-input {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 34px;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(9, 211, 211, 0.25);
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--muted);
  pointer-events: none;
}

.toc-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
  text-decoration: none !important;
  border-left: 2px solid transparent;
}
.toc-item a:hover {
  color: var(--primary);
  background: var(--input);
}
.toc-item.active a {
  color: var(--primary-dark);
  font-weight: 600;
  background: rgba(9, 211, 211, 0.14);
  border-left-color: var(--accent);
}

.content-area {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.policy-section {
  margin-bottom: 40px;
  scroll-margin-top: 96px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 36px;
}
.policy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(9, 211, 211, 0.16);
  border: 1px solid rgba(9, 211, 211, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.policy-section p,
.policy-section ul,
.policy-section ol {
  color: var(--ink);
  margin-bottom: 14px;
  font-size: 0.96rem;
}
.policy-section ul,
.policy-section ol {
  margin: 14px 0 18px 22px;
}
.policy-section li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--ink);
}
.policy-section strong {
  color: var(--primary-dark);
}
.policy-section code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86em;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--primary);
}

.callout {
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--input);
}
.callout-info,
.callout-success,
.callout-warning {
  border-color: rgba(9, 211, 211, 0.4);
  background: rgba(9, 211, 211, 0.08);
}
.callout-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.callout-content {
  font-size: 0.92rem;
  color: var(--ink);
}
.callout-content strong {
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}
.policy-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 650;
  padding: 12px 16px;
  border-bottom: 1px solid var(--primary-dark);
}
.policy-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
}
.policy-table tr:last-child td {
  border-bottom: none;
}
.policy-table tr:hover td {
  background: var(--input);
}

.tag-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(9, 211, 211, 0.16);
  border: 1px solid rgba(9, 211, 211, 0.35);
  color: var(--primary);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--panel);
}
.faq-item:hover {
  border-color: var(--accent);
}
.faq-question {
  padding: 14px 18px;
  width: 100%;
  text-align: left;
  background: var(--input);
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-icon {
  font-size: 0.9rem;
  color: var(--accent-deep);
  transition: transform 0.25s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.25s ease;
  background: var(--panel);
  padding: 0 18px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  max-height: 360px;
  padding: 0 18px 16px 18px;
}

.dpo-card {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
}
.dpo-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--primary);
  border: 1px solid var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}
.dpo-details h4 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.dpo-details p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.dpo-details p strong {
  color: var(--ink);
}
.dpo-horario {
  font-size: 0.78rem !important;
  margin-top: 4px !important;
  color: var(--muted) !important;
}
.dpo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-footer {
  background: var(--primary);
  border-top: 1px solid var(--primary-dark);
  padding: 40px 24px 28px;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.72);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.page-footer .brand-title {
  color: #fff;
}
.page-footer .brand-subtitle {
  color: var(--accent);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-legal a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}
.footer-legal a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom strong {
  color: #fff;
}

.btn-floating-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: 1px solid var(--primary-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 90;
}
.btn-floating-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.btn-floating-top:hover {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

@media (max-width: 992px) {
  .layout-wrapper {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 16px;
  }
  .content-area {
    padding: 24px 18px;
  }
  .dpo-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .dpo-avatar {
    margin: 0 auto;
  }
  .dpo-actions {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .top-header {
    padding: 10px 16px;
  }
  .badge-lgpd {
    display: none;
  }
  .hero {
    padding: 32px 16px 24px;
  }
  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .top-header, .toc-sidebar, .btn-floating-top, .page-footer, .header-actions, .search-box, .btn {
    display: none !important;
  }
  .layout-wrapper {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }
  .content-area {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
}
