/* ============================================================
   Guia de Mestrados (/guia-mestrados/)
   Usa a base do Guia de Erasmus (guia-erasmus.css: cores, letra, secções, avisos).
   Tudo aqui fica dentro de .gm-page: não mexe no resto do site.
   ============================================================ */

/* Topo: sem o cartão do perfil por baixo, por isso menos espaço em baixo */
.gm-page .gm-hero__inner {
  padding-bottom: 4.5rem;
}

.gm-page .ge-hero__meta {
  margin-top: 1.5rem;
}

/* Universidades no topo: assentes em baixo, à direita, por trás do texto (z-index -1, acima das camadas de fundo).
   O lado esquerdo desvanece, para a imagem se misturar com o azul e o texto se ler bem. */
.gm-page .gm-hero__campus {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: auto;
  opacity: 0.6;
  transform-origin: right bottom;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
  mask-image: linear-gradient(to right, transparent, #000 35%);
}

/* no telemóvel a imagem fica por baixo do texto */
@media (max-width: 767.98px) {
  .gm-page .gm-hero__inner { padding-bottom: calc(54.6vw + 1rem); }
  .gm-page .gm-hero__campus {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* a partir do tablet: texto à esquerda e imagem à direita, sem se sobreporem
   (100vw − 54vw da imagem − 4vw e 16.5px da margem do texto − 1rem de folga) */
@media (min-width: 768px) {
  .gm-page .ge-hero__lead { max-width: min(42rem, calc(42vw - 16.5px - 1rem)); }
  .gm-page .gm-hero__campus { width: min(54vw, 48rem); }
}

/* Entra com suavidade e depois aproxima-se muito devagar */
@media (prefers-reduced-motion: no-preference) {
  .gm-page .gm-hero__campus {
    animation:
      gm-campus-in 1.4s var(--ge-ease) backwards,
      gm-campus-zoom 16s ease-in-out 1.4s infinite alternate;
  }
}

@keyframes gm-campus-in {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
}

@keyframes gm-campus-zoom {
  to { transform: scale(1.05); }
}

.gm-body {
  padding-bottom: 4rem;
}

.gm-page .ge-section + .ge-section {
  border-top: 1px solid var(--ge-border);
}

/* ---------- Testemunhos (base: .ge-testimony do Guia de Erasmus) ---------- */
/* Título ao centro, por cima do slideshow */
.gm-voices .ge-section__head {
  margin-bottom: 1rem;
  text-align: center;
}

.gm-voices .ge-rule {
  margin-inline: auto;
}

.gm-page .gm-voices .ge-section__head.ge-reveal .ge-rule {
  transform-origin: center;
}

/* Slideshow: um cartão ao centro e os outros atrás, de cada lado; o testemunho completo aparece ao abrir */
.gm-slides {
  container-type: inline-size;
}

/* os cartões que entram e saem de cena não criam scroll horizontal */
.gm-page {
  overflow-x: clip;
}

.gm-list {
  display: grid;
  gap: 1rem;
  justify-content: center;
}

.gm-list .gm-testimony,
.gm-list .gm-testimony[open] {
  --gm-card: min(var(--gm-card-max, 32rem), 100cqw - 2.5rem);
  --gm-scale: 0.9;
  --gm-shift: calc((100cqw - var(--gm-card) * var(--gm-scale)) / 2); /* os de trás acabam na margem da página */
  --gm-stagger: 0.3; /* atraso do cartão que entra (parte da animação): assim trocam de camada sem se tocarem */
  width: var(--gm-card);
  border: 1px solid var(--ge-border);
  border-radius: 1rem;
  box-shadow: 0 24px 48px -28px rgba(11, 51, 103, 0.4);
}

.gm-slides.is-ready .gm-list {
  gap: 0;
  grid-template-columns: 100cqw;
  justify-items: center;
  touch-action: pan-y pinch-zoom;
}

/* Sem largura para os cartões se separarem: ficam lado a lado e deslizam todos juntos */
@container (max-width: 62rem) {
  .gm-slides.is-ready .gm-list .gm-testimony {
    --gm-shift: calc(var(--gm-card) * (1 + var(--gm-scale)) / 2 + 1rem);
    --gm-stagger: 0;
  }
}

/* A troca de cartões é animada no JS (move), também com "menos movimento".
   !important: nesse caso, o guia-erasmus.css desliga as transições. */
.gm-slides.is-ready .gm-testimony {
  grid-area: 1 / 1;
  transition:
    opacity 0.5s ease,
    width 0.4s ease,
    visibility 0s !important;
}

.gm-slides.is-ready .gm-testimony[data-gm-pos="center"] {
  z-index: 3;
}

.gm-slides.is-ready .gm-testimony:is([data-gm-pos="prev"], [data-gm-pos="next"]) {
  z-index: 2;
  opacity: 0.55;
  transform: translateX(var(--gm-shift)) scale(var(--gm-scale));
}

.gm-slides.is-ready .gm-testimony[data-gm-pos="prev"] {
  transform: translateX(calc(var(--gm-shift) * -1)) scale(var(--gm-scale));
}

.gm-slides.is-ready .gm-testimony:is([data-gm-pos="prev"], [data-gm-pos="next"]):hover {
  opacity: 0.8;
}

/* os que não cabem atrás, e todos os de trás quando há um testemunho aberto */
.gm-slides.is-ready .gm-testimony[data-gm-pos="hidden"],
.gm-slides.is-ready.is-open .gm-testimony:not([data-gm-pos="center"]) {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s 0.2s !important;
}

.gm-slides.is-ready .gm-testimony[data-gm-pos="hidden"] {
  transform: scale(0.8);
}

.gm-slides.is-instant .gm-list .gm-testimony {
  transition: none !important;
}

/* O testemunho aberto usa a largura toda */
.gm-slides .gm-testimony[open] {
  width: 100cqw;
}

.gm-testimony[open] .gm-testimony__summary {
  max-width: 46rem;
}

.gm-testimony .ge-testimony__head {
  justify-content: center;
  padding: 2.25rem 2.5rem;
  text-align: center;
}

.gm-testimony .ge-testimony__head:focus-visible {
  outline: 2px solid var(--ge-net-light);
  outline-offset: -4px;
  border-radius: 1rem;
}

.gm-testimony .ge-testimony__headtext {
  align-items: center;
  gap: 0.5rem;
}

.gm-testimony__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: var(--ge-net);
  font-size: 1.375rem;
  color: #fff;
}

.gm-testimony .ge-testimony__place {
  font-size: 12px;
}

.gm-testimony .ge-testimony__title {
  font-size: 1.375rem;
}

.gm-testimony__summary {
  margin-top: 0.75rem;
  font-size: var(--ge-text-size);
  line-height: var(--ge-text-lh);
  color: rgba(25, 34, 46, 0.8);
}

.gm-testimony__more,
.gm-page .gm-testimony__end {
  width: fit-content;
  margin-top: 1rem;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--ge-font-body);
  font-size: var(--ge-text-size);
  color: var(--ge-net);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.gm-page .gm-testimony__end {
  display: block;
  margin: 1.5rem auto 0;
}

.gm-page .gm-slides:not(.is-ready) .gm-testimony__end,
.gm-page .gm-quote:not(.is-ready) .gm-testimony__end,
.gm-testimony__close,
:is(.gm-testimony, .gm-quote)[open] .gm-testimony__open {
  display: none;
}

:is(.gm-testimony, .gm-quote)[open] .gm-testimony__close {
  display: inline;
}

.gm-testimony .ge-testimony__body {
  padding: 0 2.5rem 2.5rem;
}

/* Testemunho completo (slideshow e passos): perguntas em destaque, com uma linha entre elas */
.gm-page :is(.ge-testimony__qa, .gm-testimony__notice) {
  max-width: 76rem;
  margin-left: auto;
  margin-right: auto;
}

.gm-page .ge-testimony__qa {
  gap: 0;
  margin-top: 0;
}

.gm-page .ge-testimony__qa > div {
  padding: 1.5rem 0;
  border-top: 1px solid var(--ge-border);
}

.gm-page .ge-testimony__q {
  font-family: var(--ge-font-heading);
  font-size: 1.125rem;
  line-height: 1.4;
}

.gm-page .ge-testimony__a {
  margin-top: 0.625rem;
}

/* a partir do tablet: pergunta à esquerda e resposta à direita */
@media (min-width: 768px) {
  .gm-page .ge-testimony__qa > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: 2.5rem;
    padding: 1.75rem 0;
  }

  .gm-page .ge-testimony__q { grid-row: 1 / span 20; } /* ao lado de todos os parágrafos da resposta */
  .gm-page .ge-testimony__a { grid-column: 2; margin-top: 0; }
  .gm-page .ge-testimony__a + .ge-testimony__a { margin-top: 0.75rem; }
}

@media (max-width: 575.98px) {
  .gm-testimony .ge-testimony__head { padding: 2rem 1.25rem; }
  .gm-testimony .ge-testimony__body { padding: 0 1.25rem 1.5rem; }
}

/* Abre e fecha com uma transição suave (onde o browser o permite) */
@media (prefers-reduced-motion: no-preference) {
  .gm-testimony,
  .gm-quote,
  .gm-filter__more,
  .gm-apply { interpolate-size: allow-keywords; }

  .gm-testimony::details-content,
  .gm-quote::details-content,
  .gm-filter__more::details-content,
  .gm-apply::details-content {
    height: 0;
    overflow: clip;
    opacity: 0;
    transition: height 0.4s ease, opacity 0.4s ease, content-visibility 0.4s allow-discrete;
  }

  .gm-testimony[open]::details-content,
  .gm-quote[open]::details-content,
  .gm-filter__more[open]::details-content,
  .gm-apply[open]::details-content {
    height: auto;
    opacity: 1;
  }
}

/* Pontos: o do slide atual vai enchendo até passar ao seguinte */
.gm-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
}

.gm-controls__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.gm-page .gm-controls button {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 1rem;
  color: var(--ge-net);
  cursor: pointer;
}

.gm-controls__dots button::before {
  content: "";
  grid-area: 1 / 1;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(11, 51, 103, 0.25);
  transition: width 0.3s ease, background 0.3s ease;
}

.gm-controls__dots button[aria-current]::before {
  width: 1.5rem;
  background: var(--ge-net);
}

.gm-slides.is-auto .gm-controls__dots button[aria-current]::before {
  background: rgba(11, 51, 103, 0.25);
}

/* o JS passa ao slide seguinte quando esta animação acaba: a duração é o tempo de cada slide */
.gm-slides.is-auto .gm-controls__dots button[aria-current]::after {
  content: "";
  grid-area: 1 / 1;
  width: 1.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--ge-net);
  animation: gm-slide-time 7s linear both;
}

.gm-slides.is-paused .gm-controls__dots button[aria-current]::after {
  animation-play-state: paused;
}

@keyframes gm-slide-time {
  from { clip-path: inset(0 100% 0 0 round 999px); }
  to { clip-path: inset(0 0 0 0 round 999px); }
}

.gm-page .gm-controls button:focus-visible,
.gm-page .gm-testimony__end:focus-visible {
  outline: 2px solid var(--ge-net-light);
  outline-offset: 2px;
}

.gm-testimony__notice {
  margin-bottom: 1.25rem;
}

.gm-testimony__notice .ge-link {
  display: inline-block;
  margin-top: 0.375rem;
}

/* Pesquisa e filtros */
.gm-filter {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.gm-filter[hidden],
.gm-slides[hidden],
.gm-controls[hidden],
.gm-slides .gm-list .gm-testimony[hidden],
.gm-testimony__match[hidden],
.gm-filter__clear[hidden] {
  display: none;
}

/* Começa fechado, só com um link discreto, para os testemunhos terem o destaque */
.gm-filter__more > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-inline: auto;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: var(--ge-muted);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.gm-filter__more > summary::-webkit-details-marker {
  display: none;
}

.gm-filter__more > summary:hover,
.gm-filter__more[open] > summary {
  color: var(--ge-net);
}

.gm-filter__more > summary:focus-visible {
  outline: 2px solid var(--ge-net-light);
  outline-offset: 2px;
}

.gm-filter__chevron {
  font-size: 11px;
  transition: transform 0.3s ease;
}

.gm-filter__more[open] .gm-filter__chevron {
  transform: rotate(180deg);
}

.gm-filter__row {
  display: grid;
  gap: 0.5rem;
  max-width: 44rem;
  margin-inline: auto;
  padding: 0.75rem 4px 4px; /* espaço para o contorno do campo selecionado */
}

@media (min-width: 768px) {
  .gm-filter__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gm-filter__field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.gm-filter__field .bi {
  position: absolute;
  right: 1rem;
  font-size: 12px;
  color: var(--ge-muted);
  pointer-events: none;
}

.gm-filter__field--search .bi {
  right: auto;
  left: 1rem;
  font-size: 14px;
}

.gm-page .gm-filter__field input,
.gm-page .gm-filter__field select {
  width: 100%;
  min-width: 0;
  height: 2.5rem;
  padding: 0 2.5rem 0 1rem;
  border: 1px solid var(--ge-border);
  border-radius: 999px;
  background: #fff;
  font-family: var(--ge-font-body);
  font-size: 16px; /* abaixo de 16px, o iPhone faz zoom ao tocar no campo */
  color: var(--ge-fg);
  text-overflow: ellipsis;
  appearance: none;
}

.gm-page .gm-filter__field input {
  padding: 0 1rem 0 2.5rem;
}

.gm-page .gm-filter__field select {
  cursor: pointer;
}

@media (min-width: 768px) {
  .gm-page .gm-filter__field input,
  .gm-page .gm-filter__field select { font-size: 14px; }
}

.gm-page .gm-filter__field input:focus,
.gm-page .gm-filter__field select:focus {
  outline: none;
  border-color: var(--ge-net);
  box-shadow: 0 0 0 3px rgba(11, 51, 103, 0.15);
}

.gm-filter__status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 1rem;
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: var(--ge-muted);
}

/* sem pesquisa nem filtros, esta linha não ocupa espaço */
.gm-filter__status:has([data-gm-clear][hidden]) {
  display: none;
}

.gm-page .gm-filter__clear {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ge-net);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Excerto onde a pesquisa encontrou a palavra */
.gm-testimony__match {
  margin-top: 0.5rem;
  text-align: left;
  padding-left: 0.75rem;
  border-left: 3px solid var(--ge-net-light);
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: var(--ge-muted);
}

.gm-testimony__match mark {
  padding: 0 0.1em;
  border-radius: 3px;
  background: var(--ge-amber-200);
  color: var(--ge-fg);
}

.gm-filter__clear:focus-visible,
.gm-acc__head:focus-visible {
  outline: 2px solid var(--ge-net-light);
  outline-offset: 2px;
}

/* ---------- Candidatura: mapa dos passos (base: .ge-journey do Guia de Erasmus) ---------- */
.gm-apply > summary {
  cursor: pointer;
  list-style: none;
}

.gm-apply > summary::-webkit-details-marker {
  display: none;
}

.gm-apply__head > span {
  display: block;
}

.gm-apply > summary:hover .gm-apply__btn {
  background: var(--ge-net-dark);
}

.gm-apply > summary:focus-visible {
  border-radius: 0.5rem;
  outline: 2px solid var(--ge-net-light);
  outline-offset: 6px;
}

.gm-apply__btn .bi {
  transition: transform 0.3s ease;
}

.gm-apply[open] .gm-apply__btn .bi {
  transform: rotate(180deg);
}

.gm-apply__close,
.gm-apply[open] .gm-apply__open {
  display: none;
}

.gm-apply[open] .gm-apply__close {
  display: inline;
}

.gm-page .gm-map {
  gap: 2.25rem;
  margin-top: 2.5rem;
}

.gm-other {
  margin-top: 2.5rem;
}

/* ---------- Página de cada passo ---------- */
.gm-stepbody {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Citações: se forem em número ímpar, a última ocupa a largura toda */
.gm-quote:last-child:nth-child(odd),
.ge-quotes:has(.gm-quote[open]) .gm-quote { /* com um testemunho aberto, ficam todas a toda a largura, sem buracos */
  grid-column: 1 / -1;
}

/* O cartão todo abre e fecha o testemunho */
.ge-page .gm-quote {
  display: block;
  padding: 0;
  scroll-margin-top: calc(var(--site-header-height, 80px) + 24px);
}

.gm-quote[open] {
  border-color: rgba(11, 51, 103, 0.35);
}

.gm-quote__head {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1rem;
  cursor: pointer;
  list-style: none;
}

.gm-quote__head::-webkit-details-marker {
  display: none;
}

.gm-quote[open] .gm-quote__head {
  height: auto;
}

.gm-quote__head:focus-visible {
  outline: 2px solid var(--ge-net-light);
  outline-offset: -4px;
}

.gm-quote__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 1rem;
}

.gm-quote .gm-testimony__more {
  margin-top: 0;
  font-size: var(--ge-small-size);
}

.gm-quote .ge-testimony__body {
  padding: 0.5rem 1.5rem 1.75rem;
}


.gm-help {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--ge-text-size);
  line-height: var(--ge-text-lh);
  color: var(--ge-muted);
}

.gm-help .bi {
  color: var(--ge-net-light);
}

/* Blocos que abrem ao clicar (passos 1 e 4) */
.gm-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.gm-acc {
  border: 1px solid var(--ge-border);
  border-radius: 1rem;
  background: #fff;
}

.gm-acc[open] {
  border-color: rgba(11, 51, 103, 0.35);
  box-shadow: 0 24px 50px -40px rgba(11, 51, 103, 0.5);
}

.gm-acc__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  border-radius: 1rem;
  cursor: pointer;
  list-style: none;
}

.gm-acc__head::-webkit-details-marker {
  display: none;
}

.gm-acc__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--ge-net-soft);
  font-size: 1.125rem;
  color: var(--ge-net);
}

.gm-acc__icon--num {
  font-family: var(--ge-font-heading);
}

.gm-acc[open] .gm-acc__icon {
  background: var(--ge-net);
  color: #fff;
}

.gm-acc__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.gm-acc__title {
  font-family: var(--ge-font-heading);
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--ge-net);
}

.gm-acc__hint,
.gm-acc__note {
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: var(--ge-muted);
}

.gm-acc__chevron {
  flex-shrink: 0;
  font-size: 14px;
  color: rgba(11, 51, 103, 0.45);
}

.gm-acc[open] .gm-acc__chevron {
  transform: rotate(180deg);
}

.gm-acc__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.25rem 1.375rem 1.5rem;
}

.gm-acc__body .gm-fields {
  margin-top: 0;
}

@media (min-width: 640px) {
  /* o texto alinha com o título, a seguir ao ícone */
  .gm-acc__body { padding-left: calc(1.375rem + 2.5rem + 1rem); }
}

.gm-outcomes {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gm-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gm-outcome {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-radius: 0.875rem;
  background: #fff;
}

.gm-outcome--yes { box-shadow: inset 0 0 0 1px var(--ge-green-200); }
.gm-outcome--no { box-shadow: inset 0 0 0 1px var(--ge-amber-200); }

.gm-outcome__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1rem;
}

.gm-outcome--yes .gm-outcome__icon { background: var(--ge-green-50); color: var(--ge-green-700); }
.gm-outcome--no .gm-outcome__icon { background: var(--ge-amber-50); color: var(--ge-amber-700); }

.gm-outcome__title {
  font-family: var(--ge-font-heading);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ge-net);
}

.gm-outcome__text {
  margin-top: 0.25rem;
  font-size: var(--ge-text-size);
  line-height: var(--ge-text-lh);
  color: rgba(25, 34, 46, 0.8);
}

/* ---------- Documentos ---------- */
.gm-docs {
  padding: 1.5rem;
  border: 1px solid var(--ge-border);
  border-radius: 1rem;
  background: #fff;
}

.gm-docs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gm-docs__label {
  font-family: var(--ge-font-heading);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ge-net);
}

.gm-docs__list {
  display: grid;
  align-items: start;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .gm-docs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-docs__wide { grid-column: 1 / -1; }
}

.gm-docs__list > li {
  display: flex;
}

.gm-doc {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  width: 100%;
  padding: 1rem 1.125rem;
  border: 1px solid var(--ge-border);
  border-radius: 0.875rem;
  background: var(--ge-net-sand);
  font-family: var(--ge-font-body);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.gm-doc:hover {
  border-color: rgba(11, 51, 103, 0.35);
}

.gm-doc.is-checked {
  border-color: var(--ge-green-200);
  background: var(--ge-green-50);
}

.gm-doc__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(11, 51, 103, 0.12);
  font-size: 1rem;
  color: var(--ge-net);
}

.gm-doc__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.gm-doc__title {
  font-size: var(--ge-text-size);
  line-height: 1.4;
  color: var(--ge-net);
}

.gm-doc.is-checked .gm-doc__title {
  color: var(--ge-green-700);
}

.gm-doc__detail {
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: var(--ge-muted);
}

.gm-doc__items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.gm-doc__item {
  position: relative;
  padding-left: 0.875rem;
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: rgba(25, 34, 46, 0.75);
}

.gm-doc__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ge-net-light);
}

.gm-doc__how {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ge-border);
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: var(--ge-net);
}

.gm-doc__box {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid rgba(11, 51, 103, 0.3);
  border-radius: 0.4rem;
  background: #fff;
  font-size: 14px;
  color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gm-doc.is-checked .gm-doc__box {
  border-color: var(--ge-green-700);
  background: var(--ge-green-700);
  color: #fff;
}

/* ---------- Passo a passo ---------- */
.gm-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gm-steps::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: calc(1.25rem + 1.125rem - 1px);
  width: 2px;
  background: var(--ge-border);
}

.gm-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.125rem;
  padding: 1.25rem;
  border: 1px solid var(--ge-border);
  border-radius: 1rem;
  background: #fff;
}

.gm-step--highlight {
  border-color: var(--ge-amber-200);
  background: var(--ge-amber-50);
}

.gm-step__num {
  position: relative;
  z-index: 1;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--ge-net);
  box-shadow: 0 0 0 4px #fff;
  font-family: var(--ge-font-heading);
  font-size: 1rem;
  color: #fff;
}

.gm-step--highlight .gm-step__num {
  background: var(--ge-amber-700);
  box-shadow: 0 0 0 4px var(--ge-amber-50);
}

.gm-step__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.25rem;
}

.gm-step__title {
  margin: 0;
  font-family: var(--ge-font-heading);
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ge-net);
}

.gm-step__text {
  margin-top: 0.5rem;
  font-size: var(--ge-text-size);
  line-height: var(--ge-text-lh);
  color: rgba(25, 34, 46, 0.8);
}

.gm-fields {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 0;
}

.gm-field {
  display: grid;
  gap: 0.125rem;
  padding: 0.625rem 0;
  border-top: 1px solid var(--ge-border);
}

@media (min-width: 640px) {
  .gm-field { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; }
}

.gm-field dt {
  font-size: var(--ge-small-size);
  font-weight: inherit;
  line-height: var(--ge-small-lh);
  color: var(--ge-net);
}

.gm-field dd {
  margin: 0;
  font-size: var(--ge-small-size);
  line-height: var(--ge-small-lh);
  color: rgba(25, 34, 46, 0.8);
}

/* ---------- Fui admitido ---------- */
.gm-after {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .gm-after { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gm-after__item {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--ge-border);
  border-radius: 1rem;
  background: #fff;
}

.gm-after__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--ge-net);
  font-size: 1.25rem;
  color: #fff;
}

.gm-after__num {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--ge-font-heading);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ge-net-soft);
}

.gm-after__title {
  margin-top: 1rem;
  font-family: var(--ge-font-heading);
  font-size: 1.0625rem;
  text-transform: uppercase;
  color: var(--ge-net);
}

.gm-after__text {
  margin-top: 0.375rem;
  font-size: var(--ge-text-size);
  line-height: var(--ge-text-lh);
  color: rgba(25, 34, 46, 0.8);
}

/* ---------- Contactos ---------- */
.gm-contacts {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .gm-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gm-contact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--ge-border);
  border-radius: 1rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, translate 0.25s ease;
}

.gm-contact:hover {
  border-color: rgba(11, 51, 103, 0.35);
  box-shadow: 0 18px 40px -30px rgba(11, 51, 103, 0.55);
  translate: 0 -2px;
  color: inherit;
}

.gm-contact__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--ge-net-soft);
  font-size: 1.125rem;
  color: var(--ge-net);
}

.gm-contact__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gm-contact__topic {
  font-family: var(--ge-font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ge-muted);
}

.gm-contact__email {
  margin-top: 0.125rem;
  overflow-wrap: anywhere;
  font-size: var(--ge-text-size);
  color: var(--ge-net);
}

@media (max-width: 639.98px) {
  .gm-docs { padding: 1rem; }
  .gm-steps::before { left: calc(1rem + 1.125rem - 1px); }
  .gm-step { padding: 1rem; gap: 0.875rem; }
}

/* ---------- Ecrãs (o resto está no fim do guia-erasmus.css) ---------- */
/* Telemóveis muito estreitos: mais espaço para o texto */
@media (max-width: 374.98px) {
  .gm-docs { padding: 0.75rem; }
  .gm-doc { gap: 0.625rem; padding: 0.875rem 0.75rem; }
  .gm-doc__icon { width: 1.875rem; height: 1.875rem; font-size: 0.875rem; }
  .gm-acc__head { gap: 0.75rem; padding: 1rem; }
  .gm-acc__body { padding: 0.25rem 1rem 1.25rem; }
}

/* Telemóvel e tablet: botões com altura para o dedo */
@media screen and (max-width: 1023.98px), screen and (pointer: coarse) {
  .gm-page :is(.gm-testimony__end, .gm-filter__clear) { min-height: 2.75rem; }
  .gm-page .gm-filter__more > summary { min-height: 2.75rem; }
  .gm-page .gm-controls button { width: 2.25rem; height: 2.75rem; }
}

/* Monitores grandes */
@media screen and (min-width: 1920px) {
  .gm-page { --gm-card-max: 38rem; }
  .gm-page .ge-hero__lead { max-width: min(52rem, calc(42vw - 16.5px - 1rem)); }
  .gm-page :is(.gm-docs__label, .gm-contact__topic, .gm-outcome__title) { font-size: 15px; }
  .gm-page :is(.gm-acc__title, .gm-after__title) { font-size: 1.25rem; }
}

@media screen and (min-width: 2400px) {
  .gm-page { --gm-card-max: 46rem; }
  .gm-page :is(.gm-acc__title, .gm-after__title) { font-size: 1.5rem; }
  .gm-page .gm-testimony .ge-testimony__title { font-size: 1.75rem; }
  .gm-page .ge-testimony__q { font-size: 1.375rem; }
}

/* Antes de o JS correr, estes blocos já começam escondidos (o <head> põe .ge-anim no <html>):
   assim não aparecem e desaparecem antes de entrarem. Mesma lista que o REVEAL do guia-mestrado.js. */
html.ge-anim:not(.ge-motion-ready) .gm-page :is(
  .gm-apply__head, .gm-filter, .gm-slides, .gm-other, .gm-acc, .gm-doc, .gm-step,
  .gm-after__item, .gm-help, .gm-contact
) {
  opacity: 0;
}
