/* =====================================================================
   mobile.css — ajuste de escala para telemóvel
   ---------------------------------------------------------------------
   O ajuste de escala só vale até 640px de largura. A excepção é o HERO
   NOVO da página inicial, que vale em todas as larguras (computador incluído).

   Deve ser a ÚLTIMA folha de estilo de cada página (depois de style.css
   e do <style> de cada página), para vencer o CSS que algumas páginas
   têm lá dentro.

   Ideia: no telemóvel o ecrã tem ~390px, não 1440px. Por isso reduzimos
   a escala (texto, ícones, botões, campos, espaços) em vez de só
   empilhar colunas.
   ===================================================================== */

/* =====================================================================
   HERO NOVO (página inicial) — vale em TODAS as larguras
   ---------------------------------------------------------------------
   Foto clara a toda a largura, texto à esquerda (selo, título, texto,
   botão "Saiba mais"), borda inferior ondulada, indicador (pontos) e,
   logo abaixo, o destaque "Ensino de Qualidade".
   Os destaques antigos, o título antigo, INSCREVA-SE/Entrar e o
   WhatsApp saem do hero. Valores abaixo = computador; o telemóvel
   reduz a escala no @media (max-width: 640px) mais abaixo.
   ===================================================================== */
section.pub.section.hero {
  min-height: clamp(480px, calc(100svh - var(--hero-top, 100px)), 760px) !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden;
  color: #0f1d4a;
  background-color: #dff0fb;
  background-image: url("images/hero-mobile.jpg"), url("images/fundo.webp") !important;
  background-size: cover, cover !important;
  background-position: 70% center, 70% center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll, scroll !important;
}
/* véu claro à esquerda para o texto escuro ler bem */
section.pub.section.hero::before {
  width: 100% !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,.90) 0%, rgba(255,255,255,.72) 32%, rgba(255,255,255,0) 66%),
    linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,0) 45%) !important;
}
/* borda inferior ondulada (usa a cor de fundo da página) */
section.pub.section.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 80px; z-index: 1; pointer-events: none;
  background: var(--bg, #fff);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 44' preserveAspectRatio='none'><path d='M0 18C55 32 105 40 160 28 215 16 255 2 305 8 345 13 372 26 390 24V44H0Z'/></svg>") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 44' preserveAspectRatio='none'><path d='M0 18C55 32 105 40 160 28 215 16 255 2 305 8 345 13 372 26 390 24V44H0Z'/></svg>") center / 100% 100% no-repeat;
}
/* escondidos: título antigo, texto antigo, botões antigos, WhatsApp e os três destaques */
section.pub.section.hero .h-xl {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important;
}
section.pub.section.hero > .wrap > .measure,
section.pub.section.hero > .wrap > .hero-acoes,
section.pub.section.hero > .wrap > .hero-entrar-mobile,
section.pub.section.hero > .wrap > .hero-destaques,
section.pub.section.hero .hero-wa { display: none !important; }

section.pub.section.hero > .wrap {
  display: block !important; position: relative; z-index: 2;
  padding-top: clamp(28px, 6vh, 100px) !important; padding-bottom: clamp(84px, 11vh, 110px) !important; text-align: left;
}
.hero-m { display: block; max-width: 560px; }
.hero-m p { margin: 0; text-align: left; text-shadow: none; }
.hero-m-eyebrow {
  font-size: clamp(11px, min(.9vw, 1.9vh), 13px) !important; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: #3d4a6b; padding-bottom: 12px; position: relative; white-space: nowrap;
}
.hero-m-eyebrow span { margin: 0 .5em; }
.hero-m-eyebrow::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 38px; height: 2px; background: var(--accent-2);
}
.hero-m-titulo {
  margin-top: clamp(16px, 3vh, 30px) !important;
  font-size: clamp(30px, min(3.9vw, 6.4vh), 60px) !important; font-weight: 700; line-height: 1.1; letter-spacing: -.025em;
  color: #0f1d4a;
}
.hero-m-titulo em { font-style: normal; color: #cf2a73; }
.hero-m-sub {
  margin-top: clamp(14px, 2.6vh, 26px) !important;
  font-size: clamp(14px, min(1.3vw, 2.3vh), 19px) !important; line-height: 1.6 !important; color: #3d4a6b;
}
.hero-m-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: clamp(18px, 3.4vh, 28px); }
.hero-m-btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: clamp(42px, 5.6vh, 50px); padding: 0 28px; border-radius: 999px;
  background: #cf2a73; color: #fff; font-size: 16px; font-weight: 500; text-decoration: none;
  box-shadow: 0 8px 20px rgba(207,42,115,.28);
  transition: transform .2s, box-shadow .2s;
}
.hero-m-btn--outline {
  background: rgba(255,255,255,.75); color: #cf2a73; border: 1.5px solid #cf2a73; box-shadow: none;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero-m-btn--outline:hover { background: #fff; box-shadow: 0 8px 20px rgba(207,42,115,.18); }
.hero-m-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(207,42,115,.38); }
.hero-m-btn svg { width: 16px; height: 16px; }

/* pontos do indicador, sobre a onda */
.hero-m-dots {
  display: flex; gap: 5px; align-items: center; position: absolute; left: 50%; bottom: 10px; z-index: 3; transform: translateX(-50%);
}
.hero-m-dots i { display: block; height: 4px; width: 5px; border-radius: 2px; background: #cf2a73; }
.hero-m-dots i:last-child { width: 18px; }

/* destaque logo abaixo do hero (alinhado com o resto do conteúdo) */
.hero-m-feature {
  display: flex; align-items: center; gap: 22px;
  max-width: var(--maxw, 1520px); margin: 0 auto;
  padding: 30px var(--gutter, 48px) 18px;
}
.hero-m-feature .hmf-ico {
  flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; background: #fbe6f0; color: #cf2a73;
}
.hero-m-feature .hmf-ico svg { width: 38px; height: 38px; }
.hero-m-feature strong { display: block; font-size: 20px; font-weight: 700; color: var(--fg, #0f1d4a); line-height: 1.2; }
.hero-m-feature .hmf-txt span { display: block; margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: var(--cinza, #6b6b6b); }

/* tablet: véu mais largo para o texto ler bem sobre a foto */
@media (max-width: 900px) {
  section.pub.section.hero::before {
    background:
      linear-gradient(90deg, rgba(255,255,255,.90) 0%, rgba(255,255,255,.66) 50%, rgba(255,255,255,0) 90%),
      linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,0) 45%) !important;
  }
}

@media (max-width: 640px) {

  /* ---------- escala base ----------
     Quase tudo no site está em rem; baixar a base de 16 para 15px
     encolhe texto, espaços e ícones em ~6% de uma só vez. */
  html { font-size: 15px; }
  :root { --pad: 16px; --gutter: 16px; }

  /* O texto justificado cria "buracos" enormes em colunas estreitas */
  p { text-align: left; text-align-last: auto; hyphens: manual; }

  /* ---------- títulos ---------- */
  h1, .h-xl, .hero-content h1,
  section.pub.section.hero .h-xl { font-size: clamp(1.55rem, 7.2vw, 1.85rem) !important; line-height: 1.12; letter-spacing: -.025em; }
  .page-header h1, .pais-hero h1,
  .acompanhar-hero h1 { font-size: 1.5rem !important; }
  h2, .h-lg, .section-title, .login-card h2 { font-size: clamp(1.3rem, 6vw, 1.5rem) !important; line-height: 1.15; }
  .login-card h2 { font-size: 1.2rem !important; line-height: 1.2; }
  h3, .h-md, .cx-title, .admin-cx .cx-title { font-size: 1.2rem !important; }
  .h-sm { font-size: 1.1rem !important; }
  .lead, .section-sub { font-size: .98rem !important; line-height: 1.5; }
  .hero-content p { font-size: .98rem !important; }
  main h1:not(.h-xl) { margin-bottom: 10px; }
  .section-title { margin-bottom: 10px; }
  .section-sub { margin-bottom: 24px; }

  /* Hero da página inicial no telemóvel: mesma estrutura do bloco "HERO NOVO",
     só em escala menor. */
  section.pub.section.hero {
    min-height: 500px !important;
    background-position: 70% center, 70% center !important;
  }
  section.pub.section.hero::before {
    background:
      linear-gradient(90deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.62) 42%, rgba(255,255,255,0) 78%),
      linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 45%) !important;
  }
  section.pub.section.hero::after { height: 44px; }
  section.pub.section.hero > .wrap { padding: 58px 26px 0 !important; }
  .hero-m { max-width: 100%; }
  .hero-m-eyebrow { font-size: 10.5px !important; letter-spacing: .2em; padding-bottom: 12px; }
  .hero-m-eyebrow::after { width: 30px; }
  .hero-m-titulo { margin-top: 26px !important; font-size: clamp(23px, 6.7vw, 30px) !important; line-height: 1.12; letter-spacing: -.02em; }
  .hero-m-sub { margin-top: 22px !important; font-size: clamp(12.5px, 3.45vw, 15px) !important; }
  .hero-m-acoes { gap: 10px; margin-top: 20px; }
  .hero-m-btn { gap: 10px; height: 40px; padding: 0 20px; font-size: 14px; box-shadow: 0 6px 16px rgba(207,42,115,.28); }
  .hero-m-btn--outline { box-shadow: none; }
  .hero-m-btn svg { width: 14px; height: 14px; }
  .hero-m-dots { gap: 4px; bottom: 6px; }
  .hero-m-dots i { height: 3px; width: 4px; }
  .hero-m-dots i:last-child { width: 14px; }
  .hero-m-feature { gap: 18px; padding: 26px 26px 18px; }
  .hero-m-feature .hmf-ico { flex-basis: 70px; width: 70px; height: 70px; }
  .hero-m-feature .hmf-ico svg { width: 32px; height: 32px; }
  .hero-m-feature strong { font-size: 17px; }
  .hero-m-feature .hmf-txt span { font-size: 13.5px; }

  /* ---------- espaçamento vertical das secções ---------- */
  .section { padding-block: 44px; }
  .section--tight { padding-block: 30px; }
  .mt-l { margin-top: 36px; }
  .mt-m { margin-top: 24px; }
  .page-header { padding-top: 14px; }
  .breadcrumb { font-size: .8rem; margin-bottom: 4px; }

  /* ---------- barra do topo ---------- */
  .top-brand-text { font-size: .76rem; }

  /* ---------- botões ---------- */
  .btn .label { font-size: .88rem; }
  .btn .cap { width: 44px; height: 32px; }
  .btn .cap .ico { width: 13px; height: 13px; }
  .btn--lg .cap { width: 54px; height: 39px; }
  .btn--lg .label { font-size: .98rem; }
  .btn-primary, .btn-azul, .btn-outline, .btn-outline-azul {
    min-height: 40px; padding: 10px 16px; font-size: .85rem;
  }
  .btn-login { min-height: 42px; font-size: .92rem; }
  .hero-actions { gap: 10px; }

  /* ---------- campos de formulário ----------
     16px é o mínimo para o iPhone não fazer zoom ao tocar no campo. */
  :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset]):not([type=image]), textarea, select) {
    padding: 10px 12px; font-size: 16px;
  }
  label { font-size: .8rem; }
  .form-group { margin-bottom: 14px; }
  #insc-geral #btn-enviar-inscricao { padding: 13px 22px; font-size: .98rem; }

  /* ---------- ícones ---------- */
  .icon, .tag-icon { width: 30px; height: 30px; }
  .section-tag { font-size: 11px; padding: 5px 12px 5px 10px; margin-bottom: 12px; }
  .section-tag[data-icon]::before { width: 22px; height: 22px; font-size: 16px; }
  .hero-badge[data-icon]::before { width: 20px; height: 20px; font-size: 14px; }
  .hero-badge { font-size: .74rem; padding: 6px 12px 6px 9px; margin-bottom: 14px; }
  .hd-ico { width: 36px; height: 36px; }
  .hd-ico svg { width: 18px; height: 18px; }
  .hd-txt { font-size: 13px; }
  section.pub.section.hero .hero-wa { width: 50px; height: 50px; padding: 12px; }
  .ie-ico { font-size: 28px !important; }
  .cx-num { min-width: 34px; height: 34px; }
  .cx-num .material-symbols-outlined { font-size: 20px; }
  .contato-mapa-secao .mapa-wrapper > .material-symbols-outlined { font-size: 36px !important; }
  .acs-btn-mostrar-senha .material-symbols-outlined { font-size: 20px; }

  /* ---------- cartões e blocos ---------- */
  .ie-card { padding: 18px !important; gap: 8px; }
  .ie-card strong { font-size: 1.2rem; }
  .ie-card > span:not(.ie-ico):not(.ie-go) { font-size: .92rem; }
  .ie-h { font-size: 1.08rem; margin-top: 26px; }
  .ie-passos li, .ie-prov, .ie-caixa { padding: 14px; }
  .inscricao-form, .inscricao-camera { padding: 18px !important; }
  .login-card { padding: 22px 18px 18px !important; }
  .login-header { margin-bottom: 16px; }
  .login-logo { width: 50px; height: 50px; padding: 8px; }
  .login-wrapper { min-height: 0; padding: 22px 14px; }
  .login-form { gap: 12px; }

  /* números grandes da página "Sobre" */
  .sobre-fundacao strong { font-size: 2.1rem !important; }
  .sobre-stat strong { font-size: 1.7rem !important; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: .75rem; }

  /* ---------- blocos da página inicial ---------- */
  .path { padding: 22px 20px; gap: 16px; }
  .path svg.glyph { width: 30px; height: 30px; }
  .cta-band { padding: 28px 20px; }
  .cta-band .row { gap: 18px; }
  .cta-band .form { margin-top: 18px; gap: 10px; }
  .cta-band .form input { padding: 12px 14px; }

  /* ---------- rodapé ---------- */
  .footer { padding: 28px 20px; margin-bottom: 16px; }
  .fgrid { gap: 28px; }
  .flist { font-size: .92rem; gap: 10px; }
  .footer .legal { margin-top: 28px; padding-top: 18px; font-size: .82rem; }
}

/* ecrãs muito estreitos (telemóveis pequenos, 360px ou menos) */
@media (max-width: 380px) {
  html { font-size: 14.5px; }
  .top-brand-text { font-size: .7rem; }
}

/* ===================================================================
   CARROSSEL DO HERO (3 destaques). O destaque 1 usa a foto de fundo
   acima; os destaques 2 e 3 têm fundo claro + foto à direita.
   O JS (index.html) põe data-slide="1|2|3" na secção e .ativo no
   texto, na foto e na lista do destaque visível.
   =================================================================== */
section.pub.section.hero .hero-m:not(.ativo) { display: none !important; }
section.pub.section.hero .hero-m.ativo { animation: heroSlideIn .6s ease both; }
@keyframes heroSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { section.pub.section.hero .hero-m.ativo { animation: none; } }

/* fundo claro nos destaques 2 e 3 (sem a foto grande nem o véu do 1) */
section.pub.section.hero[data-slide="2"],
section.pub.section.hero[data-slide="3"] {
  background-image: linear-gradient(115deg, #e4f1fb 0%, #f2f8fd 55%, #ffffff 100%) !important;
  background-size: auto !important; background-position: 0 0 !important;
}
section.pub.section.hero[data-slide="2"]::before,
section.pub.section.hero[data-slide="3"]::before { background: none !important; }

/* foto à direita, com a margem esquerda esbatida */
.hero-img {
  position: absolute; right: 0; bottom: 0; z-index: 1; pointer-events: none;
  height: 100%; width: min(60%, 980px); object-fit: cover; object-position: left center;
  opacity: 0; transition: opacity .6s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%);
          mask-image: linear-gradient(90deg, transparent 0, #000 18%);
}
.hero-img.ativo { opacity: 1; }
.hero-img[data-slide="3"] { width: min(52%, 860px); }
section.pub.section.hero[data-slide="2"] .hero-m,
section.pub.section.hero[data-slide="3"] .hero-m { max-width: 640px; }

/* lista de destaques do destaque 3 (coluna do meio) */
.hero-feats { display: none; margin: 0; padding: 0; list-style: none; }
.hero-feats.ativo {
  display: flex; flex-direction: column; gap: 22px;
  position: absolute; left: 46%; top: 50%; transform: translateY(-58%); z-index: 2; max-width: 340px;
}
.hero-feats li { display: flex; align-items: center; gap: 16px; }
.hero-feats .hd-ico {
  flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
}
.hero-feats .hd-ico svg { width: 26px; height: 26px; }
.hero-feats .hd-ico--rosa  { background: #fbe6f0; color: #cf2a73; }
.hero-feats .hd-ico--ciano { background: #d4f1ee; color: #1f9d95; }
.hero-feats .hd-ico--roxo  { background: #e6e4fb; color: #3b2fd0; }
.hero-feats strong { display: block; font-size: 16px; font-weight: 700; color: #0f1d4a; line-height: 1.25; }
.hero-feats .hf-txt span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.4; color: #3d4a6b; }

/* pontos: agora são botões (área de toque maior sem mudar o aspecto) */
.hero-m-dots { pointer-events: auto; }
.hero-m-dots button {
  position: relative; display: block; height: 4px; width: 5px; padding: 0; border: 0; border-radius: 2px;
  background: #cf2a73; opacity: .35; cursor: pointer; transition: width .3s, opacity .3s;
}
.hero-m-dots button::after { content: ''; position: absolute; inset: -10px -4px; }
.hero-m-dots button[aria-selected="true"] { width: 18px; opacity: 1; }

@media (max-width: 1100px) { .hero-feats.ativo { display: none; } }
@media (max-width: 900px) {
  /* foto passa a fundo suave atrás do texto */
  .hero-img, .hero-img[data-slide="3"] { width: 100%; object-position: 70% center; -webkit-mask-image: none; mask-image: none; }
  .hero-img.ativo { opacity: .38; }
}

/* ===================================================================
   Com sessão iniciada: a Home pública (hero com foto, destaque mobile e
   restantes secções .pub) NÃO aparece — só o painel (#dashboard).
   Tem de levar !important porque "section.pub.section.hero" acima usa
   display:block !important e, sem isto, a foto ficava mesmo após o login.
   =================================================================== */
html.logado-hint .pub,
html.logado-hint section.pub.section.hero,
html.logado-hint .hero-m-feature,
html.logado-hint .hero-m-dots { display: none !important; }
html.logado-hint #dashboard:not([hidden]) { display: block; }

/* ===================================================================
   ANIMAÇÕES DE ENTRADA AO ROLAR (index): texto e cartões entram pela
   esquerda, pela direita ou de baixo para cima. O JS (index.html) põe
   .rv + .rv-l / .rv-r / .rv-u e, ao entrar no ecrã, .rv-in.
   Usa "animation" (não "transition") para não estragar os efeitos de
   hover dos cartões; depois de acabar não fica nenhum estilo preso.
   =================================================================== */
:root { --rv-x: 64px; --rv-y: 36px; }
@media (max-width: 900px) { :root { --rv-x: 36px; --rv-y: 28px; } }
@media (max-width: 480px) { :root { --rv-x: 22px; --rv-y: 24px; } }

.rv { opacity: 0; }
.rv.rv-in { opacity: 1; animation: rvU .85s cubic-bezier(.2,.7,.2,1) var(--rv-d, 0s) backwards; }
.rv.rv-l.rv-in { animation-name: rvL; }
.rv.rv-r.rv-in { animation-name: rvR; }
@keyframes rvU { from { opacity: 0; transform: translateY(var(--rv-y)); } to { opacity: 1; transform: none; } }
@keyframes rvL { from { opacity: 0; transform: translateX(calc(var(--rv-x) * -1)); } to { opacity: 1; transform: none; } }
@keyframes rvR { from { opacity: 0; transform: translateX(var(--rv-x)); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1 !important; animation: none !important; } }

/* ===================================================================
   SELO "EDUCAÇÃO · FORMAÇÃO · FUTURO" = indicador do carrossel (online).
   Cada palavra é um botão que leva ao seu destaque (1 Educação,
   2 Formação, 3 Futuro). A palavra ativa fica a rosa com a barra por baixo.
   =================================================================== */
section.pub.section.hero .hero-m-eyebrow::after { display: none; }
.hero-m-eyebrow button {
  position: relative; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; transition: color .25s;
}
.hero-m-eyebrow button::after {
  content: ''; position: absolute; left: 0; bottom: -12px; width: 38px; height: 2px; background: var(--accent-2, #cf2a73);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.hero-m-eyebrow button:hover { color: #cf2a73; }
.hero-m-eyebrow button[aria-current="true"] { color: #cf2a73; font-weight: 600; }
.hero-m-eyebrow button[aria-current="true"]::after { transform: scaleX(1); }
.hero-m-eyebrow button:focus-visible { outline: 2px solid #cf2a73; outline-offset: 4px; border-radius: 2px; }
@media (max-width: 640px) { .hero-m-eyebrow button::after { width: 30px; bottom: -12px; } }

/* ===================================================================
   TELEMÓVEL / TABLET (≤900px): nos destaques 2 e 3 o texto fica em cima,
   sobre fundo claro, e a foto ocupa a parte de baixo do hero (sem ficar
   atrás das letras). A onda e os pontos ficam por cima, como no destaque 1.
   Altura igual nos 3 destaques para o hero não "saltar" ao trocar.
   =================================================================== */
@media (max-width: 900px) {
  .hero-img,
  .hero-img[data-slide="2"],
  .hero-img[data-slide="3"] {
    left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: 40%;
    object-fit: cover; object-position: 55% 30%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%);
            mask-image: linear-gradient(180deg, transparent 0, #000 30%);
  }
  .hero-img[data-slide="3"] { object-position: 62% center; }
  .hero-img.ativo { opacity: 1; }
}
@media (max-width: 640px) {
  section.pub.section.hero { min-height: 640px !important; }
}

/* ===================================================================
   DESTAQUE "ENSINO DE QUALIDADE" que roda a cada 3 s (online).
   Cores do ícone por tom; troca com desvanecer; altura fixa para a
   página não saltar quando a frase tem uma ou duas linhas.
   =================================================================== */
.hero-m-feature .hmf-ico[data-tom="rosa"]  { background: #fbe6f0; color: #cf2a73; }
.hero-m-feature .hmf-ico[data-tom="ciano"] { background: #d4f1ee; color: #1f9d95; }
.hero-m-feature .hmf-ico[data-tom="roxo"]  { background: #e6e4fb; color: #3b2fd0; }
.hero-m-feature .hmf-ico, .hero-m-feature .hmf-txt { transition: opacity .3s ease, transform .3s ease, background-color .3s ease, color .3s ease; }
.hero-m-feature.trocando .hmf-ico,
.hero-m-feature.trocando .hmf-txt { opacity: 0; transform: translateY(8px); }
.hero-m-feature .hmf-txt { min-height: 54px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 640px) { .hero-m-feature .hmf-txt { min-height: 70px; } }
@media (prefers-reduced-motion: reduce) {
  .hero-m-feature .hmf-ico, .hero-m-feature .hmf-txt { transition: none; }
}

/* ===================================================================
   CORREÇÕES DO CARROSSEL (online)
   1) A foto que sai desaparece logo (antes desvanecia devagar e ficava
      por cima do destaque seguinte). Só a foto que entra faz fade-in.
   2) Hero mais baixo no telemóvel, para o bloco "Ensino de Qualidade"
      voltar a ficar visível sem rolar. Nos destaques 2 e 3 o texto
      deixa uma faixa livre em baixo (150px) para a foto.
   =================================================================== */
.hero-img { opacity: 0; transition: none; }
.hero-img.ativo { opacity: 1; animation: heroImgIn .6s ease both; }
@keyframes heroImgIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-img.ativo { animation: none; } }

@media (max-width: 900px) {
  .hero-img,
  .hero-img[data-slide="2"],
  .hero-img[data-slide="3"] { height: 170px; }
  section.pub.section.hero[data-slide="2"] > .wrap,
  section.pub.section.hero[data-slide="3"] > .wrap { padding-bottom: 150px !important; }
}
@media (max-width: 640px) {
  section.pub.section.hero { min-height: 540px !important; }
}
