/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */

body {
    font-family: Arial, sans-serif;
    background-image: url('/backgroundazul.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    color: #333;
}

/* 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;
}

/* Main section */
.info {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 50px 50px 50px 10px;
    gap: 5px;
}
.text {
    max-width: 380px;
    word-wrap: break-word;
    height: auto; /* deixamos a altura crescer conforme o conteúdo */
    font-family: 'Calibri', sans-serif;
    text-align: justify;
    line-height: 1.5;
}

.photo-container {
    width: 230px;
    height: 300px;
    overflow: hidden; /* Garante que a imagem fique dentro do raio de borda */
    border-radius: 10px; /* Arredonda os cantos corretamente */
    
}

.photo-container img {
    width: 95%;
    height: 88%;
    object-fit: cover;   /*Mantém a proporção correta e cobre o espaço sem distorção */
    object-position: center top;
    border-radius: 10px; /* arredonda os cantos da imagem */
    display: block;      /* remove espaçamento inline que pode dar problema */
    margin: auto;        /* centraliza a imagem dentro do container */
    margin-top: 9px;  /* baixar ou subir foto de sofia **/
}

html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1;
}


/* Footer */
footer {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    background-color: white;
    padding: 15px 0;
    text-align: center;
 /*   margin-top: 81px;  /*Move o footer para baixo ou cima */
    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 */
  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;
}
/* 
  .menu-toggle.open div:nth-child(1) { transform: rotate(60deg) translate(8px, 10px); }
  .menu-toggle.open div:nth-child(2) { opacity: 0; }
  .menu-toggle.open div:nth-child(3) { transform: rotate(-60deg) translate(3px, -5px); }*/




  /* Reorder main content: photo first, text below */
  .info {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 20px;
    /* adiciona estas linhas abaixo 👇 */
    background-image: url('/backgroundazul.jpg');
    background-size: contain;           /* faz caber no ecrã */
    background-position: center 40px;    /* começa no topo - quando maior desloca para baixo */
    background-repeat: no-repeat;
    background-color: white;            /* fundo branco por baixo */
    margin-top: 0;
    padding-top: 0;
    overflow: visible;
  }
 

  .photo-container { order: 1; width: 65%; height: auto; margin-top: 10px; }
  .photo-container img { width: 100%; height: auto; }


  .text {
    order: 2;
    max-width: 100%;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    word-wrap: normal;      /* deixa o texto fluir naturalmente */
    line-height: 1.6;       /* mais legível */
    overflow: visible;      /* garante que o texto não seja cortado */
    word-break: normal;        /* mantém palavras inteiras se possível */
    overflow-wrap: break-word; /* garante que palavras longas possam quebrar */
  }
  
  /* 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; 
}  