/* =============================================================================
 * FWO Player Portal - Directions & Maps (Peta Dunia & Laluan Pengangkutan)
 * ========================================================================== */

.directions-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dir-tab-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.dir-tab-btn:hover {
  border-color: var(--gold);
  color: var(--gold2);
}

.dir-tab-btn.is-active {
  background: linear-gradient(135deg, rgba(201,162,75,0.22) 0%, rgba(201,162,75,0.06) 100%);
  border-color: var(--gold);
  color: var(--gold2);
  box-shadow: 0 2px 8px rgba(201,162,75,0.15);
}

/* Maps Grid */
.maps-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold2);
  margin: 1.75rem 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
}

.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.map-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.map-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,162,75,0.5);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 14px rgba(201,162,75,0.12);
}

.map-preview-wrap {
  width: 100%;
  height: 180px;
  background: #020617;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.map-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.map-card:hover .map-preview-wrap img {
  transform: scale(1.05);
}

.map-zoom-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--gold2);
  border: 1px solid rgba(201,162,75,0.4);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  backdrop-filter: blur(4px);
}

.map-card-body {
  padding: 0.95rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.map-card-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

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

/* Routes Network Grid */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
}

.route-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.route-card:hover {
  border-color: rgba(201,162,75,0.4);
}

.route-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
}

.route-station {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--gold2);
  margin: 0;
}

.route-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.dest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dest-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.4);
}

.dest-arrow {
  color: #38bdf8;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Lightbox Modal */
.map-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.map-modal.open {
  display: flex;
}

.map-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.map-modal-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(201,162,75,0.4);
  box-shadow: 0 0 35px rgba(0,0,0,0.8);
}

.map-modal-caption {
  margin-top: 0.75rem;
  color: var(--gold2);
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
}

.map-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.5rem;
}

.map-modal-close:hover {
  color: var(--gold2);
}

@media (max-width: 640px) {
  .maps-grid, .routes-grid {
    grid-template-columns: 1fr;
  }
}
