/* MUNDP — interactive campus plan of The Koç School (venue/the-koc-school).
   Self-contained: only .campus-* classes (plus #campus-hotspots inside the
   injected SVG), safe to remove with the section. */

.campus-map-section {
  padding: 0.5rem 0 5rem;
}

.campus-map-head {
  max-width: 46rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.campus-map-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #2b4da0;
  margin-bottom: 0.75rem;
}

.campus-map-title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #0a1f4d;
}

.campus-map-sub {
  margin: 0;
  color: #4c5a78;
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- collapsible section ---------- */
.campus-map-toggle {
  cursor: pointer;
  border-radius: 14px;
  outline: none;
  transition: opacity 0.15s ease;
}

.campus-map-toggle:hover .campus-map-title,
.campus-map-toggle:focus-visible .campus-map-title {
  color: #2b4da0;
}

.campus-map-toggle:focus-visible {
  outline: 2px solid #2b4da0;
  outline-offset: 6px;
}

.campus-map-chev {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.45em;
  margin-bottom: 0.12em;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.campus-map-toggle[aria-expanded="true"] .campus-map-chev {
  transform: rotate(225deg) translate(-0.1em, -0.1em);
}

.campus-map-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s ease;
}

.campus-map-collapse.open {
  grid-template-rows: 1fr;
}

.campus-map-collapse-inner {
  overflow: hidden;
  min-height: 0;
  padding: 4px 4px 3rem;
}

/* ---------- frame ---------- */
.campus-map-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fdfdfc;
  box-shadow:
    0 34px 70px -34px rgba(10, 31, 77, 0.4),
    0 0 0 1px rgba(10, 31, 77, 0.1);
}

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

/* ---------- hotspots (inside the injected SVG) ---------- */
#hotspots g {
  cursor: pointer;
  outline: none;
}

#hotspots g > * {
  fill: rgba(43, 77, 160, 0);
  stroke: rgba(43, 77, 160, 0);
  stroke-width: 0;
  stroke-linejoin: round;
  transition: fill 0.18s ease, stroke 0.18s ease;
}

#hotspots g:hover > *,
#hotspots g:focus-visible > *,
#hotspots g.is-active > * {
  fill: rgba(43, 77, 160, 0.12);
  stroke: rgba(43, 77, 160, 0.85);
  stroke-width: 2.5;
}

/* ---------- info card ---------- */
.campus-map-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  overflow: hidden;
  width: min(300px, 74%);
  padding: 0.9rem 1.05rem 1rem;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  border-top: 3px solid #2b4da0;
  box-shadow:
    0 18px 40px -14px rgba(4, 14, 34, 0.4),
    0 0 0 1px rgba(10, 31, 77, 0.08);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.campus-map-card.show {
  opacity: 1;
  transform: none;
}

.campus-card-imgwrap {
  position: relative;
  width: calc(100% + 2.1rem);
  height: 132px;
  margin: -0.9rem -1.05rem 0.65rem;
  overflow: hidden;
  background: #dfe3ea;
}

.campus-card-imgwrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.campus-card-imgwrap img.on {
  opacity: 1;
}

.campus-card-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.campus-card-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.35);
}

.campus-card-dots span.on {
  background: #fff;
}

.campus-card-name {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #0a1f4d;
}

.campus-card-blurb {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #42506e;
}

.campus-map-hint {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #8a93a8;
}

/* ---------- touch devices: pin the card to the bottom ---------- */
@media (hover: none) {
  .campus-map-card {
    top: auto !important;
    left: 50% !important;
    bottom: 12px;
    transform: translate(-50%, 6px) scale(0.98);
    width: min(340px, 92%);
  }
  .campus-map-card.show {
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #hotspots g > *,
  .campus-map-card {
    transition: none;
  }
}

/* ---------- hero slideshow (The Koç School page) ---------- */
.section-hero.koc-page {
  position: relative;
  overflow: hidden;
}

.koc-hero-slides {
  position: absolute;
  inset: 0;
}

.koc-hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.koc-hero-slides img.is-active {
  opacity: 1;
}

/* navy wash over the slides — same family as the about page's Koç callout */
.koc-hero-tint {
  position: absolute;
  inset: 0;
  background: rgba(1, 15, 40, 0.55);
}

.section-hero.koc-page .grid-halves-section {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .koc-hero-slides img {
    transition: none;
  }
}
