/* ============================================================
   ACADEMIC SERVICES — Premium Centered Layout
   3-column cards, floating academic icons, glassmorphism
   ============================================================ */

.acad-svc {
  --as-navy:       #0c2340;
  --as-teal:       #1a6b7a;
  --as-teal-light: #2d8f9e;
  --as-accent:     #3b82c4;
  --as-muted:      #5b6b7d;
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4f8 45%, #f5f9fc 100%);
  border-top: 1px solid rgba(12, 35, 64, 0.05);
}

/* ===================== BACKGROUND LAYER ===================== */
.acad-svc__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.acad-svc__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 10% 25%, rgba(26, 107, 122, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 75%, rgba(59, 130, 196, 0.05) 0%, transparent 50%);
}

.acad-svc__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(12, 35, 64, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 35, 64, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, rgba(0,0,0,0.5) 0%, transparent 80%);
}

.acad-svc__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.acad-svc__orb--1 {
  width: 400px; height: 400px;
  top: -120px; right: -60px;
  background: radial-gradient(circle, rgba(45, 143, 158, 0.25) 0%, transparent 70%);
  animation: asSvcOrb1 10s ease-in-out infinite;
}
.acad-svc__orb--2 {
  width: 340px; height: 340px;
  bottom: -100px; left: -70px;
  background: radial-gradient(circle, rgba(59, 130, 196, 0.2) 0%, transparent 70%);
  animation: asSvcOrb2 12s ease-in-out infinite;
}

@keyframes asSvcOrb1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-15px, 20px); }
}
@keyframes asSvcOrb2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -15px); }
}

/* ---- Floating academic background icons ---- */
.acad-svc__bg-icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.acad-svc__bg-icon {
  position: absolute;
  color: var(--as-teal);
  opacity: 0.04;
  font-size: 2rem;
  animation: asBgIconFloat 18s ease-in-out infinite;
}
.acad-svc__bg-icon--1 { top: 8%;  left: 6%;  font-size: 2.2rem; animation-duration: 20s; animation-delay: 0s; }
.acad-svc__bg-icon--2 { top: 15%; right: 10%; font-size: 2.8rem; animation-duration: 22s; animation-delay: 2s; }
.acad-svc__bg-icon--3 { top: 45%; left: 3%;  font-size: 1.8rem; animation-duration: 18s; animation-delay: 4s; }
.acad-svc__bg-icon--4 { top: 60%; right: 5%; font-size: 2.4rem; animation-duration: 24s; animation-delay: 1s; }
.acad-svc__bg-icon--5 { bottom: 20%; left: 12%; font-size: 2rem;  animation-duration: 19s; animation-delay: 3s; }
.acad-svc__bg-icon--6 { bottom: 30%; right: 15%; font-size: 1.6rem; animation-duration: 21s; animation-delay: 5s; }
.acad-svc__bg-icon--7 { top: 30%;  left: 40%; font-size: 2.6rem; animation-duration: 25s; animation-delay: 2s; opacity: 0.03; }
.acad-svc__bg-icon--8 { bottom: 10%; right: 35%; font-size: 1.9rem; animation-duration: 17s; animation-delay: 6s; }

@keyframes asBgIconFloat {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  15%  { opacity: 0.04; }
  50%  { transform: translateY(-25px) rotate(8deg); opacity: 0.06; }
  85%  { opacity: 0.04; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0; }
}

/* ===================== CONTAINER ===================== */
.acad-svc .container {
  position: relative;
  z-index: 1;
}

/* ===================== CENTERED HEADER ===================== */
.acad-svc__header {
  max-width: 780px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.acad-svc__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--as-teal);
  background: rgba(26, 107, 122, 0.07);
  border: 1px solid rgba(26, 107, 122, 0.15);
  border-radius: 100px;
}
.acad-svc__label i {
  font-size: 0.68rem;
}

.acad-svc__title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--as-navy);
  margin-bottom: 1.25rem;
}

.acad-svc__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.925rem, 1.12vw, 1.02rem);
  line-height: 1.75;
  color: var(--as-muted);
  margin: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================== 3-COLUMN CARD GRID ===================== */
.acad-svc__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

/* Service card */
.acad-svc__card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem 1.5rem 1.5rem;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(12, 35, 64, 0.06);
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(168deg, rgba(255,255,255,0.97) 0%, rgba(245,250,253,0.85) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 24px rgba(12, 35, 64, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s ease;
}

/* Top accent bar — hidden by default, slides in on hover */
.acad-svc__card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--as-teal-light), var(--as-accent), var(--as-teal));
  border-radius: 20px 20px 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Radial glow on hover */
.acad-svc__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(45, 143, 158, 0.08) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.acad-svc__card > *:not(.acad-svc__card-accent) {
  position: relative;
  z-index: 1;
}
.acad-svc__grid, a{
     /*pointer-events: none;*/
}

.acad-svc__card:hover,
.acad-svc__card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(45, 143, 158, 0.28);
  box-shadow:
    0 0 0 1px rgba(45, 143, 158, 0.08),
    0 0 32px rgba(45, 143, 158, 0.08),
    0 20px 52px rgba(12, 35, 64, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  color: inherit;
  
}
.acad-svc__card:focus-visible {
  outline: 2px solid var(--as-teal-light);
  outline-offset: 3px;
}

.acad-svc__card:hover .acad-svc__card-accent { transform: scaleX(1); }
.acad-svc__card:hover::after { opacity: 1; }

/* Alternating tall cards for visual rhythm */
.acad-svc__card--tall {
  padding-top: 2.5rem;
  padding-bottom: 2.15rem;
}

/* Card icon */
.acad-svc__card-icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
  font-size: 1.2rem;
  color: var(--as-teal);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(232,244,248,0.9) 100%);
  border: 1px solid rgba(26, 107, 122, 0.12);
  box-shadow:
    0 4px 18px rgba(12, 35, 64, 0.06),
    0 0 0 4px rgba(26, 107, 122, 0.04);
  transition:
    color 0.4s ease,
    background 0.4s ease,
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s ease,
    border-radius 0.4s ease,
    border-color 0.4s ease;
}

.acad-svc__card:hover .acad-svc__card-icon {
  color: #fff;
  transform: scale(1.08) translateY(-2px);
  background: linear-gradient(135deg, var(--as-teal-light) 0%, var(--as-navy) 100%);
  border-color: transparent;
  border-radius: 50%;
  box-shadow:
    0 8px 24px rgba(26, 107, 122, 0.3),
    0 0 0 4px rgba(26, 107, 122, 0.1);
}

/* Card title */
.acad-svc__card-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--as-navy);
  margin-bottom: 0.6rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}
.acad-svc__card:hover .acad-svc__card-title {
  color: var(--as-teal);
}

/* Card description */
.acad-svc__card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--as-muted);
  margin: 0 0 1.15rem;
  flex-grow: 1;
}

/* Learn More link */
.acad-svc__card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--as-teal);
  margin-top: auto;
  transition: gap 0.3s ease, color 0.3s ease;
}
.acad-svc__card:hover .acad-svc__card-link {
  gap: 0.75rem;
  color: var(--as-navy);
}
.acad-svc__card-link i {
  font-size: 0.68rem;
  transition: transform 0.3s ease;
}
.acad-svc__card:hover .acad-svc__card-link i {
  transform: translateX(4px);
}

/* ===================== BOTTOM CTA ===================== */
.acad-svc__cta {
  position: relative;
  padding: 2rem 2.5rem;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a4a2e 0%, #0f2b1a 50%, #1a3c28 100%);
  border: 1px solid rgba(72, 187, 120, 0.25);
  box-shadow:
    0 8px 40px rgba(15, 43, 26, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.acad-svc__cta::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #48bb78, #38b2ac);
  border-radius: 22px 0 0 22px;
}

.acad-svc__cta::after {
  content: '';
  position: absolute;
  top: -30%; right: -5%;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 187, 120, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.acad-svc__cta-inner {
  position: relative;
  z-index: 1;
}

.acad-svc__cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.acad-svc__cta-content {
  text-align: left;
  flex: 1;
}

.acad-svc__cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #48bb78;
  background: rgba(72, 187, 120, 0.12);
  border: 1px solid rgba(72, 187, 120, 0.25);
  border-radius: 50px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acad-svc__cta-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  line-height: 1.35;
}

.acad-svc__cta-actions {
  display: flex;
  flex-shrink: 0;
}

.acad-svc__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.acad-svc__cta-btn--primary {
  color: #0f2b1a !important;
  background: linear-gradient(135deg, #48bb78, #38b2ac);
  border: none;
  box-shadow: 0 6px 28px rgba(72, 187, 120, 0.35);
}
.acad-svc__cta-btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(72, 187, 120, 0.45);
  color: #0f2b1a !important;
}
.acad-svc__cta-btn--primary i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}
.acad-svc__cta-btn--primary:hover i {
  transform: translateX(4px);
}

.acad-svc__cta-btn--outline {
  color: #48bb78 !important;
  background: rgba(72, 187, 120, 0.08);
  border: 1.5px solid rgba(72, 187, 120, 0.4);
  border-radius: 50px;
}
.acad-svc__cta-btn--outline:hover {
  transform: translateY(-3px);
  background: rgba(72, 187, 120, 0.18);
  border-color: rgba(72, 187, 120, 0.65);
  color: #fff !important;
}

/* ===================== SCROLL REVEAL ===================== */
.acad-svc-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.acad-svc-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.acad-svc-reveal[data-delay="1"] { transition-delay: 0.06s; }
.acad-svc-reveal[data-delay="2"] { transition-delay: 0.12s; }
.acad-svc-reveal[data-delay="3"] { transition-delay: 0.18s; }
.acad-svc-reveal[data-delay="4"] { transition-delay: 0.24s; }
.acad-svc-reveal[data-delay="5"] { transition-delay: 0.30s; }
.acad-svc-reveal[data-delay="6"] { transition-delay: 0.36s; }
.acad-svc-reveal[data-delay="7"] { transition-delay: 0.18s; }

/* ===================== RESPONSIVE — TABLET ===================== */
@media (max-width: 991.98px) {
  .acad-svc {
    padding: 3.5rem 0 3rem;
  }
  .acad-svc__header {
    margin-bottom: 2rem;
  }
  .acad-svc__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .acad-svc__card--tall {
    padding-top: 2rem;
    padding-bottom: 1.85rem;
  }
}

/* ===================== RESPONSIVE — MOBILE ===================== */
@media (max-width: 767.98px) {
  .acad-svc {
    padding: 2.5rem 0;
  }
  .acad-svc__header {
    margin-bottom: 1.75rem;
  }
  .acad-svc__title {
    font-size: 1.5rem;
  }
  .acad-svc__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .acad-svc__card {
    padding: 1.85rem 1.5rem 1.65rem;
    border-radius: 16px;
  }
  .acad-svc__card--tall {
    padding-top: 1.85rem;
    padding-bottom: 1.65rem;
  }
  .acad-svc__card-icon {
    width: 50px; height: 50px;
    margin-bottom: 1.1rem;
    font-size: 1.05rem;
    border-radius: 14px;
  }
  .acad-svc__card-title {
    font-size: 1.02rem;
  }
  .acad-svc__card-desc {
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
  }
  .acad-svc__bg-icon {
    display: none;
  }
  .acad-svc__cta {
    padding: 1.85rem 1.35rem;
    border-radius: 16px;
  }
  .acad-svc__cta-row {
    flex-direction: column;
    text-align: center;
  }
  .acad-svc__cta-content {
    text-align: center;
  }
  .acad-svc__cta-actions {
    width: 100%;
    justify-content: center;
  }
  .acad-svc__cta-btn {
    width: 100%;
    max-width: 300px;
  }
}

/* ===================== TOUCH DEVICES ===================== */
@media (hover: none) and (pointer: coarse) {
  .acad-svc__card:hover {
    transform: none;
  }
  .acad-svc__card:active {
    transform: translateY(-4px);
    border-color: rgba(45, 143, 158, 0.3);
  }
  .acad-svc__card:active .acad-svc__card-accent {
    transform: scaleX(1);
  }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .acad-svc-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .acad-svc__card,
  .acad-svc__card-icon,
  .acad-svc__card-accent,
  .acad-svc__cta-btn {
    transition: none;
  }
  .acad-svc__card:hover,
  .acad-svc__card:active {
    transform: none;
  }
  .acad-svc__orb,
  .acad-svc__bg-icon {
    animation: none;
  }
}
