/* =========================================
   TOKENS / RESET
========================================= */
:root{
  --bg: #eef1f4;
  --surface: #ffffff;
  --text: #1f2a2e;
  --muted: #6b7680;

  --border: rgba(30, 41, 59, .10);
  --border-2: rgba(30, 41, 59, .08);

  --shadow-lg: 0 18px 40px rgba(16, 24, 40, .14);
  --shadow-md: 0 12px 28px rgba(16, 24, 40, .12);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --pill: 999px;

  --green-900: #144b2a;
  --green-800: #1f5e35;
  --green-700: #2f6e44;

  --sidebar-w: 330px;
  --container: 1100px;

  --focus: 0 0 0 3px rgba(59, 130, 246, .35);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 800px at 55% 0%, #f7f8fb 0%, var(--bg) 55%, #e7ebf0 100%);
  color: var(--text);
  overflow-x: hidden;
}

a{ color: var(--green-700); text-decoration: none; }
a:hover{ text-decoration: underline; }

.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* =========================================
   LAYOUT BASE
========================================= */
.layout{
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

.sidebar{
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 10% 40%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(600px 520px at 45% 60%, rgba(255, 223, 120, .08) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(700px 600px at 10% 90%, rgba(125, 255, 190, .10) 0%, rgba(255,255,255,0) 70%),
    linear-gradient(160deg, #0b4f29 0%, #0f5a2f 25%, #0a3d22 55%, #073019 100%);
}

.sidebar::before{
  content:"";
  position:absolute;
  inset:-120px -220px -120px -220px;
  background:
    radial-gradient(240px 180px at 20% 30%, rgba(147, 255, 198, .18) 0%, rgba(147,255,198,0) 68%),
    radial-gradient(300px 220px at 38% 52%, rgba(122, 255, 185, .14) 0%, rgba(122,255,185,0) 70%),
    radial-gradient(260px 190px at 18% 78%, rgba(255, 220, 120, .11) 0%, rgba(255,220,120,0) 70%),
    radial-gradient(380px 260px at 58% 70%, rgba(120, 255, 180, .12) 0%, rgba(120,255,180,0) 75%),
    radial-gradient(520px 360px at 60% 25%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 70%),
    linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 60%);
  opacity: .95;
}

.sidebar::after{
  content:"";
  position:absolute;
  inset:-40px -120px -40px 40px;
  background: linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.75) 18%, rgba(255,255,255,0) 55%);
  transform: skewX(-14deg);
  transform-origin: left top;
  pointer-events: none;
}

.sidebar__brand{
  position: relative;
  z-index: 2;
  padding: 24px 14px 14px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 260px;
}

.sidebar__brandLink{ display: block; width: 100%; }

.sidebar__logo{
  width: min(300px, 92%);
  height: 220px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.30));
}

/* MAIN */
.main{
  min-width: 0;
  background:
    radial-gradient(900px 500px at 70% 10%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 30%),
    transparent;
}

/* =========================================
   TOPBAR
========================================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px 22px;
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30,41,59,.10);
}

.topbar__inner{
  max-width: calc(var(--container) + 80px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.search{
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}
.search__icon{
  position:absolute;
  left: 18px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: .55;
  background:
    radial-gradient(circle at 45% 45%, transparent 55%, rgba(0,0,0,.55) 56% 66%, transparent 67%),
    linear-gradient(45deg, rgba(0,0,0,.55) 0 45%, transparent 46% 100%);
  border-radius: 50%;
}
.search__input{
  width: 100%;
  height: 44px;
  padding: 0 18px 0 48px;
  border-radius: var(--pill);
  border: 1px solid rgba(30,41,59,.10);
  background: rgba(255,255,255,.80);
  box-shadow: 0 10px 24px rgba(16,24,40,.08);
  outline: none;
  font-size: 15px;
  color: var(--text);
}
.search__input:focus{
  box-shadow: 0 10px 24px rgba(16,24,40,.10), var(--focus);
  border-color: rgba(59,130,246,.35);
}

.topbar__right{
  display: flex;
  align-items: center;
  gap: 14px;
}

.user__avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(12px 12px at 35% 35%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 65%),
    linear-gradient(180deg, #2a2f35, #151a1f);
  box-shadow: 0 12px 22px rgba(16,24,40,.18);
  border: 2px solid rgba(255,255,255,.9);
}

/* Botões (custom) */
.btnx{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--pill);
  border: 0;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  line-height: 1;
  outline: none;
}
.btnx:focus-visible{ box-shadow: var(--focus); }

.btnx--login{
  height: 38px;
  padding: 0 18px;
  background: linear-gradient(180deg, #2f6e44, #245a36);
  color: #fff;
  box-shadow: 0 14px 26px rgba(16,24,40,.16);
  border: 1px solid rgba(255,255,255,.14);
}

.btnx__icon{
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 35%, #fff 0 40%, transparent 41% 100%),
    linear-gradient(#fff,#fff);
  opacity: .9;
  clip-path: polygon(50% 8%, 68% 20%, 68% 38%, 50% 48%, 32% 38%, 32% 20%);
}

/* =========================================
   PAGE / HERO
========================================= */
.page{ padding: 26px 22px 46px; }

.hero{
  max-width: var(--container);
  margin: 0 auto;
}

/* grid base */
.hero__grid{
  display: grid;
  gap: 22px;
  align-items: start;
}

/* duas colunas no desktop */
.hero__grid--two{
  grid-template-columns: 1.05fr .95fr;
}

/* no mobile vira 1 coluna */
@media (max-width: 980px){
  .hero__grid--two{ grid-template-columns: 1fr; }
}

.card--intro{
  padding: 22px 22px 18px;
}

.hero__title{
  margin: 10px 0 8px;
  font-size: 46px;
  letter-spacing: -.6px;
  color: #20312b;
}

.hero__subtitle{
  margin: 0 0 18px;
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}

.hero__bullets{
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}

.hero__bullets li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hero__bullets li::before{
  content: "✓";
  flex: 0 0 auto;
  font-weight: 900;
  color: var(--green-700);
  margin-top: 1px;
}

.hero__cta{
  margin-top: 16px;
}

.card{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.card--video{
  padding: 11px 11px 9px;
}

.card__title{
  margin: 0 0 7px;
  font-size: 26px;
  letter-spacing: -.2px;
}

.card__subtitle{
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

/* CTA principal */
.btnx--primary{
  height: 54px;
  width: 100%;
  border-radius: var(--pill);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(180deg, #3d7f50 0%, #2c6b41 55%, #255a36 100%);
  box-shadow: 0 18px 30px rgba(31, 94, 53, .28), 0 16px 30px rgba(16,24,40,.14);
  border: 1px solid rgba(255,255,255,.14);
}
.btnx--primary:hover{ filter: brightness(1.02); }

/* versões do modal */
.btnx--ghost{
  height: 46px;
  padding: 0 16px;
  border-radius: var(--pill);
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(30,41,59,.14);
  color: #2b3a34;
  box-shadow: 0 12px 22px rgba(16,24,40,.10);
}

.btnx--primarySmall{
  height: 46px;
  padding: 0 16px;
  border-radius: var(--pill);
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, #3d7f50 0%, #2c6b41 55%, #255a36 100%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 16px 26px rgba(31, 94, 53, .18), 0 12px 22px rgba(16,24,40,.12);
}

/* =========================================
   FEATURES (Bootstrap)
========================================= */
.cni-container{
  max-width: var(--container);
  padding-left: 0;
  padding-right: 0;
}

.cni-feature{
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cni-feature:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(16,24,40,.14);
}

.cni-ico{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(30,41,59,.08);
  box-shadow: 0 14px 26px rgba(16,24,40,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.35));
}
.cni-ico i{ font-size: 30px; line-height: 1; }

.cni-ico--green{
  background:
    radial-gradient(22px 22px at 30% 30%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(34,197,94,.22), rgba(16,185,129,.18));
}
.cni-ico--green i{ color: #1f7a4a; }

.cni-ico--blue{
  background:
    radial-gradient(22px 22px at 30% 30%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(59,130,246,.22), rgba(14,165,233,.18));
}
.cni-ico--blue i{ color: #2563eb; }

.cni-ico--amber{
  background:
    radial-gradient(22px 22px at 30% 30%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(245,158,11,.22), rgba(250,204,21,.18));
}
.cni-ico--amber i{ color: #b45309; }

/* =========================================
   MODAL
========================================= */
body.is-modal-open{ overflow: hidden; }

.modalx{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modalx.is-open{
  display: grid;
  place-items: center;
}
.modalx__overlay{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
}
.modalx__dialog{
  position: relative;
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 64px);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
  overflow: hidden;
  outline: none;
}
.modalx__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(30,41,59,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
}
.modalx__title{
  margin: 0;
  font-size: 22px;
  letter-spacing: -.2px;
}
.modalx__subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.35;
}
.modalx__close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(30,41,59,.10);
  background: rgba(255,255,255,.90);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(16,24,40,.10);
}
.modalx__close:focus-visible{ box-shadow: var(--focus); }
.modalx__close span{ font-size: 22px; line-height: 1; margin-top: -2px; color: #2b3a34; }

.modalx__body{
  padding: 16px 18px 18px;
  overflow: auto;
}

.modalx__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mfield{ display: grid; gap: 8px; }
.mfield--full{ grid-column: 1 / -1; }

.mlabel{
  font-size: 13px;
  color: #43524c;
  font-weight: 700;
  letter-spacing: .1px;
}

.req{ color: #d12c2c; margin-left: 2px; }

.minput{
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(30,41,59,.14);
  background: rgba(255,255,255,.92);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.minput:focus{
  border-color: rgba(59,130,246,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--focus);
}

.mselect{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(31,42,46,.65) 50%),
    linear-gradient(135deg, rgba(31,42,46,.65) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.modalx__actions{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(30,41,59,.10);
  display: grid;
  gap: 14px;
}

.mcheck{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: #52615a;
}
.mcheck__input{ position: absolute; opacity: 0; pointer-events: none; }
.mcheck__box{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  margin-top: 1px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(30,41,59,.18);
  box-shadow: 0 10px 18px rgba(16,24,40,.10);
  position: relative;
  flex: 0 0 auto;
}
.mcheck__input:checked + .mcheck__box{
  background: linear-gradient(180deg, #2f6e44, #245a36);
  border-color: rgba(255,255,255,.18);
}
.mcheck__input:checked + .mcheck__box::after{
  content:"";
  position:absolute;
  width: 10px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  top: 5px; left: 4px;
}
.mcheck__text a{ font-weight: 700; }

.modalx__buttons{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================
   RESPONSIVO
========================================= */
@media (max-width: 1100px){
  :root{ --sidebar-w: 290px; --container: 980px; }
  .hero__title{ font-size: 40px; }
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ min-height: 220px; }
  .sidebar::after{ inset: -50px -120px -50px -60px; transform: skewX(-12deg); }
  .sidebar__brand{ min-height: 200px; }
  .sidebar__logo{ width: min(260px, 92%); height: 170px; }

  .topbar__inner{ grid-template-columns: 1fr; }
  .search{ max-width: 720px; }

  .cni-container{ padding-left: 0; padding-right: 0; }
}

@media (max-width: 720px){
  .modalx__grid{ grid-template-columns: 1fr; }
  .mfield--full{ grid-column: auto; }
  .modalx__buttons{
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px){
  .page{ padding: 18px 14px 34px; }
  .topbar{ padding: 14px 14px; }
  .hero__title{ font-size: 34px; }
  .hero__subtitle{ font-size: 16px; }

  .card--video{ padding: 14px 14px 12px; }

  .sidebar__brand{ min-height: 170px; padding: 12px 10px 10px; }
  .sidebar__logo{ width: min(240px, 92%); height: 150px; }
}

/* =========================================
   YOUTUBE (controle de altura + responsivo)
========================================= */
.yt{
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(30,41,59,.10);
  box-shadow: 0 18px 34px rgba(16,24,40,.18);
  background: #000;

  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.yt__frame{
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

@supports (aspect-ratio: 9 / 16){
  .yt__frame{
    aspect-ratio: 9 / 16;
    max-height: 420px;
  }
}

@media (max-width: 520px){
  .yt{ max-width: 100%; }
  .yt__frame{ max-height: 520px; }
}

/* =========================================
   BLOCO: O que você verá ao entrar (GUIDE)
========================================= */
.card--guide{
  padding: 18px 18px 16px;
  max-width: var(--container);
  margin: 22px auto 0;
  grid-column: 1 / -1;
}

.guide__head{
  margin-bottom: 12px;
}

.guide__title{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -.2px;
}

.guide__subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  max-width: 760px;
}

.guide__grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.guide__item{
  display: flex;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(30,41,59,.10);
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 22px rgba(16,24,40,.08);
  align-items: flex-start;
}

.guide__icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(30,41,59,.08);
  box-shadow: 0 12px 22px rgba(16,24,40,.10);
  flex: 0 0 auto;
}

.guide__icon i{
  font-size: 20px;
  line-height: 1;
}

.guide__icon--green{
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(16,185,129,.14));
  color: #1f7a4a;
}

.guide__icon--blue{
  background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(14,165,233,.14));
  color: #2563eb;
}

.guide__icon--amber{
  background: linear-gradient(135deg, rgba(245,158,11,.20), rgba(250,204,21,.14));
  color: #b45309;
}

.guide__itemTitle{
  margin: 1px 0 4px;
  font-size: 15px;
  font-weight: 900;
  color: #1f2a2e;
}

.guide__itemText{
  margin: 0;
  font-size: 13.5px;
  color: #54625c;
  line-height: 1.45;
}

@media (max-width: 980px){
  .guide__grid{
    grid-template-columns: 1fr;
  }
  .card--guide{
    padding: 16px 16px 14px;
  }
}

/* === Cards compactos institucionais === */
.cards-compactos {
  margin-top: 16px;
}

.cards-compactos .card {
  padding: 16px 18px;
  min-height: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.cards-compactos .card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cards-compactos .card p {
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
  margin: 0;
}

.cards-compactos .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}
/* =========================================
   SCROLL APENAS NO CONTEÚDO (ÁREA AZUL)
   - Desktop: body não rola, só o .main__scroll
========================================= */

/* trava o scroll do body no desktop */
html, body{
  height: 100%;
}

body{
  overflow: hidden; /* <- o scroll do site some */
}

/* layout ocupa a tela toda */
.layout{
  height: 100vh;
  overflow: hidden;
}

/* sidebar e main ficam com altura de tela */
.sidebar{
  height: 100vh;
}

.main{
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* topbar fica fixa no topo do MAIN */
.topbar{
  flex: 0 0 auto;
}

/* somente esta área rola */
.main__scroll{
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0; /* importante pra flex + overflow funcionar */
  -webkit-overflow-scrolling: touch;
}

/* no mobile, volta o scroll normal pra evitar “scroll duplo” */
@media (max-width: 980px){
  body{ overflow: auto; }
  .layout{ height: auto; overflow: visible; }
  .sidebar{ height: auto; }
  .main{ height: auto; overflow: visible; display: block; }
  .main__scroll{ overflow: visible; }
}
