/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: Arial, sans-serif;
    color: #333;
    position: relative;
    z-index: 0;
    
}

html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

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;
    z-index: -1;
}

/* Header and navigation menu */
header {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    background-color: white;
    padding: 15px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-left {
    display: flex;
    padding-left: 40px;
    gap: 20px;
}

.nav-left a {
    text-decoration: none;
}

.nav-right {
    margin-left: auto;
    padding-right: 50px;
    position: relative;
    top: 10px;
}

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;
}

nav ul li a {
    color: black;
    text-decoration: none;
    font-size: 22px;
    padding: 10px;
}

nav ul li a:hover {
    border-bottom: 2px solid #272727;
}

/* Main section */

main {
    flex: 1;
    padding: 20px;
}

.formulario-contacto {
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  margin: 40px auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.formulario-contacto h2 {
  margin-bottom: 30px;
  color: #11355c;
  text-align: center;
  font-size: 24px;
}

.formulario-contacto label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 15px;
  color: #333;
}

.formulario-contacto input[type="text"],
.formulario-contacto input[type="tel"],
.formulario-contacto input[type="email"],
.formulario-contacto textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.formulario-contacto input[type="text"]:focus,
.formulario-contacto input[type="tel"]:focus,
.formulario-contacto input[type="email"]:focus,
.formulario-contacto textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.2);
  outline: none;
}

.formulario-contacto textarea {
  resize: vertical;
  height: 120px;
}

.erro-campos {
  color: red;
  font-size: 14px;
  margin-bottom: 15px;
  margin-top: -10px;
  font-weight: bold;  
}

.star {
  color: red;
  font-weight: bold;  
}

.formulario-contacto button {
  background-color: #11355c;
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
}

.formulario-contacto button:hover {
  background-color: #0d2c4b;
}

@media (max-width: 600px) {
  .formulario-contacto {
    padding: 20px;
    margin: 20px;
  }

  .formulario-contacto h2 {
    font-size: 20px;
  }

  .formulario-contacto button {
    font-size: 16px;
  }
}


.checkbox-politica {
  margin-top: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.checkbox-politica input[type="checkbox"] {
  margin-top: 3px;
}

.checkbox-politica a {
  color: #0077cc;
  text-decoration: none;
}

.checkbox-politica a:hover {
  text-decoration: underline;
}


/* 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 {
    margin-left: 5;  /* Remove o margin-left: auto do desktop 
    padding-right: 0; /* Remove padding extra 
  }  */  

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 para fechar*/
  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;
}

.formulario-contacto {
    margin-top: 50px;  /* baixar formulario contact um pouco menos no telemóvel */
  }

/* 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; 
}  