/* ==========================================================================
   ScrapK - Full Interactive India Map & Branches Network Styles
   Accurate 36-State Vector Layout, Glowing Corridor Arcs, Pulse Beacons, HUD
   ========================================================================== */

/* Main Container Block */
.scrapk-3d-map-block {
  margin-top: 3.5rem;
  border-radius: var(--radius-bento);
  overflow: hidden;
  background: #090e17;
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  box-shadow: 0 30px 80px -20px rgba(37, 99, 235, 0.25), 0 15px 35px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: var(--transition-apple);
}

.scrapk-3d-map-block:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 40px 100px -20px rgba(37, 99, 235, 0.35), 0 20px 45px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   Top Header Bar & Filter Controls
   ========================================== */
.map-3d-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 30, 0.98) 100%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  position: relative;
  z-index: 10;
}

.map-3d-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 650px;
}

.map-3d-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.badge-radar-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: radarBlink 1.4s infinite ease-in-out;
}

@keyframes radarBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.65); }
}

.map-3d-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-3d-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.map-3d-desc strong {
  color: #60a5fa;
}

/* Branch Filter Pills Navigation */
.map-branch-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: rgba(30, 41, 59, 0.7);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.map-branch-filter-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
}

.map-branch-filter-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.map-branch-filter-btn.active {
  background: var(--royal-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.map-branch-filter-btn .dot-ind {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* ==========================================
   Map Viewport Stage
   ========================================== */
.map-stage-wrapper {
  position: relative;
  min-height: 560px;
  background: radial-gradient(ellipse at 50% 30%, #0f172a 0%, #060913 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  overflow: hidden;
  padding: 1.5rem 2rem;
  gap: 2rem;
}

/* Glowing Neon Background Grids */
.map-ambient-glow {
  position: absolute;
  top: 40%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 1;
  filter: blur(50px);
}

.map-grid-mesh {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.6;
}

/* Vector Canvas Column */
.map-canvas-column {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-vector-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.scrapk-full-india-svg {
  width: 100%;
  height: 520px;
  display: block;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
  transition: all 0.3s ease;
}

/* State Paths Styling */
.map-state-path {
  fill: #1e293b;
  stroke: #334155;
  stroke-width: 1.1;
  stroke-linejoin: round;
  stroke-linecap: round;
  cursor: pointer;
  outline: none;
  transition: fill 0.25s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.25s, stroke-width 0.25s, filter 0.25s;
}

.map-state-path:hover {
  fill: #0284c7;
  stroke: #38bdf8;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.7));
}

/* Branch Highlighted States */
.map-state-path.state-agra {
  fill: #dc2626;
  stroke: #ef4444;
  stroke-width: 1.4;
}
.map-state-path.state-agra:hover,
.map-state-path.state-agra.active-branch-state {
  fill: #ef4444;
  stroke: #ffffff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.9));
}

.map-state-path.state-haryana {
  fill: #2563eb;
  stroke: #3b82f6;
  stroke-width: 1.4;
}
.map-state-path.state-haryana:hover,
.map-state-path.state-haryana.active-branch-state {
  fill: #3b82f6;
  stroke: #ffffff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 16px rgba(59, 130, 246, 0.9));
}

.map-state-path.state-rajasthan {
  fill: #d97706;
  stroke: #f59e0b;
  stroke-width: 1.4;
}
.map-state-path.state-rajasthan:hover,
.map-state-path.state-rajasthan.active-branch-state {
  fill: #f59e0b;
  stroke: #ffffff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.9));
}

.map-state-path.state-mp {
  fill: #059669;
  stroke: #10b981;
  stroke-width: 1.4;
}
.map-state-path.state-mp:hover,
.map-state-path.state-mp.active-branch-state {
  fill: #10b981;
  stroke: #ffffff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.9));
}

.map-state-path.state-delhi {
  fill: #7c3aed;
  stroke: #a855f7;
  stroke-width: 1.4;
}
.map-state-path.state-delhi:hover,
.map-state-path.state-delhi.active-branch-state {
  fill: #a855f7;
  stroke: #ffffff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.9));
}

/* State Text Labels */
.state-svg-label {
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  fill: #94a3b8;
  pointer-events: none;
  user-select: none;
}

.state-svg-label.branch-label {
  fill: #ffffff;
  font-size: 9px;
  font-weight: 800;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

/* Logistics Connecting Corridors */
.corridor-path {
  fill: none;
  stroke: rgba(56, 189, 248, 0.35);
  stroke-width: 1.8;
  stroke-dasharray: 4 4;
  animation: corridorDash 1.2s linear infinite;
  transition: all 0.3s ease;
}

.corridor-path.active-corridor {
  stroke: #38bdf8;
  stroke-width: 2.8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

@keyframes corridorDash {
  0% { stroke-dashoffset: 16; }
  100% { stroke-dashoffset: 0; }
}

.corridor-pulse {
  fill: #38bdf8;
  filter: drop-shadow(0 0 6px #38bdf8);
  animation: pulseBeacon 1.6s ease-in-out infinite;
}

/* Branch Location Pins */
.branch-pin-svg {
  cursor: pointer;
  transition: transform 0.25s ease;
}

.branch-pin-svg:hover {
  transform: scale(1.15);
}

.pin-sonar-wave {
  fill: none;
  stroke-width: 2;
  opacity: 0;
  animation: sonarRing 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.wave-hq { stroke: #ef4444; }
.wave-hub { stroke: #38bdf8; }

@keyframes sonarRing {
  0% { r: 5px; opacity: 0.9; }
  100% { r: 24px; opacity: 0; }
}

.pin-base-dot {
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}

.dot-hq { fill: #ef4444; }
.dot-haryana { fill: #3b82f6; }
.dot-rajasthan { fill: #f59e0b; }
.dot-mp { fill: #10b981; }

.pin-tag-text {
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

.pin-tag-text.tag-hq {
  fill: #fef08a;
  font-size: 11px;
}

/* Custom Interactive Tooltip */
.map-custom-tooltip {
  position: absolute;
  display: none;
  z-index: 40;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(37, 99, 235, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  pointer-events: none;
  max-width: 260px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.map-custom-tooltip .tip-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.map-custom-tooltip .tip-badge.hq {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.map-custom-tooltip .tip-badge.hub {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.map-custom-tooltip strong {
  display: block;
  font-size: 0.92rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.map-custom-tooltip span {
  display: block;
  color: #94a3b8;
  font-size: 0.76rem;
}

/* Floating Zoom Tools */
.map-zoom-tools {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.map-tool-btn {
  width: 32px;
  height: 32px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.82rem;
  backdrop-filter: blur(8px);
}

.map-tool-btn:hover {
  background: var(--royal-blue);
  border-color: var(--royal-blue);
  transform: scale(1.08);
}

/* ==========================================
   Floating HUD Inspector Card (Right Column)
   ========================================== */
.map-hud-column {
  position: relative;
  z-index: 5;
  width: 100%;
}

.map-3d-hud-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(37, 99, 235, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.map-3d-hud-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(37, 99, 235, 0.3);
}

.hud-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.hud-branch-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
}

.hud-branch-badge.hq {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.hud-branch-badge.hub {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.hud-branch-badge.all {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.hud-live-tag {
  font-size: 0.75rem;
  color: #22c55e;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hud-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-location {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* HUD Spec Boxes */
.hud-specs-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0.9rem;
}

.hud-spec-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hud-spec-k {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 700;
}

.hud-spec-v {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hud-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.hud-actions .btn-apple-primary {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hud-actions .btn-apple-secondary {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hud-actions .btn-apple-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ==========================================
   4 Primary State Branches Cards Grid
   ========================================== */
.branches-3d-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 30, 1) 100%);
  border-top: 1px solid rgba(37, 99, 235, 0.15);
}

.branch-3d-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.branch-3d-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.branch-3d-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Active Highlight for Cards */
.branch-3d-card.card-agra.active-card,
.branch-3d-card.card-agra:hover {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.08);
}
.branch-3d-card.card-agra::before { background: #ef4444; }

.branch-3d-card.card-haryana.active-card,
.branch-3d-card.card-haryana:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.08);
}
.branch-3d-card.card-haryana::before { background: #3b82f6; }

.branch-3d-card.card-rajasthan.active-card,
.branch-3d-card.card-rajasthan:hover {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.08);
}
.branch-3d-card.card-rajasthan::before { background: #f59e0b; }

.branch-3d-card.card-mp.active-card,
.branch-3d-card.card-mp:hover {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.08);
}
.branch-3d-card.card-mp::before { background: #10b981; }

.bcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.bcard-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.bcard-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.bcard-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.15rem 0;
  letter-spacing: -0.01em;
}

.bcard-state {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.bcard-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.4;
}

.bcard-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

.bcard-stat-val {
  font-weight: 800;
  font-size: 0.85rem;
}

/* ==========================================
   Responsive Adaptations
   ========================================== */
@media (max-width: 1024px) {
  .map-stage-wrapper {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem;
    gap: 1.5rem;
  }
  .branches-3d-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .map-3d-header {
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .map-branch-filters {
    width: 100%;
    overflow-x: auto;
    padding: 0.3rem;
  }
  .map-branch-filter-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
  }
  .map-stage-wrapper {
    padding: 1rem;
  }
  .scrapk-full-india-svg {
    height: 420px;
  }
  .branches-3d-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.75rem;
  }
  .hud-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .map-3d-title {
    font-size: 1.15rem;
  }
  .map-3d-desc {
    font-size: 0.8rem;
  }
  .scrapk-full-india-svg {
    height: 320px;
  }
  .map-3d-hud-card {
    padding: 1rem 0.85rem;
  }
}
