/* ═══════════════════════════════════════════════════════════
   EPI.C – Global Footprint Map
   Luxury LED backlit world map · brand-aligned premium design
═══════════════════════════════════════════════════════════ */

/* ── Section overrides ──────────────────────────────────── */
.epic-map.rh-section {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 80px;
  overflow: visible;
}

.epic-map > .rh-container {
  padding-left:  7vw;
  padding-right: 7vw;
}

/* ── Header grid ────────────────────────────────────────── */
.epic-map__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-top: 20px;
  margin-bottom: 52px;
}

.epic-map__sub {
  max-width: 400px;
  margin-left: auto;
  padding-bottom: 6px;
}

/* ── Map Stage ──────────────────────────────────────────── */
/* aspect-ratio MUST match the SVG viewBox set in map.js (370 120 640 300)
   so the SVG fills the stage exactly with no letterboxing */
.epic-map__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 640 / 300;
  overflow: visible;
  margin-bottom: 52px;
  background: transparent;
}

/* ── Ambient Glow ───────────────────────────────────────── */
.epic-map__glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  z-index: 1;
}

/* Centered over the Mediterranean/Middle-East region */
.epic-map__glow--bg {
  width: 70%;
  aspect-ratio: 2 / 1;
  top: 10%;
  left: 14%;              /* anchored left of Egypt in crop coords */
  background: radial-gradient(
    ellipse at 40% 60%,
    rgba(191, 138, 56, 0.07) 0%,
    rgba(201, 169, 110, 0.03) 50%,
    transparent 72%
  );
}

/* Tighter warm glow over Egypt–UAE corridor */
.epic-map__glow--mid {
  width: 36%;
  aspect-ratio: 1;
  top: 25%;
  left: 22%;              /* Egypt area in crop coords */
  background: radial-gradient(
    circle,
    rgba(232, 201, 122, 0.07) 0%,
    transparent 65%
  );
}

/* ── SVG World Map ──────────────────────────────────────── */
.epic-map__svg-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.epic-map__svg-wrap svg {
  width: 100%;
  height: 100%;
}

/* All land masses: extremely dim amber tint — backlit panel feel */
.epic-map__svg-wrap svg path,
.epic-map__svg-wrap svg polygon {
  fill:         rgba(201, 169, 110, 0.07);
  stroke:       rgba(201, 169, 110, 0.11);
  stroke-width: 0.4;
  transition:   fill 0.8s ease, filter 0.8s ease;
}

/* Active markets: warm amber glow */
.epic-map__svg-wrap svg path.epic-country--active,
.epic-map__svg-wrap svg polygon.epic-country--active {
  fill:         rgba(201, 169, 110, 0.30);
  stroke:       rgba(232, 201, 122, 0.60);
  stroke-width: 0.9;
  filter:       drop-shadow(0 0 5px rgba(201, 169, 110, 0.45));
}

/* UK HQ country: subtle white-tint rather than gold */
.epic-map__svg-wrap svg path.epic-country--hq,
.epic-map__svg-wrap svg polygon.epic-country--hq {
  fill:         rgba(240, 238, 232, 0.18);
  stroke:       rgba(240, 238, 232, 0.30);
  stroke-width: 0.6;
}

/* ── Connection Lines (SVG injected by JS) ──────────────── */
.epic-map__connections {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

@keyframes epic-dash {
  to { stroke-dashoffset: -280; }
}

/* ── Markers Layer ──────────────────────────────────────── */
.epic-map__markers {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.epic-map__marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  /* stagger entry animations via JS-added class */
}

/* ── Pulsing rings ──────────────────────────────────────── */
.epic-map__marker-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.epic-map__marker-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 122, 0.45);
  animation: epic-ring 3.2s ease-out infinite;
}

.epic-map__marker-ring:nth-child(1) {
  width: 22px;
  height: 22px;
  animation-delay: 0s;
}

.epic-map__marker-ring:nth-child(2) {
  width: 38px;
  height: 38px;
  animation-delay: 0.9s;
}

@keyframes epic-ring {
  0%   { transform: translate(-50%, -50%) scale(0.55); opacity: 0.75; }
  75%  { transform: translate(-50%, -50%) scale(1.9);  opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.9);  opacity: 0; }
}

/* ── Core dot ───────────────────────────────────────────── */
.epic-map__marker-dot {
  position: relative;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 2px rgba(201, 169, 110, 0.28),
    0 0 10px rgba(201, 169, 110, 0.75),
    0 0 22px rgba(201, 169, 110, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.epic-map__marker:hover .epic-map__marker-dot,
.epic-map__marker:focus-within .epic-map__marker-dot {
  transform: scale(1.45);
  box-shadow:
    0 0 0 3px rgba(201, 169, 110, 0.50),
    0 0 18px rgba(201, 169, 110, 0.95),
    0 0 40px rgba(201, 169, 110, 0.50);
}

/* HQ marker — smaller, white */
.epic-map__marker--hq .epic-map__marker-dot {
  width: 7px;
  height: 7px;
  background: rgba(240, 238, 232, 0.80);
  box-shadow:
    0 0 0 2px rgba(240, 238, 232, 0.18),
    0 0 7px rgba(240, 238, 232, 0.55),
    0 0 16px rgba(240, 238, 232, 0.25);
}

/* ── Number badge ───────────────────────────────────────── */
.epic-map__marker-num {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: var(--gold);
  opacity: 0.65;
  white-space: nowrap;
  pointer-events: none;
}

/* HQ text label */
.epic-map__marker-label {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 238, 232, 0.40);
  white-space: nowrap;
  pointer-events: none;
}

/* ── Hover tooltip card ─────────────────────────────────── */
.epic-map__marker-card {
  position: absolute;
  bottom: calc(100% + 13px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(9, 9, 20, 0.93);
  border: 1px solid rgba(201, 169, 110, 0.22);
  border-radius: 5px;
  padding: 11px 15px 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 148px;
  text-align: center;
  z-index: 10;
}

/* Notch */
.epic-map__marker-card::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(201, 169, 110, 0.22);
}

.epic-map__marker:hover .epic-map__marker-card,
.epic-map__marker:focus-within .epic-map__marker-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.epic-map__marker-card-flag {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

.epic-map__marker-card-name {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 3px;
}

.epic-map__marker-card-from {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.epic-map__marker-card-sub {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  color: rgba(240, 238, 232, 0.40);
  margin-top: 1px;
}

/* ── Timezone Clocks ────────────────────────────────────── */
.epic-map__clocks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.epic-map__clock {
  padding: 24px 16px 20px;
  background: rgba(14, 14, 26, 0.45);
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background 0.3s ease;
}

.epic-map__clock:last-child { border-right: none; }

.epic-map__clock:hover {
  background: rgba(201, 169, 110, 0.05);
}

.epic-map__clock-flag {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 10px;
}

.epic-map__clock-time {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}

.epic-map__clock-city {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: rgba(240, 238, 232, 0.50);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.epic-map__clock-label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .epic-map__header {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }
  .epic-map__sub { margin-left: 0; max-width: 100%; }

  .epic-map__clocks {
    grid-template-columns: repeat(3, 1fr);
  }
  .epic-map__clock:nth-child(3) { border-right: none; }
  .epic-map__clock:nth-child(4) { border-top: 1px solid var(--border); }
  .epic-map__clock:nth-child(5) {
    border-top: 1px solid var(--border);
    grid-column: 2;
  }
}

@media (max-width: 768px) {
  .epic-map.rh-section {
    padding-top: 80px;
    padding-bottom: 60px;
  }
  .epic-map__stage {
    /* keep the same aspect ratio — just smaller at this width */
    margin-bottom: 36px;
  }
  /* Keep dots small; hide cards + numbers */
  .epic-map__marker-card { display: none; }
  .epic-map__marker-num  { display: none; }

  .epic-map__clocks {
    grid-template-columns: repeat(2, 1fr);
    border-radius: 4px;
  }
  .epic-map__clock:nth-child(2) { border-right: none; }
  .epic-map__clock:nth-child(3) { border-top: 1px solid var(--border); border-right: 1px solid var(--border); }
  .epic-map__clock:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
  .epic-map__clock:nth-child(5) {
    border-top: 1px solid var(--border);
    grid-column: 1 / -1;
    border-right: none;
  }
  .epic-map__clock-time { font-size: 20px; }
}

@media (max-width: 480px) {
  .epic-map__clock { padding: 18px 10px 14px; }
  .epic-map__clock-time { font-size: 18px; }
  .epic-map__clock-flag { font-size: 16px; }
}
