/* ===== AQI CHECKER SECTION ===== */
.aqi-section {
  position: relative;
  padding: 120px 0;
  background-image: url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?w=1200&q=60&fit=crop&auto=format&fm=webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.aqi-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 6, 0.55);
  z-index: 0;
}

.aqi-section > .container,
.aqi-section > * { position: relative; z-index: 1; }

.aqi-section-inner {
  max-width: 660px;
  margin: 0 auto;
}

.aqi-header {
  text-align: center;
  margin-bottom: 56px;
}

.aqi-header .eyebrow { color: var(--text-on-dark-2); }

.aqi-header .section-heading {
  color: white;
}

/* Search box */
.aqi-search-wrap {
  display: flex;
  margin-bottom: 20px;
}

.aqi-input {
  flex: 1;
  height: 56px;
  background: var(--ivory);
  border: none;
  padding: 0 20px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  border-radius: 0;
  transition: box-shadow 0.3s;
}

.aqi-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.aqi-input:focus {
  box-shadow: inset 0 0 0 2px var(--canopy);
}

.aqi-search-btn {
  width: 56px;
  height: 56px;
  background: var(--forest-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}

.aqi-search-btn:hover {
  background: var(--forest-light);
}

.aqi-search-btn svg {
  width: 20px;
  height: 20px;
  stroke: white;
  fill: none;
}

/* Quick city buttons */
.aqi-city-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.aqi-city-chip {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-2);
  border: 1px solid rgba(168,200,128,0.2);
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.3s;
  background: transparent;
}

.aqi-city-chip:hover {
  border-color: var(--moss);
  color: var(--moss);
}

/* Result card */
.aqi-result {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 40px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.aqi-result.visible {
  opacity: 1;
  max-height: 600px;
}

.aqi-compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}

.aqi-city-block { text-align: center; }

.aqi-city-name {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-2);
  margin-bottom: 2px;
  font-family: var(--font-body);
  max-width: none;
}

.aqi-city-state {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark-2);
  opacity: 0.55;
  margin-bottom: 8px;
  font-family: var(--font-body);
  max-width: none;
}

.aqi-city-number {
  font-family: var(--font-mono);
  font-size: 72px;
  font-weight: 400;
  line-height: 1;
  display: block;
  transition: color 0.5s;
}

.aqi-vs {
  font-family: var(--font-display);
  font-size: 20px;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  text-align: center;
}

.aqi-forest-number {
  font-family: var(--font-mono);
  font-size: 72px;
  font-weight: 400;
  color: var(--moss);
  line-height: 1;
  text-align: center;
  display: block;
  margin-bottom: 8px;
}

.aqi-forest-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-2);
  font-family: var(--font-body);
  text-align: center;
  display: block;
  max-width: none;
}

/* Gauge bar */
.aqi-gauge-wrap {
  margin-bottom: 24px;
}

.aqi-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.aqi-gauge-labels span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark-2);
  font-family: var(--font-body);
  max-width: none;
}

.aqi-gauge-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.aqi-gauge-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s;
  background: var(--moss);
}

.aqi-category {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  display: inline-block;
  margin-bottom: 16px;
}

.aqi-message {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-on-dark);
  line-height: 1.7;
  font-style: italic;
  font-family: var(--font-display);
  font-size: 20px;
  max-width: none;
}

.aqi-error {
  text-align: center;
  padding: 24px;
  color: var(--text-on-dark-2);
  font-size: 14px;
  max-width: none;
}

.aqi-loading {
  text-align: center;
  padding: 24px;
  max-width: none;
}

.aqi-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(168,200,128,0.2);
  border-top-color: var(--moss);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .aqi-result {
    padding: 24px;
  }

  .aqi-city-number,
  .aqi-forest-number {
    font-size: 48px;
  }

  .aqi-compare-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
  }

  .aqi-section {
    background-attachment: scroll;
  }
}
