/* ============================================================
   Formação Macviva — public.css
   Paleta: #2E2480 (índigo), #00AEEF (ciano), #FFE600 (amarelo)
============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --indigo:    #2E2480;
  --indigo-dk: #1e1660;
  --cyan:      #00AEEF;
  --cyan-lt:   #e6f7fd;
  --yellow:    #FFE600;
  --yellow-dk: #d4c400;
  --grey:      #8C8C8C;
  --text:      #1c1c2e;
  --muted:     #5a5a72;
  --border:    #dde2ef;
  --bg:        #f5f7fb;
  --white:     #ffffff;
  --radius:    10px;
  --shadow:    0 2px 16px rgba(46,36,128,.08);
  --shadow-lg: 0 8px 40px rgba(46,36,128,.14);
  --font:      'DM Sans', sans-serif;
  --display:   'Plus Jakarta Sans', 'DM Sans', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 780px; }

/* ---- Header ----------------------------------------------- */
.site-header {
  background: #7fd4f5;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--yellow);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; transition: height .25s; }

.logo { display: flex; align-items: center; text-decoration: none; }
.logo img {
  display: block; height: 54px; width: auto;
  /* contorno branco a desvanecer */
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 4px rgba(255,255,255,.9)) drop-shadow(0 0 12px rgba(255,255,255,.6));
  transition: height .25s, transform .2s;
}
.logo:hover img { transform: translateY(-1px); }

.site-nav { display: flex; gap: 1.8rem; }
.site-nav a { color: var(--indigo); text-decoration: none; font-size: .93rem; font-weight: 500; transition: color .15s; }
.site-nav a:hover { color: #fff; }

/* ---- Header fundido com o hero (páginas com body.has-hero) - */
.has-hero .site-header {
  position: fixed; left: 0; right: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition: background .25s, box-shadow .25s, border-color .25s;
}
.has-hero .site-header.is-scrolled {
  background: #7fd4f5;
  border-bottom-color: var(--yellow);
  box-shadow: 0 4px 20px rgba(46,36,128,.12);
}
.has-hero .site-header .container { height: 108px; }
.has-hero .logo img { height: 70px; }
.has-hero .site-header.is-scrolled .container { height: 76px; }
.has-hero .site-header.is-scrolled .logo img { height: 50px; }
@media (max-width: 600px) {
  .has-hero .site-header .container { height: 84px; }
  .has-hero .logo img,
  .has-hero .site-header.is-scrolled .logo img,
  .logo img { height: 40px; }
  .site-nav { gap: 1rem; }
}

/* ---- Hero -------------------------------------------------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.35) 0, transparent 45%),
    linear-gradient(135deg, #9fe0f8 0%, #5ccbf4 50%, var(--cyan) 100%);
  color: var(--indigo);
  padding: calc(108px + 5rem) 0 6.5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: var(--yellow);
}
.hero-inner { position: relative; z-index: 1; }

.hero-shape { position: absolute; border-radius: 50%; pointer-events: none; }
.hero-shape--1 { width: 420px; height: 420px; right: -120px; top: -80px; background: rgba(255,255,255,.18); }
.hero-shape--2 { width: 220px; height: 220px; right: 18%; bottom: -90px; background: rgba(255,230,0,.55); }
.hero-shape--3 { width: 90px; height: 90px; right: 8%; top: 55%; border: 3px solid rgba(46,36,128,.25); }

.hero-eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--indigo); background: rgba(255,255,255,.6);
  padding: .35rem .9rem; border-radius: 20px; margin-bottom: 1.4rem;
}
.hero-title { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.08; font-weight: 800; letter-spacing: -.035em; margin-bottom: 1.4rem; color: var(--indigo); }
.hero-title em {
  font-style: normal; color: var(--indigo);
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%);
  padding: 0 .1em;
}
.hero-sub { font-size: 1.15rem; color: var(--indigo-dk); opacity: .85; max-width: 540px; margin-bottom: 2.2rem; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-bottom: 2.2rem; }
.btn--yellow { background: var(--yellow); color: var(--indigo); border-color: var(--yellow); box-shadow: 0 6px 20px rgba(46,36,128,.18); }
.btn--yellow:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); transform: translateY(-2px); }
.btn--hero { padding: 1rem 2rem; font-size: 1.05rem; border-radius: 40px; }
.hero-count { font-size: .95rem; color: var(--indigo-dk); }
.hero-count strong { font-size: 1.4rem; font-weight: 700; margin-right: .2rem; }

.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; font-size: .92rem; font-weight: 500; color: var(--indigo-dk); }
.hero-points span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: .35rem; border-radius: 50%; background: var(--indigo); color: var(--yellow); font-size: .7rem; font-weight: 700; }

@media (max-width: 600px) {
  .hero { padding: calc(84px + 3rem) 0 4.5rem; }
  .hero-shape--1 { width: 260px; height: 260px; }
  .hero-shape--2, .hero-shape--3 { display: none; }
  .btn--hero { width: 100%; }
}

/* ---- Cabeçalho de secção ---------------------------------- */
.section-head { text-align: center; margin-bottom: .5rem; }
.section-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: .3rem; }
.section-title { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; color: var(--indigo); }
#cursos { scroll-margin-top: 80px; }

/* ---- Contactos -------------------------------------------- */
.hero--compact { padding: calc(108px + 3rem) 0 4.5rem; }
.hero--compact .hero-sub { margin-bottom: 0; }
@media (max-width: 600px) { .hero--compact { padding: calc(84px + 2rem) 0 3.5rem; } }

.contactos-section { padding: 3.5rem 0 5rem; }
.contactos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.contacto-card {
  display: flex; flex-direction: column; gap: .35rem;
  background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--cyan);
  border-radius: 14px; padding: 1.8rem; text-decoration: none; color: var(--text);
  transition: box-shadow .2s, transform .2s;
}
.contacto-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.contacto-card__item { display: flex; flex-direction: column; margin-top: .35rem; }
.contacto-card__valor { text-decoration: none; }
a.contacto-card__valor:hover { color: var(--cyan); }
.contacto-card__nota { font-size: .76rem; color: var(--muted); }
.contacto-card__morada { font-style: normal; font-size: .98rem; font-weight: 500; color: var(--indigo); line-height: 1.55; margin-top: .35rem; }
.contacto-card__link { margin-top: auto; padding-top: .8rem; font-size: .88rem; font-weight: 600; color: var(--cyan); text-decoration: none; }
.contacto-card__link:hover { color: var(--indigo); }
.contacto-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: .6rem;
  background: var(--cyan-lt); color: var(--cyan);
}
.contacto-card__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contacto-card__label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contacto-card__valor { font-size: 1.08rem; font-weight: 600; color: var(--indigo); overflow-wrap: anywhere; }

.contactos-mapa { margin-top: 1.5rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.contactos-mapa iframe { display: block; width: 100%; height: 360px; border: 0; }

.contactos-cta {
  margin-top: 2.5rem; padding: 2.2rem 2.4rem; border-radius: 18px;
  background: linear-gradient(135deg, #9fe0f8 0%, var(--cyan) 100%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem;
}
.contactos-cta h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: 1.5rem; color: var(--indigo); margin-bottom: .2rem; }
.contactos-cta p { color: var(--indigo-dk); opacity: .85; }
@media (max-width: 600px) { .contactos-cta { padding: 1.8rem 1.4rem; } }

/* ---- Cursos grid ------------------------------------------ */
.cursos-section { padding: 3.5rem 0 5rem; }
.cursos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-top: 2rem; }

.curso-card {
  background: var(--white); border: 1px solid var(--border);
  border-top: 3px solid var(--cyan);
  border-radius: 12px; padding: 1.8rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: box-shadow .2s, transform .2s;
}
.curso-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.curso-card__tipo { display: inline-flex; background: var(--cyan-lt); color: var(--cyan); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .7rem; border-radius: 20px; align-self: flex-start; }
.curso-card__nome { font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.curso-card__desc { font-size: .9rem; color: var(--muted); flex: 1; }
.curso-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.curso-card__meta dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.curso-card__meta dd { font-size: .88rem; font-weight: 500; }
.vagas-badge { display: inline-block; background: #e8f5e9; color: #2e7d32; font-size: .78rem; font-weight: 600; padding: .2rem .7rem; border-radius: 20px; }
.vagas-badge--escassas { background: #fff3e0; color: #e65100; }

/* ---- Buttons ---------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font); font-size: .95rem; font-weight: 600; padding: .7rem 1.4rem; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: all .15s; white-space: nowrap; }
.btn--primary { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.btn--primary:hover { background: var(--indigo); border-color: var(--indigo); }
.btn--outline { background: transparent; color: var(--cyan); border-color: var(--cyan); }
.btn--outline:hover { background: var(--cyan-lt); }
.btn--large { padding: .9rem 2rem; font-size: 1.05rem; width: 100%; margin-top: .5rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Form page -------------------------------------------- */
.form-page { padding: 2.5rem 0 5rem; }
.form-header { margin-bottom: 2rem; }
.back-link { font-size: .88rem; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; margin-bottom: 1.2rem; }
.back-link:hover { color: var(--cyan); }
.form-header__curso h1 { font-size: 1.6rem; font-weight: 600; margin: .5rem 0; }
.form-header__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; color: var(--muted); }
.tag { display: inline-block; background: var(--cyan-lt); color: var(--cyan); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .6rem; border-radius: 20px; }

/* ---- Formulário ------------------------------------------- */
.inscricao-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-section { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 1.8rem; display: flex; flex-wrap: wrap; gap: 1.2rem; }
.form-section__title { font-size: 1rem; font-weight: 600; color: var(--indigo); width: 100%; display: flex; align-items: center; gap: .7rem; padding-bottom: .8rem; border-bottom: 1px solid var(--border); margin-bottom: .2rem; }
.form-section__num { background: var(--indigo); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex-shrink: 0; }

.field-row { display: flex; flex-direction: column; gap: .35rem; }
.field-row--full  { width: 100%; }
.field-row--half  { width: calc(50% - .6rem); min-width: 200px; flex: 1; }
.field-row--third { width: calc(33.33% - .8rem); min-width: 160px; flex: 1; }
.field-row--quarter { width: calc(25% - .9rem); min-width: 140px; flex: 1; }
@media (max-width: 600px) { .field-row--half, .field-row--third, .field-row--quarter { width: 100%; } }

label { font-size: .88rem; font-weight: 500; color: var(--text); }
label small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.req { color: #d32f2f; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="number"], select, textarea {
  font-family: var(--font); font-size: .95rem; padding: .6rem .85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--text); transition: border-color .15s, box-shadow .15s;
  width: 100%; appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,174,239,.12); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a5a72' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.2rem; }
.field--error input, .field--error select { border-color: #d32f2f; background: #fff8f8; }
.field-error { font-size: .8rem; color: #d32f2f; }

.radio-group { display: flex; gap: 1rem; flex-wrap: wrap; padding-top: .2rem; }
.radio-option { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.radio-option input { width: auto; accent-color: var(--cyan); }

.checkbox-option { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .9rem; line-height: 1.5; }
.checkbox-option input { width: auto; margin-top: .2rem; accent-color: var(--cyan); flex-shrink: 0; }
.checkbox-option a { color: var(--cyan); }

.cp-group { display: flex; align-items: center; gap: .4rem; }
.cp-sep { color: var(--muted); font-weight: 500; }
.cp-input { flex: 1; }
.cp-input--small { max-width: 90px; }

.file-input-wrapper { position: relative; }
.file-input { position: absolute; opacity: 0; width: 0; height: 0; }
.file-label { display: flex; align-items: center; gap: .5rem; padding: .6rem .85rem; border: 1.5px dashed var(--border); border-radius: var(--radius); cursor: pointer; background: var(--bg); font-size: .9rem; color: var(--muted); transition: border-color .15s, background .15s; }
.file-label:hover { border-color: var(--cyan); background: var(--cyan-lt); color: var(--cyan); }
.file-hint { font-size: .76rem; color: var(--muted); margin-top: .25rem; display: block; }

.form-footer { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 1.8rem; display: flex; flex-direction: column; gap: 1.2rem; }
.form-note { font-size: .82rem; color: var(--muted); text-align: center; }

/* ---- Alertas ---------------------------------------------- */
.alert { padding: .9rem 1.2rem; border-radius: var(--radius); font-size: .92rem; border-left: 4px solid; }
.alert--error { background: #fff8f8; border-color: #d32f2f; color: #b71c1c; }

/* ---- Confirmação ------------------------------------------ */
.confirmacao-box { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--cyan); border-radius: 18px; padding: 3rem 2.5rem; max-width: 560px; margin: 0 auto; box-shadow: var(--shadow); }
.confirmacao-icon { font-size: 3rem; margin-bottom: 1rem; }
.confirmacao-box h1 { font-size: 1.7rem; font-weight: 600; color: var(--indigo); margin-bottom: .5rem; }
.confirmacao-nome { font-size: 1.05rem; margin-bottom: .5rem; }
.confirmacao-ref code { background: var(--bg); border: 1px solid var(--border); padding: .15rem .5rem; border-radius: 6px; font-size: .95rem; }

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); font-size: 1rem; }

/* ---- Footer ----------------------------------------------- */
.site-footer { background: #7fd4f5; color: var(--indigo); padding: 1.5rem 0; font-size: .83rem; text-align: center; border-top: 3px solid var(--yellow); }
