* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #0b469e;
  overflow-x: hidden;
  background-color: #f7f9fc; /* Fundo leve para destacar os cards */
}

/* =================================== */
/*   HEADER CONSISTENTE                */
/* =================================== */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: transparent;
  box-shadow: none;
  transition: background-color 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

.header-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  transition: padding 0.3s ease;
}

.logo {
  height: 45px;
  margin-left: 100px;
  transition: margin 0.3s ease;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  color: #373435;
  text-decoration: none;
  font-size: 16px;
  position: relative;
}

nav a:hover {
  color: #153880;
}

nav a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #44a7ea, #153880);
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease-out;
}

nav a:hover::after{
  transform: scaleX(1);
}

nav a.active::after {
  transform: scaleX(1);
}

/* --- Estilos para o Seletor de Idioma --- */

.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px; /* Ajuste o espaçamento do menu */
}

.current-language {
    display: flex;
    align-items: center;
    padding: 5px; /* MODIFICADO: Padding ajustado para conter apenas a bandeira */
    border: 0px solid #ccc;
    border-radius: 5px;
    background-color: transparent; /* MODIFICADO: Fundo agora é transparente por padrão */
    color: #373435;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    user-select: none;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    outline: none;
}

/* MODIFICADO: Adicionado estado de fundo para o header com scroll */

.current-language:hover {
    background-color: #f0f0f0e8;
    border-color: #999;
}

.current-language:focus {
    outline: 2px solid #a0a0a0;
    outline-offset: 1px;
}

.flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 0; /* MODIFICADO: Removida a margem que separava a bandeira do texto */
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* MODIFICADO: Esconde o texto (span) dentro do botão e das opções do dropdown */
.current-language span,
.language-option span {
    display: none;
}

/* URLs para as imagens das bandeiras (SVG para melhor qualidade e escalabilidade) */
.flag-br { background-image: url(../../assets/images/flags/brasil.png); }
.flag-gb { background-image: url(../../assets/images/flags/usa.png); }
.flag-es { background-image: url(../../assets/images/flags/espanha.png); }

.language-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    min-width: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 3px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.language-dropdown:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: center; /* MODIFICADO: Centraliza a bandeira na opção */
    padding: 5.5px; /* MODIFICADO: Padding uniforme */
    cursor: pointer;
    color: #333;
    font-size: 14px;
    transition: background-color 0.15s ease;
    outline: none;
}


.language-option:hover {
    background-color: #f0f0f0;
}

.language-option:focus {
    background-color: #e0e0e0;
    outline: 1px solid #999;
    outline-offset: -1px;
}

.language-option .flag {
    margin-right: 0; /* MODIFICADO: Removida a margem */
    width: 18px;
    height: 18px;
    border: 1px solid rgba(0,0,0,0.15);
}

/* Garante que o nav-container alinhe os itens corretamente */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* =================================== */
/*   CONTEÚDO DA PÁGINA FICHA TÉCNICA  */
/* =================================== */

.ficha-container {
  max-width: 700px; /* Largura ajustada para ser mais similar à imagem */
  margin: 150px auto 50px;
  padding: 0 20px;
}

.ficha-container h1 {
  font-size: 2.2rem;
  background-image: linear-gradient(to right, #44a7ea 30%, #153880 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 40px;
  font-weight: 800;
  text-align: center;
}

/* --- REMOÇÃO DO CAMPO DE BUSCA --- */
/* Os estilos para .campo-busca e .icone-lupa foram removidos */

/* Estilos dos cards de categoria principal */
.categoria {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Sombra sutil */
  margin-bottom: 15px; /* Espaçamento entre os cards */
  cursor: pointer;
  overflow: hidden; /* Garante que o conteúdo não vaze das bordas arredondadas */
  transition: all 0.3s ease; /* Transição suave para expansão */
  border: 1px solid #eee; /* Borda leve para definição */
}

/* Remove a borda inferior antiga que estava no código */
.categoria::after {
  display: none;
}

.cabecalho-categoria {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-size: 1.2rem;
  font-weight: 700;
  background-image: linear-gradient(to right, #44a7ea 1%, #153880 15%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none; /* Previne seleção de texto ao clicar */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Sombra sutil */
  position: relative;
  z-index: 2;
}

.cabecalho-categoria .seta {
  width: 0;
  height: 0;
  border-left: 8px solid #153880; /* Triângulo apontando para a direita */
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 0.3s ease;
}

.categoria.open .cabecalho-categoria .seta {
  transform: rotate(90deg); /* Triângulo apontando para baixo quando aberto */
}

/* Área de conteúdo das categorias principais */
.conteudo {
    overflow: hidden;
    height: 0;
    transform: translateY(-5px);
    padding: 0 20px;
    transition:
        height 0.6s ease,
        opacity 0.35s ease,
        transform 0.6s ease;
    z-index: 1;
}

.categoria.open .conteudo {
    opacity: 1;
    transform: translateY(0);
    overflow: hidden;
}

/* Estilo para sub-categorias (ex: Filme, Sopro, Injeção) */
.sub-categoria {
  margin-left: 20px; /* Recuo para sub-categorias */
  margin-top: 10px;
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cabecalho-sub-categoria {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0; /* Apenas preenchimento vertical, sem horizontal */
  font-size: 1rem;
  font-weight: 600;
  /* color: #373435; */
    background-image: linear-gradient(to right, #44a7ea 1%, #153880 10%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  user-select: none;
}

.cabecalho-sub-categoria .seta-sub {
  width: 0;
  height: 0;
  border-left: 6px solid #373435; /* Triângulo menor apontando para a direita */
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.3s ease;
}

.sub-categoria.open .cabecalho-sub-categoria .seta-sub {
  transform: rotate(90deg); /* Triângulo apontando para baixo quando aberto */
}

.conteudo-sub-categoria {
  display: none; /* Escondido por padrão */
  padding-left: 20px; /* Novo recuo para itens dentro de sub-categorias */
}

.sub-categoria.open .conteudo-sub-categoria {
  display: block; /* Mostra o conteúdo quando a sub-categoria está aberta */
}

/* Estilo para itens individuais (folha) */
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eef;
  font-size: 0.95rem;
  color: #373435;
}

.item:last-child {
  border-bottom: none; /* Sem borda para o último item */
}

/* Estilo do botão "Abrir" */
.btn-abrir { /* Substitui .btn-download */
  background: linear-gradient(to right, #44a7ea 0%, #153880 100%); /* Azul claro, similar à imagem */
  color: #fff;
  padding: 6px 12px; /* Preenchimento menor */
  font-size: 0.85rem; /* Fonte menor */
  text-decoration: none;
  border-radius: 4px; /* Levemente menos arredondado */
  /* transition: background-color 0.5s ease; */
  white-space: nowrap;
  margin-left: 15px;
  border: none; /* Garante que não há borda padrão de botão */
  cursor: pointer;
}

.btn-abrir:hover {
      background: #44a7ea;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: white;
  color: transparent; /* Azul escuro ao passar o mouse */
}


/* =================================== */
/*   RODAPÉ CONSISTENTE                */
/* =================================== */
.footer {
  background: #fff;
  border-top: 2px solid #44a7ea;
  padding: 50px 20px 10px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
  gap: 40px;
}

.footer-logo img {
  height: 60px;
}

.footer-menu h4,
.footer-contato h4 {
  color: #44a7ea;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.footer-menu ul {
  list-style: none;
  padding: 0;
}

.footer-menu ul li {
  margin-bottom: 6px;
}

.footer-menu ul li a, .footer-contato p, .footer-contato a {
  text-decoration: none;
  color: #000;
  font-size: 0.95rem;
}

.footer-redes {
  margin-top: 10px;
}

.footer-redes a {
  margin-right: 10px;
  display: inline-block;
}

.footer-redes img {
  width: 24px;
  transition: 0.3s;
}

.footer-redes a:hover img {
  transform: scale(1.1);
}

.footer hr {
  border: none;
  border-top: 1.5px solid #e0e0e0;
  margin: 30px auto;
  max-width: 1200px;
}

.footer-bottom {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  padding-bottom: 10px;
}

.footer-bottom spam a{
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  padding-bottom: 10px; /* Adicionado: padding-bottom para igualar o arquivo de referência */
}

/* ======================================================= */
/* ============= SEÇÃO DE RESPONSIVIDADE ================= */
/* ======================================================= */

@media (max-width: 992px) {
  .nav-container {
    padding-left: 30px;
    padding-right: 20px;
  }
  
  .logo {
    margin-left: 0;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-logo img {
    margin: 0;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .logo {
    order: 1;
    height: 40px;
    width: auto;
  }

  .user-icon { 
    order: 2;
  }

  nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    margin-top: 15px;
    gap: 15px;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 15px;
  }
  
  .ficha-container {
    margin-top: 180px;
  }

  .ficha-container h1 {
    font-size: 2rem;
  }

  .cabecalho-categoria {
    font-size: 1.1rem;
  }

  .item {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Ajustes para telas menores */
  .sub-categoria {
    margin-left: 10px; /* Menor recuo em telas menores */
  }

  .conteudo-sub-categoria {
    padding-left: 10px; /* Menor recuo em telas menores */
  }
}