/* =====================================================================
   Correções globais (todas as páginas)
   ===================================================================== */

/* Menu do header: o style.css do tema põe "overflow-wrap: anywhere" em todos os links;
   no Safari isso fazia os itens encolher e partir palavras ("VÍDE / O", "CONTACTE- / NOS"). */
header .main-menu > li,
header .main-menu > li > a,
header .headerMenuWrapper a,
header .wrapper-header a {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

header .main-menu > li { flex-shrink: 0; }

/* =====================================================================
   Header refinado (todas as páginas) – castanho da marca, mais leve
   ===================================================================== */
header {
  transition: padding 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.45s ease, box-shadow 0.45s ease !important;
}

/* por cima do vídeo/fotos: degradê muito suave atrás do menu para se ler sempre bem */
header:not(.header-colored)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 160%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 18, 20, 0.38) 0%, rgba(10, 18, 20, 0) 100%);
}

/* depois de descer: castanho ligeiramente translúcido com efeito de vidro, mais fino */
header.header-colored {
  background-color: rgba(94, 62, 33, 0.9) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(20, 12, 6, 0.12);
}

@media (min-width: 1025px) {
  header.header-colored { padding-top: 22px !important; padding-bottom: 22px !important; }
  header .headerLogo { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); transform-origin: left center; }
  header.header-colored .headerLogo { transform: scale(0.88); }
}

/* itens do menu: sublinhado que desliza ao passar o rato */
header .main-menu > li:not(.special) > a { position: relative; }
header .main-menu > li:not(.special) > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transition: right 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
header .main-menu > li:not(.special) > a:hover::after,
header .main-menu > li.current-menu-item:not(.special) > a::after { right: 0; }

/* "Contacte-nos" em cápsula (cores de cada página mantêm-se) */
header .main-menu > li.special > a {
  border-radius: 999px !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
  transition: filter 0.3s ease, transform 0.3s ease !important;
}
header .main-menu > li.special > a:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* EN | PT: o idioma ativo mais marcado */
header .wpml-lang-wrapper .wpml-ls-item:not(.wpml-ls-current-language) a { opacity: 0.6; transition: opacity 0.3s ease; }
header .wpml-lang-wrapper .wpml-ls-item:not(.wpml-ls-current-language) a:hover { opacity: 1; }

/* Botões de ação todos em cápsula, como o "Contacte-nos" (cores e textos mantêm-se) */
body .vc_btn3-container .vc_btn3,
body .quform-button-submit button,
body .quform-submit,
body .filtros-ordenacao .botao-ordenacao {
  border-radius: 999px !important;
}
body .quform-submit { padding-left: 28px !important; padding-right: 28px !important; }

/* Voltar ao topo (plugin To Top): sem a caixa preta quadrada por trás do círculo */
#to_top_scrollup {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 50% !important;
  opacity: 0.85 !important;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 35, 40, 0.25);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#to_top_scrollup:hover { opacity: 1 !important; transform: translateY(-2px); }
#to_top_scrollup img { display: block; width: 100% !important; height: 100% !important; }
