/**
 * events/css/event-page.css — SEDS Kosmorena 2026 Event Details Styling
 * Strictly preserves the existing website UI design system, colors, fonts, and 3D card language.
 */

@import url('/homepage/css/style.css');

/* ── Event Page Header & Back Navigation ──────────────────────────────────── */
.event-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-top: 10px;
}

.back-to-events-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.back-to-events-btn:hover {
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.08);
  transform: translateX(-4px);
}

.event-category-pill {
  display: none !important;
}

/* ── Event Details Hero Section ───────────────────────────────────────────── */
.event-hero-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}

.event-poster-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 7, 18, 0.7);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  aspect-ratio: 1 / 1;
}

.event-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-poster-frame:hover .event-poster-img {
  transform: scale(1.03);
}

.event-hero-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-hero-num {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--color-white-50);
  letter-spacing: 0.25em;
}

.event-hero-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0;
}

.event-hero-tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: #38bdf8;
  line-height: 1.4;
  margin: 0;
}

.event-hero-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #cbd5e1;
  margin: 8px 0 16px 0;
}

.event-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.btn-primary-register:hover {
  background: #00f0ff;
  border-color: #00f0ff;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.6);
  transform: translateY(-2px);
}

.btn-secondary-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.btn-secondary-location:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ── Quick Specs Matrix ───────────────────────────────────────────────────── */
.event-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}

.spec-card {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.spec-header-row .preview-icon {
  width: 15px;
  height: 15px;
  stroke: #ffffff;
  flex-shrink: 0;
  display: block;
}

.spec-header-row .spec-label {
  margin: 0;
}

.spec-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--color-white-50);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.spec-val {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

/* ── Content Sections (About, Topics, Rules, Timeline, Prizes) ─────────────── */
.event-detail-block {
  margin-bottom: 64px;
}

.detail-block-header {
  margin-bottom: 24px;
}

.detail-block-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #38bdf8;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.detail-block-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  margin: 6px 0 0 0;
}

/* Topics Chips Grid */
.topics-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.topic-chip-card {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
}

.topic-chip-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
}

.topic-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 10px #00f0ff;
  flex-shrink: 0;
}

.topic-text {
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 500;
}

/* Rules List */
.rules-card-container {
  padding: 32px 36px;
}

.rules-ordered-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rules-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #cbd5e1;
}

.rule-number-badge {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Timeline Stages Grid */
.timeline-stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.timeline-stage-card {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}

.timeline-step-badge {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #38ef7d;
  background: rgba(56, 239, 125, 0.1);
  padding: 2px 8px;
  border-radius: 3px;
  width: fit-content;
  margin-bottom: 12px;
}

.timeline-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.timeline-time-pill {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #38bdf8;
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* Prizes Podium Grid */
.prizes-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.prize-card {
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.prize-card.prize-rank-1 {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.12);
  transform: translateY(-8px);
}

.prize-card.prize-rank-2 {
  border-color: rgba(192, 192, 192, 0.3);
}

.prize-card.prize-rank-3 {
  border-color: rgba(205, 127, 50, 0.3);
}

.prize-badge {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.prize-rank-1 .prize-badge {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.prize-rank-2 .prize-badge {
  background: rgba(192, 192, 192, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(192, 192, 192, 0.4);
}

.prize-rank-3 .prize-badge {
  background: rgba(205, 127, 50, 0.15);
  color: #cd7f32;
  border: 1px solid rgba(205, 127, 50, 0.4);
}

.prize-amount {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 4px 0;
}

.prize-perks {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

/* ── Interactive Location / Map Section ───────────────────────────────────── */
.event-location-section {
  margin-top: 80px;
  margin-bottom: 80px;
}

.map-layout-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.map-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 20px;
}

.map-venue-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.map-coords-pill {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #38ef7d;
  background: rgba(56, 239, 125, 0.1);
  border: 1px solid rgba(56, 239, 125, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
}

/* Map Canvas Container */
.interactive-map-canvas {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #02040a;
}

.interactive-map-canvas .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(115%) saturate(25%);
  -webkit-filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(115%) saturate(25%);
}

.interactive-map-canvas .leaflet-container {
  background: #02040a !important;
}

/* Campus Route Legend */
.map-route-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
}

.legend-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legend-info {
  display: flex;
  flex-direction: column;
}

.legend-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.legend-desc {
  font-size: 10px;
  color: #94a3b8;
}

/* Leaflet Custom Marker & Popup Styles */
.custom-leaflet-marker-wrap {
  background: transparent;
  border: none;
}

.custom-map-marker {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

.marker-waypoint {
  background: #00f0ff;
  border: 2px solid #ffffff;
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 15px #00f0ff;
}

.marker-venue {
  background: rgba(10, 15, 30, 0.95);
  border: 2px solid #00f0ff;
  color: #00f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.9);
}

.marker-venue .preview-icon {
  width: 14px;
  height: 14px;
  stroke: #00f0ff;
  display: block;
}

.marker-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #00f0ff;
  animation: markerPulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes markerPulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.dark-marker-tooltip {
  background: rgba(3, 7, 18, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  padding: 8px 12px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8) !important;
}

.dark-marker-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.3) !important;
}

.dark-map-popup .leaflet-popup-content-wrapper {
  background: rgba(5, 8, 20, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 6px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9) !important;
  color: #ffffff !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 !important;
}

.dark-map-popup .leaflet-popup-tip {
  background: rgba(5, 8, 20, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.map-popup-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.popup-tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #00f0ff;
  letter-spacing: 0.15em;
}

.popup-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.popup-venue {
  font-size: 12px;
  color: #cbd5e1;
  margin: 0;
}

.popup-coords {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  margin: 0;
}

.popup-directions-btn {
  display: block;
  text-align: center;
  padding: 8px 14px;
  background: #00f0ff;
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.popup-directions-btn:hover {
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* ── Content Container Defaults ───────────────────────────────────────────── */
.content-section,
.event-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  width: 100%;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

/* ── Responsive Behavior ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-section,
  .event-page-container {
    padding: 100px 20px 60px;
  }

  .event-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .event-poster-frame {
    max-width: 440px;
    margin: 0 auto;
  }

  .event-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .prizes-podium-grid {
    grid-template-columns: 1fr;
  }

  .prize-card.prize-rank-1 {
    transform: none;
  }

  .map-route-legend {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .content-section,
  .event-page-container {
    padding: 85px 16px 40px !important;
  }

  .event-hero-title {
    font-size: clamp(1.8rem, 6.5vw, 2.4rem);
  }

  .event-hero-tagline {
    font-size: 14px;
  }

  .event-poster-frame {
    max-width: 380px;
    margin: 0 auto;
  }

  .event-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .interactive-map-canvas {
    height: 360px;
  }

  .map-route-legend {
    grid-template-columns: 1fr;
  }

  .event-hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .btn-primary-register,
  .btn-secondary-location {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .frame-3d {
    padding: 22px 18px !important;
  }

  .detail-block-title {
    font-size: 1.35rem;
  }

  .timeline-step-card,
  .rule-card,
  .topic-focus-card {
    padding: 18px 16px;
  }
}

@media (max-width: 480px) {
  .content-section,
  .event-page-container {
    padding: 75px 12px 30px !important;
  }

  .event-hero-num {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .event-hero-title {
    font-size: clamp(1.6rem, 7.5vw, 2rem);
  }

  .event-hero-tagline {
    font-size: 13px;
    line-height: 1.5;
  }

  .event-hero-desc {
    font-size: 13.5px;
    line-height: 1.6;
  }

  .event-poster-frame {
    max-width: 320px;
    border-radius: 12px;
  }

  .event-specs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .spec-card {
    padding: 14px 12px;
    border-radius: 10px;
  }

  .spec-val {
    font-size: 13.5px;
  }

  .frame-3d {
    padding: 18px 14px !important;
  }

  .interactive-map-canvas {
    height: 270px;
  }

  .prizes-podium-grid {
    gap: 12px;
  }

  .prize-card {
    padding: 18px 14px;
    border-radius: 12px;
  }

  .back-to-events-btn {
    font-size: 11.5px;
    padding: 6px 14px;
  }
}

@media (max-width: 360px) {
  .event-hero-title {
    font-size: 1.5rem;
  }

  .event-poster-frame {
    max-width: 100%;
  }

  .btn-primary-register,
  .btn-secondary-location {
    font-size: 12px;
    padding: 13px 14px;
    height: 44px;
  }

  .spec-val {
    font-size: 12.5px;
  }
}
