/* Base styles */
body {
  background-color: #202020;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.header {
  padding: 20px 32px;
}

.header h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}

/* Campus Section */
.campus-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: calc(100vh - 64px);
}

.campus-map-container {
  position: relative;
  display: block;
  width: 100%;
  max-width: 1400px;
}

.campus-map {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG Map Overlay */
.campus-map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1836 / 660;
  z-index: 10;
  pointer-events: none;
}

.campus-map-overlay a {
  pointer-events: auto;
}

.map-area {
  fill: rgba(0, 100, 255, 0.25);
  stroke: rgba(0, 100, 255, 0.9);
  stroke-width: 3;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: scale(1.5);
  transform-origin: center;
  transform-box: fill-box;
}

.map-label {
  fill: white;
  font-size: 24px;
  font-weight: 500;
  text-anchor: middle;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.campus-map-overlay a:hover .map-area,
.building-map-overlay a:hover .map-area {
  fill: rgba(0, 100, 255, 0.6);
  stroke: rgba(0, 80, 255, 1);
  stroke-width: 5;
}

.campus-map-overlay a:hover .map-label,
.building-map-overlay a:hover .map-label {
  opacity: 1;
}

/* Building Hotspots */
.building-hotspot {
  position: absolute;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.building-hotspot:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Building Labels */
.building-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333333;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.building-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333333;
}

.building-hotspot:hover .building-label {
  opacity: 1;
  visibility: visible;
}

/* Focus styles for accessibility */
.building-hotspot:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

.building-hotspot:focus .building-label {
  opacity: 1;
  visibility: visible;
}

/* Header with back button */
.header-with-back {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-titles h1 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* Building detail page */
.building-section {
  padding: 0;
  margin: 0;
}

.building-image-container {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

.building-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Building page SVG overlay */
.building-map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 959;
  z-index: 10;
  pointer-events: none;
}

.building-map-overlay a {
  pointer-events: auto;
}

.overlay-image {
  position: absolute;
  top: 18%;
  left: 11.5%;
  width: 61%;
  pointer-events: none;
}

.map-hotspot {
  position: absolute;
  top: 18%;
  left: 11.5%;
  width: 61%;
  height: 70%;
  cursor: pointer;
}

.hotspot-area {
  fill: transparent;
  stroke: transparent;
  stroke-width: 2;
  transition: all 0.3s ease;
}

.map-hotspot:hover .hotspot-area {
  fill: rgba(74, 144, 226, 0.3);
  stroke: rgba(74, 144, 226, 0.8);
}

/* Building page specific body */
.building-page {
  padding: 0;
}

.building-page .header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}