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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(145deg, #f6f9fc 0%, #eef2f5 100%);
  color: #1a2c3e;
  line-height: 1.5;
  scroll-behavior: smooth;
}

/* container principal */
.terms-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* cabeçalho hero */
.hero-section {
  background: linear-gradient(135deg, #0B2B40 0%, #124E66 100%);
  border-radius: 2rem;
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  color: white;
  box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 1rem;
}

.hero-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 650px;
}

.last-update {
  margin-top: 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.8;
}

/* grid com sumário + conteúdo */
.terms-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

/* sumário lateral (sticky) */
.summary-card {
  flex: 0 0 280px;
  background: white;
  border-radius: 1.5rem;
  padding: 1.5rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  align-self: start;
  position: sticky;
  top: 1.5rem;
  backdrop-filter: blur(2px);
  transition: all 0.2s;
  border: 1px solid rgba(18, 78, 102, 0.1);
}

.summary-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-left: 0.5rem;
  border-left: 4px solid #124E66;
  color: #0B2B40;
}

.summary-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.summary-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2c4b5f;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: transparent;
}

.summary-nav a i {
  width: 1.6rem;
  font-size: 1rem;
  color: #4f7a92;
}

.summary-nav a:hover {
  background: #e9f0f5;
  color: #0B2B40;
  transform: translateX(4px);
}

.summary-nav a.active {
  background: linear-gradient(95deg, #eef3f8, #e2ebf1);
  color: #0a4c66;
  font-weight: 600;
  border-left: 3px solid #124E66;
}

/* conteúdo principal */
.content-document {
  flex: 1;
  min-width: 0;
  background: white;
  border-radius: 1.75rem;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.2s;
}

.document-inner {
  padding: 2rem 2rem 2.5rem;
}

.section {
  scroll-margin-top: 80px;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #e6edf2;
  padding-bottom: 1.8rem;
}

.section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0B2B40;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section h2 i {
  color: #2c7a5e;
  font-size: 1.5rem;
}

.section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.2rem 0 0.6rem 0;
  color: #1f5068;
}

.section p, .section li {
  font-size: 0.95rem;
  color: #2c3e4e;
}

.section p {
  margin-bottom: 0.75rem;
}

.section ul, .section ol {
  margin: 0.75rem 0 1rem 1.8rem;
}

.section li {
  margin-bottom: 0.4rem;
}

.highlight-box {
  background: #f0f6fa;
  border-left: 4px solid #124E66;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  margin: 1rem 0;
}

.annex-table {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 1rem;
  font-size: 0.85rem;
}

th, td {
  border: 1px solid #dce5ec;
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef2f7;
  font-weight: 600;
  color: #0f3b4f;
}

.footer-note {
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b8ba0;
  border-top: 1px solid #e2eaf0;
}

/* botão flutuante para voltar ao topo */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #124E66;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  z-index: 99;
  border: none;
  font-size: 1.2rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #0a3b4f;
  transform: translateY(-3px);
}

@media (max-width: 860px) {
  .terms-wrapper {
    padding: 1rem 1rem 2.5rem;
  }
  .hero-section {
    padding: 1.8rem 1.5rem;
  }
  .hero-section h1 {
    font-size: 1.7rem;
  }
  .summary-card {
    flex: 0 0 100%;
    position: relative;
    top: 0;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  .summary-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .summary-nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
  .document-inner {
    padding: 1.5rem;
  }
  .section h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }
  .document-inner {
    padding: 1.2rem;
  }
  .section h2 {
    font-size: 1.25rem;
  }
  .back-to-top {
    width: 42px;
    height: 42px;
    right: 1rem;
    bottom: 1rem;
  }
}