/* ═══════════════════════════════════════════════════════════════
   AFROCON LIMITED — CANADA PAGE
   Page-specific overrides (supplements Tailwind from index.css)
   ═══════════════════════════════════════════════════════════════ */

/* ── CANADA HERO ───────────────────────────────────────────── */
.canada-hero {
  min-height: 100vh;
}

/* Floating particles background */
.canada-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 40%, rgba(255, 255, 255, 0.12) 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  animation: floatParticles 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatParticles {
  0%   { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-30px) translateX(15px); }
}

/* ── PRINT STYLES ──────────────────────────────────────────── */
@media print {
  .canada-hero {
    min-height: 0;
    background: #fff !important;
    color: #000;
  }

  .canada-hero::before {
    display: none;
  }

  nav, footer, .back-to-top {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   RECOGNIZED AROUND THE WORLD — LANDMARKS SECTION
   Premium aviation-inspired design
   ═══════════════════════════════════════════════════════════ */

/* ── Section base ──────────────────────────────────────────── */
.landmarks-section {
  background: linear-gradient(160deg, #fafbff 0%, #f8f9fc 30%, #fdf6f0 60%, #fafbff 100%);
  position: relative;
}

/* ── Route line animation (SVG aviation paths) ────────────── */
.landmarks-route-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: landmarkRouteFlow 12s ease-in-out infinite alternate;
}

@keyframes landmarkRouteFlow {
  0%   { stroke-dashoffset: 600; }
  100% { stroke-dashoffset: -600; }
}

/* ── Card appearance animation (staggered fade-in) ─────── */
.landmark-card {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--card-delay, 0) * 0.15s);
}

.landmarks-section.landmarks-active .landmark-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Card hover — gentle lift & scale ──────────────────── */
.landmark-card-inner {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.4s ease;
}

.landmark-card:hover .landmark-card-inner {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 20px 60px -12px rgba(0, 0, 0, 0.12),
    0 8px 24px -8px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* ── Image zoom on hover ───────────────────────────────── */
.landmark-card:hover .landmark-card-img {
  transform: scale(1.08);
}

/* ── Image container responsive heights ────────────────── */
.landmark-card-media {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

@media (min-width: 768px) {
  .landmark-card-media {
    aspect-ratio: auto;
    min-height: 340px;
  }
}

@media (min-width: 1280px) {
  .landmark-card-media {
    min-height: 380px;
  }
}

/* ── Parallax tilt (mouse-driven via JS) ───────────────── */
.landmark-card-inner {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ── Particle canvas ───────────────────────────────────── */
#landmarks-particles {
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.landmarks-section.landmarks-active #landmarks-particles {
  opacity: 1;
}

/* ── Glow ring pulse on hover ──────────────────────────── */
.landmark-card-glow {
  transition: opacity 0.5s ease;
}

/* ── RESPONSIVE — Mobile (single column, large images) ─── */
@media (max-width: 767px) {
  .landmarks-grid {
    gap: 1.5rem;
  }

  .landmark-card-media {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }
}

/* ── REDUCED MOTION ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .landmark-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .landmark-card-inner {
    transition: box-shadow 0.3s ease;
  }

  .landmark-card:hover .landmark-card-inner {
    transform: none;
  }

  .landmark-card:hover .landmark-card-img {
    transform: none;
  }

  .landmarks-route-line {
    animation: none;
    stroke-dashoffset: 0;
    stroke-dasharray: 12 8;
  }

  #landmarks-particles {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   INTERACTIVE CANADA NETWORK MAP
   ═══════════════════════════════════════════════════════════ */

/* ── Initial hidden state (before scroll) ──────────────── */
.canada-landmass,
.connection-lines {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.data-flow-particles {
  opacity: 0;
  transition: opacity 1s ease;
}

.city-markers .city-marker {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* ── Active state (scroll-triggered) ───────────────────── */
.canada-map-section.map-active .canada-landmass {
  opacity: 1;
}

.canada-map-section.map-active .connection-lines {
  opacity: 1;
  transition-delay: 0.8s;
}

.canada-map-section.map-active .data-flow-particles {
  opacity: 1;
  transition-delay: 1.5s;
}

.canada-map-section.map-active .city-markers .city-marker {
  opacity: 1;
}

.canada-map-section.map-active .city-markers .city-marker:nth-child(1) { transition-delay: 1.0s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(2) { transition-delay: 1.2s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(3) { transition-delay: 1.4s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(4) { transition-delay: 1.6s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(5) { transition-delay: 1.8s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(6) { transition-delay: 2.0s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(7) { transition-delay: 2.2s; }
.canada-map-section.map-active .city-markers .city-marker:nth-child(8) { transition-delay: 2.4s; }

/* ── Canada outline draw-in ────────────────────────────── */
.canada-outline-path {
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  transition: stroke-dashoffset 3s cubic-bezier(0.22, 1, 0.36, 1);
}

.canada-map-section.map-active .canada-outline-path {
  stroke-dashoffset: 0;
}

/* ── Connection line dash animation ────────────────────── */
.connection-line {
  fill: none;
  stroke: url(#connectionGrad);
  stroke-width: 1;
  stroke-dasharray: 8 4;
  opacity: 0.35;
  animation: connectionDashFlow 20s linear infinite;
}

@keyframes connectionDashFlow {
  to { stroke-dashoffset: -120; }
}

/* ── Marker hover effects ──────────────────────────────── */
.city-marker {
  cursor: pointer;
}

.city-marker .marker-dot {
  transition: filter 0.3s ease;
}

.city-marker:hover .marker-dot,
.city-marker:focus-within .marker-dot {
  filter: url(#hqGlow);
}

.city-marker .city-label {
  transition: fill 0.3s ease;
}

.city-marker:hover .city-label,
.city-marker:focus-within .city-label {
  fill: #fff;
}

/* ── Province label hover ──────────────────────────────── */
.province-labels text {
  transition: opacity 0.5s ease;
}

.canada-map-section:hover .province-labels text {
  opacity: 0.7;
}

/* ── Location card bottom-line using feature-card ──────── */
.canada-map-section .feature-card::after {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.canada-map-section .feature-card:first-child::after {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

/* ── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .canada-hero::before {
    animation: none;
  }

  /* Map section — show everything instantly, no motion */
  .canada-outline-path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }

  .connection-line {
    animation: none;
  }

  .canada-landmass,
  .connection-lines,
  .data-flow-particles,
  .city-markers .city-marker {
    opacity: 1;
    transition: none;
  }

  .data-flow-particles circle[r="2"],
  .data-flow-particles circle[r="1.5"],
  .map-particles circle,
  .sparkle-particle {
    display: none;
  }
}
