/* ========================================
   RESET E VARIÁVEIS
======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary-yellow: #FFC300;
  --secondary-yellow: #fce38a;
  --bg-cream: #fce38a;
  --text-dark: #212121;
  --text-gray: #424242;
  --bg-white: #FFFFFF;
  --border-radius: 20px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
  background-color: var(--bg-cream);
}

/* ========================================
   HEADER COM SELETOR DE IDIOMA
======================================== */
.top-flags {
  background: #ffffff;
  padding: 0;
  border-bottom: 2px solid #fbd65c;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.language-selector {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  position: relative;
}

/* Botão Voltar */
.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.back-btn:hover {
  color: var(--primary-yellow);
}

/* Trigger do idioma */
.language-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.language-trigger:hover {
  border-color: var(--primary-yellow);
  box-shadow: 0 4px 12px rgba(255, 195, 0, 0.15);
}

.language-trigger img {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-trigger .chevron {
  transition: transform 0.3s ease;
}

.language-trigger.active .chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  min-width: 280px;
  z-index: 1001;
}

.language-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.language-option:hover {
  border-color: var(--primary-yellow);
  background: #fffbf0;
  transform: translateY(-2px);
}

.language-option.active {
  border-color: var(--primary-yellow);
  background: var(--secondary-yellow);
}

.language-option img {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   CONTEÚDO (QUADRO BRANCO)
======================================== */
.privacy-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

h1 {
  font-size: 2.5rem;
  line-height: 3rem;
  color: var(--primary-yellow);
  text-align: center;
  margin-bottom: 10px;
}

.last-update {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 50px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.legal-content section {
  margin-bottom: 40px;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-dark);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 20px;
  margin-bottom: 10px;
}

p {
  color: var(--text-gray);
  text-align: justify;
  margin-bottom: 15px;
}

p a {
  color: #b8860b;
  font-weight: 600;
}

/* ========================================
   LISTAS
======================================== */
.policy-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.policy-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-gray);
  margin-bottom: 10px;
  text-align: justify;
  line-height: 1.7;
}

.policy-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-yellow);
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 700;
}

.policy-list li a {
  color: #b8860b;
  font-weight: 600;
}

/* ========================================
   TABELA
======================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(255, 195, 0, 0.2);
  margin-top: 16px;
}

.data-purpose-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.data-purpose-table thead tr {
  background: var(--primary-yellow);
}

.data-purpose-table thead th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  color: #212121;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
}

.data-purpose-table tbody tr {
  border-bottom: 1px solid #f5f0e0;
  transition: background 0.2s ease;
}

.data-purpose-table tbody tr:last-child {
  border-bottom: none;
}

.data-purpose-table tbody tr:nth-child(even) {
  background: #fffdf4;
}

.data-purpose-table tbody tr:hover {
  background: #fff8dc;
}

.data-purpose-table tbody td {
  padding: 14px 20px;
  color: var(--text-gray);
  vertical-align: top;
  border: none;
}

.data-purpose-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-dark);
}

/* ========================================
   FOOTER
======================================== */
.privacy-footer {
  text-align: center;
  padding: 24px 20px;
  background: var(--primary-yellow);
  margin-top: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bg-white);
}

.privacy-footer p {
  text-align: center;
  margin-bottom: 0;
  color: var(--bg-white);
}

/* ========================================
   RESPONSIVO
======================================== */
@media (max-width: 768px) {
  .privacy-container {
    margin: 16px;
    padding: 30px 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .data-purpose-table thead th,
  .data-purpose-table tbody td {
    padding: 12px 14px;
  }
}

@media (max-width: 600px) {
  .back-btn span {
    display: none;
  }

  .language-grid {
    grid-template-columns: 1fr;
  }

  .language-dropdown {
    min-width: 240px;
    max-width: calc(100vw - 40px);
  }
}