/* Page 1 map adapted from vlc-campus-network.html. Scoped to the alternate
   Karachi page; the original page and shared styles remain unchanged. */
.campus-scroll {
  --ink: #2f2f2f;
  --body: #59687c;
  --green: #287b30;
  --green-hi: #309443;
  --green-deep: #176f30;
  --accent: #54ba4e;
  --paper: #fff7ed;
  --font: Poppins, Arial, sans-serif;
  --gutter: clamp(22px, 5.4vw, 104px);
  position: relative;
  height: 260vh;
}
.campus-scroll .sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

  .campus {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}
  .campus .campus__map {
  position: absolute;
  inset: 0;
  background: #eeebe3;
}
  .campus--satellite .campus__map {
  background: #a99a7c;
}

  .campus__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
      radial-gradient(70% 55% at 0% 100%, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 100%),
      radial-gradient(60% 50% at 0% 0%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 100%),
      linear-gradient(90deg, #fff 0%, #fff 27%, rgba(255,255,255,.93) 33%, rgba(255,255,255,.7) 40%, rgba(255,255,255,.34) 47%, rgba(255,255,255,.1) 53%, rgba(255,255,255,0) 58%);
}

  .campus__copy {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 700px);
}
  .campus__eyebrow {
  margin: 0 0 clamp(20px, 2.9vw, 44px);
  font-size: clamp(11px, 1.02vw, 15px);
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--green);
}
  .campus__title {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 6.4rem);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.048em;
  color: var(--ink);
}
  .campus__title .line {
  display: block;
  overflow: hidden;
  padding: .03em 0 .22em;
  margin: -.03em 0 -.22em;
}
  .campus__title .line > span {
  display: inline-block;
  padding: 0 .08em .22em 0;
  margin: 0 -.08em -.22em 0;
  will-change: transform;
}
  .campus__title .line--accent > span {
  color: var(--green);
  background: linear-gradient(180deg, var(--green-hi) 0%, var(--green) 45%, var(--green-deep) 82%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
  .campus__lede {
  margin: clamp(22px, 2.6vw, 42px) 0 0;
  max-width: 25.4em;
  font-size: clamp(1rem, 1.42vw, 1.36rem);
  line-height: 1.7;
  font-weight: 400;
  color: var(--body);
}

  /* Campus pins */
  /* MapLibre positions the marker element itself (absolute + transform), so .kn-pin only sets its size. */
  .kn-pin {
  width: 44px;
  height: 58px;
}
  .kn-pin__drop {
  position: absolute;
  inset: 0;
  z-index: 3;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 7px 9px rgba(6, 54, 24, .32));
  will-change: transform;
}
  .kn-pin__drop svg {
  display: block;
  width: 100%;
  height: 100%;
}
  .kn-pin__halo {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 22px;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(84,186,78,.5) 0%, rgba(84,186,78,.2) 38%, rgba(84,186,78,0) 68%);
  pointer-events: none;
}
  .kn-pin__shadow {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -5px;
  width: 30px;
  height: 10px;
  margin-left: -15px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(4,36,18,.5) 0%, rgba(4,36,18,0) 70%);
  pointer-events: none;
}
  .kn-pin__ripple {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -9px;
  width: 44px;
  height: 18px;
  margin-left: -22px;
  border-radius: 50%;
  border: 2px solid rgba(84,186,78,.9);
  opacity: 0;
  pointer-events: none;
}
  .kn-pin__label {
  position: absolute;
  z-index: 2;
  left: 24px;
  top: 2px;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 19px 0 31px;
  border-radius: 999px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 26px -10px rgba(10, 44, 26, .38), 0 2px 6px -2px rgba(10, 44, 26, .14), inset 0 0 0 1px rgba(10, 44, 26, .05);
  font: 700 15.5px/1 var(--font);
  letter-spacing: .015em;
  text-transform: uppercase;
  color: #1a1f1c;
  text-decoration: none;
  white-space: nowrap;
  transform-origin: 0 50%;
  transition: background-color .25s ease, color .25s ease;
}
  .kn-pin__label:hover, .kn-pin__label:focus-visible {
  background: #fff;
  color: var(--green-deep);
}
  .kn-pin__label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
  .kn-pin__card {
  position: absolute;
  z-index: 4;
  left: 24px;
  top: 50px;
  width: max-content;
  max-width: 250px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 40px -16px rgba(10, 44, 26, .45), inset 0 0 0 1px rgba(10, 44, 26, .06);
  font-size: 13px;
  line-height: 1.45;
  color: var(--body);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
  .kn-pin__card strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
  color: var(--ink);
}
  .kn-pin:hover .kn-pin__card, .kn-pin:focus-within .kn-pin__card {
  opacity: 1;
  transform: none;
}
  .maplibregl-marker:hover, .maplibregl-marker:focus-within {
  z-index: 5;
}

  /* Map attribution, kept legible but quiet */
  .campus .maplibregl-ctrl-attrib {
  background: rgba(255,255,255,.72);
  font: 500 10px/1.4 var(--font);
}
  .campus .maplibregl-ctrl-attrib a {
  color: #3d4643;
}

  
/* Fit the existing header and Karachi type scale. */
.campus-scroll .campus {
  position: sticky;
  top: var(--network-header, 100px);
  height: calc(100svh - var(--network-header, 100px));
  min-height: 0;
}
.campus__title {
  font-size: clamp(36px, 3.7vw, 66px);
  font-weight: 600;
  line-height: 1.06;
}
.campus__eyebrow {
  font-weight: 600;
  margin-bottom: 30px;
}
.campus__lede {
  font-size: clamp(14px, 1.15vw, 19px);
}
.kn-pin__drop {
  pointer-events: none;
}
.campus__veil {
  background: linear-gradient(90deg, #fff7ed 0%, #fff7ed 27%, #fff7eded 33%, #fff7edb3 40%, #fff7ed57 47%, #fff7ed1a 53%, transparent 58%);
}
.motion-off .campus-scroll {
  height: auto;
}
.motion-off .campus-scroll .campus {
  position: relative;
  top: 0;
}
@media (max-width: 960px) {
  .campus-scroll {
    height: auto;
  }
  .campus-scroll .campus {
    position: relative;
    top: 0;
    height: calc(var(--mobile-copy-height, 340px) + 245svh);
    overflow: visible;
  }
  .campus .campus__map {
    position: sticky;
    inset: auto;
    top: var(--network-header, 80px);
    width: 100%;
    height: calc(100svh - var(--network-header, 80px));
    z-index: 1;
  }
  .campus__copy {
    position: relative;
    top: 0;
    left: 0;
    width: min(100%, 680px);
    transform: none;
    padding: clamp(28px, 5svh, 50px) clamp(20px, 5vw, 40px) 38px;
  }
  .campus__eyebrow {
    margin-bottom: 12px;
    font-size: 11px;
  }
  .campus__title {
    font-size: clamp(31px, 6vw, 46px);
  }
  .campus__lede {
    margin-top: 14px;
    font-size: clamp(13px, 1.6vw, 16px);
    line-height: 1.5;
  }
  .campus__veil {
    display: none;
  }
  .kn-pin__label {
    font-size: 12px;
    height: 34px;
    padding-right: 12px;
  }
  .kn-pin__card {
    max-width: 180px;
  }
  .campus .maplibregl-ctrl-attrib {
    max-width: min(270px, calc(100vw - 24px));
    font-size: 9px;
  }
  .motion-off .campus-scroll .campus {
    height: auto;
  }
  .motion-off .campus .campus__map {
    position: relative;
    top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .campus-scroll {
    height: auto;
  }
  .campus-scroll .campus {
    position: relative;
    top: 0;
    height: auto;
  }
  .campus .campus__map {
    position: relative;
    top: 0;
  }
}


/* ==========================================================================
   Campus Map Marker & Hover Card Styles
   ================================================================---------- */

/* 
  Campus photo and Directions button in the pin hover card. 
  The card closes as soon as the pointer leaves (a short fade only). 
  Visibility (not pointer-events) hides it, so a closed card never blocks the map. 
*/
.kn-pin .kn-pin__card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  max-width: 380px;
  padding: 10px 16px 10px 10px;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.2s;
}

.kn-pin:hover .kn-pin__card, 
.kn-pin:focus-within .kn-pin__card {
  visibility: visible;
  transition-delay: 0s;
}

/* 
  Invisible bridge over the gap below the label, 
  so the card stays open while the pointer moves down to the Directions button. 
*/
.kn-pin__card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 10px;
}

/* --- Card Components --- */

.kn-pin__photo {
  flex: none;
  width: 120px;
  min-height: 96px;
  border-radius: 10px;
  object-fit: cover;
}

.kn-pin__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: center;
  max-width: 210px;
}

.kn-pin__directions {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--green-deep);
  color: #fff;
  font: 600 12.5px/1 var(--font);
  text-decoration: none;
  transition: background-color 0.25s ease;
}

.kn-pin__directions:hover {
  background: var(--green);
}

.kn-pin__directions:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- Positioning Modifiers --- */

/* Near the right edge: card opens leftwards, aligned with label's right edge (--kn-label-w set by script) */
.kn-pin--left .kn-pin__card {
  left: auto;
  right: calc(20px - var(--kn-label-w, 0px));
}

/* Near the bottom edge: card opens above the label */
.kn-pin--up .kn-pin__card {
  top: auto;
  bottom: 64px;
}

.kn-pin--up .kn-pin__card::before {
  top: 100%;
  bottom: auto;
  height: 26px;
}

/* Touch screens: card opened by a tap */
.kn-pin--open .kn-pin__card {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}

.maplibregl-marker.kn-pin--open {
  z-index: 5;
}

/* --- Responsive Layout --- */

@media (max-width: 960px) {
  .kn-pin .kn-pin__card {
    flex-direction: column;
    gap: 8px;
    max-width: 200px;
    padding: 10px;
  }
  
  .kn-pin__photo {
    width: 100%;
    height: 96px;
    min-height: 0;
  }
}


/*for contact*/

.ct-map-preview {
  --cm-cream: #fff7ed;
  --cm-paper: #fffbf5;
  --cm-forest: #173d31;
  --cm-green: #287b30;
  --cm-sage: #f0f0df;
  --cm-muted: #64675f;
  --cm-line: #cbd1be;
  margin: 0;
  background: var(--cm-cream);
  color: var(--cm-forest);
  font: 400 15px/1.65 Poppins, Arial, sans-serif;
}

.ct-map-preview *,
.ct-map-preview *::before,
.ct-map-preview *::after {
  box-sizing: border-box;
}

.ct-map-preview :where(h1, h2, p) {
  margin: 0;
}

.ct-map-preview a {
  color: var(--cm-green);
  text-decoration: none;
}

.ct-map-preview :where(a, button):focus-visible {
  outline: 3px solid var(--cm-green);
  outline-offset: 4px;
}

.ct-map-preview button {
  font: inherit;
  cursor: pointer;
}

.ct-map-preview [hidden] {
  display: none;
}

.cm-directory {
  max-width: 1650px;
  margin: 0 auto;
  padding: 48px clamp(22px, 4vw, 72px);
}

.cm-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 50px;
  margin-bottom: 32px;
}

.cm-eyebrow {
  margin-bottom: 18px;
  color: var(--cm-green);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cm-heading h1 {
  max-width: 800px;
  font-size: clamp(34px, 3.8vw, 56px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.cm-intro {
  max-width: 410px;
  padding-bottom: 3px;
  color: var(--cm-muted);
}

/* Map first, full width; the campus cards sit in one row beneath it. */
.cm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.cm-sidebar,
.cm-stage {
  min-width: 0;
}

.cm-campus-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cm-campus {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--cm-line);
  border-radius: 14px;
  background: var(--cm-paper);
  color: var(--cm-forest);
  text-align: left;
}

.cm-campus:is(:hover, .is-active) {
  border-color: var(--cm-green);
  background: var(--cm-sage);
}

.cm-campus img {
  width: 92px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
}

.cm-campus strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.cm-campus > span > span {
  display: block;
  margin-top: 7px;
  color: var(--cm-muted);
  font-size: 12px;
  line-height: 1.5;
}

.cm-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  margin-top: 18px;
}

.cm-location-note {
  color: var(--cm-muted);
  font-size: 11px;
}

.cm-contact {
  font-size: 13px;
  font-weight: 600;
}

.cm-stage {
  overflow: hidden;
  border: 1px solid var(--cm-line);
  border-radius: 20px;
  background: var(--cm-paper);
}

.cm-map-frame {
  position: relative;
  height: clamp(420px, 62svh, 660px);
  background: #e8ece4;
}

.cm-map {
  position: absolute;
  inset: 0;
}

.cm-map-status {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(80%, 350px);
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--cm-paper);
  color: var(--cm-muted);
  font-size: 13px;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cm-reset {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 18px;
  padding: 10px 16px;
  border: 1px solid var(--cm-line);
  border-radius: 30px;
  background: var(--cm-paper);
  color: var(--cm-forest);
  font-size: 12px;
  font-weight: 600;
}

/* Photo labels and map pins reuse the landing page's forest/cream language. */
/* Each marker is a div holding the pin button and its card. No position
   rule here: MapLibre positions each marker absolutely. A relative position
   would stack the pins in normal flow, so every pin after the first drifted
   away from its coordinates as the map zoomed. */
.cm-pin {
  width: 44px;
  height: 56px;
  color: var(--cm-forest);
}

.cm-pin__button {
  display: block;
  width: 44px;
  height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.cm-pin svg {
  display: block;
  width: 44px;
  height: 56px;
  filter: drop-shadow(0 4px 5px #173d3130);
  transition: transform 200ms ease;
}

.cm-pin:is(:hover, :focus-within, .is-open) svg {
  transform: translateY(-3px);
}

.cm-pin.is-active {
  color: var(--cm-green);
}

/* Campus name above the pin. On hover, focus or tap it opens into a card
   with the campus photograph, address and actions. --cm-shift keeps the card
   inside the map; .is-below flips it under the pin when there is no room above. */
.cm-pin__label {
  --cm-shift: 0px;
  position: absolute;
  bottom: 66px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 5px 12px;
  border: 1px solid var(--cm-line);
  border-radius: 20px;
  background: var(--cm-paper);
  color: var(--cm-forest);
  text-align: left;
  white-space: nowrap;
  transform: translateX(calc(-50% + var(--cm-shift)));
}

/* Invisible bridge over the gap to the pin, so the card stays open while
   the pointer moves from the pin up to Directions or Book a Visit. */
.cm-pin__label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.cm-pin.is-below .cm-pin__label {
  top: 64px;
  bottom: auto;
}

.cm-pin.is-below .cm-pin__label::after {
  top: auto;
  bottom: 100%;
}

.cm-pin__label strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.cm-pin__photo,
.cm-pin__address,
.cm-pin__actions {
  display: none;
}

.cm-pin:is(:hover, :focus-within, .is-open) {
  z-index: 2;
}

.cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__label {
  align-items: stretch;
  width: max-content;
  max-width: min(440px, var(--cm-room, 440px));
  padding: 12px 22px 12px 12px;
  border: 2px solid var(--cm-green);
  border-radius: 16px;
  white-space: normal;
  box-shadow: 0 18px 36px -18px #173d3173;
}

.cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__photo {
  display: block;
  flex: none;
  width: 150px;
  min-height: 112px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__text {
  align-self: center;
}

.cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__label strong {
  color: var(--cm-forest);
  font-size: 17px;
  letter-spacing: -.02em;
}

.cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__address {
  display: block;
  max-width: 220px;
  margin-top: 6px;
  color: var(--cm-muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Same link and button treatment as the campus directory actions. */
.cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}

.ct-map-preview .cm-pin__actions .cm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 5px;
  background: var(--cm-green);
  color: var(--cm-paper);
}

.ct-map-preview .cm-pin__actions .cm-button:hover {
  background: var(--cm-forest);
}

.ct-map-preview .maplibregl-ctrl-attrib,
.ct-map-preview .maplibregl-ctrl-attrib a {
  color: #3f574f;
  font-size: 10px;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .cm-campus-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cm-campus {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
  }

  .cm-campus img {
    width: 70px;
  }
}

@media (max-width: 760px) {
  .cm-directory {
    padding-block: 30px;
  }

  .cm-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .cm-heading {
    margin-bottom: 26px;
  }

  .cm-campus-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cm-campus {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: 10px;
  }

  .cm-campus img {
    width: 100%;
    height: 76px;
  }

  .cm-campus strong {
    font-size: 14px;
  }

  .cm-map-frame {
    height: 440px;
  }

  .cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__photo {
    width: 90px;
    min-height: 0;
    height: 90px;
  }

  .cm-pin:is(:hover, :focus-within, .is-open) .cm-pin__address {
    max-width: 170px;
  }
}