/* =========================================================
   PREFEITURA DE SÃO PEDRO DO PIAUÍ — CAPACITAÇÃO 2025
   Tema customizado sobre Bootstrap 5
   Paleta extraída da logomarca municipal
   ========================================================= */

:root {
  --sp-laranja: #ef7622;
  --sp-laranja-claro: #f7a03c;
  --sp-verde: #2aa87d;
  --sp-verde-claro: #4cc79a;
  --sp-azul: #1b4f8a;
  --sp-azul-escuro: #123963;
  --sp-azul-claro: #2e86c1;
  --sp-rosa: #d967a8;
  --sp-amarelo: #f4b731;

  --sp-texto: #17253a;
  --sp-texto-suave: #5b6b80;
  --sp-borda: #e4e9f0;
  --sp-fundo: #f6f8fb;

  --sp-gradiente: linear-gradient(120deg, var(--sp-laranja) 0%, var(--sp-verde) 50%, var(--sp-azul) 100%);
  --sp-sombra-sm: 0 2px 10px rgba(23, 37, 58, .06);
  --sp-sombra-md: 0 10px 30px rgba(23, 37, 58, .10);
  --sp-sombra-lg: 0 20px 50px rgba(23, 37, 58, .16);

  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html, body { overflow-x: hidden; max-width: 100%; }

body {
  font-family: var(--bs-body-font-family);
  color: var(--sp-texto);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .fw-title {
  font-weight: 800;
  letter-spacing: -.02em;
}

.texto-suave { color: var(--sp-texto-suave); }
.bg-suave { background-color: var(--sp-fundo); }

/* ---------- Faixa superior de contato ---------- */
.faixa-topo {
  background: var(--sp-azul-escuro);
  color: rgba(255, 255, 255, .85);
  font-size: .82rem;
  padding: .5rem 0;
}
.faixa-topo a { color: #fff; text-decoration: none; }
.faixa-topo a:hover { text-decoration: underline; }

/* ---------- Navbar ---------- */
.navbar-sp {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--sp-borda);
  transition: box-shadow .25s ease;
}
.navbar-sp.rolou { box-shadow: var(--sp-sombra-md); }
.navbar-sp .navbar-brand img { height: 88px; width: auto; }
.navbar-sp .nav-link {
  font-weight: 600;
  color: var(--sp-texto);
  padding: .5rem .9rem !important;
  border-radius: 8px;
}
.navbar-sp .nav-link:hover,
.navbar-sp .nav-link.ativo { color: var(--sp-azul); background: rgba(27, 79, 138, .07); }

/* ---------- Botões ---------- */
.btn-sp {
  background: var(--sp-azul);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  padding: .7rem 1.5rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-sp:hover {
  background: var(--sp-azul-escuro);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(27, 79, 138, .32);
}
.btn-laranja {
  background: var(--sp-laranja);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  padding: .7rem 1.5rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-laranja:hover {
  background: #d9651a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(239, 118, 34, .38);
}
.btn-contorno-sp {
  border: 2px solid var(--sp-azul);
  color: var(--sp-azul);
  background: transparent;
  font-weight: 700;
  border-radius: 10px;
  padding: .62rem 1.4rem;
  transition: all .18s ease;
}
.btn-contorno-sp:hover { background: var(--sp-azul); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--sp-azul-escuro);
  color: #fff;
  overflow: hidden;
  padding: 5.5rem 0 6.5rem;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 12% 8%, rgba(239, 118, 34, .55), transparent 60%),
    radial-gradient(760px 460px at 88% 22%, rgba(42, 168, 125, .5), transparent 62%),
    radial-gradient(700px 500px at 55% 100%, rgba(46, 134, 193, .45), transparent 60%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 45%, #000 25%, transparent 75%);
}
.hero > .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08; }
.hero .destaque {
  background: linear-gradient(90deg, var(--sp-amarelo), var(--sp-laranja-claro));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.selo-hero {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.hero-stat {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  padding: 1.05rem 1rem;
  backdrop-filter: blur(6px);
}
.hero-stat .valor { font-size: 1.85rem; font-weight: 800; line-height: 1; }
.hero-stat .rotulo {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .82;
  margin-top: .35rem;
}

/* Onda decorativa entre seções */
.onda { display: block; width: 100%; height: auto; margin-top: -1px; }

/* ---------- Cards de curso ---------- */
.card-curso {
  border: 1px solid var(--sp-borda);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-curso:hover {
  transform: translateY(-6px);
  box-shadow: var(--sp-sombra-lg);
  border-color: transparent;
}
.capa {
  position: relative;
  overflow: hidden;
  background: var(--sp-gradiente);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-curso .capa { height: 190px; }
/* A imagem preenche toda a capa, em qualquer proporção de arquivo */
.capa img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease;
}
.card-curso:hover .capa img { transform: scale(1.07); }
.capa .icone-fallback {
  font-size: 3.6rem;
  color: rgba(255, 255, 255, .92);
}
.capa.cor-laranja  { background: linear-gradient(135deg, #ef7622, #f7a03c); }
.capa.cor-verde    { background: linear-gradient(135deg, #2aa87d, #4cc79a); }
.capa.cor-azul     { background: linear-gradient(135deg, #1b4f8a, #2e86c1); }
.capa.cor-roxo     { background: linear-gradient(135deg, #7b4bb7, #d967a8); }
.capa.cor-vermelho { background: linear-gradient(135deg, #c0392b, #e8593f); }
.capa.cor-cinza    { background: linear-gradient(135deg, #34495e, #5d7285); }

.selo-carga {
  position: absolute;
  top: .85rem;
  left: .85rem;
  background: rgba(255, 255, 255, .95);
  color: var(--sp-azul);
  font-weight: 800;
  font-size: .78rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  box-shadow: var(--sp-sombra-sm);
  z-index: 2;
}
.selo-vagas {
  position: absolute;
  top: .85rem;
  right: .85rem;
  background: rgba(23, 37, 58, .72);
  color: #fff;
  font-weight: 700;
  font-size: .72rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.card-curso .card-body { padding: 1.25rem 1.3rem 1.4rem; }
.card-curso .card-title { font-size: 1.08rem; font-weight: 800; line-height: 1.3; }
.card-curso .resumo {
  font-size: .89rem;
  color: var(--sp-texto-suave);
  line-height: 1.55;
  min-height: 4.2rem;
}
.meta-curso {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .9rem 0 1.1rem;
}
.meta-curso span {
  font-size: .74rem;
  font-weight: 600;
  color: var(--sp-texto-suave);
  background: var(--sp-fundo);
  border: 1px solid var(--sp-borda);
  border-radius: 8px;
  padding: .28rem .6rem;
}

/* ---------- Filtros ---------- */
.filtro-btn {
  border: 1px solid var(--sp-borda);
  background: #fff;
  color: var(--sp-texto-suave);
  font-weight: 700;
  font-size: .88rem;
  border-radius: 999px;
  padding: .5rem 1.15rem;
  transition: all .18s ease;
}
.filtro-btn:hover { border-color: var(--sp-azul); color: var(--sp-azul); }
.filtro-btn.ativo {
  background: var(--sp-azul);
  border-color: var(--sp-azul);
  color: #fff;
  box-shadow: 0 6px 18px rgba(27, 79, 138, .25);
}

/* ---------- Seções ---------- */
.rotulo-secao {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sp-laranja);
  margin-bottom: .6rem;
}
.titulo-secao { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

/* ---------- Cards de benefício ---------- */
.card-info {
  border: 1px solid var(--sp-borda);
  border-radius: 16px;
  padding: 1.6rem 1.4rem;
  height: 100%;
  background: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-info:hover { transform: translateY(-4px); box-shadow: var(--sp-sombra-md); }
.card-info .icone {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}
.ic-laranja { background: linear-gradient(135deg, #ef7622, #f7a03c); }
.ic-verde   { background: linear-gradient(135deg, #2aa87d, #4cc79a); }
.ic-azul    { background: linear-gradient(135deg, #1b4f8a, #2e86c1); }
.ic-rosa    { background: linear-gradient(135deg, #d967a8, #f7a03c); }

/* ---------- Página do curso ---------- */
.hero-curso {
  position: relative;
  color: #fff;
  padding: 4.5rem 0 5rem;
  background: var(--sp-azul-escuro);
  overflow: hidden;
}
.hero-curso::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 400px at 20% 10%, rgba(239, 118, 34, .5), transparent 60%),
              radial-gradient(700px 420px at 85% 30%, rgba(42, 168, 125, .45), transparent 62%);
}
.hero-curso > .container { position: relative; z-index: 2; }
.hero-curso .breadcrumb a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.hero-curso .breadcrumb .breadcrumb-item.active { color: #fff; }
.hero-curso .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .5); }

/* ---------- Card do ministrante ---------- */
.card-ministrante {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--sp-borda);
  border-radius: 16px;
  padding: 1.5rem;
}
.card-ministrante .foto {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: var(--sp-sombra-md);
}
/* Sem foto: círculo com as iniciais */
.card-ministrante .iniciais {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--sp-gradiente);
  color: #fff;
  font-size: 2.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sp-sombra-md);
}
.card-ministrante .nome { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.card-ministrante .titulacao {
  font-size: .82rem;
  font-weight: 700;
  color: var(--sp-laranja);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .15rem;
}
.card-ministrante .curriculo {
  font-size: .93rem;
  color: var(--sp-texto-suave);
  line-height: 1.65;
  margin: .8rem 0 0;
}
.card-ministrante .a-definir {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--sp-texto-suave);
  background: var(--sp-fundo);
  border: 1px dashed var(--sp-borda);
  border-radius: 999px;
  padding: .3rem .8rem;
  margin-top: .5rem;
}

@media (max-width: 575.98px) {
  .card-ministrante { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- Blocos de destaque (objetivo / resultados) ---------- */
.bloco-destaque {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: rgba(27, 79, 138, .05);
  border-left: 4px solid var(--sp-azul);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
}
.bloco-destaque i { font-size: 1.6rem; color: var(--sp-azul); flex-shrink: 0; margin-top: .1rem; }
.bloco-destaque p { font-size: 1rem; line-height: 1.7; color: var(--sp-texto); }
.bloco-destaque.verde { background: rgba(42, 168, 125, .07); border-left-color: var(--sp-verde); }
.bloco-destaque.verde i { color: var(--sp-verde); }

/* Capa grande da página de curso */
.capa-destaque {
  height: clamp(240px, 34vw, 380px);
  border-radius: 18px;
  box-shadow: var(--sp-sombra-md);
}

.card-inscricao-fixo {
  border: 1px solid var(--sp-borda);
  border-radius: 18px;
  box-shadow: var(--sp-sombra-lg);
  background: #fff;
  overflow: hidden;
}
.card-inscricao-fixo .topo {
  background: var(--sp-gradiente);
  color: #fff;
  padding: 1.4rem;
  text-align: center;
}
@media (min-width: 992px) {
  .coluna-fixa { position: sticky; top: 100px; }
}

.lista-conteudo { list-style: none; padding: 0; margin: 0; counter-reset: item; }
.lista-conteudo li {
  position: relative;
  padding: .85rem 0 .85rem 3rem;
  border-bottom: 1px dashed var(--sp-borda);
  color: var(--sp-texto);
  font-size: .96rem;
}
.lista-conteudo li:last-child { border-bottom: none; }
.lista-conteudo li::before {
  counter-increment: item;
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .8rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--sp-fundo);
  color: var(--sp-azul);
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-info {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--sp-borda);
}
.item-info:last-child { border-bottom: none; }
.item-info i { color: var(--sp-laranja); font-size: 1.15rem; margin-top: .1rem; }
.item-info .rotulo { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sp-texto-suave); font-weight: 700; }
.item-info .valor { font-weight: 700; }

/* ---------- Formulário de inscrição ---------- */
.passos { display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.passo { display: flex; align-items: center; gap: .55rem; }
.passo .bola {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sp-fundo);
  border: 2px solid var(--sp-borda);
  color: var(--sp-texto-suave);
  font-weight: 800;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
}
.passo.ativo .bola { background: var(--sp-azul); border-color: var(--sp-azul); color: #fff; }
.passo.concluido .bola { background: var(--sp-verde); border-color: var(--sp-verde); color: #fff; }
.passo .rotulo { font-size: .84rem; font-weight: 700; color: var(--sp-texto-suave); }
.passo.ativo .rotulo { color: var(--sp-azul); }
.passo .traco { width: 42px; height: 2px; background: var(--sp-borda); }

.card-form {
  border: 1px solid var(--sp-borda);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--sp-sombra-md);
}
.form-label { font-weight: 700; font-size: .88rem; color: var(--sp-texto); }
.form-control, .form-select {
  border: 1.5px solid var(--sp-borda);
  border-radius: 10px;
  padding: .68rem .9rem;
  font-size: .95rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--sp-azul);
  box-shadow: 0 0 0 .2rem rgba(27, 79, 138, .13);
}
.opcao-curso {
  border: 1.5px solid var(--sp-borda);
  border-radius: 12px;
  padding: .9rem 1rem;
  cursor: pointer;
  transition: all .18s ease;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  height: 100%;
}
.opcao-curso:hover { border-color: var(--sp-azul-claro); background: var(--sp-fundo); }
.opcao-curso.marcada {
  border-color: var(--sp-azul);
  background: rgba(27, 79, 138, .05);
  box-shadow: 0 0 0 1px var(--sp-azul) inset;
}
.opcao-curso .form-check-input { margin-top: .2rem; flex-shrink: 0; }
.opcao-curso .form-check-input:checked {
  background-color: var(--sp-azul);
  border-color: var(--sp-azul);
}
.opcao-curso .nome { font-weight: 700; font-size: .93rem; line-height: 1.3; }
.opcao-curso .detalhe { font-size: .78rem; color: var(--sp-texto-suave); }

.resumo-lateral {
  background: var(--sp-fundo);
  border: 1px solid var(--sp-borda);
  border-radius: 16px;
  padding: 1.4rem;
}
.linha-resumo {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  font-size: .9rem;
  border-bottom: 1px dashed var(--sp-borda);
}
.linha-resumo:last-of-type { border-bottom: none; }

/* ---------- Rodapé ---------- */
.rodape {
  background: var(--sp-azul-escuro);
  color: rgba(255, 255, 255, .78);
  padding: 3.5rem 0 0;
}
.rodape h5 { color: #fff; font-size: 1rem; font-weight: 800; margin-bottom: 1.1rem; }
.rodape a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .18s ease; }
.rodape a:hover { color: var(--sp-laranja-claro); }
.rodape .logo-rodape {
  height: 82px;
  background: #fff;
  padding: .5rem .8rem;
  border-radius: 10px;
}
.rodape-base {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 2.5rem;
  padding: 1.3rem 0;
  font-size: .84rem;
}
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 1.1rem;
  transition: all .2s ease;
}
.social-btn:hover { background: var(--sp-laranja); transform: translateY(-3px); }

/* Faixa da realização */
.faixa-realizacao {
  background: var(--sp-gradiente);
  color: #fff;
  padding: 2.6rem 0;
}

/* ---------- Animação de entrada ---------- */
.revelar { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.revelar.visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .revelar { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Ajustes mobile ---------- */
@media (max-width: 575.98px) {
  .navbar-sp .navbar-brand img { height: 62px; }
  .hero { padding: 3.5rem 0 4.5rem; }
  .hero-stat .valor { font-size: 1.5rem; }
  .passo .rotulo { display: none; }
  .passo .traco { width: 26px; }
}
