:root {
  --bg: #f3f8f5;
  --surface: #ffffff;
  --text: #1f2b26;
  --muted: #5f6f67;
  --primary: #1b6b46;
  --primary-deep: #124c32;
  --accent: #e0a231;
  --border: #d8e5de;
  --shadow-soft: 0 10px 26px rgba(18, 76, 50, 0.08);
  --shadow-strong: 0 20px 44px rgba(18, 76, 50, 0.16);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(118, 190, 146, 0.2), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(224, 162, 49, 0.16), transparent 24%),
    linear-gradient(180deg, #f7fbf8 0%, #f4f9f6 56%, #f0f6f2 100%);
}

main {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 22px 18px 0;
  display: grid;
  gap: 18px;
}

.site-header {
  position: relative;
  overflow: hidden;
  color: #eef7f2;
  background:
    linear-gradient(145deg, #1d6f48, #145337 58%, #1a6240 100%);
  padding: 12px 14px 46px;
  border-bottom: 3px solid color-mix(in srgb, var(--accent) 62%, white);
}

.site-header::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 320px;
  height: 320px;
  right: -90px;
  top: 120px;
  background: rgba(255, 255, 255, 0.18);
  animation: blobPulse 8s ease-in-out infinite;
}

.site-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 240px;
  height: 240px;
  left: -70px;
  bottom: 20px;
  background: rgba(243, 155, 47, 0.3);
  animation: blobPulse 12s ease-in-out infinite alternate;
}

.top-nav {
  width: min(940px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid rgba(222, 242, 232, 0.5);
  border-radius: 14px;
  background: rgba(9, 54, 35, 0.4);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 12px;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.top-left-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(228, 247, 235, 0.24);
  padding: 4px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links li {
  display: inline-flex;
}

.nav-links a {
  text-decoration: none;
  color: #eaf8ef;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(218, 244, 228, 0.34);
  background: rgba(13, 71, 45, 0.36);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: #e7f8ee;
  border-radius: 2px;
}

.hero-content {
  width: min(940px, 100%);
  margin: 34px auto 0;
  max-width: 700px;
  text-align: left;
  animation: fadeUp 680ms ease both;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.1;
}

.hero-subtitle {
  margin-top: 12px;
  color: #dbefe3;
  max-width: 58ch;
  font-size: clamp(0.96rem, 1.6vw, 1.06rem);
}

.hero-cta {
  display: inline-flex;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: #3f2a04;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-strong);
  outline: none;
}

.controls {
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

input[type="text"],
select {
  flex: 1 1 240px;
  border: 1px solid var(--border);
  background: #fbfdff;
  border-radius: 10px;
  font-size: 0.95rem;
  padding: 10px 12px;
  font-family: inherit;
  color: var(--text);
  min-height: 42px;
}

input[type="text"]:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 40%, white);
  border-color: var(--primary);
}

.programs {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.program-card {
  background: linear-gradient(165deg, #ffffff, #f5faf7);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
  animation: fadeUp 520ms ease both;
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.program-link {
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.program-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #d3dfd8;
  background: #ffffff;
  padding: 4px;
}

.program-content h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  color: var(--primary-deep);
}

.program-content p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

.program-meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e8f2ec;
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  padding: 22px;
}

.map-section {
  margin-top: 0;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, #ffffff, #f2f8f4);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.map-tools {
  margin: 0 auto 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(252, 254, 253, 0.95);
  backdrop-filter: blur(4px);
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(140px, 190px) auto auto 1fr;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 12px;
  z-index: 10;
}

.map-tools label {
  font-weight: 600;
  color: var(--primary-deep);
  font-size: 0.92rem;
}

.map-tools select {
  min-height: 36px;
  padding: 7px 9px;
}

#locateBtn {
  border: 1px solid color-mix(in srgb, var(--primary) 50%, #ffffff);
  background: #e9f6ee;
  color: var(--primary-deep);
  min-height: 36px;
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
}

#locateBtn:hover,
#locateBtn:focus-visible {
  background: #d7efdf;
  outline: none;
}

#routeStatus {
  margin: 0;
  text-align: left;
  font-size: 0.84rem;
  color: var(--muted);
}

#map-title {
  text-align: center;
  color: var(--primary-deep);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  margin-bottom: 10px;
}

.map-mode-switch {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 8px;
  border-radius: 999px;
  background: #eaf4ee;
}

.map-mode-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease, transform 220ms ease;
}

.map-mode-button:hover,
.map-mode-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.map-mode-button.is-active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 122, 74, 0.25);
}

.campus-map {
  width: 100%;
  min-height: 420px;
  border-radius: 12px;
  border: 1px solid #d0ddef;
  overflow: hidden;
}

.campus-map.is-active {
  display: block;
}

#map3d:not(.is-active) {
  display: none;
}

.map-help {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

section {
  margin-top: 0;
  text-align: center;
  padding: 22px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.info-card {
  text-align: left;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.info-card h2 {
  margin-bottom: 10px;
}

.info-card p {
  margin: 0;
  width: 100%;
}

.info-card p + p {
  margin-top: 6px;
}

.info-single {
  text-align: center;
  padding: 16px 14px;
  border-radius: 16px;
  background: linear-gradient(170deg, #ffffff, #f7fbf8);
}

.info-single h2 {
  margin-bottom: 8px;
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
}

.info-single p {
  width: 100%;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-single p + p {
  margin-top: 4px;
}

section h2 {
  color: var(--primary-deep);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.24rem, 2.2vw, 1.62rem);
  margin-bottom: 8px;
}

section p {
  color: var(--muted);
  width: min(70ch, 100%);
  margin: 0 auto;
  font-size: 0.95rem;
}

footer {
  margin-top: 34px;
  background: linear-gradient(140deg, #144f35, #1b6b46);
  color: #e7f8ee;
  text-align: center;
  padding: 14px 12px;
  font-size: 0.82rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 720px) {
  .programs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .programs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .map-tools {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  #routeStatus {
    text-align: center;
  }
}

@media (max-width: 760px) {
  main {
    padding: 14px 12px 0;
    gap: 12px;
  }

  .site-header {
    min-height: auto;
    padding-bottom: 30px;
  }

  .top-nav {
    justify-content: space-between;
    position: sticky;
    top: 8px;
    z-index: 20;
    align-items: center;
    padding: 9px 11px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
  }

  .hero-content {
    margin-top: 24px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .program-link {
    grid-template-columns: 40px 1fr;
    padding: 10px;
  }

  .program-card img {
    width: 40px;
    height: 40px;
    padding: 3px;
    object-fit: contain;
    background: #ffffff;
  }

  .skeleton-card {
    grid-template-columns: 40px 1fr;
  }

  .skeleton-img {
    width: 40px;
    height: 40px;
  }

  #map {
    min-height: 320px;
  }

  .map-tools {
    grid-template-columns: 1fr;
    text-align: left;
  }

  #locateBtn,
  .map-tools select {
    width: 100%;
  }

  .info-single {
    padding: 12px 10px;
  }
}

/* Animations and New Classes */
@keyframes blobPulse {
  0%, 100% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(8px, -8px);
  }
}

/* Active Nav Links styling */
.nav-links a.active {
  border-color: rgba(255, 255, 255, 0.65) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-2px);
}

/* Map Pins & Pinpoint CSS classes (moving from inline styles) */
.user-location-marker {
  width: 14px;
  height: 14px;
  background-color: #2f8bff;
  border: 2px solid #0f5bd6;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(47, 139, 255, 0.3);
}

.location-pin-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.location-pin-body {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50% 50% 50% 0;
  background: #0f5bd6;
  transform: rotate(-45deg);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 7px rgba(0,0,0,.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.location-pin-wrapper:hover .location-pin-body,
.location-pin-wrapper:focus-within .location-pin-body {
  transform: rotate(-45deg) scale(1.15);
  background: #1b6ef3;
}

.location-pin-label {
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  color: #111;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.pinpoint-icon-body {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  background: #c91f37;
  transform: rotate(-45deg);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* Clear Route Button styling */
#clearRouteBtn {
  border: 1px solid #dcdfe6;
  background: #ffffff;
  color: #606266;
  min-height: 36px;
  border-radius: 10px;
  padding: 7px 12px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

#clearRouteBtn:hover,
#clearRouteBtn:focus-visible {
  background: #f5f7fa;
  border-color: #c0c4cc;
  color: #303133;
  outline: none;
}

/* Results Count styling */
.program-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  margin: 6px 0;
}

/* Program Card view-on-map chip */
.chip-locate {
  background: #fcf1db;
  color: #a06e12;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.chip-locate:hover {
  background: var(--accent);
  color: #3f2a04;
  transform: scale(1.05);
}

/* Skeleton loader for program cards */
.skeleton-card {
  background: linear-gradient(165deg, #ffffff, #f5faf7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}
.skeleton-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e8f2ec 25%, #d1edd9 50%, #e8f2ec 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.6s infinite ease-in-out;
  border: 1px solid #d3dfd8;
}
.skeleton-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8f2ec 25%, #d1edd9 50%, #e8f2ec 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.6s infinite ease-in-out;
}
.skeleton-line.title {
  width: 70%;
  height: 16px;
}
.skeleton-line.sub {
  width: 50%;
  height: 11px;
}
.skeleton-line.loc {
  width: 40%;
  height: 11px;
}
.skeleton-line.chips {
  width: 30%;
  height: 18px;
  border-radius: 999px;
}
@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

