/* =========================================================
   Externato Ergon — folha de estilos
   As cores principais estão aqui em cima. Para mudar a
   identidade do site, basta alterar estes valores.
   ========================================================= */
:root {
  /* Força o esquema de cores claro — o site fica igual mesmo com o
     modo escuro do telemóvel ligado, e o browser não inverte as cores. */
  color-scheme: only light;

  --navy:        #14213d;   /* cor principal (escuro) */
  --navy-700:    #1d2b4d;
  --gold:        #d4a23a;   /* cor de destaque */
  --gold-soft:   #f0c66b;
  --yellow:      #ffd400;   /* faixa de inscrições (amarelo da marca) */
  --yellow-deep: #f5c000;

  --ink:         #1d2433;   /* texto principal */
  --muted:       #5b6472;   /* texto secundário */
  --bg:          #ffffff;
  --bg-soft:     #f6f7fa;   /* fundo de secções alternadas */
  --line:        #e7e9ef;
  --white:       #ffffff;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 1px 2px rgba(20,33,61,.04), 0 12px 30px -12px rgba(20,33,61,.18);
  --shadow-soft: 0 1px 2px rgba(20,33,61,.04), 0 8px 24px -16px rgba(20,33,61,.25);
  --max:         1120px;
  --font-sans:   'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif:  'Fraunces', Georgia, 'Times New Roman', serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Evita qualquer deslize horizontal indesejado no telemóvel.
     'clip' (em vez de 'hidden') não quebra o cabeçalho fixo. */
  overflow-x: clip;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.12; color: var(--navy); font-weight: 500; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:where(a, button, .btn):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--navy-700); }
.btn-ghost { background: rgba(20,33,61,.06); color: var(--navy); }
.btn-ghost:hover { background: rgba(20,33,61,.1); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); background: #fff; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(20,33,61,.5); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-mark { display: inline-flex; align-items: center; }
.brand-logo { display: none; height: 44px; width: auto; max-width: 180px; object-fit: contain; border-radius: 10px; }
.footer-logo { height: 60px; max-width: 230px; padding: 9px 12px; background: #fff; border-radius: 12px; }
.social-logo { height: 48px; max-width: 130px; padding: 7px 9px; background: #fff; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-sup { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.brand-name { font-family: var(--font-serif); font-size: 1.5rem; color: var(--navy); font-weight: 600; letter-spacing: -.01em; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 500; color: var(--ink); position: relative; padding: .25rem 0; }
.main-nav ul a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .25s ease;
}
.main-nav ul a:hover::after, .main-nav ul a.active::after { width: 100%; }
/* Especificidade maior que ".main-nav a", senao o texto fica azul sobre azul */
.main-nav a.nav-cta { padding: .6rem 1.2rem; color: #fff; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-close { display: none; }

/* ---------- Hero (com imagem de fundo) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  display: flex; align-items: center;
  min-height: min(82vh, 760px);
  padding: clamp(4rem, 9vw, 7rem) 0;
  /* A imagem de fundo é assets/img/exterior.jpeg (o edifício da escola). */
  background-color: var(--navy);
  background-image:
    linear-gradient(105deg, rgba(13,22,42,.88) 0%, rgba(13,22,42,.64) 52%, rgba(13,22,42,.42) 100%),
    url('../img/exterior.jpeg');
  background-size: cover;
  background-position: center 18%;   /* mostra mais o edifício e menos a estrada */
  background-repeat: no-repeat;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { font-family: var(--font-sans); font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.hero .eyebrow { color: var(--gold-soft); }
.hero-title { font-size: clamp(2rem, 7vw, 4rem); margin: 0 0 1.2rem; font-weight: 500; color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.28); line-height: 1.08; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.9); max-width: 620px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero .btn-primary { background: var(--gold); color: var(--navy); box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
.hero .btn-primary:hover { background: var(--gold-soft); }
.hero .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.24); }
.hero-meta { display: inline-flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 500; margin: 0; }
.hero-meta .icon { fill: var(--gold-soft); }

/* ---------- Estatísticas ---------- */
.stats { padding-bottom: clamp(1rem, 4vw, 2rem); }
/* Barra mais larga do que o resto do conteúdo, para caberem as 5 colunas */
.stats > .container { max-width: min(1320px, 96vw); }
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--bg); padding: 1.5rem 1rem; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.stat-icon { display: block; margin-bottom: .3rem; }
.stat-icon svg { width: 26px; height: 26px; fill: var(--muted); margin: 0 auto; }
.stat-num { display: block; font-family: var(--font-serif); font-size: clamp(1.25rem, 2.1vw, 1.7rem); color: var(--navy); font-weight: 600; line-height: 1.15; }
.stat-label { display: block; color: var(--muted); font-size: .9rem; margin-top: .25rem; }

/* ---------- Secções ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; scroll-margin-top: 84px; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 2.8rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .6rem; }
.section-intro { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- A Escola ---------- */
.about-lead { max-width: 820px; margin: 0 0 clamp(2.2rem, 4vw, 3rem); }
.about-lead p { font-size: 1.12rem; line-height: 1.7; color: #36404f; }
.about-lead p:last-child { margin-bottom: 0; }
.about-block + .about-block { margin-top: clamp(2rem, 4vw, 2.8rem); }
.about-block-label {
  font-family: var(--font-sans); font-weight: 600; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 1.1rem;
}
.value-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.value-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
.value-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.value { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-soft); }
.value-icon { display: inline-flex; padding: .6rem; border-radius: 12px; background: rgba(212,162,58,.14); color: var(--gold); margin-bottom: .8rem; }
.value-icon .icon { width: 22px; height: 22px; }
.value h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.value p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Cursos ---------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.course-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}
.course-card::before {
  content: ""; position: absolute; left: 1.8rem; top: 1.8rem; width: 34px; height: 3px;
  border-radius: 3px; background: var(--gold);
}
.course-card h3 { font-size: 1.25rem; margin: 1.2rem 0 .5rem; }
.course-card p { margin: 0; color: var(--muted); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d8dce5; }
.course-card.highlight { background: var(--navy); border-color: var(--navy); }
.course-card.highlight::before { background: var(--gold-soft); }
.course-card.highlight h3 { color: #fff; }
.course-card.highlight p { color: rgba(255,255,255,.78); }

/* ---------- Novidades / Redes ---------- */
.social-cta {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 5vw, 3.2rem); box-shadow: var(--shadow-soft);
}
.social-cta h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: 0 0 .7rem; }
.social-cta-text p:not(.eyebrow) { color: var(--muted); }
.social-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.social-card {
  background: linear-gradient(160deg, var(--navy), #24365f);
  border-radius: var(--radius); padding: 1.5rem; color: #fff; box-shadow: var(--shadow);
}
.social-card-top { display: flex; align-items: center; gap: .8rem; }
.social-card-top strong { display: block; font-size: 1rem; }
.social-card-top span:not(.brand-mark) { display: block; font-size: .85rem; color: rgba(255,255,255,.7); }
.social-card-body {
  margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-serif); font-size: 1.2rem;
}

/* ---------- Contactos ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.contact-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.2rem); box-shadow: var(--shadow-soft); }
.contact-list { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 1.3rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-icon { display: inline-flex; padding: .55rem; border-radius: 10px; background: rgba(20,33,61,.06); color: var(--navy); }
.contact-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: .15rem; }
.contact-list a:hover { color: var(--gold); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.contact-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 340px; box-shadow: var(--shadow-soft); }
.contact-map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding-top: clamp(3rem, 6vw, 4.5rem); margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-tag { margin: 1rem 0 0; max-width: 320px; color: rgba(255,255,255,.7); }
.site-footer h4 { color: #fff; font-family: var(--font-sans); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1rem; }
.footer-links { display: flex; flex-direction: column; gap: .55rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold-soft); }
.footer-contact p { margin: 0 0 1rem; color: rgba(255,255,255,.7); }
.footer-social { display: flex; gap: .6rem; }
.footer-social a { display: inline-flex; padding: .5rem; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; transition: background .2s ease; }
.footer-social a:hover { background: rgba(255,255,255,.16); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.4rem 0; }
.footer-bottom p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.6); }

/* ---------- Animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
/* ---------- Faixa de inscrições (topo da página) ---------- */
.enrol-band {
  background: linear-gradient(90deg, var(--yellow-deep), var(--yellow) 45%, var(--yellow-deep));
  color: var(--navy);
  border-bottom: 2px solid rgba(20,33,61,.14);
}
.enrol-band-inner {
  display: flex; align-items: center; justify-content: center;
  padding: .7rem 0;
}
.enrol-text {
  margin: 0; text-align: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.005em;
}
.enrol-text strong { font-weight: 600; }

/* ---------- Cartão largo + bandeiras ---------- */
.value-wide { grid-column: 1 / -1; }
.flag-list { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.flag-list li {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .7rem; font-size: .85rem; color: var(--ink);
}
.flag { font-size: 1.05rem; line-height: 1; }

/* ---------- Destaque na secção Cursos ---------- */
.course-highlight {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, var(--yellow-deep), var(--yellow) 45%, var(--yellow-deep));
  color: var(--navy);
  border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 0 0 1.6rem;
  box-shadow: var(--shadow-soft);
}
.course-highlight p {
  margin: 0; text-align: center;
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem); line-height: 1.3;
}
.course-highlight strong { font-weight: 600; }

/* ---------- Caixa expansível (acesso ao ensino superior) ---------- */
.info-accordion {
  margin-top: 1.6rem; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden;
}
.info-accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem;
  font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: var(--navy); transition: background .2s ease;
}
.info-accordion summary::-webkit-details-marker { display: none; }
.info-accordion summary:hover { background: var(--bg-soft); }
.info-chevron { width: 22px; height: 22px; fill: var(--gold); flex: 0 0 auto; transition: transform .25s ease; }
.info-accordion[open] .info-chevron { transform: rotate(180deg); }
.info-accordion[open] summary { border-bottom: 1px solid var(--line); }
.info-accordion-body { padding: 1.3rem 1.4rem 1.5rem; color: #36404f; line-height: 1.7; font-size: .98rem; }
.info-accordion-body > p { margin: 0 0 1rem; }
.info-accordion-body ol, .info-accordion-body ul { margin: 0 0 1rem; }
.info-list-alpha, .info-list-roman { list-style: none; padding-left: 1.6rem; }
.info-list-alpha { counter-reset: alpha; }
.info-list-alpha > li { counter-increment: alpha; position: relative; margin-bottom: .5rem; }
.info-list-alpha > li::before { content: counter(alpha, lower-alpha) ")"; position: absolute; left: -1.6rem; font-weight: 600; color: var(--navy); }
.info-list-roman { counter-reset: roman; margin-top: .6rem; }
.info-list-roman > li { counter-increment: roman; position: relative; margin-bottom: .4rem; }
.info-list-roman > li::before { content: counter(roman, lower-roman) ")"; position: absolute; left: -1.6rem; font-weight: 600; color: var(--muted); }
.info-note { background: var(--bg-soft); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: .8rem 1rem; }
.info-formula {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--navy);
  text-align: center; background: var(--bg-soft); border-radius: 10px; padding: .9rem 1rem;
}
.info-defs { list-style: none; padding-left: 0; }
.info-defs li { margin-bottom: .5rem; }
.info-defs strong { color: var(--navy); }
.info-source { font-size: .9rem; color: var(--muted); margin-bottom: 0; }
.info-source a { color: var(--gold); font-weight: 600; }
.info-source a:hover { text-decoration: underline; }

/* ---------- Plano de estudos / disciplinas ---------- */
.section-subhead { margin: clamp(2rem, 5vw, 2.8rem) 0 1.2rem; }
.section-subhead h3 { font-size: 1.5rem; margin: 0 0 .4rem; }
.section-subhead p { color: var(--muted); margin: 0; max-width: 680px; }
/* Divisória entre zonas (disciplinas vs. funcionamento/informações) */
.section-subhead--divider {
  border-top: 1px solid var(--line);
  margin-top: clamp(2.6rem, 6vw, 3.6rem);
  padding-top: clamp(2rem, 5vw, 2.6rem);
}
/* Caixas dos cursos: destaque dourado à esquerda para as agrupar */
.info-accordion--curso { border-left: 4px solid var(--gold); }
.info-accordion--curso summary { color: var(--navy); }
.formacao-geral {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; box-shadow: var(--shadow-soft); margin-bottom: 1rem;
}
.disc-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.disc-list li {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .6rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
  color: var(--navy); font-weight: 500;
}
.disc-list li:last-child { border-bottom: none; }
.disc-list li span { color: var(--muted); font-weight: 400; font-size: .88rem; }
.disc-choices { list-style: none; margin: .3rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.disc-choices li {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .85rem; font-size: .9rem; color: var(--ink);
}
.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li { position: relative; padding-left: 1.7rem; margin-bottom: .7rem; }
.tick-list li:last-child { margin-bottom: 0; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 800; }
.tick-list strong { color: var(--navy); }
/* Painel de vantagens (lista aberta, com aspeto de cartão) */
.vantagens-panel {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-soft);
}
.vantagens-panel .tick-list li { color: #36404f; }
.vantagens-panel a { color: var(--gold); font-weight: 600; }
.vantagens-panel a:hover { text-decoration: underline; }

/* ---------- Promoções e descontos ---------- */
.deals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.deals-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.7rem; box-shadow: var(--shadow-soft);
}
.deals-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px; background: rgba(212,162,58,.14); margin-bottom: .9rem;
}
.deals-icon svg { width: 26px; height: 26px; fill: var(--gold); }
.deals-card h3 { font-size: 1.25rem; margin: 0 0 .3rem; }
.deals-card > p { color: var(--muted); margin: 0 0 1rem; }
.tier-list { list-style: none; margin: 0; padding: 0; }
.tier-list li {
  display: flex; align-items: center; gap: .9rem; padding: .6rem 0;
  border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 500;
}
.tier-list li:last-child { border-bottom: none; }
.tier-pct {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; height: 38px; padding: 0 .5rem; border-radius: 10px;
  background: rgba(212,162,58,.16); color: var(--gold);
  font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem;
}
.deals-fine { color: var(--muted); font-size: .88rem; margin: 1.1rem 0 0; }
.deals-fine a { color: var(--gold); font-weight: 600; }
.deals-fine a:hover { text-decoration: underline; }
@media (max-width: 720px) { .deals-grid { grid-template-columns: 1fr; } }

/* ---------- Galeria de instalações ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item {
  margin: 0; overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow-soft); aspect-ratio: 4 / 3; background: var(--bg-soft);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.gallery-item img { cursor: zoom-in; }
.gallery-item:hover img { transform: scale(1.04); }

/* ---------- Galeria em ecrã inteiro (lightbox) ---------- */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.5rem, 2vw, 1.5rem); padding: clamp(1rem, 4vw, 3rem);
  background: rgba(9, 14, 28, .92); backdrop-filter: blur(4px);
  animation: lb-fade .2s ease;
}
.lightbox[hidden] { display: none; }

/* ---------- Popup lateral de promoção (com aba sempre visível) ---------- */
.promo-dock {
  position: fixed; top: 50%; right: 0; z-index: 190;
  display: flex; align-items: stretch;
  transform: translateY(-50%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
/* Recolhido: desliza para a direita, ficando só a aba (~44px) à vista */
.promo-dock.collapsed { transform: translateY(-50%) translateX(calc(100% - 44px)); }

/* A aba / rabinho — sempre visível */
.promo-tab {
  flex: 0 0 44px; width: 44px; align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  background: var(--gold); color: var(--navy); border: none; cursor: pointer;
  padding: .9rem .2rem; border-radius: 12px 0 0 12px;
  box-shadow: -6px 0 20px -10px rgba(20,33,61,.5);
}
.promo-tab:hover { background: var(--gold-soft); }
.promo-tab-icon svg { width: 22px; height: 22px; fill: var(--navy); }
.promo-tab-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-sans); font-weight: 700; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
}
/* Quando aberto, a aba junta-se ao cartão sem cantos entre os dois */
.promo-dock:not(.collapsed) .promo-tab { border-radius: 12px 0 0 12px; }

/* O cartão */
.promo-panel {
  position: relative; width: min(320px, 78vw); text-align: center;
  background: #fff; padding: 1.8rem 1.4rem 1.5rem;
  border-radius: 0 0 0 16px; border-top: 5px solid var(--gold);
  box-shadow: -14px 0 40px -18px rgba(20,33,61,.5);
}
.promo-collapse {
  position: absolute; top: .5rem; right: .6rem; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: var(--bg-soft); border-radius: 50%; cursor: pointer;
  transition: background .2s ease;
}
.promo-collapse:hover { background: rgba(20,33,61,.1); }
.promo-collapse svg { width: 16px; height: 16px; fill: var(--muted); }
.promo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(212,162,58,.16); margin-bottom: .9rem;
}
.promo-icon svg { width: 28px; height: 28px; fill: var(--gold); }
.promo-eyebrow { font-family: var(--font-sans); font-weight: 600; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 .3rem; }
.promo-panel h2 { font-size: 1.5rem; margin: 0 0 .5rem; }
.promo-text { color: var(--muted); font-size: 1rem; margin: 0 0 1.2rem; }
.promo-text strong { color: var(--navy); }
.promo-btn { background: var(--gold); color: var(--navy); font-weight: 600; width: 100%; justify-content: center; padding: .8rem 1rem; }
.promo-btn:hover { background: var(--gold-soft); }
@media (max-width: 480px) {
  .promo-tab-label { display: none; }
  .promo-tab { flex-basis: 40px; width: 40px; }
  .promo-dock.collapsed { transform: translateY(-50%) translateX(calc(100% - 40px)); }
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .8rem; max-width: 100%; }
.lightbox-img {
  max-width: min(1100px, 92vw); max-height: 82vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: 10px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.7);
}
.lightbox-count { color: rgba(255,255,255,.75); font-size: .9rem; letter-spacing: .04em; }
.lightbox-close, .lightbox-nav {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  cursor: pointer; border-radius: 999px; transition: background .2s ease, transform .2s ease;
}
.lightbox-nav { width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
.lightbox-close { position: absolute; top: clamp(.8rem, 3vw, 1.6rem); right: clamp(.8rem, 3vw, 1.6rem); width: 44px; height: 44px; font-size: 1.7rem; line-height: 1; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-nav:hover { transform: scale(1.06); }
.lightbox-nav:active { transform: scale(.96); }
@media (max-width: 620px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-img { max-height: 70vh; }
}

/* ---------- História ---------- */
.historia-grid { display: grid; grid-template-columns: 1fr 300px; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.historia-text p { font-size: 1.08rem; line-height: 1.7; color: #36404f; }
.historia-text p:last-child { margin-bottom: 0; }
.historia-portrait { margin: 0; }
.historia-portrait img {
  width: 100%; max-width: 260px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-soft);
}
.historia-portrait figcaption { margin-top: .7rem; font-size: .9rem; color: var(--muted); }
.historia-pintor { margin-top: clamp(2.2rem, 5vw, 3rem); border-top: 1px solid var(--line); padding-top: clamp(1.8rem, 4vw, 2.4rem); }
.historia-pintor h3 { font-size: 1.4rem; margin: 0 0 1.2rem; }
.historia-pintor-grid { display: grid; grid-template-columns: 1fr 340px; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.historia-pintor-text p { color: #36404f; line-height: 1.7; }
.historia-link a { color: var(--gold); font-weight: 600; }
.historia-link a:hover { text-decoration: underline; }
.historia-obras { display: flex; gap: 1rem; }
.historia-obras img {
  width: 100%; height: 200px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-soft);
}

/* ---------- Aluguer de salas ---------- */
.rent-band { background: linear-gradient(160deg, var(--navy), #24365f); color: #fff; padding: clamp(2.4rem, 6vw, 3.6rem) 0; }
.rent-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap; }
.rent-text { max-width: 640px; }
.rent-text .eyebrow { color: var(--gold-soft); }
.rent-text h2 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 .6rem; }
.rent-text p { margin: 0; color: rgba(255,255,255,.82); }
.rent-btn { background: var(--gold); color: var(--navy); font-weight: 600; padding: .8rem 1.6rem; flex: 0 0 auto; }
.rent-btn:hover { background: var(--gold-soft); }

/* ---------- Ligações úteis ---------- */
.links-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.links-grid a {
  display: flex; flex-direction: column; gap: .2rem; height: 100%;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow-soft);
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.links-grid a:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 12px 28px -18px rgba(20,33,61,.5); }
.links-grid strong { color: var(--navy); font-size: 1.02rem; }
.links-grid span { color: var(--muted); font-size: .9rem; }

@media (max-width: 900px) {
  .historia-grid, .historia-pintor-grid { grid-template-columns: 1fr; }
  .historia-portrait img { max-width: 220px; }
  .links-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .social-cta, .contact-grid { grid-template-columns: 1fr; }
  .value-cards.cols-4, .value-cards.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > .stat:last-child { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  /* IMPORTANTE: sem backdrop-filter no telemóvel. Um filtro no cabeçalho
     "prende" o menu (position:fixed) dentro do cabeçalho em vez de ocupar
     o ecrã todo. Sem filtro, o menu cobre o ecrã inteiro. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  /* Menu de ecrã inteiro, fundo branco sólido. Quando fechado fica
     totalmente escondido (visibility:hidden) — sem deslize lateral. */
  .main-nav {
    position: fixed; inset: 0; z-index: 195;
    flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
    background: #fff; padding: 2rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .main-nav.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .main-nav ul { flex-direction: column; align-items: center; gap: 1.4rem; }
  .main-nav a { font-family: var(--font-serif); font-size: 1.55rem; color: var(--navy); }
  .main-nav ul a::after { background: var(--gold-soft); left: 50%; transform: translateX(-50%); }
  .nav-cta { margin-top: .6rem; }
  .main-nav a.nav-cta { font-size: 1.1rem; padding: .85rem 2.2rem; }
  .nav-close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 18px; right: 20px; width: 46px; height: 46px;
    font-size: 2.2rem; line-height: 1; color: var(--navy);
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  }
  .nav-close:hover { background: #fff; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 560px) {
  .course-grid, .stats-grid { grid-template-columns: 1fr; }
  .value-cards.cols-4, .value-cards.cols-3 { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Acessibilidade: menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .course-card:hover { transform: none; }
}
