/* ===== heating-energy.css ===== */
/* Styles for the Heating Energy page (heating-energy.php) */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans SC', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-white);
  color: var(--color-text);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }
button, select, input { font-family: inherit; }

/* ===== Container ===== */
.section-container {
  width: min(100% - 48px, var(--container-width));
  margin: 0 auto;
}
.section {
  padding: 88px 0;
}

/* ===== Hero ===== */
.he-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 72px;
  overflow: hidden;
  background: var(--color-black);
}
.he-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(156, 200, 41, 0.10) 0%, transparent 70%),
    linear-gradient(180deg, #0a0a0a 0%, #000000 50%, #111 100%);
}
.he-hero.has-bg::before {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(156, 200, 41, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.70) 100%);
}
.he-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.he-hero-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}
.he-hero-label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.he-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.16;
  margin-bottom: 16px;
  color: var(--color-text);
}
.he-hero p {
  font-size: 17px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== Filter Section ===== */
.he-filter-section {
  background: var(--color-dark);
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--border-light);
}
.he-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
  margin-bottom: 24px;
}
.he-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.he-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.06em;
}
.he-filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-black);
  color: var(--color-text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 40px 12px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(245,245,245,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.he-filter-select:hover { border-color: rgba(156, 200, 41, 0.4); }
.he-filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(156, 200, 41, 0.15);
}
.he-filter-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ===== Data Notice ===== */
.he-data-notice {
  max-width: 680px;
  margin: 16px auto 0;
  padding: 14px 18px;
  background: rgba(156, 200, 41, 0.06);
  border: 1px solid rgba(156, 200, 41, 0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-light);
}

/* Disabled select options */
.he-filter-select option:disabled {
  color: rgba(245,245,245,0.25);
  font-style: italic;
}

/* ===== Searchable City Dropdown ===== */
.he-city-search-wrap { position: relative; }
.he-city-search-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none'%3E%3Ccircle cx='6' cy='6' r='4.5' stroke='rgba(245,245,245,0.4)' stroke-width='1.5'/%3E%3Cline x1='9.5' y1='9.5' x2='13' y2='13' stroke='rgba(245,245,245,0.4)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  cursor: text;
}
.he-city-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.he-city-dropdown.open { display: block; }
.he-city-option {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--color-text);
}
.he-city-option:hover { background: rgba(156, 200, 41, 0.12); }
.he-city-option.selected {
  background: rgba(156, 200, 41, 0.18);
  color: var(--primary);
  font-weight: 600;
}
.he-city-option.hidden { display: none; }
.he-city-dropdown::-webkit-scrollbar { width: 6px; }
.he-city-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  gap: 8px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #17120f;
}
.btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(156, 200, 41, 0.25); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(156, 200, 41, 0.44);
}
.btn-outline:hover { background: rgba(156, 200, 41, 0.08); border-color: var(--primary); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.36); }
.btn-lg {
  min-height: 56px;
  padding: 14px 34px;
  font-size: 15px;
}

/* ===== Result Section ===== */
.he-result-section {
  background: var(--color-black);
  padding: 80px 0;
  position: relative;
}
.he-result-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 320px;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(156, 200, 41, 0.06) 0%, transparent 100%);
  pointer-events: none;
}

/* Query summary bar */
.he-query-summary {
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-light);
  position: relative;
}
.he-query-summary strong { color: var(--color-text); font-weight: 600; }
.he-query-period {
  text-align: center;
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 40px;
  position: relative;
}

/* Core median card */
.he-median-card {
  background: linear-gradient(180deg, #252525 0%, #1a1a1a 100%);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 48px 32px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
  position: relative;
  overflow: hidden;
}
.he-median-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: var(--gradient-warm);
  border-radius: 0 0 3px 3px;
}
.he-median-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.he-median-value {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(56px, 8vw, 80px);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.he-median-unit {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 0;
}
.he-median-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 16px;
}

/* P25-P75 range */
.he-range-card {
  background: var(--color-dark);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 32px;
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}
.he-range-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.he-range-bar-wrap {
  position: relative;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 24px;
  margin-bottom: 12px;
  overflow: hidden;
}
.he-range-bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(156, 200, 41, 0.20) 0%, rgba(156, 200, 41, 0.40) 100%);
  border-radius: 24px;
}
.he-range-bar-median {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 50%;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
  transform: translateX(-50%);
}
.he-range-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.he-range-point {
  text-align: center;
}
.he-range-point-value {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}
.he-range-point-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}
.he-range-desc {
  font-size: 14px;
  color: var(--text-mid);
  margin-top: 16px;
  line-height: 1.6;
}

/* Metadata strip */
.he-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}
.he-meta-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--card-radius-sm);
  padding: 20px 16px;
  text-align: center;
}
.he-meta-value {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}
.he-meta-value span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}
.he-meta-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== Distribution Section ===== */
.he-dist-section {
  background: var(--color-dark);
  padding: 80px 0;
}
.he-section-heading {
  text-align: center;
  margin-bottom: 48px;
}
.he-section-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.he-section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.24;
  color: var(--color-text);
  margin-bottom: 12px;
}
.he-section-desc {
  font-size: 15px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}
.he-dist-card {
  background: var(--color-black);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 36px 32px;
  max-width: 680px;
  margin: 0 auto;
}
.he-dist-highlight {
  text-align: center;
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 32px;
  line-height: 1.6;
}
.he-dist-highlight strong {
  color: var(--primary);
  font-weight: 700;
}
.he-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.he-bar-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  text-align: right;
  white-space: nowrap;
}
.he-bar-track {
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.he-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 6px;
  transition: width 0.8s var(--ease-out);
  position: relative;
}
.he-bar-fill.is-peak {
  background: linear-gradient(90deg, var(--primary) 0%, #c8e65a 100%);
  box-shadow: 0 0 16px rgba(156, 200, 41, 0.3);
}
.he-bar-pct {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  text-align: left;
}
.he-bar-pct.is-peak { color: var(--primary); }

/* ===== Disclaimer Section ===== */
.he-disclaimer-section {
  background: var(--color-black);
  padding: 64px 0;
  border-top: 1px solid var(--border-light);
}
.he-disclaimer-card {
  background: var(--color-dark);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 36px 32px;
  max-width: 680px;
  margin: 0 auto;
}
.he-disclaimer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.he-disclaimer-title svg {
  width: 18px; height: 18px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.8;
}
.he-disclaimer-body {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.85;
}
.he-disclaimer-body p + p { margin-top: 12px; }

/* ===== CTA Section ===== */
.he-cta-section {
  background: var(--color-dark);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.he-cta-section::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(156, 200, 41, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.he-cta-card {
  position: relative;
  background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 56px 32px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.he-cta-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.3;
}
.he-cta-desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 32px;
}
.he-cta-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Empty / Error States ===== */
.he-empty {
  text-align: center;
  padding: 64px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.he-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.he-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.he-empty-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-container { width: min(100% - 32px, var(--container-width)); }
  .he-hero { min-height: auto; padding: 120px 20px 56px; }
  .he-hero h1 { font-size: 28px; }
  .he-hero p { font-size: 15px; }
  .he-filter-grid { grid-template-columns: 1fr; }
  .he-median-card { padding: 36px 20px; }
  .he-median-value { font-size: 52px; }
  .he-range-card { padding: 24px 16px; }
  .he-meta-strip { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .he-meta-item { padding: 14px 10px; }
  .he-meta-value { font-size: 20px; }
  .he-dist-card { padding: 24px 16px; }
  .he-bar-row { grid-template-columns: 90px 1fr 50px; gap: 8px; }
  .he-bar-label { font-size: 12px; }
  .he-cta-card { padding: 40px 20px; }
  .he-cta-btns { flex-direction: column; align-items: center; }
  .he-cta-btns .btn { width: 100%; max-width: 320px; }
  .he-disclaimer-card { padding: 24px 16px; }
}
@media (max-width: 480px) {
  .he-bar-row { grid-template-columns: 76px 1fr 44px; }
  .he-range-point-value { font-size: 18px; }
}
