/* ===== Base (mobile-first) — identidade UniFatecie: laranja + grafite ===== */
:root {
  /* Laranja UniFatecie */
  --brand: #f79633;        /* cor da marca: destaques, bordas, fundos */
  --brand-600: #e8701a;    /* botões (texto branco em negrito) */
  --brand-700: #c85a0c;    /* hover dos botões */
  --brand-ink: #a84e0b;    /* links/texto laranja sobre branco (contraste AA) */
  --brand-100: #fde6d1;
  --brand-50: #fff6ee;
  /* Grafite UniFatecie */
  --graphite: #616063;
  --graphite-900: #38373a;
  --graphite-950: #2a292c;
  --gray-bg: #f3f3f3;
  /* Neutros e estados */
  --ink: #2b2a2d;
  --muted: #5f5e62;
  --line: #e2e0dd;
  --field: #bdbab6;
  --white: #fff;
  --green: #138a45;
  --green-wa: #1fa855;
  --red: #b42318;
  --amber: #b25e09;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(40, 38, 42, .07);
  --shadow-lg: 0 10px 30px rgba(40, 38, 42, .12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-ink); text-underline-offset: 2px; }
a:hover { color: var(--brand-700); }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .6em; color: var(--graphite-900); }
h1 { font-size: 1.85rem; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.hl { color: var(--brand); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mt { margin-top: 1.5rem; }
.pt-0 { padding-top: 0 !important; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.3em;
  font: inherit; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  color: var(--white); background: var(--brand-600);
  border: 2px solid var(--brand-600); border-radius: 999px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: var(--brand-700); border-color: var(--brand-700); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: .8em 1.7em; }
.btn-sm { min-height: 40px; padding: .45em 1.1em; font-size: .95rem; }
.btn-outline { background: var(--white); color: var(--brand-ink); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-600); }
.btn-light { background: var(--white); color: var(--graphite-900); border-color: var(--white); }
.btn-light:hover { background: var(--brand-50); color: var(--graphite-950); border-color: var(--brand-50); }
.btn-dark { background: var(--graphite-900); border-color: var(--graphite-900); }
.btn-dark:hover { background: var(--graphite-950); border-color: var(--graphite-950); }
.btn-ghost { background: transparent; color: var(--graphite-900); border-color: var(--line); }
.btn-ghost:hover { background: var(--gray-bg); color: var(--graphite-950); border-color: var(--graphite); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover { background: #0e6b35; border-color: #0e6b35; }
.btn-wa { background: var(--green-wa); border-color: var(--green-wa); }
.btn-wa:hover { background: #178a45; border-color: #178a45; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #8f1c13; border-color: #8f1c13; }
.btn-block { width: 100%; }

/* ===== Cabeçalho ===== */
.site-header { background: var(--white); border-bottom: 3px solid var(--brand); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: var(--white); }
.brand-text { font-size: .88rem; line-height: 1.25; }
.brand-text strong { color: var(--graphite-900); font-size: 1rem; display: block; }
.brand-text span { color: var(--brand-ink); font-weight: 600; }
.nav-toggle { flex: none; width: 44px; height: 44px; border: 1.5px solid var(--brand); border-radius: 12px; background: var(--white); display: grid; place-content: center; gap: 5px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--graphite-900); border-radius: 2px; }
.nav { display: none; position: absolute; top: calc(100% + 3px); left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 8px 16px 16px; flex-direction: column; }
.nav.open { display: flex; }
.nav a { padding: 12px 4px; text-decoration: none; color: var(--graphite); font-weight: 500; border-bottom: 1px solid var(--gray-bg); }
.nav a:hover { color: var(--brand-ink); }
.nav a.btn { color: var(--white); margin-top: 10px; border-bottom: 0; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, #4a494d 0%, var(--graphite-950) 60%);
  color: var(--white); padding: 44px 0 52px;
}
.hero::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 380px; height: 380px;
  border: 46px solid var(--brand); border-radius: 50%; opacity: .25; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: 2rem; max-width: 720px; }
.hero .lead { font-size: 1.12rem; color: #e4e3e6; max-width: 620px; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .02em; color: var(--graphite-950); background: var(--brand); padding: 4px 14px; border-radius: 999px; margin-bottom: 14px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.hero .btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.75); }
.hero .btn-outline:hover { background: rgba(255,255,255,.1); color: var(--white); border-color: var(--white); }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .95rem; color: #e4e3e6; }
.hero-badges li::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* ===== Ofertas (graduação / pós) ===== */
.offers { display: grid; gap: 16px; margin-top: -28px; position: relative; z-index: 2; }
.offer { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-lg); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.offer:hover { transform: translateY(-2px); color: var(--ink); }
.offer-kind { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-ink); }
.offer-title { font-size: 1.3rem; font-weight: 700; color: var(--graphite-900); }
.offer-price { color: var(--muted); }
.offer-price strong { font-size: 1.5rem; color: var(--graphite-900); }
.offer-link { margin-top: 6px; font-weight: 700; color: var(--brand-ink); }

/* ===== Seções ===== */
.section { padding: 48px 0; }
.section-alt { background: var(--gray-bg); }
.section-title { text-align: center; margin-bottom: 1.2em; }
.section-title::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--brand); margin: .45em auto 0; }
.section-title.left::after { margin-left: 0; }
.section-title.left { text-align: left; }
.page-head { background: var(--gray-bg); border-bottom: 1px solid var(--line); padding: 32px 0 28px; margin-bottom: 28px; }
.page-head.compact { padding: 24px 0 18px; }
.page-head h1 { margin-bottom: .3em; }
.page-head h1::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 4px; background: var(--brand); margin-top: .35em; }
.cta { background: var(--brand); color: var(--graphite-950); }
.cta h2 { color: var(--graphite-950); }
.cta p { color: var(--graphite-950); }

.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
.step-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--graphite-950); font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.step-card p { margin: 0; color: var(--muted); }

.about { display: grid; gap: 24px; align-items: center; justify-items: center; }
.about-photo img, .avatar-placeholder { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 5px solid var(--brand); box-shadow: var(--shadow); }
.avatar-placeholder { display: grid; place-items: center; background: var(--graphite-900); color: var(--white); font-size: 3rem; font-weight: 700; }
.about-name { color: var(--graphite-900); }
.about-name span { color: var(--brand-ink); font-weight: 600; }

.faq details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: var(--white); }
.faq details[open] { border-color: var(--brand); }
.faq summary { cursor: pointer; padding: 16px 44px 16px 18px; font-weight: 600; position: relative; list-style: none; min-height: 48px; color: var(--graphite-900); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.4rem; color: var(--brand-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* ===== Cursos ===== */
.filters { display: grid; gap: 12px; margin-bottom: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--brand); background: var(--white); color: var(--graphite-900); font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer; }
.chip:hover { background: var(--brand-50); }
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--graphite-950); font-weight: 700; }
.course-grid { display: grid; gap: 16px; }
.course-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.course-card:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.course-card h2 { font-size: 1.15rem; margin-bottom: .4em; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand-100); color: #7a3a06; margin-bottom: 10px; align-self: flex-start; }
.tag-pos { background: var(--graphite-900); color: var(--white); }
.tag-tecnologo { background: #e5f5ec; color: #0e5a30; }
.tag-licenciatura { background: #ecebf7; color: #3b3577; }
.course-meta { list-style: none; padding: 0; margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.course-price { margin-top: auto; margin-bottom: 14px; font-size: .95rem; color: var(--muted); }
.course-price strong { font-size: 1.35rem; color: var(--graphite-900); }
.course-price .price-full { font-size: .88rem; }
.course-card p.desc { font-size: .95rem; color: var(--muted); }

/* ===== Formulários ===== */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend { font-size: 1.3rem; font-weight: 700; color: var(--graphite-900); margin-bottom: 14px; padding: 0; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--field); border-radius: 10px;
  appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23e8701a' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); outline: 3px solid rgba(247, 150, 51, .3); outline-offset: 0; }
.invalid input, .invalid select, input.invalid, select.invalid { border-color: var(--red); }
.error { color: var(--red); font-size: .9rem; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
.form-error { margin: 12px 0 0; font-weight: 600; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.hint:empty { display: none; }
.notice { background: var(--brand-50); border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: 6px; color: var(--ink); }
.grid-2 { display: grid; gap: 0 16px; }
.radio-group { display: grid; gap: 10px; }
.radio-option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: 10px; cursor: pointer; font-weight: 500; }
.radio-option:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.radio-option input, .check input { width: 22px; height: 22px; accent-color: var(--brand-600); flex: none; margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--brand); background: var(--brand-50); border-radius: 10px; cursor: pointer; font-weight: 600; margin-top: 16px; }
.check input { margin-top: 2px; }

.progress-wrap { margin-bottom: 16px; }
.progress-labels { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; gap: 8px; }
.progress { height: 10px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 20%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.progress-steps { display: none; list-style: none; padding: 0; margin: 8px 0 0; grid-template-columns: repeat(5, 1fr); font-size: .82rem; color: var(--muted); text-align: center; }
.progress-steps.steps-3 { grid-template-columns: repeat(3, 1fr); }
.progress-steps li.done, .progress-steps li.current { color: var(--graphite-900); font-weight: 700; }

.form-nav { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 20px; }
.form-nav .btn { width: 100%; }

.summary { display: grid; gap: 12px; margin-bottom: 20px; }
.summary-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.summary-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.summary-head h4 { margin: 0; color: var(--graphite-900); font-size: 1rem; }
.summary-edit { background: none; border: 0; color: var(--brand-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 6px; min-height: 40px; }
.summary dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px 12px; font-size: .95rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0 0 6px; font-weight: 500; overflow-wrap: anywhere; }
.term-title { margin-top: 8px; }
.term-box { max-height: 260px; overflow-y: auto; background: var(--gray-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: .97rem; white-space: pre-line; }
.term-box.static { max-height: none; }

.success-card { text-align: center; padding: 32px 20px; border-top: 5px solid var(--brand); }
.success-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); margin-bottom: 12px; }
.protocol { font-size: 1.25rem; background: var(--gray-bg); border: 1px dashed var(--brand); border-radius: 10px; padding: 12px; }
.protocol strong { color: var(--graphite-900); letter-spacing: .03em; }

.prose h2 { font-size: 1.2rem; margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }

/* ===== Rodapé ===== */
.site-footer { background: var(--graphite-950); color: #d2d0d4; padding: 36px 0 96px; border-top: 4px solid var(--brand); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--brand); }
.footer-grid { display: grid; gap: 22px; }
.footer-brand { color: var(--white); font-size: 1.05rem; }
.footer-note { font-size: .92rem; }
.footer-title { font-size: 1rem; color: var(--brand); margin-bottom: .5em; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 8px; }
.footer-list button { background: none; border: 0; padding: 0; font: inherit; color: var(--white); text-decoration: underline; cursor: pointer; }
.footer-list button:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 16px; font-size: .88rem; }

.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: var(--green-wa); color: var(--white); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.wa-float:hover { background: #178a45; color: var(--white); }

/* ===== Aviso de cookies ===== */
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px; display: grid; gap: 12px; max-width: 720px; margin: 0 auto; }
.cookie-bar p { margin: 0; font-size: .93rem; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions .btn { flex: 1 1 140px; }

/* ===== Telas maiores ===== */
@media (min-width: 640px) {
  h1 { font-size: 2.2rem; }
  .hero h1 { font-size: 2.6rem; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .offers { grid-template-columns: 1fr 1fr; }
  .card { padding: 28px; }
  .form-nav { flex-direction: row; justify-content: flex-end; }
  .form-nav .btn { width: auto; }
  .form-nav #btn-voltar { margin-right: auto; }
  .progress-steps { display: grid; }
  .summary dl { grid-template-columns: 190px 1fr; }
  .summary dd { margin: 0 0 4px; }
  .filters { grid-template-columns: minmax(240px, 1fr) auto; align-items: center; }
  .cookie-bar { grid-template-columns: 1fr auto; align-items: center; }
  .cookie-actions .btn { flex: none; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 4px; padding: 0; border: 0; box-shadow: none; background: none; }
  .nav a { border: 0; padding: 8px 12px; }
  .nav a.btn { margin: 0 0 0 8px; }
  .brand-text { font-size: .92rem; }
  .hero { padding: 76px 0 96px; }
  .hero::after { right: -60px; bottom: -200px; width: 520px; height: 520px; border-width: 64px; opacity: .95; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .about { grid-template-columns: 220px 1fr; justify-items: start; }
  .about-photo img, .avatar-placeholder { width: 200px; height: 200px; }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .site-footer { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
