/* ============================================================
   HUB ACADÊMICO UNISENAI-MT
   Paleta extraída da logo oficial:
   Azul  #024EA2 / Laranja #F2521E
   ============================================================ */

:root {
  --un-blue: #024EA2;
  --un-blue-dark: #013A7A;
  --un-blue-darker: #012854;
  --un-blue-light: #E8F0FB;
  --un-orange: #F2521E;
  --un-orange-dark: #CC3F13;
  --un-orange-light: #FFE9E0;
  --un-gray-50: #F5F7FA;
  --un-gray-100: #EEF1F6;
  --un-gray-600: #5B6472;
  --un-gray-800: #263041;

  --bs-primary: var(--un-blue);
  --bs-primary-rgb: 2, 78, 162;

  font-size: 16px;
}

* { scroll-behavior: smooth; }

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

body {
  font-family: 'Segoe UI', 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--un-gray-800);
  background-color: #ffffff;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; }

/* ---------- Utility color classes ---------- */
.text-un-blue { color: var(--un-blue) !important; }
.text-un-orange { color: var(--un-orange) !important; }
.bg-un-blue { background-color: var(--un-blue) !important; }
.bg-un-orange { background-color: var(--un-orange) !important; }
.bg-un-light { background-color: var(--un-gray-50) !important; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-unisenai {
  background: linear-gradient(90deg, var(--un-blue-darker) 0%, var(--un-blue) 100%);
  box-shadow: 0 2px 10px rgba(1, 40, 84, .25);
}

.navbar-unisenai .navbar-brand img { height: 38px; }

.navbar-unisenai .nav-link {
  color: rgba(255,255,255,.88) !important;
  font-weight: 500;
  padding: .5rem 1rem !important;
  border-radius: .4rem;
  transition: background-color .15s ease, color .15s ease;
}

.navbar-unisenai .nav-link:hover,
.navbar-unisenai .nav-link.active {
  background-color: rgba(255,255,255,.12);
  color: #fff !important;
}

.navbar-unisenai .btn-home {
  background-color: var(--un-orange);
  color: #fff;
  font-weight: 600;
  border-radius: .5rem;
}
.navbar-unisenai .btn-home:hover { background-color: var(--un-orange-dark); color: #fff; }

/* ============================================================
   HERO (index)
   ============================================================ */
.hub-hero {
  background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.08), transparent 45%),
              linear-gradient(120deg, var(--un-blue-darker) 0%, var(--un-blue) 55%, var(--un-blue) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hub-hero::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -80px;
  width: 320px; height: 320px;
  background: var(--un-orange);
  opacity: .18;
  border-radius: 50%;
}

.hub-hero .logo-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.75rem;
  display: inline-block;
  box-shadow: 0 12px 30px rgba(1,40,84,.35);
}

.hub-hero .badge-orange {
  background-color: var(--un-orange);
  color: #fff;
  font-weight: 600;
  letter-spacing: .04em;
}

/* ============================================================
   HUB CARDS (index grid)
   ============================================================ */
.hub-card {
  display: block;
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem 1.35rem;
  height: 100%;
  border: 1px solid var(--un-gray-100);
  box-shadow: 0 4px 14px rgba(1, 40, 84, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--un-blue), var(--un-orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.hub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(1, 40, 84, .16);
  border-color: transparent;
}

.hub-card:hover::before { transform: scaleX(1); }

.hub-card .hub-icon {
  width: 58px; height: 58px;
  border-radius: .85rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--un-blue-light);
  color: var(--un-blue);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  transition: background-color .18s ease, color .18s ease;
}

.hub-card:hover .hub-icon {
  background: var(--un-orange);
  color: #fff;
}

.hub-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--un-blue-darker);
  margin-bottom: .4rem;
}

.hub-card p {
  font-size: .88rem;
  color: var(--un-gray-600);
  margin-bottom: 0;
}

.hub-card .go-arrow {
  position: absolute;
  right: 1.35rem; bottom: 1.35rem;
  color: var(--un-orange);
  opacity: 0;
  transform: translateX(-6px);
  transition: all .18s ease;
}
.hub-card:hover .go-arrow { opacity: 1; transform: translateX(0); }

/* ============================================================
   PAGE HEADER BANNER (subpages)
   ============================================================ */
.page-banner {
  background: linear-gradient(115deg, var(--un-blue-darker), var(--un-blue));
  color: #fff;
  padding: 3rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  content: "";
  position: absolute;
  left: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--un-orange);
  opacity: .15;
}
.page-banner .banner-icon {
  width: 72px; height: 72px;
  border-radius: 1rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: var(--un-orange);
  backdrop-filter: blur(2px);
}
.page-banner h1 { font-weight: 800; }
.page-banner .lead { color: rgba(255,255,255,.85); }

.breadcrumb-bar {
  background: var(--un-gray-50);
  border-bottom: 1px solid var(--un-gray-100);
  font-size: .85rem;
}
.breadcrumb-bar a { color: var(--un-blue); font-weight: 600; }
.breadcrumb-bar .bi { font-size: .75rem; }

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc-card {
  border: none;
  border-radius: 1rem;
  background: var(--un-gray-50);
  padding: 1.25rem 1.4rem;
}
.toc-card .toc-title {
  color: var(--un-blue-darker);
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.toc-card ol { counter-reset: toc; margin-bottom: 0; }
.toc-card ol li {
  list-style: none;
  counter-increment: toc;
  margin-bottom: .5rem;
}
.toc-card ol li a {
  color: var(--un-gray-800);
  font-size: .92rem;
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  transition: color .15s ease;
}
.toc-card ol li a::before {
  content: counter(toc);
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--un-blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.toc-card ol li a:hover { color: var(--un-orange); }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-title {
  color: var(--un-blue-darker);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 90px;
}
.section-title .num-badge {
  flex: none;
  width: 40px; height: 40px;
  border-radius: .7rem;
  background: var(--un-blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.section-title .bi { color: var(--un-orange); }

/* ============================================================
   GENERIC CONTENT CARDS
   ============================================================ */
.content-card {
  border: 1px solid var(--un-gray-100);
  border-radius: 1rem;
  padding: 1.5rem;
  height: 100%;
  background: #fff;
  transition: box-shadow .18s ease, transform .18s ease;
}
.content-card:hover { box-shadow: 0 10px 24px rgba(1,40,84,.08); transform: translateY(-3px); }
.content-card .card-icon {
  width: 46px; height: 46px;
  border-radius: .65rem;
  background: var(--un-blue-light);
  color: var(--un-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: .85rem;
}

.callout {
  border-radius: .9rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid;
  display: flex;
  gap: .8rem;
}
.callout .bi { font-size: 1.3rem; flex: none; }
.callout-warning { background: #FFF6EC; border-color: #FFDDB0; color: #8A5300; }
.callout-danger  { background: #FDECEB; border-color: #F6C4BF; color: #8A2418; }
.callout-info    { background: var(--un-blue-light); border-color: #C7DBF3; color: var(--un-blue-darker); }
.callout-success { background: #EAF7EE; border-color: #BEE6C9; color: #1E6B34; }

.golden-rule {
  background: linear-gradient(120deg, var(--un-orange), var(--un-orange-dark));
  color: #fff;
  border-radius: 1rem;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 10px 24px rgba(242, 82, 30, .25);
}
.golden-rule h4 { font-weight: 800; }

/* ============================================================
   INFOGRAPHIC — numbered flow (checklist / step-by-step)
   ============================================================ */
.info-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: stretch;
  padding: 1rem 0;
}
.info-flow .flow-step {
  flex: 1 1 200px;
  position: relative;
  background: #fff;
  border: 2px dashed var(--un-gray-100);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
}
.info-flow .flow-step .flow-num {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(120deg, var(--un-blue), var(--un-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.info-flow .flow-step h5 { font-weight: 700; color: var(--un-blue-darker); margin: .5rem 0 .35rem; }
.info-flow .flow-step p { font-size: .87rem; color: var(--un-gray-600); margin-bottom: 0; }
.info-flow .flow-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--un-orange); font-size: 1.6rem;
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  .info-flow .flow-arrow { width: 100%; transform: rotate(90deg); }
}

/* ---------- Botão de download de documento ---------- */
.btn-doc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  background-color: var(--un-orange);
  color: #fff !important;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  padding: .55rem 1rem;
  border-radius: 2rem;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-doc:hover,
.btn-doc:focus {
  background-color: var(--un-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(242, 82, 30, .3);
}

/* ---------- Journey / process bar ---------- */
.info-journey {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--un-gray-50);
  border-radius: 1rem;
}
.info-journey .jn-item {
  background: #fff;
  border: 1px solid var(--un-gray-100);
  border-radius: 2rem;
  padding: .55rem 1.1rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--un-blue-darker);
  box-shadow: 0 3px 8px rgba(1,40,84,.06);
}
.info-journey .jn-item.final {
  background: var(--un-orange);
  color: #fff;
  border-color: transparent;
}
.info-journey .jn-arrow { color: var(--un-orange); font-size: 1.2rem; }

/* ---------- Stat / percentage rings ---------- */
.stat-ring-wrap { display: flex; flex-wrap: wrap; gap: 1.75rem; justify-content: center; }
.stat-ring { text-align: center; width: 140px; }
.stat-ring svg { transform: rotate(-90deg); }
.stat-ring .ring-value {
  font-size: 1.6rem; font-weight: 800; color: var(--un-blue-darker);
}
.stat-ring .ring-label { font-size: .8rem; color: var(--un-gray-600); font-weight: 600; }
.stat-ring circle.ring-value-circle {
  transition: stroke-dashoffset 1.1s ease;
}

/* ---------- Section flash (TOC click highlight) ---------- */
.section-flash { animation: flashBg 0.9s ease; border-radius: .75rem; }
@keyframes flashBg {
  0% { background-color: var(--un-blue-light); }
  100% { background-color: transparent; }
}

/* ---------- Donut split (75/25 etc.) ---------- */
.donut-legend .legend-dot {
  width: 14px; height: 14px; border-radius: 4px; display: inline-block; margin-right: .5rem;
}
.donut-wrap { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center; }
.donut {
  width: 170px; height: 170px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  box-shadow: 0 8px 20px rgba(1,40,84,.1);
}
.donut .donut-inner {
  width: 68%; height: 68%; background: #fff; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut .donut-inner .donut-big { font-size: 1.5rem; font-weight: 800; color: var(--un-blue-darker); line-height: 1; }
.donut .donut-inner .donut-small { font-size: .72rem; color: var(--un-gray-600); font-weight: 600; }
.donut-legend { display: flex; flex-direction: column; gap: .6rem; }
.donut-legend .legend-row { display: flex; align-items: center; font-size: .92rem; }
.donut-legend strong { color: var(--un-blue-darker); }

/* ---------- Icon stat grid ---------- */
.stat-box {
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--un-gray-100);
  height: 100%;
}
.stat-box .bi { font-size: 1.8rem; color: var(--un-orange); }
.stat-box .stat-title { font-weight: 700; color: var(--un-blue-darker); font-size: .9rem; margin-top: .5rem; }
.stat-box .stat-desc { font-size: .8rem; color: var(--un-gray-600); }

/* ---------- Timeline (vertical) ---------- */
.un-timeline { position: relative; padding-left: 2.5rem; }
.un-timeline::before {
  content: "";
  position: absolute; left: 14px; top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(var(--un-blue), var(--un-orange));
  border-radius: 3px;
}
.un-timeline .tl-item { position: relative; padding-bottom: 1.75rem; }
.un-timeline .tl-item:last-child { padding-bottom: 0; }
.un-timeline .tl-dot {
  position: absolute; left: -2.5rem; top: 2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--un-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--un-gray-100);
}
.un-timeline .tl-item h6 { font-weight: 700; color: var(--un-blue-darker); margin-bottom: .2rem; }
.un-timeline .tl-item p { font-size: .88rem; color: var(--un-gray-600); margin-bottom: 0; }

/* ============================================================
   TABLES
   ============================================================ */
.table-unisenai thead { background: var(--un-blue); color: #fff; }
.table-unisenai thead th { border: none; font-weight: 600; font-size: .85rem; }
.table-unisenai td, .table-unisenai th { vertical-align: middle; }

/* ============================================================
   FORMULA BOX
   ============================================================ */
.formula-box {
  background: var(--un-blue-darker);
  color: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}
.formula-box .fx { color: #FFD9CC; }

/* ============================================================
   ACCORDION overrides
   ============================================================ */
.accordion-button:not(.collapsed) {
  background-color: var(--un-blue-light);
  color: var(--un-blue-darker);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; border-color: var(--un-blue); }

/* ============================================================
   FOOTER
   ============================================================ */
footer.site-footer {
  background: var(--un-blue-darker);
  color: rgba(255,255,255,.75);
}
footer.site-footer a { color: #fff; }
footer.site-footer a:hover { color: var(--un-orange); }
footer.site-footer .footer-logo {
  height: 30px;
  background: #fff;
  padding: .35rem .6rem;
  border-radius: .5rem;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#backToTop {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--un-orange);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  z-index: 1040;
}
#backToTop:hover { background: var(--un-orange-dark); }

/* ============================================================
   PREV/NEXT NAV
   ============================================================ */
.page-nav-link {
  border: 1px solid var(--un-gray-100);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
  color: var(--un-gray-800);
}
.page-nav-link:hover { border-color: var(--un-orange); box-shadow: 0 8px 20px rgba(1,40,84,.08); color: var(--un-gray-800); }
.page-nav-link .bi { font-size: 1.4rem; color: var(--un-blue); }
.page-nav-link small { color: var(--un-gray-600); display: block; }
.page-nav-link strong { color: var(--un-blue-darker); }
