/**
 * @file
 * Use this CSS file to override base CSS rules
 */

/* Set default font weight to 300 for better typography in high-density screens */
/*body {
  font-weight: 300;
}*/

/* remove background image from header/banner */
/* .path-frontpage .page-top-container {
  background-image: none;
} */

/* remove background image from footer */
/* .footers-container {
  background-image: none;
} */


/* faz o iframe ocupar toda a largura */
.video-embed-field iframe {
  width: 100%;
  max-width: 100%;
  height: auto; /* altura passa a ser controlada pela proporção abaixo */
}

/* wrapper para forçar 16:9 de forma moderna */
.video-embed-field {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
}
.video-embed-field iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Esconder completamente o link "Início" */
.breadcrumb a[href="/"],
.breadcrumb a:first-child {
  display: none;
}

/* Se esconder, também esconder a seta depois dele */
.breadcrumb li:first-child::after,
.breadcrumb .breadcrumb-item:first-child::after {
  display: none;
}

/* Logo responsivo */
.site-branding__logo img {
  max-width: 120px; /* tamanho máximo em desktop */
  height: auto;
}

/* Ecrãs pequenos (tablets e telemóveis) */
@media (max-width: 991px) {
  .site-branding__logo img {
    max-width: 100px;
  }

  .logo-and-site-name-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Telemóveis */
@media (max-width: 575px) {
  .site-branding__logo img {
    max-width: 80px;
  }
}



@media (min-width: 1440px) {
  .site-branding:not(.logo-enabled):not(.site-slogan-enabled) a {
    font-size: 40px;
    color: var(--mt-color-success);
  }
}

.fixed-header-enabled.onscroll .header-container .site-branding:not(.logo-enabled):not(.site-slogan-enabled) a {
  font-size: 40px;
  color: var(--mt-color-success);
}


/* ==================================== */
/* 1. CLASSE BASE E EFEITOS VISUAIS GERAIS */
/* ==================================== */
.btn-base {
    display: inline-block;
    padding: 10px 20px; 
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border-radius: 8px; /* Cantos arredondados */
    font-weight: 600;
    line-height: 1.2;
    
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out; 
}

/* EFEITO GERAL AO PASSAR O MOUSE */
.btn-base:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px); 
}

/* ==================================== */
/* 2. ESTILOS DE CORES (BOTÕES PREENCHIDOS) */
/* O texto é forçado a ser --mt-color-primary-contrast no hover */
/* ==================================== */

/* BOTÃO PRIMÁRIO (Turquesa) */
.btn-primario {
    background-color: var(--mt-color-primary);
    color: var(--mt-color-primary-contrast);
}

.btn-primario:hover {
    background-color: var(--mt-color-primary-dark);
    color: var(--mt-color-primary-contrast); /* <-- FORÇADO: Cor do texto no hover */
}

/* BOTÃO SECUNDÁRIO (Neutro) */
.btn-secundario {
    background-color: var(--mt-color-secondary);
    color: var(--mt-color-base-contrast); /* O seu tema define este contraste como white/quase-white */
}

.btn-secundario:hover {
    background-color: var(--mt-color-secondary-dark);
    color: var(--mt-color-primary-contrast); /* <-- FORÇADO: Usando o contraste primário para consistência */
}

/* BOTÃO DE SUCESSO/DOWNLOAD (Verde) */
.btn-sucesso {
    background-color: var(--mt-color-success);
    color: var(--mt-color-success-contrast);
}

.btn-sucesso:hover {
    background-color: var(--mt-color-success-dark);
    color: var(--mt-color-primary-contrast); /* <-- FORÇADO: Usando o contraste primário para consistência */
}

/* ==================================== */
/* 3. BOTÃO OUTLINE (Mantido com Inversão) */
/* ==================================== */
.btn-outline {
    background-color: transparent;
    color: var(--mt-color-primary); 
    border: 2px solid var(--mt-color-primary);
    box-shadow: none; 
}

.btn-outline:hover {
    /* Este inverte, como pretendido */
    background-color: var(--mt-color-primary);
    color: var(--mt-color-primary-contrast); 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
}

/* ==================================== */
/* 4. VARIAÇÕES DE TAMANHO (Mantidas) */
/* ==================================== */
.btn-pequeno {
    padding: 7px 14px;
    font-size: 0.85em;
    border-radius: 6px;
}

.btn-grande {
    padding: 14px 28px;
    font-size: 1.15em;
    border-radius: 10px;
}

/* ==================================== */
/* Altura da barra de navegação e da barra do rodapé */
/* ==================================== */
.hero-top {
  padding: 17px 0 17px;
  max-height: 52px !important;
  min-height: 52px !important;
  
}
.footer-bottom__container {
  padding: 25px 0 25px;
}

/* ========================================
   FOOTER - LOGO REDUZIDO E CENTRADO
   ======================================== */

/* Reduzir a imagem (sobrescreve width="480" inline) */
#subfooter .media--type-image img,
#subfooter .field--name-field-media-image img {
  max-width: 100px !important;
  width: 100px !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Centrar o article.media */
#subfooter .media--type-image {
  display: block !important;
  text-align: center !important;
  margin: 0 auto 20px auto !important;
}

/* Centrar o container */
#subfooter .field--name-body {
  text-align: center !important;
}

/* Garantir que o field__item também está centrado */
#subfooter .field--name-field-media-image .field__item {
  text-align: center !important;
  display: block !important;
}

/* ========================================
   AUMENTAR O TAMANHO DA LETRA DO MENU
   ======================================== */

/* Desktop - letra maior */
.header-container ul.menu > li > a, 
.header-container ul.menu > li > span {
  font-size: 15px !important;
}

/* ========================================
   FIX MOBILE - MENU COMPLETO
   ======================================== */

@media (max-width: 991px) {
  
  /* Container do menu mobile - altura automática */
  .header-container .navbar-collapse,
  .header-container .mobile-menu {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  /* Navbar collapse - permitir scroll se necessário */
  .navbar-collapse.collapse.in,
  .navbar-collapse.show {
    max-height: 80vh !important;
    overflow-y: auto !important;
  }
  
  /* Menu items - espaçamento adequado */
  .header-container ul.menu > li {
    padding: 8px 0 !important;
  }
  
  .header-container ul.menu > li > a,
  .header-container ul.menu > li > span {
    padding: 10px 15px !important;
    line-height: 1.4 !important;
  }
  
  /* Submenu mobile - também visível */
  .header-container ul.menu ul.menu {
    max-height: none !important;
    height: auto !important;
  }
}

/* Mobile muito pequeno */
@media (max-width: 767px) {
  
  /* Letra ligeiramente menor no mobile */
  .header-container ul.menu > li > a,
  .header-container ul.menu > li > span {
    font-size: 15px !important;
  }
}

* Se o menu usar Superfish */
@media (max-width: 991px) {
  
  #superfish-main,
  #superfish-main-accordion {
    max-height: none !important;
    overflow: visible !important;
  }
  
  #superfish-main li,
  #superfish-main-accordion li {
    height: auto !important;
  }
  
  #superfish-main .sf-accordion-toggle {
    display: block !important;
  }
}