/**
 * Página Apoio institucional
 */

.main--apoio-institucional {
  padding: 0;
}

.ai-page {
  scroll-behavior: smooth;
}

.ai-section {
  scroll-margin-top: 120px;
  padding: var(--space-2xl) 0;
}

.ai-section--alt {
  background: var(--sb-gray-50, #f5f5f5);
}

.ai-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(360px, 50vh, 480px);
  display: flex;
  align-items: flex-end;
  background: var(--sb-gray-dark) center / cover no-repeat;
  background-image: linear-gradient(135deg, rgba(158, 12, 36, 0.88) 0%, rgba(60, 60, 60, 0.82) 100%),
    var(--ai-hero-img);
  color: var(--sb-white);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.ai-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 50%);
  pointer-events: none;
}

.ai-hero-inner {
  position: relative;
  z-index: 1;
}

.ai-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 var(--space-sm);
}

.ai-hero-title {
  font-family: var(--ffc);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 var(--space-sm);
  line-height: 1.05;
}

.ai-hero-lead {
  max-width: 36em;
  margin: 0 0 var(--space-lg);
  opacity: 0.95;
}

.ai-hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.ai-hero-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  color: var(--sb-white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.ai-hero-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--sb-white);
}

.ai-section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.ai-section-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--sb-red, #9e0c24);
  color: var(--sb-white);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.ai-section-header h2 {
  font-family: var(--ffc);
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-transform: uppercase;
  margin: 0 0 var(--space-xs);
}

.ai-section-count {
  margin: 0;
  color: var(--sb-gray-mid, #666);
  font-size: 0.95rem;
}

.ai-vazio {
  text-align: center;
  color: var(--sb-gray-mid, #666);
}

.ai-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.ai-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md);
  background: var(--sb-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.ai-section--alt .ai-card {
  border-color: rgba(0, 0, 0, 0.06);
}

.ai-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--sb-red, #9e0c24);
}

.ai-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100px;
  margin-bottom: var(--space-sm);
}

.ai-card-logo img {
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ai-card-nome {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sb-gray-dark, #333);
}

@media (max-width: 640px) {
  .ai-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .ai-card {
    padding: var(--space-sm);
  }
}
