/* ==========================================================================
   Campuses — "Find Your Ogle School Campus": state maps + pins + campus list
   ========================================================================== */

.campuses {
  background: var(--c-black);
  padding-top: clamp(64px, calc(64px + 11 * (100vw - 390px) / 1290), 75px);
  padding-bottom: clamp(60px, calc(79px - 19 * (100vw - 390px) / 1290), 79px);
  padding-inline: clamp(16px, calc(16px + 224 * (100vw - 390px) / 1290), 240px);
}

.campuses__inner {
  max-width: 1200px;
  margin-inline: auto;
}

.campuses__eyebrow {
  /* cap-trim compensation: Figma places the glyph cap at the padding edge */
  margin-top: clamp(-5px, calc(-4px - 1 * (100vw - 390px) / 1290), -4px);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(13px, calc(13px + 3 * (100vw - 390px) / 1290), 16px);
  line-height: 1.425;
  letter-spacing: clamp(2.6px, calc(2.6px + 0.6 * (100vw - 390px) / 1290), 3.2px);
  text-transform: uppercase;
  color: var(--c-pink);
}

.campuses__title {
  margin-top: clamp(16px, calc(24px - 8 * (100vw - 390px) / 1290), 24px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, calc(38px + 19 * (100vw - 390px) / 1290), 57px);
  line-height: 1.13;
  text-transform: uppercase;
}
.campuses__title-glitter {
  background: url('/wp-content/themes/ogle/assets/img/glitter-texture.webp') center / cover;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.campuses__title-pink { color: var(--c-pink); }

.campuses__body { margin-top: 18px; }

/* Maps: desktop only */
.campuses__maps { display: none; }

.campuses__intro {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(20px, calc(28px - 8 * (100vw - 390px) / 1290), 28px);
  line-height: clamp(32px, calc(39.9px - 7.9 * (100vw - 390px) / 1290), 39.9px);
  color: var(--c-white);
}

.campuses__nav { margin-top: 16px; }

/* Mobile: keep the flat-list 56px pitch across the (invisible) state groups */
@media (max-width: 899.98px) {
  .campuses__group + .campuses__group { margin-top: 23px; }
}

.campuses__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 33px;
  margin-bottom: 23px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  line-height: 24.225px;
  color: var(--c-white);
  transition: color 0.2s cubic-bezier(0, 0, 0.58, 1);
}
.campuses__items li:last-child .campuses__link { margin-bottom: 0; }
.campuses__link .campuses__chev {
  flex-shrink: 0;
  margin-left: 8px;
  /* design: 4px vector sits at the LEFT edge of its 12px frame (hover slides it +10px) */
  margin-right: 6px;
  transition: transform 0.2s cubic-bezier(0, 0, 0.58, 1);
}
.campuses__link:hover,
.campuses__link:focus-visible { color: var(--c-pink); }
.campuses__link:hover .campuses__chev,
.campuses__link:focus-visible .campuses__chev { transform: translateX(10px); }

/* State group headings: desktop only */
.campuses__state { display: none; }

/* ================= Desktop (>=900px) ================= */
@media (min-width: 900px) {
  .campuses__eyebrow,
  .campuses__title { text-align: center; }

  .campuses__body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline: 7px;
    margin-top: 71px;
    align-items: flex-start;
  }

  .campuses__maps {
    display: block;
    position: relative;
    flex: 1;
    aspect-ratio: 883.9 / 537.1;
    container-type: inline-size;
    margin-top: 78px; /* design: maps group sits 67px below the row's trimmed top */
  }

  .campuses__map {
    position: absolute;
  }
  .campuses__map--texas {
    left: -0.11%;
    top: 15.56%;
    width: 54.19%;
  }
  .campuses__map--georgia {
    left: 58.15%;
    top: 15.73%;
    width: 41.85%;
  }
  .campuses__map img { width: 100%; height: auto; }

  .campuses__map-label {
    position: absolute;
    bottom: 100%;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 5.091cqw; /* 45px at the 883.9px design group width */
    line-height: 1.13;
    text-transform: uppercase;
    background: url('/wp-content/themes/ogle/assets/img/glitter-texture.webp') center / cover;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .campuses__map--texas .campuses__map-label { left: 36.9%; margin-bottom: 6.74%; }
  .campuses__map--georgia .campuses__map-label { left: 13.2%; margin-bottom: 8.95%; }

  .campuses__pins {
    position: absolute;
    inset: 0;
  }
  .campuses__pin {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    display: block;
  }
  /* Pin dot centers as % of each map box (from Figma instance positions) */
  .campuses__map--texas .campuses__pins li:nth-child(1) .campuses__pin { left: 70.95%; top: 35.98%; } /* Arlington */
  .campuses__map--texas .campuses__pins li:nth-child(2) .campuses__pin { left: 74.51%; top: 35.54%; } /* Dallas */
  .campuses__map--texas .campuses__pins li:nth-child(3) .campuses__pin { left: 71.16%; top: 32.00%; } /* North Dallas */
  .campuses__map--texas .campuses__pins li:nth-child(4) .campuses__pin { left: 68.64%; top: 29.79%; } /* Denton */
  .campuses__map--texas .campuses__pins li:nth-child(5) .campuses__pin { left: 68.01%; top: 32.89%; } /* Hurst */
  .campuses__map--texas .campuses__pins li:nth-child(6) .campuses__pin { left: 67.38%; top: 36.42%; } /* Fort Worth */
  .campuses__map--texas .campuses__pins li:nth-child(7) .campuses__pin { left: 86.90%; top: 61.62%; } /* Houston */
  .campuses__map--texas .campuses__pins li:nth-child(8) .campuses__pin { left: 85.01%; top: 63.61%; } /* Stafford */
  .campuses__map--texas .campuses__pins li:nth-child(9) .campuses__pin { left: 62.55%; top: 64.94%; } /* San Antonio */
  .campuses__map--georgia .campuses__pins li:nth-child(1) .campuses__pin { left: 27.28%; top: 21.21%; } /* Atlanta */
  .campuses__pin::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    background: var(--c-pink-deep);
    border: 2px solid var(--c-white);
    border-radius: 50%;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    transition: width 0.1s cubic-bezier(0, 0, 0.58, 1), height 0.1s cubic-bezier(0, 0, 0.58, 1);
  }
  .campuses__pin:hover::before,
  .campuses__pin:focus-visible::before {
    width: 24px;
    height: 24px;
  }
  .campuses__tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(50% + 15px);
    transform: translate(-50%, -6px);
    min-width: 129px;
    width: max-content;
    padding: 7px 10px;
    background: var(--c-pink);
    border-radius: 6px;
    color: var(--c-white);
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    line-height: 22.8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.1s cubic-bezier(0, 0, 0.58, 1), transform 0.1s cubic-bezier(0, 0, 0.58, 1);
  }
  .campuses__pin:hover .campuses__tooltip,
  .campuses__pin:focus-visible .campuses__tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .campuses__col {
    flex: 0 0 292px;
    padding-left: 34px;
  }

  .campuses__nav { margin-top: 39px; }

  .campuses__link {
    height: 24px;
    margin-bottom: 12px;
  }

  .campuses__group { margin-top: 30px; }

  .campuses__state {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 28px;
    line-height: 39.9px;
    color: var(--c-white);
    margin-bottom: 10px;
  }
}
