/* =========================================== */
/* VARIÁVEIS E RESET                          */
/* =========================================== */
:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary: #8b5cf6;
  --secondary-dark: #7c3aed;
  --secondary-light: #a78bfa;
  --accent: #f97316;
  
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  
  --success: #10b981;
  --warning: #f59e0b;
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  
  --shadow-subtle: 0 10px 30px rgba(59,130,246,0.08);
  --shadow-medium: 0 20px 50px rgba(59,130,246,0.12);
  --shadow-hover: 0 30px 60px rgba(59,130,246,0.16);
  
  --transition-smooth: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--neutral-50), #fff);
  color: var(--neutral-800);
  line-height: 1.7;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 30% 30%, rgba(37,99,235,0.03), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* =========================================== */
/* CONTAINER                                  */
/* =========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 40px;
}

/* =========================================== */
/* HEADER                                     */
/* =========================================== */
header {
  text-align: center;
  margin-bottom: 60px;
}

.header-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--neutral-900), var(--primary-dark), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.header-subtitle {
  font-size: 1.375rem;
  color: var(--neutral-700);
  max-width: 800px;
  margin: 0 auto 40px;
}

/* =========================================== */
/* INTRODUÇÃO                                 */
/* =========================================== */
.intro-section {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(255,255,255,0.6);
  margin-bottom: 60px;
  position: relative;
}

.intro-section::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.intro-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.intro-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.intro-text p {
  font-size: 1.125rem;
  color: var(--neutral-700);
  margin-bottom: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 20px;
}

.feature-item {
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(139,92,246,0.05));
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(59,130,246,0.1);
}

/* =========================================== */
/* DISTRITOS                                  */
/* =========================================== */
.districts-section {
  margin-bottom: 80px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.districts-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}

.district-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.district-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.district-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.municipalities-count {
  background: rgba(59,130,246,0.1);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.district-cta {
  margin-top: auto;
  width: 100%;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

/* =========================================== */
/* PATROCÍNIOS SEM MARGEM SUPERIOR            */
/* =========================================== */
.sponsorships {
  margin-top: 0;            /* ZERO - já tem espaço do .footer-note */
  padding: 25px 20px;       /* REDUZIDO */
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--neutral-200);
  margin-bottom: 60px;
}

.sponsorships h3 {
  font-size: 1.2rem;        /* REDUZIDO */
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: 10px;      /* REDUZIDO */
  text-align: center;
}

.sponsorships p {
  color: var(--neutral-600);
  font-size: 0.95rem;       /* REDUZIDO */
  margin-bottom: 20px;      /* REDUZIDO */
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* GRID BASE */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;                /* REDUZIDO */
  margin-top: 15px;         /* REDUZIDO */
  justify-items: stretch;   /* 🔑 evita encolher no mobile */
}

/* SLOT BASE — ENQUADRAMENTO CORRETO DO LOGO */
.sponsor-slot {
  width: 100%;                 /* ocupa toda a coluna do grid */
  aspect-ratio: 3 / 2;         /* PROPORÇÃO REAL DO LOGO (120x80) */
  min-height: 80px;            /* referência visual (não força largura) */
  
  border-radius: var(--radius-sm);
  border: 2px dashed var(--neutral-300);
  background: var(--neutral-50);
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  color: var(--neutral-500);
  font-size: 0.9rem;
  font-weight: 500;
  
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;            /* impede logo de invadir a borda */
}

.sponsor-slot:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
}

/* LINK OCUPA TODO O SLOT */
.sponsor-slot a {
  width: 100%;
  height: 100%;
  display: flex;
}

/* ZONA DE SEGURANÇA INTERNAL */
.sponsor-inner {
  width: 100%;
  height: 100%;
  padding: 6px;             /* afasta logo do tracejado */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* LOGO — ENCAIXE NATURAL, MAIS PRESENÇA */
.sponsor-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.2);    /* +20% de presença */
  transform-origin: center;
  filter: grayscale(100%);
  opacity: 0.85;
  display: block;
}

/* ESCONDER TEXTO QUANDO HÁ LOGO */
.sponsor-slot.has-logo span {
  display: none;
}

/* SLOT VAZIO (placeholder) */
.sponsor-slot:not(.has-logo) .sponsor-inner {
  flex-direction: column;
  gap: 4px;
}

.slot-label {
  font-size: 0.8rem;
  color: var(--neutral-500);
}

.slot-placeholder {
  font-size: 1.5rem;
  color: var(--neutral-400);
  font-weight: 300;
}

/* =========================================== */
/* COMO FUNCIONA                              */
/* =========================================== */
.how-it-works {
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(139,92,246,0.05));
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  margin-bottom: 80px;
  border: 1px solid rgba(59,130,246,0.1);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 30px;
  max-width: 800px;
  margin: 40px auto 0;
}

.step-card {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  text-align: center;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  line-height: 50px;
  margin: 0 auto 20px;
}

/* =========================================== */
/* AVISO LEGAL                                */
/* =========================================== */
.legal-notice {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  margin-bottom: 60px;
  border-left: 6px solid var(--warning);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 20px;
}

/* =========================================== */
/* FOOTER                                     */
/* =========================================== */
footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: rgba(248,250,252,0.8);
}

.footer-note {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius-md);
  margin: 24px auto 32px;
  max-width: 800px;
  box-shadow: var(--shadow-subtle);
  border-left: 4px solid var(--primary);
}

footer p.sponsor-policy {
  font-size: 0.85rem;
  color: var(--neutral-600);
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--neutral-200);
  max-width: 600px;
}

/* =========================================== */
/* RESPONSIVO                                 */
/* =========================================== */
@media (max-width: 900px) {
  .intro-content,
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .districts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sponsor-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .sponsor-slot {
    height: 72px;
  }
}

@media (max-width: 768px) {
  .districts-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  .sponsor-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sponsor-slot {
    width: 100%;            /* 🔑 ocupa toda a largura */
    height: auto;           /* 🔑 deixa o aspect-ratio mandar */
  }

  .sponsorships {
    padding: 20px 16px;
  }
}