/* ==========================================================
   responsive.css
   Laptop, tablet and phone adjustments, plus the reduced-motion preference.
   Breakpoints: 1100px, 980px, 900px, 800px, 650px, 600px.
   ========================================================== */

@media (max-width: 1100px) {
  .site-header nav {
    gap: 22px;
  }
}

/* ---------- Tablet: hero stacks, graduate and globe sit below the headline ---------- */
@media (max-width: 980px) {
  .hero {
    min-height: 0;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 6%;
  }
  .hero-copy {
    max-width: 640px;
    padding: 64px 0 26px;
  }
  .hero-scene {
    width: min(100%, 600px);
    margin: 0 auto;
    max-height: none;
  }
  /* The text now sits over the top of the photo, so grade top-to-bottom instead of left-to-right. */
  .hero-grade {
    background:
      linear-gradient(
        180deg,
        rgba(8, 12, 30, 0.96) 0%,
        rgba(8, 12, 30, 0.78) 34%,
        rgba(11, 16, 36, 0.3) 62%,
        #0e152d 100%
      ),
      radial-gradient(
        70% 50% at 62% 70%,
        rgba(105, 70, 180, 0.34),
        transparent 72%
      );
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 5%;
  }
  .site-header nav {
    gap: 17px;
  }
  .search-section,
.destinations-section,
.about-section,
.guides-section {
  padding: 46px 6%;
}
  .funding-band {
    padding: 70px 8%;
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-button {
    grid-column: 1 / -1;
  }
  .destination-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 180px;
  }
  .destination:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }
}

@media (max-width: 800px) {
  .scholarship-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Phone ---------- */
@media (max-width: 650px) {
  .announcement {
    font-size: 8px;
  }
  .announcement-end {
    display: none;
  }
  .site-header {
    height: 70px;
  }
  section[id] {
    scroll-margin-top: 70px;
  }
  .menu-toggle {
    display: block;
  }
  .site-header nav {
  display: none;
  position: absolute;
  top: 69px;
  left: 0;
  right: 0;
  background: #EAF6FB;
  padding: 18px 6%;
  flex-direction: column;
  align-items: stretch;
  border-bottom: 1px solid #CDE6F2;
  box-shadow: 0 12px 24px rgba(7, 88, 133, 0.10);
}

.site-header nav.open {
  display: flex;
}

.site-header nav a {
  color: #075985;
  padding: 13px 0;
  font-weight: 600;
  border-bottom: 1px solid rgba(7, 88, 133, 0.08);
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: #20BFA5;
}

.site-header nav a:after {
  display: none;
}

.nav-login {
  text-align: left;
}

  .hero-copy {
    padding: 48px 0 18px;
  }
  .hero-copy h1 {
    font-size: 44px;
  }
  .hero-lede {
    font-size: 14px;
  }
  .hero-actions {
    margin-top: 28px;
  }
  .hero-trust {
    margin-top: 34px;
  }
  .hero-scene {
    aspect-ratio: 1 / 1.16;
  }
  .globe-wrap {
  width: 135%;
  right: -27%;
  top: 44%;
  margin-top: -67.5%;
}
  .graduate {
    height: 72%;
  }
  .hero-grade {
    background:
      linear-gradient(
        180deg,
        rgba(8, 12, 30, 0.97) 0%,
        rgba(8, 12, 30, 0.88) 48%,
        rgba(11, 16, 36, 0.42) 76%,
        #0e152d 100%
      ),
      radial-gradient(
        70% 40% at 62% 82%,
        rgba(105, 70, 180, 0.34),
        transparent 72%
      );
  }

  .search-section,
  .destinations-section,
  .about-section,
  .guides-section {
    padding: 70px 6%;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .search-button {
    grid-column: 1/-1;
  }
 .results-top {
  margin-top: 24px;
}
.funding-band {
  min-height: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 50px 32px !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 28px;
}

.funding-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.funding-band h2,
.funding-band p {
  max-width: 100%;
  overflow-wrap: break-word;
}

.funding-stat {
  width: 100%;
  max-width: 100%;
  margin: 0;
  align-items: flex-start;
  text-align: left;
}

.funding-orb {
  width: 210px;
  height: 210px;
  right: -100px;
  top: 25%;
  opacity: 0.25;
  pointer-events: none;
}

.funding-orb:after {
  font-size: 100px;
}
  .destination-grid {
    grid-auto-rows: 150px;
    gap: 12px;
  }
  .destination {
    padding: 16px;
  }
  .destination:first-child {
    padding: 20px;
  }
  .destination:first-child .destination-name {
    font-size: 28px;
  }
  .destination-name {
    font-size: 16px;
  }
  .journey li {
    grid-template-columns: 52px 1fr;
    padding: 20px;
    gap: 14px;
  }
  .journey-num {
    width: 44px;
    height: 44px;
  }
  .guides-section {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .guide-item {
    grid-template-columns: 100px 1fr 15px;
    gap: 8px;
  }
  .guide-item b {
    font-size: 11px;
  }
  .account-features {
    flex-wrap: wrap;
    gap: 8px;
  }
  footer {
    grid-template-columns: 1fr;
    padding: 38px 7%;
  }
  .footer-links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .footer-note {
    grid-column: 1;
  }
  .footer-brand {
    margin-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .scholarship-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Fix funding cards overflowing on mobile */
@media (max-width: 650px) {
  .funding-band {
    padding-left: 24px !important;
    padding-right: 24px !important;
    overflow: hidden;
  }

  .funding-band * {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  .funding-content,
  .funding-stat {
    width: 100%;
    min-width: 0;
  }
}
/* ---------- Mobile: fit the four feature cards ---------- */
@media (max-width: 650px) {

  .guide-card-grid {
    width: 100%;
    max-width: 100%;
    padding: 0 18px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .guide-card-grid .guide-section,
  .guide-card-grid .guide-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .guide-card-grid .guide-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .guide-card-grid .guide-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    padding: 22px 20px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  .guide-card-grid .guide-number {
    font-size: 25px;
  }

  .guide-card-grid .guide-card-title {
    font-size: 17px;
    line-height: 1.35;
  }

  .guide-card-grid .guide-card-description {
    font-size: 13px;
    line-height: 1.6;
  }
}
@media (max-width: 650px) {
  .guides-intro {
    width: 100%;
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .guides-intro h2,
  .guides-intro p,
  .guides-intro .eyebrow {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
  }
}
/* MOBILE UNIVERSITY CARDS: TWO COLUMNS */

@media screen and (max-width: 600px) {
  #universityGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  #universityGrid > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}