/* Páginas públicas — identidade do Manual da Marca IF: verde #2f9e41, vermelho #cd191e, Open Sans */
:root {
  --if-green: #2f9e41;
  --if-green-d: #1e7a2f;
  --if-green-dd: #135a21;
  --if-red: #cd191e;
  --ink: #18201a;
  --muted: #5d6a60;
  --line: #e4e9e5;
  --bg-alt: #f4f7f4;
  --course: #2f9e41;
}
body.pub { font-family: 'Open Sans', system-ui, sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
.pub h1, .pub h2, .pub h3 { font-weight: 800; letter-spacing: -.01em; }
a { color: var(--if-green-d); }

/* Assinatura IF */
.if-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); line-height: 1.05; }
.if-brand-t { display: flex; flex-direction: column; }
.if-brand-t b { font-weight: 800; font-size: 17px; letter-spacing: .01em; }
.if-brand-t span { font-weight: 400; font-size: 13px; }
.if-brand-t small { font-weight: 600; font-size: 11px; color: var(--if-green-d); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.if-brand-branco, .if-brand-branco .if-brand-t small { color: #fff; }

.pub-top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 0; }
.pub-link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 10px; }
.pub-link:hover { color: var(--if-green-d); }

/* Heróis */
.portal-hero, .c-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(125deg, var(--if-green-dd) 0%, var(--if-green-d) 45%, var(--if-green) 100%); padding: 72px 0 64px; }
.c-hero { padding: 64px 0 56px; }
.mods { position: absolute; right: -60px; top: 50%; transform: translateY(-50%) rotate(-8deg); opacity: .09; pointer-events: none; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 99px; margin-bottom: 16px; }
.portal-hero h1, .c-hero h1 { font-size: clamp(30px, 4.6vw, 52px); max-width: 900px; line-height: 1.08; margin-bottom: 14px; }
.portal-hero .lead, .c-hero .lead { max-width: 760px; font-size: clamp(16px, 1.6vw, 19px); opacity: .92; font-weight: 400; }
.facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts > div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 12px 18px; min-width: 120px; }
.facts b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.facts .wide b { font-size: 16px; padding-top: 5px; }
.facts span { font-size: 12.5px; opacity: .85; }

/* Navegação do curso */
.c-nav { position: sticky; top: 63px; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.c-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.c-nav a { white-space: nowrap; padding: 14px 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.c-nav a:hover { color: var(--if-green-d); border-color: var(--if-green); }
html { scroll-padding-top: 120px; scroll-behavior: smooth; }

.sec { padding: 64px 0; }
.sec-alt { background: var(--bg-alt); }
.sec-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 28px; }
.sec-h h2 { font-size: clamp(24px, 3vw, 34px); margin: 0; position: relative; padding-left: 18px; }
.sec-h h2::before { content: ''; position: absolute; left: 0; top: .18em; bottom: .18em; width: 6px; border-radius: 3px; background: var(--if-green); }

/* Destaques */
.feat { height: 100%; border: 1px solid var(--line); border-radius: 18px; padding: 28px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.feat h2 { font-size: 22px; color: var(--if-green-d); }
.clamp { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.more { font-weight: 700; color: var(--if-green-d); text-decoration: none; }
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.nums > div { border-radius: 16px; padding: 20px 22px; background: var(--bg-alt); border: 1px solid var(--line); }
.nums > div.tec { background: #eaf6ec; border-color: #cbe8d0; }
.nums b { display: block; font-size: 28px; font-weight: 800; color: var(--if-green-dd); }
.nums span { font-weight: 700; font-size: 14px; display: block; }
.nums small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }

/* Texto rico */
.rt p { line-height: 1.7; margin-bottom: .7em; }
.rt ul { padding-left: 1.2em; margin-bottom: .8em; }
.rt li { margin-bottom: .35em; line-height: 1.6; }
.rt li::marker { color: var(--if-green); }
.rt-l1 { font-weight: 700; margin: .9em 0 .3em; }
.rt-l2 { padding-left: 1.4em; margin: .2em 0; }
.rt-l3 { padding-left: 2.8em; margin: .15em 0; color: #333; }
.rt-n { display: inline-block; min-width: 1.8em; color: var(--if-green-d); font-weight: 700; }

/* Matriz */
.matrix { display: grid; grid-template-columns: repeat(var(--n), minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.mcol { display: flex; flex-direction: column; gap: 8px; }
.mhead { background: var(--if-green-dd); color: #fff; border-radius: 14px; padding: 12px 14px; position: sticky; top: 0; }
.mhead b { display: block; font-size: 18px; }
.mhead span { font-size: 12px; opacity: .8; }
.mcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 4px solid #b8c3ba; border-radius: 10px; padding: 9px 11px; transition: transform .12s, box-shadow .12s; }
.mcard.tec { border-left-color: var(--if-green); background: #f7fcf8; }
.mcard:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(19,90,33,.12); color: var(--ink); }
.mcard .nm { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.mcard .meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); }
.mcard .sem { display: inline-flex; gap: 3px; }
.mcard .sem i { font-style: normal; width: 20px; text-align: center; border-radius: 4px; background: #eef1ee; color: #9aa59c; font-weight: 700; }
.mcard .sem i.on { background: #dff0e2; color: var(--if-green-dd); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.lg { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 14px; height: 14px; border-radius: 4px; background: #b8c3ba; }
.lg.tec::before { background: var(--if-green); }

/* Lista de disciplinas */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters .form-control { min-width: 260px; border-radius: 99px; }
.filters .form-select { width: auto; border-radius: 99px; }
.slist { display: grid; gap: 12px; }
.sitem { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; }
.sh { display: flex; gap: 14px; align-items: flex-start; }
.yr { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: #eaf6ec; color: var(--if-green-dd); }
.sitem h3 { font-size: 17px; margin: 0 0 4px; }
.sitem h3 a { color: var(--ink); text-decoration: none; }
.sitem h3 a:hover { color: var(--if-green-d); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 11.5px; color: var(--muted); background: var(--bg-alt); border-radius: 99px; padding: 2px 9px; }
.tags .nuc.tec { background: #dff0e2; color: var(--if-green-dd); font-weight: 700; }
.sitem .em { margin: 10px 0 0 54px; color: #3c463e; line-height: 1.6; font-size: 14.5px; }

/* Prática */
.pp { height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.pp.req { border-left: 4px solid var(--if-green); }
.pp.opt { border-left: 4px solid #c7cfc8; }
.pp span { font-size: 13px; color: var(--muted); }

/* PPC */
.ppc .accordion-item { border-radius: 12px !important; overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); }
.ppc .accordion-button { font-weight: 700; font-size: 16px; }
.ppc .accordion-button:not(.collapsed) { background: #eef7f0; color: var(--if-green-dd); box-shadow: none; }
.ppc .num { display: inline-block; min-width: 46px; color: var(--if-green); font-weight: 800; }

/* Portal */
.portal-list { padding: 48px 12px 72px; margin-top: -40px; position: relative; }
.pcard { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border-radius: 20px; padding: 26px; border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(19,90,33,.10); transition: transform .15s, box-shadow .15s; border-top: 6px solid var(--course); }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(19,90,33,.16); color: var(--ink); }
.pcard-top { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--course); }
.pcard h2 { font-size: 24px; margin: 10px 0; }
.pcard p { color: var(--muted); flex-grow: 1; }
.pcard-facts { display: flex; gap: 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.pcard-facts b { color: var(--ink); }

/* Disciplina */
.d-hero { background: linear-gradient(120deg, #2d3a2f, #46554a); color: #fff; padding: 44px 0 36px; }
.d-hero.tec { background: linear-gradient(120deg, var(--if-green-dd), var(--if-green)); }
.d-hero h1 { font-size: clamp(26px, 3.6vw, 42px); margin: 10px 0 16px; }
.crumb { font-size: 13px; display: flex; gap: 8px; align-items: center; opacity: .9; }
.crumb a { color: #fff; text-decoration: none; }
.crumb i { font-size: 10px; opacity: .7; }
.dfacts { display: flex; flex-wrap: wrap; gap: 8px; }
.dfacts span { background: rgba(255,255,255,.14); border-radius: 99px; padding: 5px 12px; font-size: 13px; }
.dfacts i { margin-right: 6px; opacity: .85; }
.dmain { padding: 40px 12px 64px; }
.ementa { background: #eef7f0; border-radius: 16px; padding: 22px 24px; margin-bottom: 28px; border-left: 5px solid var(--if-green); }
.ementa h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--if-green-dd); }
.ementa p { font-size: 17px; line-height: 1.7; margin: 0; }
.dpart { margin-bottom: 28px; }
.dpart h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 14px; }
.dpart h2 i { color: var(--if-green); }
.bib { background: var(--bg-alt); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.bib h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--if-green-dd); }
.bib ul { list-style: none; padding: 0; margin: 0; }
.bib li { font-size: 13.5px; line-height: 1.5; padding: 8px 0; border-top: 1px solid var(--line); }
.bib li:first-child { border-top: 0; }
.pn { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; }
.pn a { text-decoration: none; color: var(--ink); font-weight: 700; display: flex; flex-direction: column; max-width: 48%; }
.pn small { color: var(--muted); font-weight: 400; }

.pub-foot { background: var(--if-green-dd); color: #fff; padding: 32px 0; }
.pub-foot .op { opacity: .7; font-size: 12px; margin-top: 4px; }

@media (max-width: 767px) {
  .c-nav { top: 59px; }
  .sitem .em { margin-left: 0; }
  .filters .form-control { min-width: 0; width: 100%; }
  .mods { right: -180px; opacity: .07; }
  .portal-hero, .c-hero { padding: 44px 0 40px; }
}
@media print {
  .pub-top, .c-nav, .pub-foot, .filters { display: none !important; }
  .d-hero, .c-hero { background: none !important; color: #000 !important; padding: 0 0 12px; }
  .dfacts span { background: none; border: 1px solid #ccc; color: #000; }
  .crumb a { color: #000; }
  .clamp { max-height: none; -webkit-mask-image: none; mask-image: none; }
}
