/* ============================================================
   transparencia.css - Portal da Transparencia O.E.C.A
   ============================================================ */

:root {
  --oeca-primary: #1a5276;
  --oeca-secondary: #2874a6;
  --oeca-accent: #f39c12;
  --oeca-dark: #2c3e50;
  --oeca-light: #f8f9fa;
  --oeca-border: #e9ecef;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #f5f7fa 0%, #eef2f7 100%);
  color: var(--oeca-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-portal {
  background: linear-gradient(135deg, #1a5276 0%, #1e3a5f 30%, #2874a6 70%, #3498db 100%);
  color: white;
  padding: 70px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-portal::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  animation: float 25s infinite ease-in-out;
  pointer-events: none;
}

.hero-portal::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.02);
  border-radius: 50%;
  animation: float 30s infinite ease-in-out reverse;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-title {
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.88;
  max-width: 650px;
  line-height: 1.7;
  font-weight: 400;
}

/* Botoes Hero */
.btn-hero-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 16px 32px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.35);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-hero-stats:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-hero-site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
  color: var(--oeca-primary);
  padding: 16px 32px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-hero-site:hover {
  background: #f0f4f8;
  color: var(--oeca-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ============================================================
   BUSCA
   ============================================================ */
.search-section {
  margin-top: -45px;
  position: relative;
  z-index: 10;
}

.search-box-hero {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(26, 82, 118, 0.12);
  border: 1px solid rgba(233, 237, 239, 0.8);
}

.search-input {
  border: 2px solid #e9ecef;
  border-radius: 14px;
  padding: 16px 20px 16px 52px;
  font-size: 1.05rem;
  transition: all 0.3s;
  width: 100%;
  background: #f8f9fa;
}

.search-input:focus {
  border-color: var(--oeca-secondary);
  box-shadow: 0 0 0 5px rgba(40, 116, 166, 0.08);
  outline: none;
  background: white;
}

.search-icon {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 1.3rem;
  transition: color 0.3s;
}

.search-input:focus + .search-icon,
.search-input:not(:placeholder-shown) + .search-icon {
  color: var(--oeca-secondary);
}

.btn-search {
  background: linear-gradient(135deg, var(--oeca-primary), var(--oeca-secondary));
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px 36px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(26, 82, 118, 0.25);
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 82, 118, 0.35);
  color: white;
  filter: brightness(1.05);
}

/* ============================================================
   ESTATISTICAS
   ============================================================ */
.stats-bar {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 50px;
  border: 1px solid rgba(233, 237, 239, 0.8);
}

.stat-item {
  text-align: center;
  padding: 20px 16px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(180deg, transparent, #e9ecef, transparent);
}

.stat-item i {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
  background: linear-gradient(135deg, var(--oeca-primary), var(--oeca-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 12px;
}

.stat-icon i {
  font-size: 1.8rem;
  margin-bottom: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.stat-item .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--oeca-dark);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-item .label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-stats-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--oeca-primary), var(--oeca-secondary));
  color: white;
  padding: 18px 36px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(26, 82, 118, 0.3);
  width: 100%;
}

.btn-stats-bar:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(26, 82, 118, 0.4);
  color: white;
  filter: brightness(1.08);
}

/* ============================================================
   CARDS DE CATEGORIA
   ============================================================ */
.cat-section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--oeca-dark);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: #6c757d;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.cat-card {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: all 0.4s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(233, 237, 239, 0.5);
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--card-color);
  transition: width 0.3s;
}

.cat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--card-bg);
  border-radius: 0 0 0 100%;
  opacity: 0.3;
  transition: all 0.4s;
}

.cat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  color: inherit;
  border-color: rgba(233, 237, 239, 0.8);
}

.cat-card:hover::before {
  width: 7px;
}

.cat-card:hover::after {
  width: 140px;
  height: 140px;
  opacity: 0.5;
}

.cat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.cat-card:hover .cat-icon {
  transform: scale(1.1) rotate(-5deg);
}

.cat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--oeca-dark);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.cat-desc {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.cat-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--card-color);
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

.cat-card:hover .cat-count {
  transform: scale(1.05);
}

.cat-arrow {
  position: absolute;
  bottom: 32px;
  right: 32px;
  font-size: 1.4rem;
  color: #adb5bd;
  transition: all 0.3s;
  z-index: 1;
}

.cat-card:hover .cat-arrow {
  color: var(--card-color);
  transform: translateX(6px);
}

/* ============================================================
   DOCUMENTOS RECENTES
   ============================================================ */
.destaques-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  padding: 70px 0;
  position: relative;
}

.destaques-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

.doc-mini-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: all 0.35s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(233, 237, 239, 0.6);
  position: relative;
  overflow: hidden;
}

.doc-mini-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--oeca-primary), var(--oeca-secondary));
}

.doc-mini-card:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  color: inherit;
  border-color: rgba(233, 237, 239, 0.9);
}

.doc-mini-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: var(--oeca-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s;
}

.doc-mini-card:hover .doc-mini-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--oeca-primary), var(--oeca-secondary));
  color: white;
}

.doc-mini-content {
  flex-grow: 1;
  min-width: 0;
}

.doc-mini-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--oeca-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.doc-mini-meta {
  font-size: 0.82rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-mini-meta i {
  font-size: 0.9rem;
}

/* ============================================================
   BOTAO VOLTAR AO TOPO
   ============================================================ */
#toTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--oeca-primary), var(--oeca-secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
  z-index: 9999;
  cursor: pointer;
}

#toTop.show {
  opacity: 1;
  visibility: visible;
}

#toTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(26, 82, 118, 0.4);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 991.98px) {
  .hero-portal { padding: 50px 0 70px; }
  .stat-item:not(:last-child)::after { display: none; }
  .btn-stats-bar { margin-top: 20px; }
}

@media (max-width: 767.98px) {
  .hero-portal { padding: 40px 0 55px; }
  .hero-title { font-size: 1.8rem; }
  .search-box-hero { padding: 20px; margin-top: -30px; }
  .cat-card { padding: 24px; }
  .cat-icon { width: 52px; height: 52px; font-size: 1.6rem; }
  .stats-bar { padding: 20px; }
  .stat-item { padding: 12px 8px; }
  .stat-item .number { font-size: 1.6rem; }
  .btn-hero-stats, .btn-hero-site {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
  .btn-stats-bar {
    padding: 16px 24px;
    font-size: 0.95rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}