/* =========================================================
   ASPIRATIONS — GLOBAL PLACEMENTS
   Three-part block adapted from the dummy test.php UI:
   1) Top-5 merit strip, 2) country-tabbed world map,
   3) university logo cards. All CMS-driven (gp-* classes).
========================================================= */

/* ---------- 1. TOP 5 MERIT STRIP ---------- */
.gp-top-section {
  padding: 60px 0;
  background: #fff9f0;
}

.gp-top-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 100%;
  margin: 0 auto;
  background: linear-gradient(135deg, rgb(126 209 255) 0%, rgb(15 58 113 / 73%) 58%, rgba(56, 166, 221, 0.9) 100%);
  border-radius: 24px;
  box-shadow: 10px 11px 40px 8px rgb(9 41 77 / 22%);
  padding: 20px 0;
}

.gp-top-item {
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  position: relative;
}

.gp-top-item:last-child {
  border-right: 0;
}

.gp-rank {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 100px;
  font-weight: bold;
  line-height: 1;
  color: #0000003b;
  position: absolute;
  top: -64px;
  left: -10px;
  font-style: italic;
  opacity: 0.2;
}

.gp-unr-logo {
  height: 40px;
}

.gp-unr-logo img {
  height: 100%;
  object-fit: contain;
}

.gp-student-info,
.gp-university-info,
.gp-course-info {
  width: 100%;
  padding: 0;
  border: 0;
}

.gp-student-info h3,
.gp-university-info h3,
.gp-course-info h3 {
  margin: 0;
  font-family: 'EB Garamond', serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #ffffff;
}

.gp-student-info h3 {
  font-size: 28px !important;
  margin-bottom: 8px;
}

.gp-course-info h3 {
  color: rgba(255, 255, 255, 0.92);
}

/* ---------- 2 & 3. MAP + CARDS ---------- */
.gp-section {
  padding: 60px 0;
  background: #fff9f0;
}

/* TABS */
.gp-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
}

.gp-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 48px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #16263a;
  cursor: pointer;
  overflow: hidden;
  transition: padding 0.35s ease, background-color 0.35s ease,
    border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  box-shadow: 1px 2px 20px #ababab30;
  transition: all 0.5s linear;
}

.plmt-sec {
  display: flex;
  align-items: center;
}

.gp-tab__flag {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 23px;
  line-height: 1;
}

.gp-tab__name {
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-8px);
  transition: max-width 0.35s ease, margin-left 0.35s ease, opacity 0.25s ease,
    visibility 0.25s ease, transform 0.35s ease;
}

.gp-tab__count {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: #f1f1f1;
  color: #222;
  transition: background-color 0.35s ease;
}

.gp-tab:hover,
.gp-tab.is-active {
  padding-left: 14px;
  padding-right: 14px;
  background: var(--dark-blue, #0f3a71);
  border-color: var(--dark-blue, #0f3a71);
  color: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  transition: all 0.5s linear;
}

.gp-tab:hover .gp-tab__name,
.gp-tab.is-active .gp-tab__name {
  max-width: 250px;
  margin-left: 8px;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.gp-tab:hover .gp-tab__count,
.gp-tab.is-active .gp-tab__count {
  background: #fff;
  color: var(--dark-blue);
}

/* SEARCH */
.gp-search {
  margin-left: auto;
  width: min(100%, 300px);
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 17px;
  border-radius: 8px;
  background: #3442522e;
  box-shadow: 0 8px 20px rgba(8, 38, 82, 0.12);
}

.gp-search i {
  color: #000000;
  font-size: 18px;
  margin-right: 12px;
}

.gp-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #000000;
  font-size: 14px;
}

.gp-search input::placeholder {
  color: rgba(9, 9, 9, 0.72);
}

/* BOARD */
.gp-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1.02fr);
  gap: 20px;
  align-items: center;
  margin-top: 10px;
  height: 400px;
  margin-bottom: 0px;
}

.gp-map {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gp-map__wrap {
  position: relative;
  width: 100%;
  max-width: 850px;
  aspect-ratio: 1000 / 560;
}

.gp-map__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* PIN */
.gp-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 10;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #34485c;
  color: #fff;
  cursor: pointer;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(20, 40, 60, 0.25), 0 0 0 3px rgba(52, 72, 92, 0.16);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.gp-pin>* {
  transform: rotate(45deg);
}

.gp-pin:hover,
.gp-pin.is-active {
  background: #d9bd78;
  color: #16202c;
  box-shadow: 0 8px 18px rgba(30, 45, 60, 0.3), 0 0 0 5px rgba(217, 189, 120, 0.22);
  z-index: 999;
}

.gp-pin__count {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.gp-pin__country {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 13px);
  transform: translate(-50%, 8px) scale(0.96);
  opacity: 0;
  padding: 8px 13px;
  border-radius: 7px;
  background: #26384a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(8, 38, 82, 0.2);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gp-pin__country::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #26384a;
  transform: translateX(-50%) rotate(45deg);
}

.gp-pin:hover .gp-pin__country,
.gp-pin.is-active .gp-pin__country {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.gp-pin::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(52, 72, 92, 0.35);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.gp-pin.is-active::after {
  animation: gpPinPulse 1.8s ease-out infinite;
}

@keyframes gpPinPulse {
  0% {
    opacity: 0.8;
    transform: scale(0.8);
  }

  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

/* UNIVERSITY CARDS */
.gp-unis {
  min-width: 0;
  height: 100%;
  overflow: auto;
}

.gp-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 0 20px;
}

.gp-logo-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  border: 1px solid rgba(15, 35, 55, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(20, 40, 60, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gp-logo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(20, 40, 60, 0.15);
}

.gp-logo-card__img {
  display: block;
  width: 100%;
  height: 54px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 12px;
}

.gp-logo-card__name {
  font-size: 14px;
  font-weight: 600;
  color: #182331;
}

.gp-logo-card__country {
  font-size: 12px;
  color: #6b7a8a;
}

.gp-logo-card.is-hidden {
  display: none;
}

.gp-logo-feedback {
  display: none;
  margin: 20px 0 0;
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.gp-logo-feedback.is-visible {
  display: block;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .gp-board {
    grid-template-columns: 1fr;
    height: auto;
  }

  .gp-logo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet/large phone: the 5-across strip becomes a wrapping grid so cards keep
   a readable width instead of being crushed or force-scrolled. */
@media (max-width: 1100px) {
  .gp-top-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 16px;
    padding: 40px 24px 24px;
  }

  .gp-top-item {
    border-right: 0;
    padding: 0 16px;
  }

  .gp-rank {
    font-size: 64px;
    top: -40px;
  }

  .aae-section__title {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .gp-top-item:last-child {
    border-bottom: 0;
  }

  .gp-top-section {
    padding: 60px 0;
  }

  .gp-top-list {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 36px 22px 22px;
  }

  .gp-top-item {
    min-height: 0;
    padding: 0 8px;
    border-bottom: 1px dashed rgb(255 255 255 / 16%);
    padding: 0px 8px 30px;
  }

  .gp-rank {
    font-size: 56px;
    top: -34px;
    left: -4px;
  }

  .gp-student-info h3 {
    font-size: 24px !important;
  }

  .gp-unr-logo {
    height: 34px;
  }

  .gp-tabs {
    /* flex-wrap: nowrap; */
    /* overflow-x: auto; */
    padding: 10px 6px;
    gap: 16px 9px;
    margin: 0 0;
  }

  .gp-tab {
    flex: 0 0 auto;
    border: none;
    overflow: unset;

  }

  .gp-search {
    order: -1;
    margin-left: 0;
    width: 100%;
    margin-bottom: 16px;
  }

  .gp-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-tab__count {
    position: absolute;
    top: -10px;
    right: 0;
    background: var(--dark-blue);
    color: #ffffff;
  }

  .gp-section {
    padding-top: 0;
  }

  .plmt-sec {
    flex-direction: column;
  }
}

/* =========================================================
   GP TABS — collapse / "+N more" toggle
========================================================= */
.gp-tab--hidden {
  display: none !important;
}

/* The +/- toggle reuses the pill look; collapsed it shows "+" and a count. */
.gp-tab--toggle {
  gap: 6px;
  padding: 0 12px;
  justify-content: center;
  font-weight: 400;
  background: #dbdbdb;
  overflow: unset;
}

.gp-tab--toggle .gp-tab__sign {
  font-size: 40px;
  font-weight: 100;
}

/* Expanded ("−") is a compact square with no count. */
.gp-tab--toggle[aria-expanded="true"] {
  min-width: 48px;
  padding: 0;
}

.gp-tab__sign {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
}

/* Count badge on the toggle stays visible (the country-tab count is hidden
   until hover, but the toggle should always show how many are hidden). */
.gp-tab--toggle .gp-tab__count {
  background: var(--dark-blue, #0f3a71);
  color: #fff;
  position: absolute;
  top: -10px;
  right: 0;
}

.gp-tab--toggle:hover .gp-tab__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}