:root {
  /* Identidade visual (fixa) */
  --ispu-blue: rgb(12, 195, 247);
  --ispu-yellow: rgb(255, 255, 0);
  --ispu-red: rgb(255, 0, 0);
  --ispu-bg: #F5F0D3;
  /* Azul de apoio (mais escuro) para garantir contraste em header/footer sem “preto” */
  --ispu-blue-900: #0b3a4a;
  --ispu-blue-800: #0f4f64;
}

/* Bootstrap theme (CSS variables) */
:root {
  --bs-primary: var(--ispu-blue);
  --bs-warning: var(--ispu-yellow);
  --bs-danger: var(--ispu-red);
  --bs-body-bg: var(--ispu-bg);
  --bs-body-font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, sans-serif;
  --bs-body-color: #111;
  --bs-border-color: rgba(0, 0, 0, .12);
  --bs-link-color: #0b5b74;
  --bs-link-hover-color: #094a5e;
}

html {
  scroll-behavior: smooth;
}

/* Navbar */
.ispu-navbar {
  border-bottom: 2px solid rgba(12, 195, 247, .30);
  background: var(--ispu-blue-900);
}

.ispu-brand-name {
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .2px;
}

.ispu-brand-tagline {
  font-family: "Freehand521 BT", "Comic Sans MS", cursive;
  /* se a fonte não existir no SO, cai no fallback */
  font-size: 1rem;
  opacity: .95;
}

.navbar .nav-link {
  border-radius: 999px;
  padding-inline: .8rem;
}

.navbar .nav-link:hover {
  background: rgba(255, 255, 255, .08);
}

.navbar .nav-link.fw-semibold {
  color: #fff;
}

/* Botões: manter contraste e ênfase no azul */
.btn-primary {
  --bs-btn-color: #000;
  --bs-btn-bg: var(--ispu-blue);
  --bs-btn-border-color: var(--ispu-blue);
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: rgb(7, 175, 222);
  --bs-btn-hover-border-color: rgb(7, 175, 222);
  --bs-btn-active-color: #000;
}

/* Botão amarelo ISPU para carrossel */
.ispu-btn-yellow {
  --bs-btn-color: #000;
  --bs-btn-bg: var(--ispu-yellow);
  --bs-btn-border-color: var(--ispu-yellow);
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #ffeb3b;
  --bs-btn-hover-border-color: #ffeb3b;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: #fdd835;
  --bs-btn-active-border-color: #fdd835;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: clamp(9px, 1.35vw, 14px);
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(255, 255, 0, .4);
  font-size: clamp(1.125rem, 2.7vw, 1.8rem);
  padding: clamp(1.125rem, 2.25vw, 1.8rem) clamp(2.7rem, 6.3vw, 5.4rem);
   margin-top: 3.5rem;
  margin-left: 50px !important;
  transition: all 0.3s ease;
}

.ispu-btn-yellow:hover {
  box-shadow: 0 8px 25px rgba(255, 255, 0, .5);
  transform: translateY(-2px) scale(1.02);
}

.ispu-btn-yellow-outline {
  --bs-btn-color: #fff;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--ispu-yellow);
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: var(--ispu-yellow);
  --bs-btn-hover-border-color: var(--ispu-yellow);
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: #fdd835;
  --bs-btn-active-border-color: #fdd835;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: clamp(10px, 1.5vw, 16px);
  border-width: 2px;
  text-transform: uppercase;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  /*clamp é uma função CSS que define um valor responsivo entre um mínimo, um valor preferido e um máximo */
  padding: clamp(1rem, 2vw, 1.5rem) clamp(2.5rem, 5vw, 4rem);
  transition: all 0.3s ease;
}

.ispu-btn-yellow-outline:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Conteúdo */
.site-main {
  padding: 0 0 2rem;
}

/* Hero (carrossel full-screen) */
.ispu-hero-carousel {
  height: 90vh;
  min-height: 300px;
}

/*.carousel-inner*/
.ispu-hero-carousel .carousel,
.ispu-hero-carousel,
.ispu-hero-carousel .carousel-item {
  height: 100%;
}

.ispu-hero-img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.ispu-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 58, 74, .65) 0%, rgba(11, 58, 74, .35) 60%, rgba(11, 58, 74, .15) 100%);
}

.ispu-hero-content {
  max-width: 650px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .5);
  padding-left: clamp(3rem, 3vw, 4rem);
}

.ispu-hero-text {
  font-family: "Freehand521 BT", "Comic Sans MS", cursive;
  font-size: clamp(1.925rem, 4.4vw, 3.3rem);
  line-height: 1.2;
  height: 100px;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 3px 25px rgba(0, 0, 0, .6);
}

.carousel-caption {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: 0;
  text-align: left;
}

.carousel-indicators [data-bs-target] {
  background-color: rgba(255, 255, 255, .85);
}

@media (prefers-reduced-motion: reduce) {
  .carousel {
    scroll-behavior: auto;
  }

  .carousel-item {
    transition: none !important;
  }
}

/* Blocos de destaque (estilo institucional, fluido) */
.ispu-feature {
  border: 1px solid rgba(0, 0, 0, .12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

.ispu-feature.ispu-feature-primary {
  background: var(--ispu-blue);
  color: #000;
}

.ispu-feature.ispu-feature-dark {
  background: var(--ispu-blue-900);
  /* variação do azul (não cria “identidade nova”, apenas tom) */
  color: #fff;
}

.ispu-feature.ispu-feature-light {
  background: #fff;
  color: #111;
}

.ispu-badge {
  background: rgba(12, 195, 247, .18);
  border: 1px solid rgba(12, 195, 247, .35);
  color: #043d4c;
}

/* Links em cards/listas */
.ispu-card-link {
  text-decoration: none;
}

.ispu-card-link:hover {
  text-decoration: underline;
}

/* Footer */
.ispu-footer {
  background: var(--ispu-blue-900);
}

/* Rodapé sem underline (inclusive hover/focus) */
.ispu-footer .ispu-footer-link {
  color: rgba(255, 255, 255, .85);
  text-decoration: none !important;
}

.ispu-footer .ispu-footer-link:hover,
.ispu-footer .ispu-footer-link:focus {
  color: #fff;
  text-decoration: none !important;
}

.ispu-footer .ispu-footer-link-subtle {
  color: rgba(255, 255, 255, .72);
}

/* Valores monetários: não quebrar linha e ficar mais compacto */
.ispu-money {
  white-space: nowrap;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: .1px;
}

/* Tabelas de Transparência: reduzir tipografia e melhorar legibilidade */
.ispu-transparency-table {
  font-size: .92rem;
}

.ispu-transparency-table th {
  white-space: nowrap;
}

.ispu-transparency-table td:nth-child(3) {
  white-space: normal;
  /* descrição pode quebrar */
}

/* Cards com imagem (Projetos) */
.ispu-card-img {
  height: 170px;
  object-fit: cover;
}

/* Timeline de Notícias (AdminLTE style) */
.timeline {
  position: relative;
  margin: 0 0 50px 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #dee2e6;
  left: 31px;
  margin: 0;
  border-radius: 2px;
}

.timeline>div {
  position: relative;
  margin-right: 10px;
  margin-bottom: 20px;
  clear: both;
}

.timeline>div::before,
.timeline>div::after {
  content: "";
  display: table;
}

.timeline>div::after {
  clear: both;
}

/* Time labels (badges de data) */
.timeline>div>.time-label {
  float: left;
  width: auto;
  position: relative;
}

.timeline>div>.time-label>span {
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  padding: 5px 10px;
  color: #fff;
  font-size: 0.9rem;
}

.timeline>div>.time-label>span.bg-primary {
  background-color: #007bff !important;
}

.timeline>div>.time-label>span.bg-danger {
  background-color: #dc3545 !important;
}

.timeline>div>.time-label>span.bg-success {
  background-color: #28a745 !important;
}

.timeline>div>.time-label>span.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

/* Ícones da timeline */
.timeline>div>.fa,
.timeline>div>.fas,
.timeline>div>.far,
.timeline>div>.fab,
.timeline>div>.fal,
.timeline>div>.fad,
.timeline>div>.svg-inline--fa {
  background-color: #adb5bd;
  border-radius: 50%;
  font-size: 15px;
  height: 30px;
  left: 18px;
  line-height: 30px;
  position: absolute;
  text-align: center;
  top: 0;
  width: 30px;
  color: #fff;
  z-index: 2;
}

.timeline>div>.fa.bg-primary,
.timeline>div>.fas.bg-primary {
  background-color: #007bff !important;
}

.timeline>div>.fa.bg-info,
.timeline>div>.fas.bg-info {
  background-color: #17a2b8 !important;
}

.timeline>div>.fa.bg-success,
.timeline>div>.fas.bg-success {
  background-color: #28a745 !important;
}

.timeline>div>.fa.bg-warning,
.timeline>div>.fas.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.timeline>div>.fa.bg-danger,
.timeline>div>.fas.bg-danger {
  background-color: #dc3545 !important;
}

.timeline>div>.fa.bg-gray,
.timeline>div>.fas.bg-gray {
  background-color: #6c757d !important;
}

/* Cards/items da timeline */
.timeline>div>.timeline-item {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  border-radius: 3px;
  background-color: #fff;
  margin-left: 60px;
  margin-right: 15px;
  padding: 0;
  position: relative;
}

.timeline>div>.timeline-item::before {
  content: '';
  position: absolute;
  top: 10px;
  left: -15px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 15px 10px 0;
  border-color: transparent #fff transparent transparent;
}

.timeline>div>.timeline-item>.time {
  color: #999;
  float: right;
  padding: 10px;
  font-size: 12px;
}

.timeline>div>.timeline-item>.timeline-header {
  border-bottom: 1px solid rgba(0, 0, 0, .125);
  color: #495057;
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  padding: 10px 15px;
  font-weight: 600;
}

.timeline>div>.timeline-item>.timeline-header a {
  font-weight: 600;
  color: #007bff;
  text-decoration: none;
}

.timeline>div>.timeline-item>.timeline-header a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.timeline>div>.timeline-item>.timeline-body {
  padding: 15px;
  color: #555;
  line-height: 1.6;
}

.timeline>div>.timeline-item>.timeline-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
}

.timeline>div>.timeline-item>.timeline-footer {
  border-top: 1px solid rgba(0, 0, 0, .125);
  background-color: #f8f9fa;
  padding: 10px 15px;
  border-radius: 0 0 3px 3px;
}

.timeline>div>.timeline-item>.timeline-footer .btn {
  margin-right: 5px;
}

/* Responsivo para timeline */
@media (max-width: 767px) {
  .timeline::before {
    left: 25px;
  }

  .timeline>div>.timeline-item {
    margin-left: 50px;
    margin-right: 5px;
  }

  .timeline>div>.fa,
  .timeline>div>.fas,
  .timeline>div>.far,
  .timeline>div>.fab,
  .timeline>div>.fal,
  .timeline>div>.fad {
    left: 10px;
  }

  .timeline>div>.timeline-item::before {
    left: -10px;
    border-width: 8px 10px 8px 0;
  }
}

/* ========================================
   ORGANOGRAMA - Estrutura Hierárquica
   ======================================== */

.organograma-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Níveis do organograma */
.org-level {
  position: relative;
  margin-bottom: 4rem;
  padding-top: 1rem;
}

/* Primeiro nível sem linha superior */
.org-level-1::before {
  display: none;
}

/* Título do nível com badge */
.org-level-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.org-level-title .badge {
  font-size: 1rem;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Espaçamento entre níveis 
.org-level {
  margin-bottom: 6rem;
}*/

.org-level:last-child {
  margin-bottom: 2rem;
}

/* Container dos cards em linha */
.org-cards-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4rem 2.5rem;
  padding-top: 60px;
}

/* Card individual */
.org-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 3.5rem 1rem 1.5rem;
  width: 220px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.org-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Bordas coloridas por tipo */
.org-card-diretoria {
  border-color: var(--bs-primary);
}

.org-card-conselho {
  border-color: var(--bs-success);
}

.org-card-outros {
  border-color: var(--bs-secondary);
}

/* Foto do membro - posicionada no topo do card */
.org-card-photo {
  width: 100px;
  height: 100px;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: white;
}

.org-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
}

/* Conteúdo do card */
.org-card-content {
  padding-top: 0.5rem;
}

.org-card-role {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.org-card-name {
  font-size: 0.95rem;
  color: #718096;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Botão de ver funções */
.org-btn-function {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  transition: all 0.2s;
}

.org-btn-function i {
  font-size: 0.75rem;
}

/* Remover estilos antigos de collapse */

/* Responsividade */
@media (max-width: 768px) {
  .org-cards-row {
    flex-direction: column;
    align-items: center;
    gap: 4.5rem;
  }

  .org-level {
    margin-bottom: 4.5rem;
  }

  .org-level-title {
    margin-bottom: 1.5rem;
  }
  .ispu-btn-yellow {
    font-size: .9rem !important;
    padding: 1rem 1.7rem !important;
    box-shadow: 0 3px 10px rgba(255, 255, 0, .3);
    margin-top: 5px !important;
    margin-left: 25px !important;
  }
}

@media (max-width: 500px) {
  .ispu-hero-content {
    padding-left: 1rem;
    width: 100%;
    max-width: 220px;
  }

  .ispu-hero-text {
    font-size: 1rem !important;
    margin: 0 !important;
    height: 60px !important;
    max-height: 60px !important;
  }

  .ispu-btn-yellow {
    font-size: .7rem !important;
    padding: 0.5rem 1rem !important;
    box-shadow: 0 3px 10px rgba(255, 255, 0, .3);
    margin-top: 5px !important;
    margin-left: 25px !important;
  }

  .carousel-caption {
    padding-top: 5px;
    padding-bottom: 0;
    text-align: left;
  }

  .org-cards-row {
    flex-direction: column;
    align-items: center;
    gap: 4rem;
  }

  .org-level {
    margin-bottom: 4rem;
  }

  .org-level-title {
    margin-bottom: 1.2rem;
  }
}