:root{
  --blue: #15314f;
  --orange: #f4a84b;
  --dark-text: #0b2a3d;
}

/* =========================
   DESKTOP: Esconder mobile custom
========================= */
@media (min-width: 769px) {
  .custom-mobile-topbar,
  .custom-sidebar,
  .custom-overlay { 
    display: none !important; 
  }
}

/* =========================
   TOPBAR MOBILE - 3 LINHAS
========================= */
.custom-mobile-topbar { 
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--blue);
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* LINHA 1 */
.topbar-row1 {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 6px;
  font-size: 13.5px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.welcome-text { font-weight: 500; }
.social-text { font-size: 13px; opacity: 0.95; }

/* LINHA 2 */
.topbar-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.custom-logo img {
  height: 48px;
  width: auto;
  max-width: 230px;
}

.btn-contact-topbar {
  background: var(--orange);
  color: var(--dark-text);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* LINHA 3 */
.topbar-row3 {
  background: #ffffff;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
}

/* Hambúrguer */
.custom-menu-btn {
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hamburger-lines {
  position: relative;
  width: 28px;
  height: 3px;
  background: #15314f;
  display: inline-block;
}

.hamburger-lines::before,
.hamburger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 28px;
  height: 3px;
  background: #15314f;
}

.hamburger-lines::before { top: -8px; }
.hamburger-lines::after { bottom: -8px; }

/* Animação para X */
.custom-menu-btn.open .hamburger-lines { background: transparent; }
.custom-menu-btn.open .hamburger-lines::before { transform: rotate(45deg); top: 0; }
.custom-menu-btn.open .hamburger-lines::after { transform: rotate(-45deg); bottom: 0; }

/* Pesquisa */
.custom-search-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  color: #15314f;
  cursor: pointer;
}

/* =========================
   SIDEBAR MENU
========================= */
.custom-sidebar{
  position: fixed;
  top: 178px;           /* Aumentado por causa das 3 linhas da topbar */
  left: 0;
  right: 0;
  height: calc(100vh - 178px);
  background: var(--blue);
  padding: 20px;
  transform: translateY(-100%);
  transition: transform .4s ease;
  z-index: 99998;
  overflow-y: auto;
}

.custom-sidebar.active{
  transform: translateY(0);
}

/* Espaço para não sobrepor conteúdo */
body { 
  padding-top: 178px !important; 
}

/* Menu Links */
.custom-menu-links{
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}

.custom-menu-links li{ 
  margin-bottom: 8px; 
}

.custom-menu-links a{
  display: block;
  color: #ffffff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  padding: 14px 12px;
  border-radius: 6px;
  transition: all .2s ease;
}

.custom-menu-links a:hover,
.custom-menu-links .current-menu-item > a {
  background: var(--orange);
  color: var(--dark-text);
}

/* ======================
   DROPDOWN (Submenu)
====================== */
.custom-menu-links .menu-item-has-children > a {
  position: relative;
}

.custom-menu-links .menu-item-has-children > a:after {
  content: " ▼";
  font-size: 14px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.custom-menu-links .sub-menu {
  list-style: none;
  padding-left: 20px;
  margin-top: 6px;
}

.custom-menu-links .sub-menu a {
  font-size: 17px;
  font-weight: 500;
  padding: 10px 12px;
  color: #e0e0e0;
}

.custom-menu-links .sub-menu a:hover {
  background: rgba(244, 168, 75, 0.2);
  color: white;
}

/* Botão Contactar dentro do menu */
.custom-call{
  margin: 30px 0 20px;
  text-align: center;
}

.btn-contact{
  font-family: 'Montserrat', sans-serif;
  display:inline-flex;
  align-items:center;
  gap:10px;
  background: var(--orange);
  color: var(--dark-text);
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 800;
  text-decoration:none;
}

/* Redes Sociais */
.custom-social{
  margin-top: 30px;
  display:flex;
  justify-content:center;
  gap:16px;
}

.custom-social a{
  width:42px;
  height:42px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  color:#ffffff;
  border:2px solid rgba(255,255,255,0.2);
  font-size:18px;
}

.custom-social a:hover{
  border-color: var(--orange);
  background: rgba(255,255,255,0.1);
}

/* Overlay */
.custom-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 99997;
}

.custom-overlay.active{
  opacity: 1;
  visibility: visible;
}
/* =============================================
   REMOVER LOGO PEQUENO DENTRO DO MENU MOBILE
============================================= */
.custom-sidebar-top .custom-logo-small,
.custom-sidebar .custom-logo-small,
.custom-logo-small {
    display: none !important;
}

/* Ajustes depois de remover o logo */
.custom-sidebar-top {
    justify-content: flex-end;   /* Move o botão "X" para a direita */
    padding: 10px 0 15px 0;
}

/* Aumenta um pouco o espaço no topo do menu */
.custom-sidebar {
    padding-top: 25px !important;
}
.custom-sidebar img {
   display: none;
}
.custom-sidebar-top {
   display: none;
}



/* ======================
   DROPDOWN FUNCIONAL
====================== */
.custom-menu-links .menu-item-has-children {
    position: relative;
}

.custom-menu-links .menu-item-has-children.active > .sub-menu {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
}

.custom-menu-links .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding-left: 20px;
    margin-top: 5px;
}

.custom-menu-links .sub-menu a {
    font-size: 17px;
    padding: 10px 12px;
    color: #e0e0e0;
}

.custom-menu-links .sub-menu a:hover {
    background: rgba(244, 168, 75, 0.25);
}

/* Seta para indicar dropdown */
.custom-menu-links .menu-item-has-children > a:after {
    content: " ▼";
    font-size: 14px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.custom-menu-links .menu-item-has-children.active > a:after {
    transform: translateY(-50%) rotate(180deg);
}



/* Botão Contactar */
.btn-contact-topbar {
    padding: 5px 15px !important;
    height: 36px !important;
    font-size: 14px !important;
}

.btn-contact-topbar i {
    width: 22px;
    height: 22px;
    font-size: 13px;
}

/* Altura total da topbar fixa */
.custom-mobile-topbar {
    height: auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Remove espaço em branco + permite cliques */
body {
    padding-top: 172px !important;
    margin-top: 0 !important;
}

/* Menu sidebar encostado */
.custom-sidebar {
    top: 172px !important;
}

/* Esconde completamente o header original do OceanWP no mobile */
@media (max-width: 768px) {
    #site-header,
    #site-header-inner,
    .oceanwp-mobile-menu-icon,
    .is-sticky #site-header,
    header#site-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none;
    }
}

/* Garante que a linha 3 não sobreponha o conteúdo */
.topbar-row3 {
    position: relative;
    z-index: 99990;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Permite cliques no conteúdo da página */
#wrap, 
#outer-wrap, 
.site-main, 
.main, 
#content, 
#primary,
.entry-content {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Evita scroll fantasma */
body {
    overflow-x: hidden;
}


/* 1. Botão Contactar (Linha 2) - Sem border radius */
.btn-contact-topbar {
    background: var(--orange);
    color: #ffffff !important;
    padding: 5px 16px !important;
    height: 37px !important;
    font-size: 14px !important;
    border-radius: 0 !important;        /* Sem arredondamento */
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-contact-topbar i {
    background: var(--blue);
    color: #ffffff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    font-size: 13.5px;
}

/* 2. Quadrados amarelos nos links principais - Sem border radius */
.custom-menu-links > li > a {
    position: relative;
    padding-left: 48px !important;
}

.custom-menu-links > li > a:before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 11px;
    height: 11px;
    background: var(--orange);
    border-radius: 0 !important;        /* Quadrado perfeito sem arredondamento */
}

/* 3. Triângulos nos sub-itens de Serviços */
.custom-menu-links .sub-menu a {
    position: relative;
    padding-left: 40px !important;
}

.custom-menu-links .sub-menu a:before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--orange);
}
/* =============================================
   TRIÂNGULOS NOS SUB-MENUS (VERSÃO MAIS FORTE)
============================================= */

.custom-menu-links .menu-item-has-children .sub-menu a,
.custom-menu-links .sub-menu a,
.custom-menu-links li ul a {
    position: relative !important;
    padding-left: 42px !important;
}

/* Triângulo laranja */
.custom-menu-links .sub-menu a:before,
.custom-menu-links li ul a:before {
    content: "" !important;
    position: absolute !important;
    left: 17px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-top: 5px solid transparent !important;
    border-bottom: 5px solid transparent !important;
    border-left: 7px solid var(--orange) !important;
    z-index: 2;
}

/* Hover no triângulo */
.custom-menu-links .sub-menu a:hover:before,
.custom-menu-links li ul a:hover:before {
    border-left-color: var(--dark-text) !important;
}