/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: Arial, sans-serif;
    color: #333;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/backgroundazul.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 65px;  /* desloca img fundo para baixo*/
    opacity: 0.3; /* <--- controla o quanto a imagem fica esbatida */
    z-index: -1;
}



/* Header and navigation menu */
header {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif, sans-serif;
    background-color: white;
    padding: 15px 0;
    text-align: center;
    
}



nav ul {
    list-style: none;
    display: flex;
    justify-content: space-between; /* Separates elements */
    padding: 0 20px;
}

/* Group first three links on the left */
.nav-left {
    display: flex;
    padding-left: 40px;
    gap: 20px; /* Adjust spacing between links */ 
}

.nav-left a {
   /* color: #586875;  Cor do link */
    text-decoration: none; /* Remove o sublinhado */
}

/* Move 'Marcaçoes' to the right */
.nav-right {
    margin-left: auto; /* Pushes it to the right */
    padding-right: 50px;
    position: relative;
    top: 10px;  /* Move um pouco para baixo , position relative é necessario */
}

/*Opçoes botao Marcações *******************************************/
nav ul li.marcacoes a {
   
    color: black;
    padding: 10px 18px;
    border-radius: 8px;    
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 2.2);
    border: 2px solid black;
}

nav ul li.marcacoes a:hover {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}


/*********************************************************/
nav ul li {
    display: inline;
}

/* Fonte e cor dos links *******************************************/
nav ul li a {
    color:   black;
    text-decoration: none;
    font-size: 22px;
    padding: 10px;
}

nav ul li a:hover {
    border-bottom: 2px solid#272727;
}
/************ Seção de serviços */
main {
    flex: 1;
    display: flex;
    justify-content: center; /* Centraliza o conteúdo */
    gap: 1px; /* Espaço entre as seções */
    padding: 20px 0;
}

/* Seção de serviços */
.service {
    width: 45%;
    margin: 0 auto;         /* <-- Centraliza o bloco .service */
    text-align: center;   
}

.service h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.details {
  width: 410px;        /* igual ao iframe */
  text-align: left;    /* alinha o texto à esquerda */
  margin: 0 auto;      /* centraliza o bloco .details dentro do .service */
  margin-top: 10px;
}

.button-container {
  text-align: center;
  margin-top: 20px;
}

.link {
    display: inline-block;
    padding: 10px;
    background-color: #11355c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.link.center {
  display: block;
  text-align: center;
  margin: 20px auto 0 auto; /* topo 20px, auto para centralizar */
  width: fit-content;
}


.link:hover {
    background-color: #0056b3;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}


/* Footer */
footer {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    background-color: white;
    padding: 15px 0;
    text-align: center;    
    font-size: 14px;
    color: #333;
}

footer a {
    color: #333;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== MOBILE SMARTPHONE LAYOUT =========================================== */
@media (max-width: 768px) {

 /* Ensure the burger button positions correctly */
  header nav {
    position: relative; /* allows absolute burger menu to be top-right */
    z-index: 2000;
  }

  /* Make list items vertical on mobile */

  /* Make all links same style */
  nav ul li {
    display: block;
    width: 100%;
    margin: 5px 0;      /* smaller spacing */
    text-align: left;
  }

  .nav-left {
    padding-left: 0;
    gap: 0; /* opcional: remove o espaçamento extra se quiser que fiquem bem justificados */
    flex-direction: column; /* já faz no seu CSS, mas reforça */
  }

 
nav ul li.marcacoes a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 0;
  padding-left: 11px;  
  border: none;
  box-shadow: none;
  background: none;
  color: #007FFF;        /* tom mais suave que o preto puro */
  font-size: 18px;    /* igual aos outros links */
  font-weight: 500;   /* ligeiramente mais elegante */
}

  /* === MOBILE BURGER MENU (opened state) === */
nav ul {
  /* substituímos display:none por isto 👇 */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #ffffff;
  position: absolute;
  top: 7px; /* quanto maior mais se afasta do topo */
  left: 0;
  right: 0;
  padding: 15px 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;

  /* animação suave */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.01s ease-out, opacity 0.1s ease-out;
}

/* quando o menu é aberto */
nav ul.active {
  max-height: 400px; /* ajusta conforme o número de itens */
  opacity: 1;
  transition: max-height 0.5s ease-in, opacity 0.3s ease-in;
}

/* === LINKS DENTRO DO MENU === */
nav ul li {
  width: 100%;
  padding: 10px 0;           /* menos espaçamento entre links */
  border-bottom: 1px solid #eee; /* linha separadora leve */
}

nav ul li:last-child {
  border-bottom: none;
}

nav ul li a {
  color: #222;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: block;
  width: 100%;
  transition: all 0.2s ease;
}

/* Hover estilizado */
nav ul li a:hover {
  color: #0077b6;          /* azul moderno */
  background-color: #f4f4f4;
  border-radius: 4px;
}


  /* === HAMBURGER MENU ICON (mobile) === */
.menu-toggle {
  position: absolute;
  top: 10px;     /* Quanto mais pequeno mais proximo do topo - sobe o menu  */
  right: 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 26px;
  cursor: pointer;
  background: none;     /* sem fundo branco */
  border: none;         /* sem borda */
  box-shadow: none;     /* sem sombra */
  z-index: 9999;        /* sobrepõe tudo */
}

.menu-toggle div {
  width: 100%;
  height: 4px;          /* espessura da linha */
  background-color: rgb(86, 83, 83); /* linhas pretas sólidas */
  margin: 0;            /* sem espaços extras */
  transition: all 0.3s ease;
  transform-origin: center; 
}

.menu-toggle.open div {
  display: none;
}

/* Mostra um X fixo no centro */
.menu-toggle.open::before {
  content: "X";
  font-size: 32px;
  color: black;
  position: absolute;
  top: -4px;
  right: 4px;
}

/* Evita scroll lateral e permite scroll vertical natural */
  html, body {
      overflow-x: hidden;   /* bloqueia só scroll lateral */
      overflow-y: auto;     /* permite scroll vertical normal */
  }

  
main {
  flex-direction: column;   /* empilha as secções em coluna */
  align-items: center;      /* centra horizontalmente */
  gap: 30px;                /* espaço entre as duas secções */
  padding: 80px 0 60px 0;
  overflow: visible;        /* garante que nada fica cortado */
}

.service {
  width: 90%;               /* ocupa quase toda a largura no telemóvel */
  text-align: center;
}

 /* Google Maps imagens adaptadas */
 
  /* Imagem da ADEST */
.img-adest {
  max-width: 85%;
  max-height: 180px;
  height: auto;
  display: block;
  margin: 0 auto 15px auto;
}

/* Imagem do Lusíadas */
.img-lusiadas {
  max-width: 78%;
  max-height: 180px;
  height: auto;
  display: block;
  margin: 0 auto 15px auto;
}

  .details {
    width: 100% !important;       /* remove a largura fixa anterior */
    text-align: center;            /* centraliza todo o conteúdo dentro */
    margin: 0 auto 20px auto;      /* centraliza horizontal e dá margem inferior */
}

  .button-container {
    text-align: center;   /* centraliza horizontalmente */
    width: 100%;          /* ocupa toda largura disponível */
    margin-top: 20px;
}

.button-container .link.center {
    display: inline-block; /* garante que o botão seja tratado como bloco para centralizar */
    margin: 0 auto;        /* centraliza o botão */
}


/* Footer at bottom, single line */
  footer {
    font-size: 14px;
    text-align: center;
    position: relative;
    bottom: 0;
    left: 0;
    background-color: white;
    width: 100%;
    padding: 10px;
  }

  footer a { display: inline; margin: 0 5px; }

}

/* Overlay escondido por padrão */
#portrait-warning {
    position: fixed;
    inset: 0; 
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    padding: 20px;
}

#portrait-warning .warning-message {
    font-size: 1.5em;
    color: #333;
    font-weight: bold;
}

/* Impede scroll quando o aviso está ativo */
body.landscape-warning {
    overflow: hidden !important;
    height: 100vh;
}

/* Aplica blur em todo o conteúdo quando overlay ativo */
body.landscape-warning main,
body.landscape-warning header,
body.landscape-warning footer {
    filter: blur(5px);
    pointer-events: none; 
}  