/* Página da disciplina, ajustada ao desenho Canva de 23/09/2026. Editável no Notepad++. */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+Double+Pica&family=Montserrat:wght@600;700&family=Raleway:wght@400;500&display=swap');
:root {
  --areia: #d9cebd;
  --tinta: #211d19;
  --texto-claro: #d9cebd;
  --serif: 'IM Fell Double Pica', Georgia, 'Times New Roman', serif;
  --sans: Raleway, Arial, sans-serif;
  --destaque: Montserrat, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #cfc5b4; color: var(--tinta); }
a { color: inherit; }
a:focus-visible { outline: 3px solid #826f51; outline-offset: 4px; }


.pagina {
    width: 100%;
    margin: 0;
    box-shadow: none;
}
/* Secção superior: proporções e elementos aproximados à composição do Canva. */
.hero {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1024.5 / 637.3;
  overflow: hidden;
  color: var(--texto-claro);
  background: #211f1c url('assets/top_background.jpg') center / 100% 100% no-repeat;
  border-bottom: 0.6cqw solid var(--areia);
}
.faculdade { position: absolute; top: 3.3%; left: 2.08%; width: 21.08%; }
.faculdade img { display: block; width: 100%; height: auto; }
.nome {
  position: absolute; top: 24.46%; left: 12.50%; margin: 0;
  font: 400 8.17cqw / 1.0 var(--serif);
  letter-spacing: 0;
}
.nome span { display: block; }
.nome span + span { margin-left: 4.10cqw; }
.identificacao {
  position: absolute; top: 57.15%; left: 9.25%;
  margin: 0; font: 400 1.79cqw / 1.4 var(--sans);
  white-space: nowrap;
}
.identificacao span { padding: 0 .48em; }
.linha-identificacao {
  position: absolute; top: 63.24%; left: 7.68%; width: 49.87%;
  height: .22cqw; background: var(--areia);
}
.detalhes {
  position: absolute; top: 68.21%; left: 7.85%; width: 37.0%;
  display: grid; grid-template-columns: 15cqw 15cqw; gap: 7cqw;
  text-align: center;
}
.detalhes p { margin: 0; }
.detalhes p:nth-child(2) { margin-top: .45cqw; }
.detalhes span, .detalhes strong { display: block; }
.detalhes span { font: 400 1.79cqw / 1.35 var(--sans); }
.detalhes strong { margin-top: .55cqw; font: 700 1.79cqw / 1.4 var(--destaque); }
.retrato {
  position: absolute; top: 23.14%; left: 62.06%; width: 25.85%;
  aspect-ratio: 3 / 4; border: .98cqw solid var(--areia);
  background: var(--areia);
}
.retrato img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Secção inferior: a textura e os ramos foram extraídos do PDF do Canva enviado. */
.conteudo {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1024.5 / 801.2;
  background: #c5bba5 url('assets/paper_background.jpg') top center / 100% auto no-repeat;
  overflow: hidden;
}
.titulo-disciplina {
  position: absolute; top: 9.00%; left: 7%; width: 90%; margin: 0;
  font: 400 3.905cqw / 1.25 var(--serif); text-align: center;
  white-space: nowrap;
}
/* Em ecrãs grandes cada elemento ocupa o lugar da referência visual. */
.bloco { display: contents; }
.bloco h3 {
  position: absolute; left: 0; width: 100%; margin: 0;
  font: 700 2.636cqw / 1.3 var(--sans); text-align: center;
}
.bloco .linha {
  position: absolute; left: 5.82%; width: 88.36%; margin: 0;
  border: 0; height: .23cqw; background: var(--areia);
}
.botao {
  position: absolute; left: 35.13%; width: 29.75%; height: 7.47%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 .8cqw; background: var(--areia);
  text-decoration: none; text-transform: uppercase;
  font: 400 2.33cqw / 1.1 var(--sans);
  transition: background-color .2s, transform .2s;
}
.botao:hover { background: #eee6d9; transform: translateY(-2px); }
.bloco-caderno h3 { top: 22.72%; }
.bloco-caderno .linha-superior { top: 29.08%; }
.bloco-caderno .botao { top: 31.98%; }
.bloco-caderno .linha-inferior { top: 42.0%; }
.bloco-trabalhos h3 { top: 52.30%; }
.bloco-trabalhos .linha-superior { top: 58.65%; }
.bloco-trabalhos .botao { top: 61.58%; }
.bloco-trabalhos .linha-inferior { top: 70.88%; left: 6.34%; }
.contacto {
  position: absolute; top: 86.9%; right: 6.95%;
  font: 400 2.05cqw / 1.35 var(--sans);
  white-space: nowrap;
}
.contacto strong { font: 700 1.96cqw / 1.35 var(--destaque); }
.contacto a { text-underline-offset: .15em; }
/* Páginas para acrescentar trabalhos e entradas de caderno. */
.subpagina .hero-interno {
  background: #211f1c url('assets/top_background.jpg') center / cover no-repeat;
  color: var(--texto-claro); padding: 36px clamp(22px, 6vw, 64px) 55px;
  border-bottom: 6px solid var(--areia);
}
.hero-interno .faculdade-interna img { width: min(245px, 65%); height: auto; }
.hero-interno h1 { font: 400 clamp(43px, 7vw, 76px) / 1.08 var(--serif); margin: 65px 0 13px; }
.hero-interno p { margin: 0; font: 16px / 1.5 var(--sans); }
.hero-interno .voltar { display: inline-block; margin-top: 26px; font: 15px var(--sans); text-underline-offset: 4px; }
.pagina-interior {
  min-height: 65vh; padding: clamp(30px, 6vw, 68px);
  background: #c5bba5 url('assets/paper_background.jpg') top center / cover no-repeat;
  font: 17px / 1.65 var(--sans);
}
.pagina-interior h2 { font: 36px / 1.2 var(--serif); margin: 0 0 15px; }
.pagina-interior .entrada { background: #eee7d9e8; border: 1px solid #aa9b84; padding: 24px; margin: 28px 0; }
.pagina-interior .entrada h3 { font: 29px / 1.2 var(--serif); margin: 0 0 8px; }
.pagina-interior .entrada p { margin: 8px 0 17px; }
.pagina-interior .entrada a { display: inline-block; padding: 10px 16px; background: var(--tinta); color: #eee7d9; text-decoration: none; }
.pagina-interior .aviso { max-width: 650px; background: #eee7d9e8; padding: 25px; border-left: 4px solid #6e604e; }
.subpagina footer { background: #211f1c; color: var(--areia); padding: 22px 35px; font: 14px / 1.5 var(--sans); }
/* Em telemóvel, os elementos passam a empilhar-se em vez de ficarem sobrepostos. */
@media (max-width: 700px) {
  .pagina { box-shadow: none; }
  .hero {
    aspect-ratio: auto; min-height: 0; padding: 26px 24px 36px;
    display: flex; flex-direction: column; gap: 0;
    background-size: cover; background-position: 64% center;
    border-bottom-width: 5px;
  }
  .faculdade, .nome, .identificacao, .linha-identificacao, .detalhes, .retrato {
    position: static; top: auto; left: auto; width: auto;
  }
  .faculdade { width: min(250px, 70%); margin-bottom: 45px; }
  .nome { font-size: clamp(61px, 15vw, 96px); line-height: 1.0; }
  .nome span + span { margin-left: clamp(18px, 5vw, 42px); }
  .identificacao { font-size: clamp(13px, 3.4vw, 17px); margin: 20px 0 12px; white-space: normal; }
  .linha-identificacao { height: 2px; width: min(100%, 430px); }
  .detalhes { width: min(100%, 380px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 17px 0 29px; }
  .detalhes span { font-size: 15px; }
  .detalhes p:nth-child(2) { margin-top: 0; }
  .detalhes strong { font-size: 14px; margin-top: 7px; }
  .retrato { width: min(70%, 290px); align-self: center; border-width: 7px; }
  .conteudo { aspect-ratio: auto; min-height: 560px; padding: 53px 24px 52px; background-size: cover; }
  .titulo-disciplina { position: static; width: 100%; font-size: clamp(24px, 6vw, 36px); line-height: 1.2; white-space: normal; margin: 0 0 49px; }
  .bloco { display: flex; flex-direction: column; align-items: center; }
  .bloco h3 { position: static; width: auto; font-size: 28px; margin: 0 0 15px; }
  .bloco .linha { position: static; width: 100%; height: 2px; }
  .botao { position: static; width: min(100%, 305px); height: 56px; margin: 19px 0; font-size: 17px; }
  .bloco + .bloco { margin-top: 53px; }
  .contacto { position: static; margin-top: 69px; text-align: center; white-space: normal; font-size: 14px; overflow-wrap: anywhere; background: #e8ddcaee; padding: 12px 8px; }
  .contacto strong { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .botao { transition: none; } }

/* Botões dos trabalhos: acrescenta novos blocos <a class="botao-trabalho"> em trabalhos.html. */
.pagina-interior .introducao-trabalhos { margin: 0 0 30px; }
.lista-trabalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.botao-trabalho {
  display: flex; align-items: center; justify-content: space-between; gap: 15px;
  padding: 22px 24px; min-height: 86px; text-decoration: none;
  color: var(--tinta); background: #eee7d9ed; border: 1px solid #a99a85;
  box-shadow: 0 3px 10px #211d1910;
  font: 700 20px / 1.3 var(--sans);
  transition: background-color .2s, transform .2s;
}
.botao-trabalho:hover { background: #fff8ed; transform: translateY(-2px); }
.botao-trabalho:focus-visible { outline: 3px solid #826f51; outline-offset: 4px; }
.formato-trabalho { flex-shrink: 0; font: 500 13px / 1.4 var(--sans); white-space: nowrap; }
@media (max-width: 420px) {
  .botao-trabalho { padding: 18px; font-size: 18px; }
  .formato-trabalho { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .botao-trabalho { transition: none; } }
