/* Header Journeys-style */

/* Base header: barra preta, sticky, override a inline bg */
/* Reservar espaço para o header fixo, evitando faixa branca e sem precisar de div espaçadora */
/*body { padding-top: 60px; }

/* Alta especificidade para garantir fundo preto quando o menu está aberto */
body.menu-open header nav,
body.menu-open header nav.active {
  background: #000 !important;
}

/* Garantir que elementos internos não introduzem fundos brancos */
nav .menu-container,
nav .overlay-inner,
nav .overlay-left,
nav .overlay-right {
  background: transparent !important;
}

/* Texto branco em todo o overlay (links e textos) */
nav .main-menu,
nav .main-menu li,
nav .main-menu a,
nav .overlay-text,
nav .overlay-text *,
nav .overlay-right,
nav .overlay-right * {
  color: #fff !important;
}
/* Não empurrar a hero manualmente para evitar espaço duplo */
.hero { margin-top: 0; }
/* Neutralizar faixa branca criada por CSS legado (menu-fix-production.css) */
body::before { display: none !important; }
header {
    
  
  
   height: 80px !important;       
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-dark) !important;
  color: #fff;
  
  border-bottom: none;
  padding: 0 !important;
  box-shadow: none !important;
  overflow: visible !important; /* permitir que o logo centrado seja visível mesmo maior que 56px */
}

/* Container: manter consistente mas permitir centralização do logo */
header .container {
  max-width: 1400px;
  margin: 0 auto;
  height: 56px;
  padding: 0 !important;
  position: relative;
  display: block;
}

/* Hambúrguer à esquerda, visível em TODAS as telas */
.mobile-menu-toggle,
#mobile-menu-toggle {
  position: absolute !important;
  left: 10px !important;
  padding-left: 4px !important;
  top: 50% !important;
  transform: translateY(-50%);
  background: none !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 24px !important;
  z-index: 1001 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  cursor: pointer;
  pointer-events: auto !important;
}

/* Garantir que o ícone do hambúrguer seja sempre visível */
.mobile-menu-toggle i,
#mobile-menu-toggle i {
  color: #fff !important;
  font-size: 24px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Logo centrado no header */
header .logo {
  position: absolute;
  left: 50% !important;
  top: 85% !important;
  transform: translate(-50%, -50%) !important;
  padding-bottom: 25px !important;
  padding-top: 25px !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  z-index: 1002;
}

header .logo img {
  height:300px !important;
  width: 300px !important;
  display: block !important;
  opacity: 1 !important;
  filter: none !important;
  
}

/* Ações à direita (botão e seletor de idioma) */
.right-section {
  position: absolute;
 right: -120px !important;
  padding-right: 0px !important;
  top: 50%;
  transform: translateY(-50%);
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  gap: 14px;
  z-index: 1001;
}

.right-section .btn-informe-se,
.btn-mobile-informe {
  background: #000 !important;
  color: #fff !important;
  border-radius: 18px;
  padding: 6px 8px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
  height: 28px;
  
}
.right-section .btn-informe-se:hover,
.btn-mobile-informe:hover { background: #b5141b; }

.language-selector,
.language-selector a,
.language-selector span,
.language-selector i { 
  color: rgba(255,255,255,.95) !important; 
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Botão do seletor de línguas: remover fundo branco e manter contraste */
.language-selector .lang-select {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow: none !important;
  
}
.language-selector .lang-select:hover { border-color: rgba(255,255,255,0.4) !important; }
.language-selector .lang-select span,
.language-selector .lang-select i { color: #fff !important; }


/* Menu principal escondido em TODAS as telas para seguir o padrão traveldesigner */
header nav { 
  display: none !important; 
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Esconder qualquer menu antigo que possa aparecer */
.main-menu,
header .main-menu,
nav .main-menu {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Esconder menus desktop antigos em TODAS as telas */
@media (min-width: 768px) {
  header nav:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  .main-menu:not(.mobile-menu .main-menu) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* Esconder APENAS o menu móvel antigo em telas grandes, preservando funcionamento em mobile */
@media (min-width: 992px) {
  #mobile-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-100%) !important;
  }
  
  /* GARANTIR que o hambúrguer permaneça visível em telas grandes */
  .mobile-menu-toggle,
  #mobile-menu-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* Dropdowns e listas no header herdam cor branca quando visíveis */
nav .main-menu > li > a { color: #fff !important; }
nav .main-menu > li > a:hover { color: #fff !important; }

/* Abrir menu quando ativo (controlado por JS existente) */
nav.active,
header nav.active,
body.menu-open header nav.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  background: #000 !important;
  border: none !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  pointer-events: auto;
  opacity: 1;
  transition: opacity .25s ease;
  overflow: hidden !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
nav.active .main-menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 30px;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none;
  align-items: flex-start !important;
  text-align: left !important;
}

@media (max-width: 991px) {
  /* Garantir que o overlay ocupa toda a tela sem rolagem */
  body.menu-open header nav.active {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    z-index: 99999 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    padding: 0 !important;
  }
  
  /* Logotipo e X só aparecem em telas pequenas */
  nav.active::before {
      content: '';
      position: fixed;
      top: 20px;
      left: 20px;
      width: 180px;
      height: 60px;
      background-image: url('../logotipos/logoATLANTIDADMC.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: left center;
      z-index: 100002;
      filter: brightness(0) invert(1);
      display: block !important;
    }
    
    nav.active::after {
      content: 'X';
      position: fixed;
      top: 25px;
      right: 25px;
      font-size: 24px;
      color: #fff;
      cursor: pointer;
      z-index: 100002;
      font-weight: 400;
      line-height: 1;
      font-family: Arial, sans-serif;
      display: block !important;
    }
  
  nav.active .overlay-inner {
    flex-direction: column !important;
    padding: 120px 20px 30px 20px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    padding: 80px 60px !important;
    gap: 100px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
    padding-left: 0 !important;
  }

  nav.active .main-menu {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-top: 150px !important;
  }

  nav.active .main-menu li {
    text-align: left !important;
    width: auto !important;
    
  }

  nav.active .main-menu li a {
    text-align: left !important;
    display: block !important;
    width: auto !important;
  }

  nav.active .overlay-text {
    font-size: 28px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}

nav.active .main-menu > li { 
  width: auto; 
  text-align: left !important;
}
nav.active .main-menu > li > a {
  display: block;
  padding: 8px 0;
  color: #fff !important;
  font-family: 'General Sans', 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: .2px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: left !important;
}
nav.active .main-menu > li > a:hover,
nav.active .main-menu > li > a:focus {
  color: #fff !important;
  opacity: 0.8;
}

/* Estrutura de duas colunas (esquerda menu, direita texto) */
nav .overlay-inner {
  display: none;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 80px 60px !important;
  gap: 100px !important;
  background: transparent !important;
}
nav.active .overlay-inner { 
  display: flex !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 !important;
  margin-left: 60px !important;
  padding: 80px 60px !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  flex-direction: row !important;
}

/* Ajustes específicos para mobile */
/* Fazer overlay principal aparecer em telas pequenas também */
@media (max-width: 991px) {
  /* Garantir que o overlay ocupa toda a tela sem rolagem */
  body.menu-open header nav.active {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0 !important;
  }
  
  nav.active .overlay-inner {
    flex-direction: column !important;
    padding: 30px 20px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 40px !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  nav.active .overlay-left,
  nav.active .overlay-right {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  nav.active .main-menu {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  nav.active .overlay-text {
    font-size: 28px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}
nav .overlay-left { 
  flex: 0 0 45%; 
  display: flex; 
  justify-content: flex-start; 
  align-items: flex-start;
  padding-left: 0px;
  padding-top: 20px;
}
nav .overlay-right { 
  flex: 0 0 50%; 
  display: none; 
  padding-left: 0px;
  text-align: left;
}
nav.active .overlay-social { 
  display: flex !important; 
  gap: 18px !important; 
  margin-top: 24px !important; 
  justify-content: flex-start !important;
}

@media (max-width: 767px) {
  nav.active .main-menu .dropdown-content {
    display: block !important;
    margin-top: 5px !important;
    padding: 0 !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  
  nav.active .overlay-social {
    margin-top: 30px !important;
  }
}
nav.active .overlay-text {
  color: #fff !important;
  font-size: 38px;
  font-weight: 500;
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 30px;
  margin-top: 60px;
  text-align: left !important;
  padding-top: 150px !important;
}

/* Botão fechar (X) visível no overlay */
nav .overlay-close {
  display: none;
  z-index: 10000 !important;
  top: 30px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
  outline: none;
}

nav.active .overlay-close { 
  display: block;
}
body.menu-open { 
  overflow: hidden !important; 
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Forçar visibilidade quando o body indica menu aberto (maior especificidade) */
body.menu-open header nav.active {
  display: flex !important;
  position: fixed !important;
  left: 0px !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: var(--primary-dark) !important;
  
  z-index: 9999 !important;
  pointer-events: auto;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .25s ease;
  overflow: hidden !important;
}

/* Garantir que o body não permite rolagem quando o menu está aberto */
body.menu-open {
  overflow: hidden !important;
}

/* Ajustes mobile mantêm-se próximos ao desktop */
@media (max-width: 991px) {
  header { height: 60px; background: var(--primary-dark) !important; }
  header .container { height: 60px; position: relative; }
  /* Garantir que os controlos ficam visíveis nas margens em ecrãs pequenos */
  .mobile-menu-toggle, #mobile-menu-toggle { 
    left: 12px !important; 
    top: 16px !important; 
    transform: none !important; 
    padding: 10px !important; 
    font-size: 28px !important; 
    z-index: 9999 !important; 
    color: #fff !important; 
    opacity: 1 !important; 
    pointer-events: auto !important; 
    position: absolute !important;
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    cursor: pointer !important;
  }
  .mobile-menu-toggle i, #mobile-menu-toggle i { color: #fff !important; opacity: 1 !important; filter: none !important; pointer-events: none !important; }
  .right-section { position: absolute !important; right: 0px !important; top: 50% !important; transform: translateY(-50%) !important; gap: 4px; z-index: 1004; display: inline-flex; align-items: center; height: 36px; padding-right: 8px !important; }
  header .logo { position: absolute !important; left: 45% !important; top: -60% !important; transform: translate(-50%,-50%) !important; z-index: 1006; }
  header .logo img { height: 180px !important; width: auto !important; display: block !important; opacity: 1 !important; filter: none !important; }

  /* Seletor de idioma visível e compacto ao lado do envelope */
  .language-selector { display: inline-flex !important; position: static !important; align-items: center !important; right: 0px !important;}
  .language-selector .lang-select {
    background: transparent !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: none !important;
    height: auto !important;
    
  }
  .language-selector .lang-select i,
  .language-selector .lang-select span { color: #fff !important; font-size: 16px !important; font-weight: 700 !important; }
  #lang-dropdown { 
    right: 0 !important; 
    left: auto !important; 
    background: #fff !important; 
    color: #111 !important; 
    border-radius: 8px !important; 
    z-index: 99999 !important;
    position: absolute !important;
    top: 100% !important;
    min-width: 120px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    border: 1px solid #ddd !important;
  }

  /* Resetar regras legadas do envelope (#btn-informe-se) que o colocavam fixo/flutuante */
  header .right-section #btn-informe-se,
  .right-section #btn-informe-se,
  header .right-section .btn-informe-se,
  .right-section .btn-informe-se {
   position: static !important;
    background: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    margin-right: -40px !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    line-height: 1 !important;
    
  }
  .right-section #btn-informe-se i,
  .right-section .btn-informe-se i { color: #fff !important; font-size: 22px !important; }

  /* Garantir que o seletor de idioma não herda posicionamentos absolutos antigos */
  header #language-selector,
  #language-selector { 
    position: static !important; 
    top: auto !important; 
    right: auto !important; 
    overflow-y: auto; /* permitir scroll interno caso a lista cresça */
    
  }
  nav .overlay-inner { 
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px; 
  }
  nav .overlay-left { flex: 0 0 auto; padding-left: 0; }
  nav .overlay-right { width: 100%; }
  /* Mostrar a coluna da direita quando o overlay está ativo (override ao inline style="display:none;") */
  nav.active .overlay-right { display: block !important; position: relative !important; }
  /* (Revert) Sem logo na coluna esquerda */
  nav .overlay-text { font-size: 20px; line-height: 1.5; }
  nav.active .main-menu { gap: 14px; }
  nav.active .main-menu > li > a { font-size: 20px; padding: 8px 0; }

  /* Botão fechar mais acessível no mobile */
  nav .overlay-close { right: 12px !important; top: 12px !important; font-size: 22px !important; }

  /* Dropdown de línguas: largura e legibilidade */
  #lang-dropdown { min-width: 140px !important; }
}

/* Posicionamento do logo quando o menu estiver aberto */
nav.active .logo-menu {
  position: fixed !important;
  top: 30px !important;
  left: 30px !important;
  z-index: 10000 !important;
  width: 180px !important;
  height: auto !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Garantir que ambas as colunas aparecem */
nav.active .overlay-left { 
  display: flex !important; 
  position: relative; 
  align-items: flex-start;
  justify-content: flex-start;
}
nav.active .overlay-right { 
  display: block !important; 
  position: relative; 
  visibility: visible !important;
  opacity: 1 !important;
}

/* CORREÇÃO FINAL: Garantir que o menu overlay funcione corretamente */
nav.active .overlay-inner,
header nav.active .overlay-inner,
body.menu-open header nav.active .overlay-inner {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 80px 60px !important;
  gap: 100px !important;
}

/* Garantir que a coluna esquerda (menu) seja visível */
nav.active .overlay-left,
header nav.active .overlay-left,
body.menu-open header nav.active .overlay-left {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 45% !important;
  width: 45% !important;
  min-width: 400px !important;
  background: rgba(255, 0, 0, 0.1) !important; /* DEBUG: fundo vermelho temporário */
}

/* Garantir que a coluna direita (texto) seja visível */
nav.active .overlay-right,
header nav.active .overlay-right,
body.menu-open header nav.active .overlay-right {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 50% !important;
  width: 50% !important;
}

nav.active .main-menu,
header nav.active .main-menu {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-direction: column !important;
  gap: 30px !important;
  list-style: none !important;
  padding: 20px !important;
  margin: 0 !important;
  background: rgba(0, 255, 0, 0.1) !important; /* DEBUG: fundo verde temporário */
  border: 2px solid #00ff00 !important; /* DEBUG: borda verde */
}

nav.active .main-menu li a,
header nav.active .main-menu li a {
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  display: block !important;
}

/* FORÇA MÁXIMA: Sobrescrever estilos inline com especificidade máxima */
body header nav.active[style*="display: none"],
body header nav.active[style*="opacity: 0"],
body header nav.active[style*="visibility: hidden"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body header nav.active .overlay-inner[style*="display: none"],
body header nav.active .overlay-inner[style*="opacity: 0"],
body header nav.active .overlay-inner[style*="visibility: hidden"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body header nav.active .overlay-left[style*="display: none"],
body header nav.active .overlay-left[style*="opacity: 0"],
body header nav.active .overlay-left[style*="visibility: hidden"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body header nav.active .main-menu[style*="display: none"],
body header nav.active .main-menu[style*="opacity: 0"],
body header nav.active .main-menu[style*="visibility: hidden"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Botão X posicionado corretamente */
body header nav.active .overlay-close[style*="display: none"] {
  display: block !important;
  position: fixed !important;
  right: 25px !important;
  top: 25px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Logo do menu posicionado corretamente */
body header nav.active .logo-menu[style*="display: none"] {
  display: block !important;
  position: fixed !important;
  top: 20px !important;
  left: 20px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ===== CORREÇÃO MOBILE PARA SELETOR DE IDIOMAS ===== */
@media (max-width: 767px) {
  .language-selector {
    position: relative !important;
    z-index: 999999998 !important;
    pointer-events: auto !important;
  }
  
  #lang-dropdown,
  .language-selector #lang-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    background: #ffffff !important;
    color: #333 !important;
    border: 2px solid #333 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
    z-index: 999999 !important;
    min-width: 140px !important;
    margin-top: 8px !important;
    padding: 5px 0 !important;
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
 
}
