/* ═══════════════════════════════════════════════════════
   geo-index.css — Homepage-specific styles for geo.ahappy.net
   Extracted from index.html {% block head %} for caching.
═══════════════════════════════════════════════════════ */

/* ─── HERO — 2 columns: left content / right map ─── */
.hp-hero { padding: 52px 0 36px; }
.hp-hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 32px; align-items: center;
}
.hp-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--gm-green-100); border: 1px solid rgba(31,77,58,.15);
  font-size: 13px; font-weight: 500; color: var(--gm-green-900); margin-bottom: 18px;
}
.hp-hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gm-green-700); }
.hp-hero h1 {
  font-size: 44px; line-height: 1.08; font-weight: 700;
  color: var(--gm-ink); margin-bottom: 16px;
}
.hp-hero h1 em { font-style: normal; color: var(--gm-green-700); }
.hp-hero-desc {
  font-size: 17px; line-height: 1.7; color: var(--gm-ink-muted);
  margin-bottom: 22px; max-width: 480px;
}
.hp-hero-search { display: flex; gap: 8px; margin-bottom: 14px; }
.hp-hero-search input {
  flex: 1; padding: 14px 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--gm-line); background: var(--gm-card);
  font-size: 15px; font-family: inherit; color: var(--gm-ink); outline: none;
  transition: border-color var(--gm-transition), box-shadow var(--gm-transition);
  box-shadow: var(--shadow-card);
}
.hp-hero-search input:focus { border-color: var(--gm-green-700); box-shadow: 0 0 0 3px rgba(86,122,98,.15); }
.hp-hero-search input::placeholder { color: var(--gm-ink-light); }
.hp-btn-primary {
  padding: 14px 20px; border-radius: var(--radius-lg);
  border: none; background: var(--gm-green-900); color: #fff;
  font-size: 15px; font-weight: 600; font-family: inherit;
  transition: background var(--gm-transition); white-space: nowrap; cursor: pointer;
}
.hp-btn-primary:hover { background: #164030; }
.hp-hero-ctas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.hp-btn-secondary {
  padding: 9px 15px; border-radius: var(--radius-lg);
  border: 1px solid var(--gm-green-700); background: transparent;
  color: var(--gm-green-900); font-size: 14px; font-weight: 500;
  font-family: inherit; transition: all var(--gm-transition); text-decoration: none; display: inline-block;
}
.hp-btn-secondary:hover { background: var(--gm-green-100); border-color: var(--gm-green-900); }
.hp-hero-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hp-filter-label { font-size: 13px; color: var(--gm-ink-muted); font-weight: 500; }
.hp-chip {
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--gm-line); background: rgba(255,255,255,.8);
  font-size: 13px; color: var(--gm-ink-muted); cursor: pointer;
  transition: all var(--gm-transition); text-decoration: none; display: inline-block;
}
.hp-chip:hover, .hp-chip.active { background: var(--gm-green-900); color: #fff; border-color: var(--gm-green-900); }

/* ─── Hero mascot ─── */
.hp-hero-mascot {
  width: 92px; height: 92px; object-fit: contain;
  display: block; margin-bottom: 14px;
  filter: drop-shadow(0 6px 16px rgba(31,77,58,.18));
  animation: hp-mascot-float 3.6s ease-in-out infinite;
}
@keyframes hp-mascot-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ─── Hero map panel ─── */
.hp-hero-map {
  position: relative;
  background: radial-gradient(circle at 25% 30%, rgba(86,122,98,.2) 0%, transparent 50%),
              radial-gradient(circle at 75% 70%, rgba(86,122,98,.12) 0%, transparent 40%),
              linear-gradient(160deg, #EBE2CE, #F2ECD8);
  border: 1px solid var(--gm-line); border-radius: var(--radius-xl);
  min-height: 440px; overflow: hidden; box-shadow: var(--shadow-hero);
}
/* Map view toggle */
.map-view-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: flex; border: 1px solid var(--gm-line);
  border-radius: var(--radius-md); overflow: hidden;
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px);
}
.map-toggle-btn {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  border: none; background: none; cursor: pointer; color: var(--gm-ink-muted);
  transition: all var(--gm-transition);
}
.map-toggle-btn.active { background: var(--gm-green-900); color: #fff; }
.map-toggle-divider { width: 1px; background: var(--gm-line); }
.map-era-label {
  position: absolute; bottom: 60px; left: 14px;
  background: rgba(31,77,58,.85); color: #fff;
  font-size: 11px; font-weight: 600; padding: 5px 10px;
  border-radius: var(--radius-md); display: none;
}
.hp-hero-map[data-view="historical"] .map-era-label { display: block; }
.hp-hero-map[data-view="historical"] .map-grid-lines { opacity: .25; }
.map-grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(86,122,98,.10) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(86,122,98,.10) 1px, transparent 1px);
  background-size: 46px 46px; opacity: .5; transition: opacity var(--gm-transition);
}
.map-marker {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gm-green-900);
  box-shadow: 0 0 0 4px rgba(31,77,58,.18), 0 0 0 8px rgba(31,77,58,.07);
  transform: translate(-50%, -50%); cursor: pointer; transition: transform var(--gm-transition);
}
.map-marker:hover { transform: translate(-50%, -50%) scale(1.3); }
.map-marker-label {
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  background: var(--gm-green-900); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; white-space: nowrap; pointer-events: none;
}
.map-marker.historical { background: var(--gm-pending); box-shadow: 0 0 0 4px rgba(146,64,14,.18); }
.map-marker.historical .map-marker-label { background: var(--gm-pending); }
.map-tag-ribbon { position: absolute; top: 52px; left: 14px; display: flex; flex-direction: column; gap: 6px; }
.map-tag {
  background: rgba(255,255,255,.88); border: 1px solid var(--gm-line);
  border-radius: var(--radius-md); padding: 5px 10px;
  font-size: 12px; color: var(--gm-ink-muted); font-weight: 500;
}
.map-tag strong { color: var(--gm-green-900); }
.map-popup {
  position: absolute; bottom: 14px; right: 14px; width: 230px;
  background: rgba(255,255,255,.96); border: 1px solid var(--gm-line);
  border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-hover);
}
.map-popup-era { display: inline-block; font-size: 11px; font-weight: 600; color: var(--gm-green-700); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 5px; }
.map-popup h4 { font-size: 14px; font-weight: 700; margin-bottom: 5px; color: var(--gm-ink); }
.map-popup p  { font-size: 13px; color: var(--gm-ink-muted); line-height: 1.5; margin-bottom: 8px; }
.map-popup-track { font-size: 11px; color: var(--gm-vis-regional); background: var(--gm-vis-regional-bg); padding: 4px 8px; border-radius: 6px; margin-bottom: 8px; }
.map-popup-link { font-size: 12px; font-weight: 600; color: var(--gm-green-700); display: flex; align-items: center; gap: 4px; text-decoration: none; }
.map-popup-link::after { content: "→"; }

/* ─── TRUST LAYER — 3 cards ─── */
.hp-trust-section { padding: 18px 0 44px; }
.hp-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hp-trust-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--gm-card); border: 1px solid var(--gm-line); box-shadow: var(--shadow-card);
}
.hp-trust-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--gm-green-100); flex-shrink: 0; display: grid; place-items: center; font-size: 20px;
}
.hp-trust-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--gm-ink); }
.hp-trust-card p  { font-size: 13px; color: var(--gm-ink-muted); line-height: 1.55; margin: 0; }

/* ─── TIMELINE — 6 era cards ─── */
.hp-timeline-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.hp-timeline-card {
  padding: 18px 14px; border-radius: var(--radius-lg);
  background: var(--gm-card); border: 1px solid var(--gm-line);
  box-shadow: var(--shadow-card); text-align: center;
  transition: all var(--gm-transition); display: flex; flex-direction: column; gap: 5px;
  text-decoration: none; color: inherit;
}
.hp-timeline-card:hover { border-color: var(--gm-green-700); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.hp-timeline-card.featured { background: var(--gm-green-900); color: #fff; border-color: var(--gm-green-900); }
.hp-timeline-card.regional-only { border-color: rgba(30,64,175,.25); background: var(--gm-vis-regional-bg); }
.tc-era { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gm-green-700); }
.hp-timeline-card.featured .tc-era { color: rgba(255,255,255,.75); }
.hp-timeline-card.regional-only .tc-era { color: var(--gm-vis-regional); }
.tc-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.hp-timeline-card.featured .tc-name { color: #fff; }
.hp-timeline-card.regional-only .tc-name { color: var(--gm-vis-regional); }
.tc-count { font-size: 12px; color: var(--gm-ink-light); margin-top: 2px; }
.hp-timeline-card.featured .tc-count { color: rgba(255,255,255,.6); }

/* ─── STORIES — editorial 1 main + 3 mini ─── */
.hp-story-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; }
.hp-story-main {
  border-radius: var(--radius-xl); overflow: hidden;
  background: linear-gradient(180deg, #D8C9A8, #EDE4CF);
  border: 1px solid var(--gm-line); min-height: 360px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; position: relative; box-shadow: var(--shadow-card);
  cursor: pointer; transition: box-shadow var(--gm-transition); text-decoration: none; color: inherit;
}
.hp-story-main:hover { box-shadow: var(--shadow-hover); }
.hp-story-main-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(86,122,98,.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(86,122,98,.08) 1px, transparent 1px);
  background-size: 36px 36px; opacity: .4;
}
.hp-story-main-content { position: relative; z-index: 1; }
.hp-story-main-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 10px; }
.hp-story-era-badge {
  display: inline-block; padding: 5px 12px; border-radius: var(--radius-full);
  background: rgba(31,77,58,.12); border: 1px solid rgba(31,77,58,.2);
  font-size: 12px; font-weight: 600; color: var(--gm-green-900);
  letter-spacing: .04em; text-transform: uppercase;
}
.hp-story-main h3 { font-size: 21px; font-weight: 700; color: var(--gm-ink); line-height: 1.25; margin-bottom: 8px; }
.hp-story-main p { font-size: 14px; color: var(--gm-ink-muted); line-height: 1.6; margin-bottom: 12px; }
.hp-story-main-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.hp-story-meta { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--gm-ink-muted); }

.hp-story-side { display: flex; flex-direction: column; gap: 12px; }
.hp-story-mini {
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--gm-card); border: 1px solid var(--gm-line);
  box-shadow: var(--shadow-card); cursor: pointer; flex: 1;
  transition: all var(--gm-transition); text-decoration: none; color: inherit; display: block;
}
.hp-story-mini:hover { border-color: var(--gm-green-700); box-shadow: var(--shadow-hover); }
.hp-story-mini-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.hp-story-mini-location { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gm-green-700); }
.hp-story-mini h4 { font-size: 14px; font-weight: 700; color: var(--gm-ink); line-height: 1.3; margin-bottom: 5px; }
.hp-story-mini p { font-size: 13px; color: var(--gm-ink-muted); line-height: 1.5; margin-bottom: 10px; }
.hp-story-mini-footer { display: flex; justify-content: space-between; align-items: center; }

/* ─── MULTIMODAL — 3-col grid ─── */
.hp-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hp-media-card {
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--gm-card); border: 1px solid var(--gm-line);
  box-shadow: var(--shadow-card); cursor: pointer; transition: all var(--gm-transition);
}
.hp-media-card:hover { border-color: var(--gm-green-700); box-shadow: var(--shadow-hover); }
.hp-media-thumb {
  height: 100px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gm-clay), var(--gm-paper));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.hp-media-thumb.audio-thumb { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); }
.hp-media-thumb.video-thumb { background: linear-gradient(135deg, #FEE2E2, #FECACA); }
.hp-media-thumb.image-thumb { background: linear-gradient(135deg, #E0F2FE, #BAE6FD); }
.hp-media-play {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.hp-media-play svg { width: 16px; height: 16px; fill: var(--gm-ink); }
.hp-media-duration {
  position: absolute; bottom: 6px; right: 8px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 6px;
}
.hp-media-card-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.hp-media-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; color: var(--gm-ink); }
.hp-media-card p { font-size: 12px; color: var(--gm-ink-muted); line-height: 1.5; margin-bottom: 10px; }
.hp-media-card-footer { display: flex; justify-content: space-between; align-items: center; }

/* ─── PEOPLE — 4-col grid ─── */
.hp-people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ─── CONTRIBUTE — 3 steps ─── */
.hp-contribute-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hp-contribute-card {
  padding: 26px 20px; border-radius: var(--radius-lg);
  background: var(--gm-card); border: 1px solid var(--gm-line); box-shadow: var(--shadow-card);
}
.hp-contribute-step {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: var(--gm-green-900); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; margin-bottom: 14px;
}
.hp-contribute-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--gm-ink); }
.hp-contribute-card p { font-size: 14px; color: var(--gm-ink-muted); line-height: 1.6; margin-bottom: 14px; }
.upload-types { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.upload-type-tag {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-md);
  border: 1px solid var(--gm-line); background: var(--gm-paper);
  font-size: 12px; font-weight: 500; color: var(--gm-ink-muted);
}
.status-tracker { display: flex; gap: 0; margin-bottom: 14px; }
.status-step { flex: 1; text-align: center; position: relative; padding-top: 28px; }
.status-step::before {
  content: ''; position: absolute; top: 10px; left: 50%;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gm-green-900); border: 2px solid var(--gm-green-900);
  transform: translateX(-50%); z-index: 1;
}
.status-step::after {
  content: ''; position: absolute; top: 19px; left: 50%;
  height: 2px; width: 100%; background: var(--gm-line);
}
.status-step:last-child::after { display: none; }
.status-step.done::before   { background: var(--gm-verified); border-color: var(--gm-verified); }
.status-step.active::before { background: var(--gm-green-900); box-shadow: 0 0 0 4px rgba(31,77,58,.15); }
.status-step.waiting::before{ background: #fff; border-color: var(--gm-line); }
.status-step span { font-size: 11px; color: var(--gm-ink-muted); font-weight: 500; }
.hp-contribute-cta {
  font-size: 13px; font-weight: 600; color: var(--gm-green-700);
  display: flex; align-items: center; gap: 4px; text-decoration: none;
}
.hp-contribute-cta::after { content: "→"; }

/* ─── Data error banner ─── */
.data-error-banner {
  display: flex; align-items: center; gap: 8px;
  background: #FFF8E1; border-left: 4px solid #F59E0B;
  color: #92400E; padding: 10px 16px; border-radius: 6px;
  font-size: 14px; margin-bottom: 12px;
}

/* ─── RESPONSIVE — homepage ─── */
@media (max-width: 980px) {
  .hp-hero-inner { grid-template-columns: 1fr; }
  .hp-hero-map { min-height: 280px; }
  .hp-trust-grid { grid-template-columns: 1fr; }
  .hp-timeline-grid { grid-template-columns: repeat(3, 1fr); }
  .hp-story-grid { grid-template-columns: 1fr; }
  .hp-story-main { min-height: 280px; }
  .hp-people-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-contribute-grid { grid-template-columns: 1fr; }
  .hp-media-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hp-hero { padding: 32px 0 24px; }
  .hp-hero h1 { font-size: 30px; }
  .hp-hero-search { flex-direction: column; }
  .hp-timeline-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-people-grid { grid-template-columns: 1fr; }
  .hp-media-grid { grid-template-columns: 1fr; }
}
