/* ============================================================
   Van Hero — Live Hero Plugin CSS
   ============================================================
   
   CSS SCOPING STRATEGY:
   All rules are wrapped under .vh-hero-root parent selector.
   This raises specificity high enough to beat Elementor's defaults
   WITHOUT needing !important on every rule.
   
   The wrapper is added by the renderer around the hero markup.
   
   For a small number of properties where Elementor/theme absolutely
   try to override (font-family resets on buttons, h1 sizing, etc.),
   !important is used SELECTIVELY.
   
   ============================================================ */

/* Brand tokens - scoped to plugin root */
.vh-hero-root {
  --color-primary-blue: #1E3A8A;
  --color-deep-blue: #0B1F4A;
  --color-navy-darker: #081632;
  --color-soft-lavender: #EEF2FF;
  --color-soft-grey: #E9EBF0;
  --color-yellow: #FFD60A;
  --color-yellow-soft: #FFF8D6;
  --color-green: #10B981;
  --color-green-soft: #DCFCE7;
  --color-blue-dot: #BCC4E0;
  --color-white: #FFFFFF;
  --color-grey-text: #5A6478;
  --color-border: #E5E9F2;
  --font-heading: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --shadow-card: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-tracker: 0 12px 28px rgba(15, 23, 42, 0.18);
}

/* Reset INSIDE the hero root only - won't affect rest of page */
.vh-hero-root *,
.vh-hero-root *::before,
.vh-hero-root *::after {
  box-sizing: border-box;
}
.vh-hero-root img { max-width: 100%; display: block; }

/* ============================================================
   HERO Section CSS (scoped under .vh-hero-root)
   ============================================================ */
/* ============================================================
   HERO (v2 snake-grid, unchanged design)
   ============================================================ */
.vh-hero-root .vh-hero {
  width: 100%;
  min-height: 720px;
  background: linear-gradient(90deg, #EEF2FF 0%, #EEF2FF 48%, #EAF1FF 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.vh-hero-root .vh-hero__content {
  padding: 86px 60px 66px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  max-width: 640px;
  position: relative;
  z-index: 2;
}
.vh-hero-root .vh-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-yellow);
  color: var(--color-deep-blue);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 20px;
  width: fit-content;
}
.vh-hero-root .vh-h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-deep-blue);
  max-width: 500px;
}
.vh-hero-root .vh-pulse-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-green);
  margin-left: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: vh-pulse 1.5s infinite;
}
@keyframes vh-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.vh-hero-root .vh-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.vh-hero-root .vh-stat__number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--color-deep-blue);
  line-height: 1;
}
.vh-hero-root .vh-stat__number small { font-size: 1.1rem; margin-left: 2px; }
.vh-hero-root .vh-stat__number.vh-stat--bump, .vh-hero-root .vh-stat-row__value.vh-stat--bump { animation: vh-stat-bump 0.4s ease; }
@keyframes vh-stat-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); color: var(--color-green); }
  100% { transform: scale(1); }
}
.vh-hero-root .vh-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-grey-text);
  margin-top: 4px;
}
.vh-hero-root .vh-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.vh-hero-root .vh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  border: none;
  font-family: var(--font-body);
}
.vh-hero-root .vh-btn--primary { background: var(--color-yellow); color: var(--color-deep-blue); }
.vh-hero-root .vh-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(255, 214, 10, 0.4); }
.vh-hero-root .vh-btn--outline { background: transparent; color: var(--color-deep-blue); border: 2px solid var(--color-deep-blue); }
.vh-hero-root .vh-btn--outline:hover { background: var(--color-deep-blue); color: var(--color-white); }
.vh-hero-root .vh-trust { display: flex; gap: 32px; flex-wrap: wrap; }
.vh-hero-root .vh-trust__item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-grey-text);
}
.vh-hero-root .vh-trust__icon { width: 16px; height: 16px; color: var(--color-deep-blue); flex-shrink: 0; }
.vh-hero-root .vh-hero__grid {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 720px;
  background: #EAF1FF;
  isolation: isolate;
}
.vh-hero-root .vh-canvas { width: 100%; height: 100%; display: block; }
.vh-hero-root .vh-map-credit {
  position: absolute; bottom: 8px; right: 14px; z-index: 5;
  font-size: 10px; letter-spacing: 0.02em;
  color: rgba(11, 31, 74, 0.56);
  background: rgba(255, 255, 255, 0.72);
  padding: 2px 7px; border-radius: 5px;
  pointer-events: none; user-select: none;
}

.vh-hero-root .vh-activity-card {
  position: absolute;
  top: 60px; right: 40px;
  z-index: 8;
  width: 300px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(11, 31, 74, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.82);
  transition: width 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease;
}
.vh-hero-root .vh-activity-card--collapsed { width: auto; padding: 12px 16px; }
.vh-hero-root .vh-activity-card__header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 20px;
  width: 100%; background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; color: inherit; white-space: nowrap;
}
.vh-hero-root .vh-activity-card--collapsed .vh-activity-card__header { margin-bottom: 0; }
.vh-hero-root .vh-activity-card__header:focus-visible {
  outline: 3px solid rgba(255, 214, 10, 0.8);
  outline-offset: 5px;
  border-radius: 10px;
}
.vh-hero-root .vh-activity-card__head-right { display: flex; align-items: center; gap: 10px; }
.vh-hero-root .vh-activity-card__chev { color: var(--color-grey-text); transition: transform 0.25s ease; flex-shrink: 0; }
.vh-hero-root .vh-activity-card--collapsed .vh-activity-card__chev { transform: rotate(-90deg); }
.vh-hero-root .vh-activity-card__body {
  overflow: hidden; max-height: 520px; opacity: 1;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}
.vh-hero-root .vh-activity-card--collapsed .vh-activity-card__body { max-height: 0; opacity: 0; }
.vh-hero-root .vh-activity-card__title {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 1.1rem;
  color: var(--color-deep-blue);
  display: flex; align-items: center; gap: 8px;
}
.vh-hero-root .vh-mini-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--color-green); animation: vh-pulse 1.5s infinite; }
.vh-hero-root .vh-ref-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--color-grey-text);
  background: var(--color-soft-lavender);
  padding: 4px 8px; border-radius: 6px;
}
.vh-hero-root .vh-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--color-soft-lavender);
  border-radius: 10px;
  margin-bottom: 8px;
}
.vh-hero-root .vh-stat-row__label { font-size: 0.9rem; color: var(--color-grey-text); }
.vh-hero-root .vh-stat-row__value { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--color-deep-blue); }
.vh-hero-root .vh-stat-row--yellow { background: var(--color-yellow-soft); }
.vh-hero-root .vh-divider { height: 1px; background: var(--color-border); margin: 16px 0; }
.vh-hero-root .vh-card-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-grey-text);
  margin-bottom: 12px;
}
.vh-hero-root .vh-feed { display: flex; flex-direction: column; gap: 10px; }
.vh-hero-root .vh-feed__item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; }
.vh-hero-root .vh-feed__item--new { animation: vh-feed-in 0.45s ease; }
@keyframes vh-feed-in {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .vh-hero-root .vh-pulse-dot, .vh-hero-root .vh-mini-pulse, .vh-hero-root .vh-feed__item--new, .vh-hero-root .vh-stat__number.vh-stat--bump, .vh-hero-root .vh-stat-row__value.vh-stat--bump {
    animation: none;
  }
}
.vh-hero-root .vh-feed__bar { width: 3px; align-self: stretch; background: var(--color-blue-dot); border-radius: 2px; flex-shrink: 0; margin-top: 2px; }
.vh-hero-root .vh-feed__item--active .vh-feed__bar { background: var(--color-green); }
.vh-hero-root .vh-feed__content { flex: 1; line-height: 1.4; }
.vh-hero-root .vh-feed__location { font-weight: 700; color: var(--color-deep-blue); }
.vh-hero-root .vh-feed__status { color: var(--color-grey-text); font-size: 0.78rem; }
.vh-hero-root .vh-feed__time { font-size: 0.75rem; color: var(--color-grey-text); margin-left: 8px; flex-shrink: 0; }

/* ============================================================
   SITE-WIDE STICKY TRACKER (bottom-right)
   ============================================================ */
.vh-hero-root .vh-tracker {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 280px;
  background: var(--color-white);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-tracker);
  border: 1px solid var(--color-border);
  z-index: 999;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.vh-hero-root .vh-tracker--hidden { transform: translateY(120%); opacity: 0; }
.vh-hero-root .vh-tracker__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.vh-hero-root .vh-tracker__live-label { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--color-deep-blue); }
.vh-hero-root .vh-tracker__close { background: none; border: none; color: var(--color-grey-text); cursor: pointer; font-size: 16px; padding: 0; line-height: 1; }
.vh-hero-root .vh-tracker__message { font-size: 0.9rem; font-weight: 700; color: var(--color-deep-blue); line-height: 1.3; margin-bottom: 2px; }
.vh-hero-root .vh-tracker__time { font-size: 0.75rem; color: var(--color-grey-text); }


/* ============================================================
   CRITICAL OVERRIDES — selective !important
   These specific properties commonly get overridden by themes/Elementor.
   ============================================================ */
.vh-hero-root .vh-h1 {
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
}
.vh-hero-root .vh-btn {
  font-family: var(--font-body) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
}
.vh-hero-root .vh-btn--primary {
  background: var(--color-yellow) !important;
  color: var(--color-deep-blue) !important;
}
.vh-hero-root .vh-btn--outline {
  background: transparent !important;
  color: var(--color-deep-blue) !important;
  border: 2px solid var(--color-deep-blue) !important;
}

/* ------------------------------------------------------------
   Neutralise theme / Elementor <button> styling.
   The activity-card header and the tracker close (×) are <button>
   elements. The theme applies a navy background + focus/active state
   to buttons, which is the blue bar on the activity card and the blue
   circle on the × you saw. These resets force them transparent in
   every state. Keyboard focus still gets the yellow :focus-visible
   outline defined earlier — only mouse focus is stripped.
   ------------------------------------------------------------ */
.vh-hero-root .vh-activity-card__header,
.vh-hero-root .vh-activity-card__header:hover,
.vh-hero-root .vh-activity-card__header:focus,
.vh-hero-root .vh-activity-card__header:active,
.vh-hero-root .vh-tracker__close,
.vh-hero-root .vh-tracker__close:hover,
.vh-hero-root .vh-tracker__close:focus,
.vh-hero-root .vh-tracker__close:active {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.vh-hero-root .vh-activity-card__header:focus:not(:focus-visible),
.vh-hero-root .vh-tracker__close:focus:not(:focus-visible) {
  outline: none !important;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .vh-hero-root .vh-hero { min-height: 620px; }
  .vh-hero-root .vh-hero__content { padding: 64px 40px 56px 48px; }
  .vh-hero-root .vh-h1 { font-size: 2.75rem !important; }
}

@media (max-width: 900px) {
  .vh-hero-root .vh-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .vh-hero-root .vh-hero__content {
    padding: 56px 24px 48px 24px;
    max-width: 100%;
  }
  .vh-hero-root .vh-h1 { font-size: 2.25rem !important; }
  .vh-hero-root .vh-hero__grid { min-height: 500px; }
  .vh-hero-root .vh-activity-card {
    top: 24px;
    right: 16px;
    left: 16px;
    width: auto;
  }
  /* The opened card can exceed the shorter mobile map area and get clipped
     by .vh-hero { overflow:hidden }. Cap it and let it scroll inside. */
  .vh-hero-root .vh-activity-card__body {
    max-height: 300px;
    overflow-y: auto;
  }
  .vh-hero-root .vh-tracker {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 16px;
    max-width: 360px;
  }
}

@media (max-width: 560px) {
  .vh-hero-root .vh-h1 { font-size: 1.85rem !important; }
  .vh-hero-root .vh-hero__content { padding: 40px 20px 32px 20px; gap: 20px; }
  .vh-hero-root .vh-stats { gap: 18px; flex-wrap: wrap; }
  .vh-hero-root .vh-stat__number { font-size: 1.85rem; }
  .vh-hero-root .vh-cta-row { flex-direction: column; align-items: stretch; }
  .vh-hero-root .vh-btn { width: 100%; justify-content: center; }
  .vh-hero-root .vh-hero__grid { min-height: 440px; }
}

/* ============================================================
   ACCESSIBILITY — respect user's motion preferences
   Some users have vestibular disorders and need motion disabled.
   We hide the canvas animations but keep the static layout.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .vh-hero-root .vh-canvas {
    opacity: 0;
  }
  .vh-hero-root .vh-pulse-dot,
  .vh-hero-root .vh-mini-pulse {
    animation: none !important;
  }
  .vh-hero-root .vh-pulse-dot,
  .vh-hero-root .vh-mini-pulse {
    background: var(--color-green);
  }
}

/* ============================================================
   PRINT — hide hero animation, sticky tracker on print
   ============================================================ */
@media print {
  .vh-hero-root .vh-canvas,
  .vh-hero-root .vh-tracker {
    display: none;
  }
}
