/* ==========================================================================
   HERO SECTION & INTERACTIVE PIXEL SCHOOL MAP STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero Welcome Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  padding: 4rem 0 6rem 0;
  overflow: hidden;
  background: radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
}

.hero-grid-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.hero-content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Left Hero Column */
.hero-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--accent-sky);
  padding: 0.4rem 0.9rem;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--accent-sky);
  margin-bottom: 1.5rem;
  box-shadow: 2px 2px 0px #000;
}

.hero-main-title {
  font-size: 3rem;
  font-family: var(--font-pixel-heading);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.hero-main-title span.highlight-cyber {
  color: var(--accent-sky);
  display: inline-block;
  position: relative;
}

.hero-lead-text {
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

/* School Live Stats Row */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
}

.stat-item-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  padding: 0.85rem;
  text-align: center;
  transition: var(--transition-fast);
}

.stat-item-box:hover {
  border-color: var(--accent-sky);
  transform: translateY(-3px);
}

.stat-number {
  font-family: var(--font-pixel-heading);
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Right Hero Column: Animated Mascot Vista */
.hero-mascot-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mascot-stage-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 3px solid var(--accent-sky);
  padding: 2.5rem 2rem;
  box-shadow: 6px 6px 0px #020617, 0 0 35px rgba(56, 189, 248, 0.25);
  text-align: center;
}

.mascot-stage-frame::before {
  content: 'STAGE 01: WELCOME PLAZA';
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--accent-blue);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--accent-sky);
}

.hero-mascot-img {
  width: 220px;
  height: 250px;
  margin: 0 auto;
  animation: mascotHover 3s ease-in-out infinite;
  display: block;
}

@keyframes mascotHover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.mascot-dialogue-bubble {
  background: #0f172a;
  border: 2px solid var(--accent-gold);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--text-main);
  line-height: 1.6;
  position: relative;
  box-shadow: 3px 3px 0px #000;
}

.mascot-dialogue-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--accent-gold) transparent;
}

/* Minimized mascot transition state */
.hero-mascot-wrapper.mascot-minimized .mascot-stage-frame {
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Section 3: Interactive Pixel School Adventure Map
   -------------------------------------------------------------------------- */
.pixel-map-wrapper {
  background: #090d16;
  border: 3px solid var(--accent-sky);
  box-shadow: 6px 6px 0px #020617, 0 0 30px rgba(56, 189, 248, 0.2);
  position: relative;
  overflow: hidden;
}

/* Map Top HUD Header */
.map-hud-header {
  background: #020617;
  border-bottom: 2px solid #1e293b;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.map-hud-title {
  font-family: var(--font-pixel-heading);
  font-size: 0.85rem;
  color: var(--accent-sky);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-hud-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.coord-value {
  color: var(--accent-gold);
}

/* Map Interactive Canvas Canvas Layout */
.pixel-map-viewport {
  position: relative;
  width: 100%;
  height: 540px;
  background-color: #0c1222;
  background-image: 
    radial-gradient(#1e3a8a 1px, transparent 1px),
    linear-gradient(to right, rgba(30, 58, 138, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 138, 0.15) 1px, transparent 1px);
  background-size: 20px 20px, 40px 40px, 40px 40px;
  overflow: hidden;
}

/* Pixel School Isometric Grounds Vector/Graphic Layers */
.map-school-graphic {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}

/* Map Interactive Pins Layer */
.map-nodes-layer {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.pixel-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  border: 2px solid var(--accent-sky);
  box-shadow: 3px 3px 0px #000;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.pixel-map-pin:hover, .pixel-map-pin:focus {
  transform: translate(-50%, -60%) scale(1.08);
  border-color: var(--accent-gold);
  background: var(--accent-blue);
  box-shadow: 4px 4px 0px #000, 0 0 15px rgba(251, 191, 36, 0.5);
  outline: none;
}

.pin-icon {
  font-size: 1.15rem;
}

.pin-label-tag {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: #ffffff;
  white-space: nowrap;
}

.pin-beacon {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: beaconPulse 1.8s infinite;
}

@keyframes beaconPulse {
  0% { transform: translateX(-50%) scale(0.8); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

/* Animated Player Marker on Map */
.map-player-marker {
  position: absolute;
  left: 48%;
  top: 22%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  z-index: 20;
  pointer-events: none;
  transition: left 0.5s ease, top 0.5s ease;
}

.map-player-marker img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7));
}

.map-player-marker.walking {
  animation: markerStep 0.25s infinite alternate;
}

@keyframes markerStep {
  0% { transform: translate(-50%, -50%) rotate(-6deg); }
  100% { transform: translate(-50%, -50%) rotate(6deg); }
}

/* Dynamic Map Tooltip Box */
.map-node-tooltip {
  position: absolute;
  bottom: 20px;
  left: 20px;
  max-width: 340px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid var(--accent-sky);
  padding: 1rem 1.25rem;
  box-shadow: 4px 4px 0px #000, 0 0 20px rgba(0, 0, 0, 0.6);
  z-index: 30;
  display: none;
  animation: fadeInTooltip 0.2s ease;
}

.map-node-tooltip.active {
  display: block;
}

@keyframes fadeInTooltip {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tooltip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
}

.tooltip-title {
  font-family: var(--font-pixel-heading);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.tooltip-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.tooltip-cta {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-gold);
}

/* Accessibility Fallback List */
.map-accessible-list {
  background: var(--bg-secondary);
  border-top: 2px solid #1e293b;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
}

.map-accessible-list summary {
  cursor: pointer;
  color: var(--accent-sky);
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  margin-bottom: 0.5rem;
}

.map-accessible-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
  list-style: none;
}

.map-accessible-links a {
  background: #1e293b;
  border: 1px solid #334155;
  color: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  text-decoration: none;
}
.map-accessible-links a:hover {
  border-color: var(--accent-sky);
  color: var(--accent-sky);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-content-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-main-title {
    font-size: 2.25rem;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .pixel-map-viewport {
    height: 480px;
  }
}

@media (max-width: 600px) {
  .hero-main-title {
    font-size: 1.75rem;
  }
  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .pixel-map-viewport {
    height: 420px;
  }
  .pin-label-tag {
    display: none;
  }
  .pixel-map-pin {
    padding: 0.4rem;
  }
  .map-node-tooltip {
    left: 10px; right: 10px; bottom: 10px;
    max-width: none;
  }
}
