/* ==========================================================================
   ESTILOS DO HEADER (Atualizado para Mobile)
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; /* Base para o efeito scrolled funcionar */
}

header.scrolled {
  border-bottom-color: var(--border);
}

.nav-home {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 36px;
  display: block;
  cursor: pointer;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0;
}

/* --- SELETOR DE IDIOMAS --- */
.nav-lang-container {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 8px;
}

#lang-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #718096;
}

#active-lang-flag {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 2px;
}

#active-lang-text {
  color: #4a5568;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  padding: 6px;
  box-sizing: border-box;
}

#lang-menu {
  width: 140px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.lang-option img {
  width: 20px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-option span {
  font-family: sans-serif;
  font-size: 12px;
  color: #2d3748;
  font-weight: 500;
}

/* --- MENU BENTO --- */
.nav-bento-container {
  position: relative;
  display: inline-block;
}

#bento-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4a5568;
  border-radius: 8px;
  transition: background 0.2s;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 500;
}

#bento-trigger svg,
#bento-trigger span {
  pointer-events: none;
}

.bento-dropdown {
  width: 440px;
  top: calc(100% + 12px);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 16px;
  text-align: left;
  left: auto;
  right: 0;
}

.bento-header-info {
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bento-header-info h4 {
  font-size: 18px;
  font-weight: 500;
  color: #1a202c;
  margin: 0;
  font-family: sans-serif;
}

.bento-header-info p {
  font-size: 12px;
  color: #718096;
  margin: 2px 0 0 0;
  font-family: sans-serif;
}

.bento-grid-3cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 30px;
  column-gap: 20px;
  margin-bottom: 20px;
}

.bento-section {
  margin-bottom: 14px;
}

.bento-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #8b7cf7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-family: sans-serif;
}

.bento-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  background: transparent !important;
  transition: all 0.2s;
}

.bento-card svg {
  margin-bottom: 17px; /* Removida a linha duplicada de 4px */
  color:var(--blue-icon);
}

.bento-card span {
  font-size: 12px;
  font-weight: 600;
  color: #2d3748;
  font-family: sans-serif;
}

.bento-card-full {
  grid-column: span 2;
}

.bento-card-row {
  flex-direction: row;
  gap: 8px;
}

.bento-card:hover {
  background: #edf2f7 !important;
  border-color: #cbd5e0 !important;
  transform: translateY(-1px);
}

/* --- RESPONSIVIDADE --- */

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-home {
    padding: 0 12px; /* Ganha espaço lateral */
  }

  .nav-logo {
    flex-shrink: 0; /* IMPEDE O LOGO DE ACHATAR */
  }

  .nav-logo img {
    height: 24px;
    width: auto; /* Mantém a proporção correta */
  }

  .nav-right {
    gap: 8px; /* Aproxima os itens para caberem na linha */
  }

  /* Esconde textos para sobrar espaço para o logo no celular */
  #lang-trigger span, 
  #bento-trigger span {
    display: none;
  }

  .bento-dropdown {
    width: calc(100vw - 24px);
    right: -12px;
  }

  .bento-grid-3cols {
    grid-template-columns: repeat(2, 1fr); /* 2 colunas no celular */
    gap: 16px;
  }
}