/* ============================================================
   FAERI College Partnership — Responsive Breakpoints
   ============================================================ */

/* -- Tablet landscape & small desktops (clamp handles fluid sizing) -- */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 60px 0;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .nav-logo img {
    height: 32px;
  }
  .nav-brand-name {
    font-size: 0.95rem;
    letter-spacing: 2px;
  }
  .nav-inner {
    gap: 6px;
  }

  .footer-grid {
    gap: 30px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

/* -- Tablet landscape / iPad -- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* -- Tablet portrait & large phones -- */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

  h1 { font-size: 2rem;   }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.3rem; }

  .section-title {
    font-size: 1.8rem;
  }

  .nav-brand-full {
    display: none;
  }

  .nav-brand-name {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .nav-brand-sub {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--cyan);
    margin-top: 2px;
  }

  /* -- Mobile Navigation -- */
  .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    flex-direction: column;
    background: rgba(6, 10, 20, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    z-index: 99;
    padding: 80px 20px 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16,1,0.3,1),
                visibility 0.25s cubic-bezier(0.16,1,0.3,1);
    will-change: opacity;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
  }

  body.nav-open .site-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* -- Animated grid background -- */
  body.nav-open .nav-links::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image:
      linear-gradient(rgba(0,230,118,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,230,118,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    animation: navGridDrift 20s linear infinite;
    opacity: 0.5;
  }
  @keyframes navGridDrift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-60px, -60px) rotate(3deg); }
  }

  /* -- Nebula background -- */
  body.nav-open .nav-links::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle 300px at 20% 25%, rgba(0,230,118,0.12) 0%, transparent 70%),
      radial-gradient(circle 250px at 80% 75%, rgba(124,77,255,0.10) 0%, transparent 70%),
      radial-gradient(circle 200px at 50% 50%, rgba(0,230,118,0.06) 0%, transparent 60%),
      radial-gradient(circle 350px at 70% 20%, rgba(255,215,0,0.04) 0%, transparent 70%);
    pointer-events: none;
    animation: nebulaOrbit 12s ease-in-out infinite alternate, nebulaFadeIn 0.6s ease forwards;
  }
  @keyframes nebulaOrbit {
    0%   { transform: scale(1)   translate(0, 0)      rotate(0deg); }
    33%  { transform: scale(1.1) translate(15px, -20px) rotate(2deg); }
    66%  { transform: scale(0.95) translate(-10px, 15px) rotate(-1.5deg); }
    100% { transform: scale(1.05) translate(5px, -10px) rotate(1deg); }
  }
  @keyframes nebulaFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .nav-links .nav-menu-title {
    display: list-item;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--cyan);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,230,118,0.15);
    text-shadow: 0 0 10px rgba(0,230,118,0.3);
  }

  .nav-links .nav-menu-logo {
    display: list-item;
    margin-bottom: 6px;
  }
  .nav-links .nav-menu-logo a {
    display: flex;
    justify-content: center;
  }
  .nav-links .nav-menu-logo img {
    width: 72px;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(0, 230, 118,0.3));
  }

  .nav-links .nav-menu-cta {
    display: list-item;
    margin-top: 16px;
  }
  .nav-links .nav-menu-cta a {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
    background: linear-gradient(135deg, var(--cyan), #69ffb0, var(--cyan));
    background-size: 200% 200%;
    padding: 16px 48px;
    border-radius: 50px;
    border: 2px solid rgba(0, 230, 118,0.6);
    box-shadow:
      0 0 20px rgba(0, 230, 118,0.35),
      0 0 60px rgba(0, 230, 118,0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: ctaGlow 2.5s ease-in-out infinite alternate;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .nav-links .nav-menu-cta a:hover {
    transform: scale(1.05);
    box-shadow:
      0 0 30px rgba(0, 230, 118,0.5),
      0 0 80px rgba(0, 230, 118,0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  @keyframes ctaGlow {
    0%   { background-position: 0% 50%;   box-shadow: 0 0 20px rgba(0,230,118,0.35), 0 0 60px rgba(0,230,118,0.15); }
    100% { background-position: 100% 50%; box-shadow: 0 0 28px rgba(0,230,118,0.45), 0 0 80px rgba(0,230,118,0.20); }
  }

  .nav-links li {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
  }

  body.nav-open .nav-links li {
    animation: navItemSlide 0.3s ease forwards;
  }
  body.nav-open .nav-links li:nth-child(1)  { animation-delay: 0.03s; }
  body.nav-open .nav-links li:nth-child(2)  { animation-delay: 0.06s; }
  body.nav-open .nav-links li:nth-child(3)  { animation-delay: 0.09s; }
  body.nav-open .nav-links li:nth-child(4)  { animation-delay: 0.12s; }
  body.nav-open .nav-links li:nth-child(5)  { animation-delay: 0.15s; }
  body.nav-open .nav-links li:nth-child(6)  { animation-delay: 0.18s; }
  body.nav-open .nav-links li:nth-child(7)  { animation-delay: 0.21s; }
  body.nav-open .nav-links li:nth-child(8)  { animation-delay: 0.24s; }
  body.nav-open .nav-links li:nth-child(9)  { animation-delay: 0.27s; }
  body.nav-open .nav-links li:nth-child(10) { animation-delay: 0.30s; }

  @keyframes navItemSlide {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  body.nav-open .nav-links li:not(.nav-menu-logo):not(.nav-menu-cta) a {
    position: relative;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 12px;
    display: block;
    width: 100%;
    text-align: center;
    letter-spacing: 1px;
    color: var(--silver);
    border: 1px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
    transition: color 0.3s ease,
                background 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s cubic-bezier(0.22,1,0.36,1),
                letter-spacing 0.3s ease;
  }

  body.nav-open .nav-links li:not(.nav-menu-logo):not(.nav-menu-cta) a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      120deg,
      transparent 0%,
      rgba(0,230,118,0.08) 35%,
      rgba(0,230,118,0.18) 50%,
      rgba(0,230,118,0.08) 65%,
      transparent 100%
    );
    transition: left 0.5s ease;
    pointer-events: none;
    border-radius: inherit;
  }

  body.nav-open .nav-links li:not(.nav-menu-logo):not(.nav-menu-cta) a:hover {
    color: #fff;
    background: rgba(0,230,118,0.06);
    border-color: rgba(0,230,118,0.3);
    box-shadow:
      0 0 20px rgba(0,230,118,0.15),
      0 0 50px rgba(0,230,118,0.06),
      inset 0 0 16px rgba(0,230,118,0.04);
    transform: scale(1.04);
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(0,230,118,0.5), 0 0 30px rgba(0,230,118,0.2);
  }

  body.nav-open .nav-links li:not(.nav-menu-logo):not(.nav-menu-cta) a:hover::before {
    left: 100%;
  }

  body.nav-open .nav-links li:not(.nav-menu-logo):not(.nav-menu-cta) a:active {
    transform: scale(0.97);
    background: rgba(0,230,118,0.12);
    border-color: rgba(0,230,118,0.5);
    box-shadow:
      0 0 10px rgba(0,230,118,0.25),
      inset 0 0 20px rgba(0,230,118,0.08);
    transition-duration: 0.1s;
  }

  body.nav-open .nav-links a.active {
    color: var(--cyan);
    background: rgba(0,230,118,0.08);
    border: 1px solid rgba(0,230,118,0.25);
    box-shadow:
      0 0 16px rgba(0,230,118,0.12),
      0 0 40px rgba(0,230,118,0.05),
      inset 0 0 12px rgba(0,230,118,0.04);
    text-shadow: 0 0 8px rgba(0,230,118,0.35);
  }
  body.nav-open .nav-links a.active::before {
    display: none;
  }
  body.nav-open .nav-links a.active::after {
    display: none;
  }

  /* -- Hamburger X animation -- */
  body.nav-open .nav-toggle {
    border-color: rgba(0,230,118,0.4);
    background: rgba(0,230,118,0.08);
  }
  body.nav-open .nav-toggle span {
    background: #00e676;
  }
  body.nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
    width: 0;
  }
  body.nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    text-align: center;
  }

  .nav-cta {
    padding: 10px 22px;
    font-size: 0.85rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 36px;
    font-size: 0.95rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .website-float {
    padding: 8px 14px;
    font-size: 0.65rem;
    bottom: 20px;
    left: 16px;
  }
}

/* -- Small phones -- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 36px 0;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  .section-title {
    font-size: 1.5rem;
  }

  .section-tag {
    font-size: 0.75rem;
    letter-spacing: 3px;
  }

  .starfield {
    display: none;
  }

  .stat-number {
    font-size: 2rem;
  }

  .card,
  .stat-box,
  .domain-card,
  .benefit-card,
  .facility-card,
  .contact-card {
    padding: 16px;
  }

  .tag-pill {
    padding: 6px 14px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 28px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }

  .page-hero-content {
    padding: 0 16px;
  }

  .page-hero-title {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* College form on mobile */
  .form-row { grid-template-columns: 1fr; }
  .form-input, .form-select, .form-textarea { font-size: 0.9rem; min-height: 46px; }
}

/* ── Ultra-small phones ── */
@media (max-width: 360px) {
  .container { padding: 0 12px; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1rem; }
  .section-title { font-size: 1.25rem; }
  .page-hero-title { font-size: 1.25rem; }
  .section-tag { font-size: 0.7rem; letter-spacing: 2px; }
  .btn-primary, .btn-secondary { padding: 10px 20px; font-size: 0.85rem; }
}
