/* === RESET & VARIABLES === */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #FF6B1A;
  --primary-dark: #E55500;
  --primary-light: #FF8F4A;
  --dark: #1A1A2E;
  --dark-2: #16213E;
  --gray: #4A5568;
  --gray-light: #E2E8F0;
  --bg: #F7FAFC;
  --white: #FFFFFF;
  --success: #48BB78;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s;
  background: transparent;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo-img {
  height: 48px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s;
}
.navbar.scrolled .nav-logo-img { filter: none; }

.nav-menu {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-menu a {
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}
.navbar.scrolled .nav-menu a { color: var(--dark); }
.nav-menu a:hover { color: var(--primary); }
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}
.nav-menu a:hover::after { width: 100%; }

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}
.navbar.scrolled .mobile-toggle { color: var(--dark); }

/* === HERO === */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: white;
  padding: 140px 24px 80px;
  overflow: hidden;
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,107,26,0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,143,74,0.15) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.hero h1 span { color: var(--primary); }
.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 720px;
  margin: 0 auto 40px;
  font-weight: 300;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(255,107,26,0.4);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,107,26,0.5);
}
.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}
.btn-lg { padding: 16px 32px; font-size: 1rem; width: 100%; justify-content: center; }

/* === STATS === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.stat-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 28px 20px;
  transition: all 0.3s;
}
.stat-card:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-4px);
}
.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === SECTIONS === */
section { padding: 100px 0; }
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-align: center;
}
.section-title span { color: var(--primary); }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 48px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* === MAP === */
.map-section { background: white; }
#map {
  width: 100%;
  height: 600px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  overflow: hidden;
}
.map-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
}
.map-filters label {
  font-weight: 600;
  color: var(--gray);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: white;
  border: 2px solid var(--gray-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.chip:hover { border-color: var(--primary); }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
}
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem;
  color: var(--gray);
}
.legend-dot {
  width: 14px; height: 14px; border-radius: 50%;
}

/* === REGIONS === */
.regions-section { background: var(--bg); }
.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.region-card {
  padding: 36px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--region-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s;
}
.region-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.region-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--region-color);
}
.region-count {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1;
}
.region-label {
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* === TOP CITIES === */
.top-cities-section { background: white; }
.top-cities {
  background: var(--bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 1000px;
  margin: 0 auto;
}
.top-city {
  display: grid;
  grid-template-columns: 50px 1fr 50px 1fr 80px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-light);
}
.top-city:last-child { border-bottom: none; }
.top-rank {
  font-weight: 800;
  color: white;
  font-size: 0.9rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 107, 26, 0.3);
}
/* Top 3 com cores especiais */
.top-city:nth-child(1) .top-rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  box-shadow: 0 3px 10px rgba(255, 165, 0, 0.5);
}
.top-city:nth-child(2) .top-rank {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  box-shadow: 0 3px 10px rgba(160, 160, 160, 0.4);
}
.top-city:nth-child(3) .top-rank {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  box-shadow: 0 3px 10px rgba(205, 127, 50, 0.4);
}
.top-name { font-weight: 600; }
.top-uf {
  background: var(--primary);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  width: fit-content;
}
.top-bar {
  background: var(--gray-light);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}
.top-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 5px;
  transition: width 1.5s ease;
}
.top-val {
  font-weight: 700;
  color: var(--gray);
  text-align: right;
  font-size: 0.9rem;
}

/* === SEARCH === */
.search-bar {
  position: relative;
  max-width: 600px;
  margin: 0 auto 40px;
}
.search-bar input {
  width: 100%;
  padding: 16px 100px 16px 50px;
  border: 2px solid var(--gray-light);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,107,26,0.1);
}
.search-bar > i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}
.search-count {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 600;
}

/* === STATE CARDS === */
.cities-section { background: var(--bg); }
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 28px;
}
.state-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border-top: 6px solid var(--state-color);
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.6s ease backwards;
}
.state-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.state-card.hidden { display: none; }
.state-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--gray-light);
}
.state-badge {
  width: 56px; height: 56px;
  background: var(--state-color);
  color: white;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.state-info { flex: 1; }
.state-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.state-region {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}
.state-count { text-align: right; }
.count-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--state-color);
  line-height: 1;
}
.count-label {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.city-list {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}
.city-list::-webkit-scrollbar { width: 6px; }
.city-list::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }
.city-list::-webkit-scrollbar-thumb:hover { background: var(--gray); }
.city-item {
  display: grid;
  grid-template-columns: 24px 1fr 60px;
  gap: 8px;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f7fafc;
}
.city-item:last-child { border-bottom: none; }
.city-item:hover {
  background: linear-gradient(90deg, rgba(255,107,26,0.08), transparent);
}
.city-item.hidden { display: none; }
.city-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.city-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.15);
  transition: all 0.2s;
}
.city-item:hover .city-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.25);
}
.city-name { color: var(--dark); font-weight: 500; }
.city-points {
  font-size: 0.75rem;
  color: var(--gray);
  text-align: right;
  font-weight: 600;
}
.tier-hub .city-name { color: var(--dark); font-weight: 700; }
.tier-primary .city-name { font-weight: 600; }

/* === VIABILITY === */
.viability-section {
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.viability-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 30%, rgba(255,107,26,0.15) 0%, transparent 50%);
}
.viability-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.viability-info .section-title { text-align: left; }
.viability-info p {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 32px;
}
.viability-features {
  list-style: none;
  display: grid;
  gap: 16px;
}
.viability-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
}
.viability-features i {
  width: 40px; height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.viability-form {
  background: white;
  color: var(--dark);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
.viability-form h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: var(--dark);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; }

/* Seções do formulário (Link Dedicado vs Ponta A/B) */
.service-fields {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
  animation: fadeUp 0.3s ease;
}
.form-section-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255,107,26,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-tip {
  display: inline-block;
  color: var(--gray);
  cursor: help;
  font-size: 0.85rem;
}
.help-tip:hover { color: var(--primary); }

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.5;
}
.field-hint i {
  color: #F6AD55;
  margin-right: 4px;
}
.field-hint a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}
.field-hint a:hover { color: var(--primary-dark); }

/* Blocos de Ponta A / Ponta B */
.endpoint-block {
  background: white;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.endpoint-block:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,26,0.08);
}
.endpoint-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.endpoint-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.endpoint-a {
  background: linear-gradient(135deg, #FF6B1A, #FF8F4A);
}
.endpoint-b {
  background: linear-gradient(135deg, #1E88E5, #42A5F5);
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal.active { display: flex; animation: fadeIn 0.3s; }
.modal-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  max-width: 450px;
  text-align: center;
  animation: popIn 0.4s;
}
.modal-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 20px;
}
.modal-content h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.modal-content p {
  color: var(--gray);
  margin-bottom: 24px;
}

/* === FOOTER === */
footer {
  background: var(--dark);
  color: white;
  padding: 80px 24px 30px;
}
.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  height: 56px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}
.footer-col p {
  opacity: 0.7;
  font-size: 0.9rem;
  line-height: 1.8;
}
.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 18px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; }
.footer-col li {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.copyright {
  max-width: 1400px;
  margin: 50px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  opacity: 0.5;
  font-size: 0.85rem;
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .nav-menu.active {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
  }
  .nav-menu.active a { color: var(--dark) !important; }

  .viability-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  section { padding: 60px 0; }
  .top-city { grid-template-columns: 40px 1fr 80px; gap: 8px; }
  .top-bar { grid-column: 1 / -1; }
  .top-val { grid-column: 3; grid-row: 1; }
  .top-uf { display: none; }
  .footer-content { grid-template-columns: 1fr; }
  .viability-form { padding: 24px; }
}
