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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background: #0b0b14;
}

/* ── Navigation ── */
nav {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid #2a2a3a;
  flex-wrap: wrap;
  background: #0f0f1ae0;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
}
nav a { color: #a0a0b0; text-decoration: none; font-weight: 500; font-size: 15px; padding: 4px 0; }
nav a:hover { color: #ff6b4a; }
.logo { font-size: 20px; font-weight: 700; color: #ff6b4a !important; margin-right: auto; }
.logo span { color: #e0e0e0; }

/* ── Hero Banner ── */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(135deg, #0a1a2a 0%, #1a0a15 40%, #0a1525 70%, #0a1a2a 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,74,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(52,152,219,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255,107,74,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero h1 { font-size: 40px; color: #fff; position: relative; }
.hero p  { font-size: 18px; color: #a0a0b0; max-width: 700px; margin: 12px auto 0; position: relative; }

/* ── Section Banner ── */
.section-banner {
  padding: 50px 24px; text-align: center; position: relative;
}
.section-banner.what    { background: linear-gradient(135deg, #0a1a2a 0%, #0a1025 100%); }
.section-banner.impacts { background: linear-gradient(135deg, #2a0a0a 0%, #1a100a 100%); }
.section-banner.history { background: linear-gradient(135deg, #1a0a2a 0%, #0a0a1a 100%); }
.section-banner.monitor { background: linear-gradient(135deg, #0a1a1a 0%, #0a1020 100%); }
.section-banner h1 { font-size: 36px; color: #fff; position: relative; }
.section-banner p  { color: #a0a0b0; max-width: 600px; margin: 8px auto 0; position: relative; }

/* ── Content Wrapper ── */
.content { max-width: 1040px; margin: 0 auto; padding: 0 24px 40px; }

/* ── Typography ── */
h1 { font-size: 32px; margin: 30px 0 15px; color: #fff; }
h2 { font-size: 22px; margin: 36px 0 14px; color: #f0f0f0; border-left: 3px solid #ff6b4a; padding-left: 12px; }
h3 { font-size: 17px; margin: 16px 0 8px; color: #d0d0d0; display: flex; align-items: center; gap: 10px; }
p  { margin: 10px 0; }
a  { color: #ff6b4a; }

.breadcrumb { color: #666; font-size: 14px; margin: 16px 0; }
.breadcrumb a { color: #888; }

/* ── Icon (inline SVG) ── */
.icon { width: 24px; height: 24px; flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0 40px;
  align-items: stretch;
}
.card-grid.triple { grid-template-columns: repeat(3, 1fr); }

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}
a.card:hover { border-color: #ff6b4a; transform: translateY(-2px); }

.img-placeholder {
  width: 100%;
  height: 200px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-placeholder.what    { background: linear-gradient(135deg, #0a1a3a, #0a2a4a); }
.img-placeholder.impacts { background: linear-gradient(135deg, #3a1a1a, #2a1a1a); }
.img-placeholder.history { background: linear-gradient(135deg, #2a1a3a, #1a1a2a); }
.img-placeholder.monitor { background: linear-gradient(135deg, #1a2a2a, #1a1a3a); }

.card-body { padding: 18px 20px; }
.card-body h3 { margin-top: 0; font-size: 17px; color: #ff6b4a; }
.card-body p  { color: #a0a0b0; }

.tag {
  display: inline-block;
  background: rgba(255,107,74,0.15);
  color: #ff6b4a;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 6px;
}

.tag.green { background: rgba(76,175,80,0.15); color: #4caf50; }

/* ── Quick Facts ── */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0 40px;
}
.fact-item {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}
.fact-item .fact-icon  { margin-bottom: 8px; display: flex; justify-content: center; }
.fact-item .fact-icon svg { width: 28px; height: 28px; }
.fact-item .fact-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.fact-item .fact-value { font-size: 18px; color: #fff; font-weight: 600; }

/* ── Info Cards ── */
.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 16px 0 24px;
}
.info-card-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.info-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
}
.info-card-head {
  background: #1a1a35;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card-head svg { width: 20px; height: 20px; flex-shrink: 0; }
.info-card-body { padding: 14px 16px; }
.info-card-body p { margin-top: 0; color: #a0a0b0; font-size: 14px; }

.kv-row {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: #b0b0b0;
  line-height: 1.5;
}
.kv-row:last-child { border-bottom: none; }
.kv-row span {
  flex-shrink: 0;
  min-width: 90px;
  font-weight: 600;
  color: #e0e0e0;
  font-size: 12px;
}
.kv-row.highlight { color: #ff6b4a; font-weight: 600; }
.kv-row.highlight span { color: #ff6b4a; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 40px;
  font-size: 14px;
}
th {
  background: #14142a;
  color: #ff6b4a;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #252540;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td { padding: 12px 16px; border-bottom: 1px solid #1a1a30; }
tr:hover td { background: #14142a; }
td.hl { color: #ff6b4a; font-weight: 600; }
td.blue { color: #3498db; font-weight: 600; }

/* ── Lists ── */
ul, ol { margin: 10px 0 10px 24px; }
li { margin: 6px 0; }

/* ── Timeline ── */
.timeline { margin: 20px 0 40px; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #252540;
}
.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
  padding-left: 20px;
}
.timeline-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff6b4a;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}
.timeline-dot.major { background: #e74c3c; width: 18px; height: 18px; }
.timeline-content {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 18px;
  flex: 1;
}
.timeline-content h3 { color: #ff6b4a; margin: 0 0 6px; font-size: 17px; }
.timeline-content .year { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.timeline-content p { color: #a0a0b0; font-size: 14px; margin: 6px 0 0; }

/* ── Timeline Media Extras ── */
.timeline-extras {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #1f1f38;
}

/* Stat highlight row */
.extra-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.extra-stat {
  background: #0f0f22;
  border: 1px solid #252540;
  border-radius: 6px;
  padding: 8px 14px;
  text-align: center;
  min-width: 80px;
  flex: 1;
}
.extra-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: #ff6b4a;
  line-height: 1.2;
}
.extra-stat-val.blue { color: #3498db; }
.extra-stat-val.gold { color: #f39c12; }
.extra-stat-lbl {
  font-size: 10px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* News report excerpt */
.extra-report {
  margin-top: 10px;
  background: #0f0f22;
  border-left: 3px solid #f39c12;
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.extra-report svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.extra-report-body {
  flex: 1;
}
.extra-report-body .report-head {
  font-size: 12px;
  font-weight: 700;
  color: #f39c12;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.extra-report-body .report-text {
  font-size: 12px;
  color: #a0a0b0;
  line-height: 1.5;
}
.extra-report-body .report-source {
  font-size: 10px;
  color: #666;
  margin-top: 4px;
}

/* Photo-style image card */
.extra-photo {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.extra-photo-card {
  background: #0f0f22;
  border: 1px solid #252540;
  border-radius: 6px;
  overflow: hidden;
}
.extra-photo-card .photo-visual {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.photo-visual.flood { background: linear-gradient(135deg, #0a1a3a 0%, #1a2a4a 100%); }
.photo-visual.drought { background: linear-gradient(135deg, #2a1a0a 0%, #1a100a 100%); }
.photo-visual.fire { background: linear-gradient(135deg, #2a0a0a 0%, #1a0a0a 100%); }
.photo-visual.ocean { background: linear-gradient(135deg, #0a1a2a 0%, #0a2a3a 100%); }
.photo-visual svg { width: 32px; height: 32px; opacity: 0.7; }
.extra-photo-card .photo-cap {
  padding: 8px 10px;
  font-size: 10px;
  color: #888;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 600px) {
  .extra-photo { grid-template-columns: 1fr; }
  .extra-stats { flex-direction: column; }
}

/* ── Mechanism Diagram (text-based flow) ── */
.mechanism-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}
.flow-step {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
  min-width: 140px;
}
.flow-step .flow-icon { margin-bottom: 8px; }
.flow-step .flow-icon svg { width: 32px; height: 32px; }
.flow-step .flow-label { font-size: 13px; color: #a0a0b0; line-height: 1.4; }
.flow-arrow { color: #ff6b4a; font-size: 24px; font-weight: 700; }

/* ── Comparison (El Niño vs La Niña) ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 40px;
}
.compare-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
}
.compare-card.el-nino  { border-top: 3px solid #ff6b4a; }
.compare-card.la-nina  { border-top: 3px solid #3498db; }
.compare-card .compare-head {
  padding: 14px 18px;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
}
.compare-card.el-nino .compare-head  { color: #ff6b4a; background: rgba(255,107,74,0.08); }
.compare-card.la-nina .compare-head  { color: #3498db; background: rgba(52,152,219,0.08); }
.compare-card .compare-body { padding: 16px 18px; }
.compare-card .compare-body p { color: #a0a0b0; font-size: 14px; margin: 0; }
.compare-card .compare-body ul { margin-top: 8px; margin-bottom: 0; }
.compare-card .compare-body li { font-size: 14px; color: #a0a0b0; }

/* ── Stat Cards (big numbers) ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 40px;
}
.stat-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 36px;
  font-weight: 700;
  color: #ff6b4a;
  line-height: 1.2;
}
.stat-card .stat-value.blue { color: #3498db; }
.stat-card .stat-label { font-size: 13px; color: #888; margin-top: 6px; line-height: 1.4; }

/* ── Data Viz Bars ── */

/* ── Full-Width Hover Map ── */
.map-full {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: 20px;
  margin-bottom: 40px;
}

.map-svg-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.map-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Hotspot anchor */
.map-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  text-decoration: none;
  z-index: 1;
  cursor: default;
}

/* Pulsing dot */
.spot-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
}
.spot-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}

.dot-blue   { background: #3498db; }
.dot-blue::after   { background: rgba(52,152,219,0.25); }
.dot-orange  { background: #f39c12; }
.dot-orange::after  { background: rgba(243,156,18,0.25); }
.dot-red    { background: #e74c3c; }
.dot-red::after    { background: rgba(231,76,60,0.25); }
.dot-coral   { background: #ff6b4a; }
.dot-coral::after   { background: rgba(255,107,74,0.25); }

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(3); opacity: 0; }
}

/* Country label next to dot */
.spot-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: #e0e0e0;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
}

/* Tooltip card */
.spot-tip {
  display: none;
  position: absolute;
  width: 250px;
  background: #14142a;
  border: 1px solid #333355;
  border-radius: 8px;
  padding: 14px 16px;
  z-index: 5;
  pointer-events: none;
  text-align: left;
}
.map-spot:hover .spot-tip { display: block; }
.map-spot:hover { z-index: 20; }

/* Tooltip positioning variants */
.tip-right { left: 110px; top: 50%; transform: translateY(-50%); }
.tip-left  { right: 110px; top: 50%; transform: translateY(-50%); }
.tip-top   { left: 50%; bottom: 30px; transform: translateX(-50%); }

.tip-head {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tip-text {
  font-size: 12px;
  color: #a0a0b0;
  line-height: 1.55;
  margin-bottom: 8px;
}

.tip-stat {
  display: block;
  font-size: 11px;
  color: #777;
  line-height: 1.5;
  padding: 2px 0;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid #2a2a3a;
  margin-top: 50px;
  color: #555;
  font-size: 13px;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .card-grid.triple { grid-template-columns: repeat(2, 1fr); }
  .info-card-grid.three-col { grid-template-columns: 1fr 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .mechanism-flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .spot-tip { width: 220px; }
}
@media (max-width: 600px) {
  h1 { font-size: 24px; }
  .hero { padding: 50px 16px 40px; }
  .hero h1 { font-size: 28px; }
  .card-grid, .card-grid.triple, .quick-facts, .stat-grid { grid-template-columns: 1fr; }
  .info-card-grid, .info-card-grid.three-col { grid-template-columns: 1fr; }
  nav { gap: 12px; padding: 12px 16px; }
  .timeline-item { padding-left: 12px; }
}
