* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f7fa;
  color: #123a5f;
}

.header {
  background: linear-gradient(90deg, #004a7a, #007d8a);
  color: #ffffff;
  padding: .9rem 1.1rem;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.logo-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.logo-subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* General helpers */
.hidden {
  display: none !important;
}

/* ========================= */
/* Navigation page           */
/* ========================= */

.map-section {
  margin-bottom: 1.3rem;
}

.map-caption {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.map-frame {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0.5rem 0.8rem;
}

.map-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Scroll hint between top + bottom images */
.scroll-hint {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #7b8a99;
}

.scroll-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(0, 74, 122, 0),
    rgba(0, 74, 122, 0.4),
    rgba(0, 74, 122, 0)
  );
}

.scroll-text {
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.controls {
  margin-top: 1.4rem;
}

.origin-row {
  margin-bottom: 0.5rem;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid #c3d0dd;
  background: #ffffff;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #004a7a 50%),
    linear-gradient(135deg, #004a7a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.select:focus {
  border-color: #007d8a;
  box-shadow: 0 0 0 2px rgba(0, 125, 138, 0.25);
}

.buttons-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.button-secondary {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #004a7a;
  background: #ffffff;
  color: #004a7a;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.button-secondary:hover,
.button-secondary:focus {
  background: #e5f3f7;
}

.hint {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #5a6a7b;
}

.footer {
  font-size: 0.75rem;
  text-align: center;
  padding: 0.8rem;
  color: #6a7b8b;
}

.search-container {
  position: relative;
  width: 100%;
  margin-top: 0.3rem;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #cfd8dc;
  border-radius: 8px;
  outline: none;
  transition: border 0.2s ease;
}

.search-input:focus {
  border-color: #0288d1;
}

.results-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 0;
  margin: 4px 0 0 0;
  list-style: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 20;
}

.results-list li {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.results-list li:last-child {
  border-bottom: none;
}

.results-list li.level-header {
  background: #eceff1;
  font-weight: bold;
  cursor: default;
}

.results-list li.no-results {
  cursor: default;
  color: #7b8a99;
}

.results-list li:hover:not(.level-header):not(.no-results),
.results-list li.active {
  background: #f5f5f5;
}

.origin-select option[disabled] {
  color: #999;
}

/* Fade animation */
.map-fade {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.map-fade.show {
  opacity: 1;
}

.alias-note {
  margin: 0.8rem 0 0.6rem;
  font-size: 0.8rem;
  color: #5a6a7b;
  font-style: italic;
}

.screenshot-tip {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: #5a6a7b;
  text-align: center;
  opacity: 0.85;
}

/* ===== Print styles ===== */
@media print {
  body {
    background: #ffffff;
  }

  .header,
  .controls,
  .footer {
    display: none !important;
  }

  .main {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem;
  }

  .map-frame {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .map-image {
    width: 100%;
    height: auto;
  }

  .map-caption {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .scroll-hint {
    display: none !important;
  }
}

/* ========================= */
/* Home page                 */
/* ========================= */

.home-main {
  max-width: 1000px;
}

.home-hero {
  margin-top: 0.2rem;
}

.home-hero-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

/* Left side: hero image */
.home-hero-media {
  flex: 1 1 47%;
  min-height: 220px;
  background-image: url("img/STARS-building-facade-1.jpg");
  background-size: cover;
  background-position: center;
}

/* Right side: text card - Find your Way Inside STARS*/
.home-intro-card {
  flex: 1 1 50%;
  padding: 0.8rem 1.6rem 1.5rem;
}

.home-title {
  margin: 0 0 0.7rem;
  font-size: 1.6rem;
}

.home-lead {
  margin: 0 0 0.rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #34495e;
}

.home-origin-group {
  margin: .8rem 0 1rem;
}

.home-origin-group .origin-select {
  max-width: 100%;
}

.home-steps {
  margin: 0 0 1.0rem 1.2rem;
  padding: 0;
  font-size: 0.93rem;
  color: #34495e;
}

.home-steps li {
  margin-bottom: 0.4rem;
}

.home-step-note {
  margin-left: 0.15rem;
}

/* Primary CTA button */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #004a7a, #007d8a);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 74, 122, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.primary-button:hover,
.primary-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 9px 24px rgba(0, 74, 122, 0.4);
  opacity: 0.96;
}

.hero-start-btn {
  margin-right: 0.8rem;
}

.home-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

/* Header click area */
.logo-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
