/*
Theme Name: Macroprocesso do Sistema - Completo
Theme URI: https://example.org/sigede-premium
Author: OpenAI
Description: Tema WordPress completo e instalável para o Macroprocesso do Sistema, com cinco módulos, Módulo IV unificado, ícones, etapas e edição pelo painel.
Version: 5.4.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: sigede-premium
License: GPL-2.0-or-later
*/

:root {
  --sp-primary: #082b68;
  --sp-secondary: #0e5ab8;
  --sp-accent: #ff7a00;
  --sp-surface: #ffffff;
  --sp-bg: #f5f8fc;
  --sp-text: #172033;
  --sp-muted: #667085;
  --sp-radius: 24px;
  --sp-shadow: 0 20px 55px rgba(8, 43, 104, .12);
  --sp-container: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sp-text);
  background: var(--sp-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.sp-container { width: min(calc(100% - 32px), var(--sp-container)); margin-inline: auto; }
.sp-skip-link { position: absolute; left: -9999px; }
.sp-skip-link:focus { left: 16px; top: 16px; z-index: 99999; background: #fff; padding: 12px 16px; border-radius: 10px; }

.sp-site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(8,43,104,.08);
}
.sp-header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sp-brand { display: flex; align-items: center; gap: 12px; font-weight: 900; color: var(--sp-primary); }
.sp-brand-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary)); box-shadow: 0 10px 25px rgba(8,43,104,.24); }
.sp-brand small { display: block; font-weight: 600; color: var(--sp-muted); font-size: 11px; letter-spacing: .04em; }
.sp-menu { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; }
.sp-menu a { font-weight: 750; color: #334155; }
.sp-menu a:hover { color: var(--sp-secondary); }
.sp-menu-toggle { display: none; border: 0; border-radius: 12px; background: var(--sp-primary); color: #fff; padding: 10px 12px; }

.sp-hero { position: relative; overflow: hidden; padding: 92px 0 72px; background: radial-gradient(circle at 90% 10%, rgba(14,90,184,.18), transparent 35%), linear-gradient(135deg, #f8fbff 0%, #edf4ff 100%); }
.sp-hero::after { content: ""; position: absolute; width: 500px; height: 500px; right: -230px; bottom: -300px; border: 70px solid rgba(255,122,0,.08); border-radius: 50%; }
.sp-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.sp-kicker { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 999px; color: var(--sp-primary); background: #fff; border: 1px solid rgba(8,43,104,.08); font-weight: 800; font-size: 13px; }
.sp-hero h1 { margin: 18px 0 16px; color: var(--sp-primary); font-size: clamp(42px, 7vw, 78px); line-height: .98; letter-spacing: -.045em; }
.sp-hero p { max-width: 680px; margin: 0; color: #4b5f7b; font-size: clamp(17px, 2.2vw, 22px); }
.sp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 14px; padding: 13px 18px; font-weight: 850; transition: transform .2s ease, box-shadow .2s ease; }
.sp-btn:hover { transform: translateY(-2px); }
.sp-btn-primary { color: #fff; background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary)); box-shadow: 0 12px 26px rgba(8,43,104,.22); }
.sp-btn-light { background: #fff; color: var(--sp-primary); border: 1px solid rgba(8,43,104,.1); }
.sp-hero-panel { position: relative; z-index: 2; padding: 22px; border-radius: 30px; background: rgba(255,255,255,.82); border: 1px solid #fff; box-shadow: var(--sp-shadow); }
.sp-mini-flow { display: grid; gap: 12px; }
.sp-mini-step { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; background: #fff; padding: 12px; border-radius: 16px; box-shadow: 0 10px 30px rgba(8,43,104,.07); }
.sp-mini-step strong { color: var(--sp-primary); }
.sp-mini-step span { color: var(--sp-muted); font-size: 13px; }
.sp-mini-number { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 900; background: var(--card-color, var(--sp-primary)); }

.sp-section { padding: 80px 0; }
.sp-section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 28px; }
.sp-section-head h2 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; color: var(--sp-primary); }
.sp-section-head p { margin: 0; color: var(--sp-muted); max-width: 700px; }

.sp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.sp-filter { border: 1px solid rgba(8,43,104,.12); color: #334155; background: #fff; border-radius: 999px; padding: 10px 15px; font-weight: 800; cursor: pointer; }
.sp-filter.is-active { background: var(--sp-primary); color: #fff; }
.sp-search { min-width: min(100%, 260px); margin-left: auto; border: 1px solid rgba(8,43,104,.12); background: #fff; border-radius: 999px; padding: 10px 15px; outline: none; }

.sp-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.sp-card { --card-color: var(--sp-secondary); position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 430px; border-radius: var(--sp-radius); background: #fff; border: 1px solid rgba(8,43,104,.08); box-shadow: 0 14px 40px rgba(8,43,104,.08); transition: transform .25s ease, box-shadow .25s ease; }
.sp-card:hover { transform: translateY(-7px); box-shadow: var(--sp-shadow); }
.sp-card-top { padding: 24px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--card-color), #000 7%), var(--card-color)); }
.sp-card-index { position: absolute; right: 18px; top: 14px; font-size: 44px; line-height: 1; font-weight: 950; opacity: .18; }
.sp-card-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 18px; color: var(--card-color); background: #fff; font-size: 28px; }
.sp-card-kicker { opacity: .78; font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.sp-card h3 { margin: 5px 0 6px; font-size: 26px; line-height: 1.06; }
.sp-card-top p { margin: 0; opacity: .9; font-size: 14px; }
.sp-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.sp-card-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.sp-card-list li { display: flex; gap: 9px; align-items: flex-start; color: #475569; font-size: 14px; }
.sp-card-list li::before { content: "✓"; color: var(--card-color); font-weight: 950; }
.sp-card-users { margin-top: 18px; padding: 13px; border-radius: 14px; background: color-mix(in srgb, var(--card-color), #fff 92%); color: #42526a; font-size: 13px; }
.sp-card-footer { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sp-card-link { font-weight: 900; color: var(--card-color); }
.sp-card-badge { padding: 5px 9px; border-radius: 999px; color: var(--card-color); background: color-mix(in srgb, var(--card-color), #fff 90%); font-size: 11px; font-weight: 900; }
.sp-card[hidden] { display: none; }

.sp-process { background: #fff; }
.sp-timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: stretch; }
.sp-timeline-item { position: relative; padding: 20px 16px; text-align: center; border-radius: 18px; background: #f8fbff; border: 1px solid rgba(8,43,104,.08); }
.sp-timeline-item:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -19px; z-index: 2; transform: translateY(-50%); color: var(--sp-secondary); font-weight: 950; font-size: 24px; }
.sp-timeline-dot { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 950; background: var(--card-color); }
.sp-timeline-item strong { display: block; color: var(--sp-primary); }
.sp-timeline-item small { color: var(--sp-muted); }

.sp-benefits { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.sp-benefit { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid rgba(8,43,104,.08); box-shadow: 0 10px 25px rgba(8,43,104,.06); }
.sp-benefit-icon { font-size: 30px; }
.sp-benefit h3 { color: var(--sp-primary); margin: 8px 0 4px; }
.sp-benefit p { color: var(--sp-muted); margin: 0; font-size: 14px; }

.sp-single-hero { padding: 70px 0; color: #fff; background: linear-gradient(135deg, var(--card-color, var(--sp-primary)), color-mix(in srgb, var(--card-color, var(--sp-primary)), #000 18%)); }
.sp-single-hero h1 { margin: 8px 0; font-size: clamp(38px,6vw,68px); }
.sp-content-grid { display: grid; grid-template-columns: 1fr 330px; gap: 36px; padding: 58px 0; }
.sp-entry { background: #fff; padding: 34px; border-radius: 24px; box-shadow: 0 14px 40px rgba(8,43,104,.08); }
.sp-entry h2, .sp-entry h3 { color: var(--sp-primary); }
.sp-sidebar { display: grid; align-content: start; gap: 18px; }
.sp-widget { background: #fff; padding: 22px; border-radius: 20px; border: 1px solid rgba(8,43,104,.08); }
.sp-widget h3 { margin-top: 0; color: var(--sp-primary); }

.sp-footer { padding: 40px 0; color: #dbe8ff; background: #061d46; }
.sp-footer-grid { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.sp-footer small { opacity: .75; }

.sp-reveal { opacity: 0; transform: translateY(18px); }
.sp-reveal.is-visible { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s ease; }

@media (max-width: 980px) {
  .sp-hero-grid, .sp-content-grid { grid-template-columns: 1fr; }
  .sp-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-benefits { grid-template-columns: repeat(2,1fr); }
  .sp-timeline { grid-template-columns: 1fr; }
  .sp-timeline-item:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -24px; transform: translateX(50%); }
}
@media (max-width: 760px) {
  .sp-menu-toggle { display: inline-flex; }
  .sp-nav { display: none; position: absolute; top: 78px; left: 16px; right: 16px; background: #fff; padding: 18px; border-radius: 16px; box-shadow: var(--sp-shadow); }
  .sp-nav.is-open { display: block; }
  .sp-menu { flex-direction: column; align-items: flex-start; }
  .sp-cards, .sp-benefits { grid-template-columns: 1fr; }
  .sp-section { padding: 58px 0; }
  .sp-section-head, .sp-footer-grid { align-items: flex-start; flex-direction: column; }
  .sp-search { width: 100%; margin-left: 0; }
}

/* Cards fiéis à estrutura do infográfico SIGEDE */
.sp-cards { grid-template-columns: repeat(5,minmax(220px,1fr)); gap: 12px; align-items: stretch; }
.sp-card { min-height: 620px; border-radius: 14px; }
.sp-card-top { padding: 20px 18px 17px; min-height: 150px; }
.sp-card-titleline { display:flex; align-items:center; gap:12px; }
.sp-card-titleline .sp-card-icon { flex:0 0 52px; margin:0; }
.sp-card h3 { font-size: 22px; text-transform: uppercase; }
.sp-card-index { width:42px; height:42px; display:grid; place-items:center; right:14px; top:-8px; border-radius:50%; background:var(--card-color); border:2px solid #fff; opacity:1; font-size:22px; color:#fff; box-shadow:0 4px 10px rgba(0,0,0,.15); }
.sp-card-body { padding:16px 14px; }
.sp-process-list { display:grid; gap:8px; }
.sp-process-heading { margin:5px 0 0; padding:7px 5px 4px; text-align:center; color:var(--card-color); font-size:11px; line-height:1.2; text-transform:uppercase; border-bottom:1px solid color-mix(in srgb,var(--card-color),#fff 70%); }
.sp-process-row { display:grid; grid-template-columns:20px 1fr; gap:6px; color:#334155; font-size:12px; line-height:1.28; }
.sp-process-icon { color:var(--card-color); font-weight:900; }
.sp-new-badge { display:inline-block; margin-left:5px; padding:2px 5px; border-radius:4px; background:#ffe800; color:#24324a; font-size:9px; font-weight:950; vertical-align:middle; }
.sp-card-users { margin-top:auto; padding:12px 10px; text-align:center; }
.sp-card-users > strong { color:var(--card-color); font-size:10px; }
.sp-card-users ul { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:6px; text-align:left; }
.sp-card-users li { display:grid; grid-template-columns:17px 1fr; gap:5px; font-size:11px; line-height:1.25; }
.sp-card-users li span { color:var(--card-color); }
.sp-card-footer { padding-top:11px; }
.sp-card-link { font-size:11px; }
@media (max-width:1280px){.sp-cards{grid-template-columns:repeat(3,minmax(230px,1fr));}}
@media (max-width:900px){.sp-cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:620px){.sp-cards{grid-template-columns:1fr;}.sp-card{min-height:auto;}}


/* Ícones SVG institucionais — versão 3.0 */
.sp-svg-icon { width: 1em; height: 1em; display: block; fill: currentColor; }
.sp-card-icon .sp-svg-icon { width: 34px; height: 34px; }
.sp-mini-svg, .sp-timeline-svg { width: 25px; height: 25px; fill: currentColor; }
.sp-mini-number .sp-svg-icon, .sp-timeline-dot .sp-svg-icon { fill: currentColor; }
.sp-heading-svg { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; margin-right: 8px; fill: currentColor; }
.sp-icon-fallback { line-height: 1; }

/* Página inicial editável */
.sp-page-content{padding-top:2rem;padding-bottom:1rem;background:#fff}
.sp-entry-content{max-width:1100px}
.sp-entry-content > *{max-width:900px;margin-left:auto;margin-right:auto}
.sp-entry-content > .alignwide{max-width:1100px}
.sp-entry-content > .alignfull{max-width:none}
.sp-editor-hint{padding:1rem 1.25rem;border:1px dashed #9bb7d8;border-radius:12px;background:#f5f9ff;color:#36506f}

/* Marca SIGEDE e acesso ao sistema — v4.5 */
.sp-brand-image { flex: 0 0 auto; }
.sp-brand-image img,
.sp-brand-image .custom-logo { display: block; width: auto; height: 68px; max-width: 220px; object-fit: contain; }
.sp-brand-image .custom-logo-link { display: block; line-height: 0; }
.sp-header-access { flex: 0 0 auto; white-space: nowrap; padding-inline: 20px; }
.sp-hero-brand { position: relative; z-index: 2; display: grid; place-items: center; min-height: 390px; padding: 26px; }
.sp-hero-brand img { width: min(100%, 540px); max-height: 440px; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 24px 34px rgba(8,43,104,.14)); }

@media (max-width: 980px) {
  .sp-header-access { display: none; }
  .sp-brand-image img, .sp-brand-image .custom-logo { height: 56px; max-width: 180px; }
  .sp-hero-brand { min-height: 300px; }
}
@media (max-width: 720px) {
  .sp-hero-brand { min-height: 220px; padding: 10px 0 0; }
  .sp-hero-brand img { max-height: 260px; }
}

/* Biblioteca de vídeos em cards */
.sp-video-hero {
  padding: clamp(3rem, 7vw, 6rem) 0;
  color: #fff;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary));
}
.sp-video-hero h1 { margin: .3rem 0 .65rem; font-size: clamp(2.3rem, 5vw, 4.8rem); line-height: 1.05; }
.sp-video-hero p { max-width: 720px; margin: 0; font-size: 1.1rem; opacity: .9; }
.sp-video-toolbar { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.sp-video-search { width: min(100%, 390px); border: 1px solid rgba(8,43,104,.15); border-radius: 999px; padding: .85rem 1.1rem; background: #fff; outline: none; box-shadow: 0 8px 24px rgba(8,43,104,.06); }
.sp-video-search:focus { border-color: var(--sp-secondary); box-shadow: 0 0 0 4px rgba(14,90,184,.12); }
.sp-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.sp-video-card { overflow: hidden; display: flex; flex-direction: column; min-height: 100%; background: #fff; border: 1px solid rgba(8,43,104,.1); border-radius: var(--sp-radius); box-shadow: 0 14px 40px rgba(8,43,104,.08); transition: transform .25s ease, box-shadow .25s ease; }
.sp-video-card:hover { transform: translateY(-6px); box-shadow: var(--sp-shadow); }
.sp-video-cover { position: relative; display: block; width: 100%; padding: 0; border: 0; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary)); }
.sp-video-cover:disabled { cursor: not-allowed; opacity: .72; }
.sp-video-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.sp-video-card:hover .sp-video-cover img { transform: scale(1.035); }
.sp-video-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255,255,255,.2); font-size: 5rem; }
.sp-video-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; color: var(--sp-primary); background: rgba(255,255,255,.94); box-shadow: 0 15px 35px rgba(0,0,0,.25); transform: translate(-50%, -50%); transition: transform .2s ease; }
.sp-video-cover:hover .sp-video-play { transform: translate(-50%, -50%) scale(1.08); }
.sp-video-content { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.4rem 1.45rem; }
.sp-video-label { width: fit-content; margin-bottom: .65rem; padding: .25rem .55rem; border-radius: 999px; color: var(--sp-secondary); background: rgba(14,90,184,.09); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sp-video-content h2 { margin: 0 0 .55rem; color: var(--sp-primary); font-size: 1.3rem; line-height: 1.2; }
.sp-video-content p { margin: 0; color: var(--sp-muted); }
.sp-video-card-footer { margin-top: auto; padding-top: 1.15rem; }
.sp-video-watch { border: 0; padding: 0; color: var(--sp-secondary); background: transparent; font-weight: 900; cursor: pointer; }
.sp-video-watch:hover { text-decoration: underline; }
.sp-video-unavailable { color: var(--sp-muted); font-size: .9rem; font-weight: 700; }
.sp-video-no-results { padding: 2rem; border-radius: var(--sp-radius); background: #fff; text-align: center; }
.sp-video-modal[hidden] { display: none; }
.sp-video-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 1rem; }
.sp-video-modal-backdrop { position: absolute; inset: 0; background: rgba(2,10,24,.82); backdrop-filter: blur(6px); }
.sp-video-modal-dialog { position: relative; z-index: 1; width: min(100%, 980px); padding: 1.25rem; border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.sp-video-modal-dialog h2 { margin: 0 3rem 1rem 0; color: var(--sp-primary); font-size: clamp(1.25rem, 3vw, 2rem); }
.sp-video-modal-close { position: absolute; right: 1rem; top: .8rem; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #fff; background: var(--sp-primary); font-size: 1.7rem; cursor: pointer; }
.sp-video-modal-player { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; }
.sp-video-modal-player video { display: block; width: 100%; height: 100%; object-fit: contain; }
body.sp-video-modal-open { overflow: hidden; }
.sp-video-single-wrap { max-width: 980px; }
.sp-video-player-large { border-radius: var(--sp-radius); box-shadow: var(--sp-shadow); }
.sp-empty-state { padding: 3rem; background: #fff; border-radius: var(--sp-radius); text-align: center; }
@media (max-width: 980px) { .sp-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .sp-video-grid { grid-template-columns: 1fr; } .sp-video-toolbar { justify-content: stretch; } .sp-video-search { width: 100%; } }


/* =========================================================
   Versão 5.0 — cards ampliados para módulos e vídeos
   ========================================================= */

/* Módulos: cards mais largos e altos para acomodar títulos extensos. */
.sp-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.sp-card {
  min-height: 500px;
}

.sp-card-top {
  min-height: 190px;
  padding: 30px;
}

.sp-card-titleline {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.sp-card-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 0;
  border-radius: 22px;
  font-size: 34px;
}

.sp-card h3 {
  max-width: 100%;
  margin-top: 8px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.sp-card-top p {
  margin-top: 18px;
  font-size: 15px;
}

.sp-card-body {
  padding: 28px 30px 30px;
}

.sp-card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-color), #fff 90%);
}

/* Vídeos: cards maiores, com área 16:9 e conteúdo mais confortável. */
.sp-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.sp-video-card {
  min-height: 510px;
  border-radius: 26px;
}

.sp-video-cover {
  min-height: 290px;
  aspect-ratio: 16 / 9;
}

.sp-video-content {
  padding: 1.65rem 1.75rem 1.8rem;
}

.sp-video-content h2 {
  min-height: 2.5em;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.sp-video-content p {
  font-size: 1rem;
}

.sp-video-watch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .65rem 1rem;
  border-radius: 12px;
  background: rgba(14,90,184,.09);
}

@media (max-width: 900px) {
  .sp-cards,
  .sp-video-grid {
    grid-template-columns: 1fr;
  }

  .sp-card {
    min-height: auto;
  }

  .sp-video-card {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .sp-card-top,
  .sp-card-body {
    padding-left: 22px;
    padding-right: 22px;
  }

  .sp-card-titleline {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
  }

  .sp-card-icon {
    width: 60px;
    height: 60px;
  }

  .sp-card h3 {
    font-size: 27px;
  }

  .sp-video-cover {
    min-height: 210px;
  }

  .sp-video-content {
    padding: 1.35rem;
  }
}


/* =========================================================
   Versão 5.1 — títulos de módulos sem quebra e card de vídeos
   ========================================================= */
@media (min-width: 901px) {
  .sp-card h3 {
    white-space: nowrap;
    overflow: visible;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    font-size: clamp(1.65rem, 2.25vw, 2.15rem);
    letter-spacing: -.035em;
  }
}

.sp-video-hub-card .sp-card-top {
  background: linear-gradient(145deg, color-mix(in srgb, var(--card-color), #fff 92%), #fff);
}

.sp-video-hub-card .sp-card-icon-video svg {
  width: 42px;
  height: 42px;
}

.sp-video-hub-card .sp-card-index {
  color: #fff;
  background: var(--card-color);
}

.sp-video-hub-card .sp-process-icon {
  color: var(--card-color);
}

@media (max-width: 900px) {
  .sp-card h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    font-size: clamp(1.45rem, 6vw, 2rem);
  }
}


/* =========================================================
   Versão 5.2 — biblioteca de vídeos em modal na página inicial
   ========================================================= */
.sp-video-hub-trigger {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.sp-home-video-modal[hidden] { display: none; }
.sp-home-video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.sp-home-video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 24, .84);
  backdrop-filter: blur(7px);
}
.sp-home-video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(0,0,0,.42);
}
.sp-home-video-modal-close {
  position: sticky;
  float: right;
  top: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--sp-primary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.sp-home-video-modal-head { margin: 0 60px 22px 0; }
.sp-home-video-modal-head h2 { margin: 0 0 6px; color: var(--sp-primary); font-size: clamp(1.7rem, 4vw, 2.6rem); }
.sp-home-video-modal-head p { margin: 0; color: var(--sp-muted); }
.sp-home-video-player-wrap[hidden] { display: none; }
.sp-home-video-player-wrap { margin-bottom: 24px; }
.sp-home-video-player-title { margin: 0 0 12px; color: var(--sp-primary); font-size: 1.35rem; }
.sp-home-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #000;
}
.sp-home-video-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.sp-home-video-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid rgba(8,43,104,.12);
  border-radius: 18px;
  color: var(--sp-text);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sp-home-video-item:hover,
.sp-home-video-item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--sp-secondary);
  box-shadow: 0 14px 34px rgba(8,43,104,.12);
  outline: none;
}
.sp-home-video-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary));
}
.sp-home-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-home-video-thumb span { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--sp-primary); background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.sp-home-video-item strong { display: block; color: var(--sp-primary); font-size: 1.05rem; line-height: 1.25; }
.sp-home-video-item small { display: block; margin-top: 5px; color: var(--sp-muted); }
.sp-home-video-empty { grid-column: 1 / -1; padding: 24px; border-radius: 16px; background: var(--sp-bg); text-align: center; }
body.sp-home-video-modal-open { overflow: hidden; }

@media (max-width: 760px) {
  .sp-home-video-modal-dialog { padding: 20px; }
  .sp-home-video-list { grid-template-columns: 1fr; }
  .sp-home-video-item { grid-template-columns: 118px minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .sp-home-video-item { grid-template-columns: 1fr; }
  .sp-home-video-thumb { width: 100%; }
}

/* 5.3 — assinatura institucional unificada (SIGEDE + SEED/AP) */
.sp-brand-image img,
.sp-brand-image .custom-logo {
  height: 72px;
  max-width: 430px;
}
.sp-hero-brand img {
  width: min(100%, 720px);
  max-height: 430px;
}
@media (max-width: 1180px) {
  .sp-brand-image img,
  .sp-brand-image .custom-logo { height: 60px; max-width: 330px; }
}
@media (max-width: 760px) {
  .sp-brand-image img,
  .sp-brand-image .custom-logo { height: 50px; max-width: 250px; }
  .sp-hero-brand img { max-height: 260px; }
}
