/* ============================================================
   SASTRA University – English Page Stylesheet
   Organised: variables → base → nav → hero → sections → modal
              → utilities → media queries
   ============================================================ */

/* ── 1. CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
  --primary:      #1d4ed8;
  --primary-2:    #3b82f6;
  --bg:           #f8fafc;
  --text:         #0f172a;
  --muted:        #475569;
  --glass:        rgba(255, 255, 255, 0.75);
  --border:       rgba(15, 23, 42, 0.08);
  --sastra-blue:  #1d4ed8;
  --sastra-glow:  #3b82f6;
  --white:        #ffffff;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background-color: var(--white);
  background-image: radial-gradient(rgba(29, 78, 216, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── 3. NAVIGATION ────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 5%;
  transition: transform 0.3s ease;
}

nav.nav--hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
}

.logo-highlight { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--primary); }

/* ── 4. HERO SECTION ──────────────────────────────────────── */
.hero {
  position: relative;
  padding: 10rem 5% 6rem;
  text-align: center;
  overflow: hidden;
  min-height: 100svh;
  min-height: 100vh;
}

.hero-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(29, 78, 216, 0.15) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

h1 .highlight {
  color: var(--primary);
  font-style: italic;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

/* Hero Image & Floating Icons */
.hero-visual-wrapper {
  position: relative;
  display: block;
  margin: 3.5rem auto 0;
  width: 100%;
  max-width: 800px;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(29, 78, 216, 0.25);
  display: block;
}

.floating-icon {
  position: absolute;
  width: 90px;
  height: 80px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(38, 35, 241, 0.35);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  z-index: 10;
  animation: floatIcon 6s ease-in-out infinite;
  will-change: transform;
}

.icon-1 { top: 10%;    left: -120px; }
.icon-2 { top: 10%;    right: -120px; animation-delay: 1.5s; }
.icon-3 { bottom: 10%; left: -120px;  animation-delay: 3s; }
.icon-4 { bottom: 10%; right: -120px; animation-delay: 4.5s; }

/* Hero Headline */
.hero-headline {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 3rem);
  margin: 20px auto 30px;
  width: 100%;
}

.static-part  { color: #1a1a1a; font-weight: 900; }
.dynamic-part {
  color: #4f86f7;
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(79, 134, 247, 0.3), 0 0 20px rgba(79, 134, 247, 0.1);
}

#dynamic-word.fade-out { opacity: 0; transform: translateY(-8px); transition: opacity 0.3s, transform 0.3s; }
#dynamic-word.fade-in  { opacity: 1; transform: translateY(0);    transition: opacity 0.3s, transform 0.3s; }

/* ── 5. BUTTONS ───────────────────────────────────────────── */
.btn {
  padding: 1rem 2.5rem;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 10px 30px rgba(29, 78, 216, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(29, 78, 216, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-white {
  background: white;
  color: var(--primary);
  padding: 1.2rem 3rem;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  display: inline-block;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.btn-white:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── 6. PROGRAM SELECTOR ──────────────────────────────────── */
.program-selector {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px dashed rgba(29, 78, 216, 0.2);
}

.program-selector h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.select-wrapper {
  position: relative;
  max-width: 450px;
  margin: 0 auto;
}

.program-dropdown {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(29, 78, 216, 0.2);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.program-dropdown:focus,
.program-dropdown:hover {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.select-arrow {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--primary);
  font-size: 0.9rem;
}

.program-selector .highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

/* ── 7. SCHOOLS GRID ──────────────────────────────────────── */
.page-container {
  min-height: 100svh;
  min-height: 100vh;
  padding: 80px 20px;
  background-color: #f7f9fc;
  background-image:
    linear-gradient(rgba(0, 82, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 82, 204, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

.main-title {
  color: #002d72;
  font-size: clamp(24px, 8vw, 32px);
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
}

.title-underline {
  width: 80%;
  max-width: 450px;
  height: 4px;
  background-color: #f39c12;
  border-radius: 10px;
  margin: 0 auto 40px;
}

.schools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1400px;
  width: 95%;
  margin: 0 auto;
}

.school-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid transparent;
}

.card-movement-wrapper {
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  text-align: center;
}

.image-container {
  width: 100%;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 25px;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.school-label {
  font-size: 14px;
  font-weight: 800;
  color: #1a2a40;
  margin: 0;
  padding: 0 5px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  margin-top: 25px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s ease;
}

.school-btn {
  flex: 1;
  padding: 10px 5px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  text-transform: uppercase;
  border: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background-color: #002d72;
  color: white;
  opacity: 0;
  transform: translateY(10px);
}

.faculty-btn {
  background-color: #f8f9fa;
  color: #002d72;
  border: 1px solid #002d72 !important;
}

/* Hover effects for school cards */
.school-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transform: translateY(-10px);
}

.school-card:hover .card-movement-wrapper { transform: translateY(-70px); }
.school-card:hover .card-actions         { opacity: 1; transform: translateY(0); }
.school-card:hover .school-btn           { opacity: 1; transform: translateY(0); }

.school-btn:first-child:hover,
.school-btn:first-child:active {
  transform: scale(1.15);
  background-color: #003db3;
  box-shadow: 0 0 20px rgba(0, 82, 204, 0.7);
  z-index: 2;
}

.faculty-btn:hover,
.faculty-btn:active {
  transform: scale(1.15);
  background-color: #002d72;
  color: white !important;
  border-color: #002d72 !important;
  box-shadow: 0 0 20px rgba(0, 82, 204, 0.7);
  z-index: 2;
}

/* ── 8. PROGRAMMES SECTION ────────────────────────────────── */
.programmes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1400px;
  width: 95%;
  margin-bottom: 100px;
}

.prog-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(0, 45, 114, 0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  cursor: pointer;
  overflow: hidden;
}

.prog-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 45, 114, 0.12), 0 0 25px rgba(0, 45, 114, 0.08);
  border-color: rgba(0, 45, 114, 0.15);
}

.prog-card:active {
  transform: translateY(-5px) scale(0.98);
  box-shadow: 0 5px 15px rgba(0, 45, 114, 0.2);
  transition: transform 0.1s ease;
}

.prog-number {
  font-size: 14px;
  font-weight: 800;
  color: #f39c12;
  display: block;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.prog-card:hover .prog-number { transform: translateY(-3px); }

.prog-card h3 {
  color: #002d72;
  font-size: 22px;
  margin-bottom: 15px;
  font-weight: 800;
}

.prog-card p {
  color: #555;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.prog-card .image-container {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.prog-card:hover .image-container,
.prog-card.touched .image-container {
  transform: translateY(-10px);
}

.prog-card .school-btn {
  opacity: 0;
  transform: translateY(14px);
  position: relative;
  margin-top: 10px;
  transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

.prog-card:hover .school-btn,
.prog-card.touched .school-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  background-color: #003db3;
  box-shadow: 0 5px 15px rgba(0, 61, 179, 0.3);
}

/* ── 9. B.TECH MODAL ──────────────────────────────────────── */
.program-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 45, 114, 0.9);
  backdrop-filter: blur(8px);
  overflow-y: auto;           /* lets the modal scroll if content is taller than viewport */
  padding: 40px 20px;
  box-sizing: border-box;
}

.modal-content {
  background: url('../images/sastranirf2025web.jpg') no-repeat center center;
  background-size: cover;
  margin: 0 auto;
  padding: 40px;
  width: 100%;
  max-width: 1100px;
  border-radius: 30px;
  position: relative;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  color: white;
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  z-index: 1;
  pointer-events: none;
}

.modal-title,
.modal-underline,
.btech-grid { position: relative; z-index: 2; }

.modal-title {
  color: #002d72;
  text-align: center;
  font-weight: 800;
}

.modal-underline {
  width: 100px;
  height: 4px;
  background: #f39c12;
  margin: 10px auto 40px;
}

.btech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 15px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px;
}

.prog-item {
  background: white;
  border: 1px solid #e0e0e0;
  padding: 15px 20px;
  border-radius: 12px;
  color: #333;
  font-weight: 600;
  text-align: left;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 14px;
}

.prog-item:hover {
  background: #002d72;
  color: white;
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 45, 114, 0.2);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #002d72;
  background: white;
  color: #002d72;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.close-btn:hover {
  background: #002d72;
  color: white;
}

/* --- Course Card Design --- */
.course-card {
  position: relative;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  background: #002d72;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.course-image {
  width: 100%;
  height: 100%;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

/* --- Animated Info Panel --- */
.course-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0, 45, 114, 0.95), transparent);
  transform: translateY(100%); /* Hidden initially */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-info h3 {
  margin: 0;
  color: white;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.apply-btn {
  background: #f39c12;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 12px;
  width: -webkit-fit-content;
  width: fit-content;
  cursor: pointer;
}

/* --- Interaction Effects --- */

/* Desktop Hover */
.course-card:hover .course-info {
  transform: translateY(0);
}

.course-card:hover .course-image img {
  transform: scale(1.1);
  opacity: 0.6;
}

/* Mobile Touch Support - Always show partially or on active */
@media (max-width: 768px) {
  .course-info {
    transform: translateY(45px); /* Peek the title */
    background: linear-gradient(to top, rgba(0, 45, 114, 0.9) 70%, transparent);
  }
  
  .course-card:active .course-info {
    transform: translateY(0);
  }
}

/* Update btech-grid to support larger cards */
.btech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 15px;
}

/* ── 10. SECTION BASE ─────────────────────────────────────── */
section {
  padding: 40px 5%;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 20px;
}

.section-tag {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: block;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── 11. ADMISSION PROCESS ────────────────────────────────── */
#admission-process {
  padding: 20px 20px 80px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 40px;
  position: relative;
  margin-top: 20px;
}

.central-flag {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: var(--sastra-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 20px rgba(29, 78, 216, 0.4);
  font-size: 24px;
}

.process-card {
  position: relative;
  background: var(--white);
  border: 2px solid #e2e8f0;
  padding: 40px;
  transition: all 0.4s ease;
  cursor: pointer;
}

.card-1 { border-radius: 0 50px 50px 50px; }
.card-2 { border-radius: 50px 0 50px 50px; }
.card-3 { border-radius: 50px 50px 0 50px; }
.card-4 { border-radius: 50px 50px 50px 0; }

.corner-orb {
  position: absolute;
  width: 60px; height: 60px;
  background: var(--sastra-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 4px solid var(--white);
  z-index: 5;
  transition: transform 0.3s ease;
  will-change: transform;
}

.card-1 .corner-orb { top: -30px;    left: -30px; }
.card-2 .corner-orb { top: -30px;    right: -30px; }
.card-3 .corner-orb { bottom: -30px; left: -30px; }
.card-4 .corner-orb { bottom: -30px; right: -30px; }

.process-card:hover {
  border-color: var(--sastra-blue);
  box-shadow: 0 10px 30px rgba(29, 78, 216, 0.1);
}

.process-card:hover h3 {
  color: var(--sastra-blue);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.process-card:hover .corner-orb {
  animation: shakeRotate 0.5s ease-in-out;
}

.process-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 15px 0;
  transition: all 0.3s ease;
}

.process-card p { color: #64748b; font-size: 0.95rem; line-height: 1.6; }

/* ── 12. ABOUT SECTION ────────────────────────────────────── */
.about-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.about-card {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-2);
}

.card-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.about-card h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--text); }
.about-card p  { color: var(--muted); line-height: 1.7; }

/* ── 13. VIDEOS SECTION ───────────────────────────────────── */
.videos-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.video-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  overflow: hidden;
}

.video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  object-fit: cover;
  background-color: #000;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.9), rgba(59, 130, 246, 0.9));
  color: white;
  font-size: 3rem;
  cursor: pointer;
}

.video-info { padding: 1.8rem; }
.video-info h3 { font-size: 1.2rem; margin-bottom: 0.8rem; color: var(--text); }
.video-info p  { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

/* ── 14. DEANS SECTION ────────────────────────────────────── */
.deans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 1400px;
  width: 95%;
  margin: 0 auto;
}

.dean-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 45, 114, 0.06);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 0.35s ease;
}

.dean-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 45, 114, 0.13);
}

.dean-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: linear-gradient(135deg, #002d72, #1d4ed8);
  overflow: hidden;
}

.dean-video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  /* Ensure native controls work on all platforms */
  -webkit-appearance: none;
  appearance: none;
}

.dean-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Hide overlay once the video has a real source loaded */
.dean-video-wrapper video:not([src=""]):not([src="#"]) ~ .dean-play-overlay,
.dean-video-wrapper video[src] ~ .dean-play-overlay {
  opacity: 0;
}

.dean-info {
  padding: 1.2rem 1.4rem 1.5rem;
  text-align: center;
}

.dean-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #002d72;
  margin-bottom: 4px;
}

.dean-school {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* Tablet – 2 columns */
@media (max-width: 1024px) {
  .deans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Mobile – 1 column; full-width videos */
@media (max-width: 600px) {
  .deans-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    padding: 0 4px;
  }

  .dean-card {
    border-radius: 14px;
  }

  .dean-info {
    padding: 1rem 1rem 1.2rem;
  }

  .dean-name { font-size: 1rem; }
  .dean-school { font-size: 0.78rem; }
}

/* ── 14b. FEATURES SECTION ───────────────────────────────── */
.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item { text-align: center; padding: 2rem; }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }
.feature-item h3 { font-size: 1.15rem; margin-bottom: 0.8rem; color: var(--text); }
.feature-item p  { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

/* ── 15. LEADERSHIP SECTION ──────────────────────────────── */
#leadership {
  padding: 60px 5% 70px;
  background: rgba(29, 78, 216, 0.02);
}

.leadership-slider {
  max-width: 960px;
  width: 100%;             /* definite width so children can resolve % against it */
  margin: 0 auto;
  overflow: hidden;        /* clips card 2 until it slides in */
  border-radius: 24px;
}

.leadership-track {
  display: flex;
  width: 100%;             /* equals slider width — makes flex-basis % work */
  -webkit-transition: -webkit-transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
          transition:         transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* ── Leader card ── */
.leader-card {
  flex: 0 0 100%;          /* 0 grow · 0 shrink · 100% of track = full slider width */
  width: 100%;             /* belt-and-suspenders for older WebKit */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 50px 56px;
  background: white;
  border-radius: 24px;
  /* visible blue border — always present, intensifies on hover */
  border: 2px solid rgba(29, 78, 216, 0.18);
  box-shadow: 0 10px 40px rgba(29, 78, 216, 0.07),
              0 0 0 0 rgba(29, 78, 216, 0);
  position: relative;
  overflow: hidden;
  -webkit-transition: box-shadow 0.4s ease, border-color 0.4s ease;
          transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* blue-wash overlay on hover */
.leader-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.04), transparent 60%);
  opacity: 0;
  -webkit-transition: opacity 0.4s ease;
          transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: 24px;
}

/* blue border glow on hover — works on all platforms via box-shadow */
.leader-card:hover {
  border-color: rgba(29, 78, 216, 0.65);
  box-shadow: 0 20px 56px rgba(29, 78, 216, 0.14),
              0 0  24px rgba(29, 78, 216, 0.22),
              0 0  48px rgba(59, 130, 246, 0.12);
}

.leader-card:hover::before { opacity: 1; }

/* ── Circular photo with spinning gradient ring ── */
.leader-photo-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 170px;
  height: 170px;
}

.leader-photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #1d4ed8 0%,
    #3b82f6 35%,
    #93c5fd 60%,
    #1d4ed8 100%
  );
  animation: spinRing 3s linear infinite;
  z-index: 0;
  transition: box-shadow 0.4s ease;
}

/* white gap between ring and photo */
.leader-photo-wrapper::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: white;
  z-index: 1;
}

.leader-photo-wrapper img {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
}

.leader-card:hover .leader-photo-ring {
  box-shadow: 0 0 28px rgba(29, 78, 216, 0.55),
              0 0 56px rgba(59, 130, 246, 0.28);
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

/* ── Text content ── */
.leader-content { flex: 1; min-width: 0; }

.leader-role-tag {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(29, 78, 216, 0.07);
  border: 1px solid rgba(29, 78, 216, 0.18);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.leader-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.45;
}

.leader-name-highlight {
  color: var(--primary);
  font-weight: 800;
}

.leader-bio {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 22px;
}


/* ── Navigation dots + next button ── */
.leadership-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.leader-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(29, 78, 216, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}

.leader-dot.active {
  width: 28px;
  background: var(--primary);
}

.leader-dot:hover:not(.active) {
  background: rgba(29, 78, 216, 0.4);
}

.leader-next {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(29, 78, 216, 0.2);
  background: white;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: background 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, color 0.3s ease;
}

.leader-next:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(29, 78, 216, 0.4);
}

/* Tablet */
@media (max-width: 768px) {
  .leader-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px 40px;
    gap: 28px;
  }

  .leader-photo-wrapper {
    width: 130px;
    height: 130px;
    margin: 0 auto;
  }

  .leader-link { justify-content: center; }
}

/* Mobile */
@media (max-width: 480px) {
  .leader-card { padding: 28px 16px 32px; gap: 22px; }
  .leader-heading { font-size: 1.05rem; }
  .leader-bio { font-size: 0.88rem; }
}

/* ── 16. CTA SECTION ──────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  text-align: center;
  padding: 6rem 5%;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 30m-2 0a2 2 0 1 0 4 0 2 2 0 1 0-4 0' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cta-section h2 { color: white; margin-bottom: 1.5rem; }
.cta-section p  { font-size: 1.15rem; margin-bottom: 2.5rem; opacity: 0.95; line-height: 1.7; }

/* ── 16. FOOTER ───────────────────────────────────────────── */
footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 5%;
  text-align: center;
}

footer p   { margin-bottom: 1rem; }
footer a   { color: var(--primary-2); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── 17. KEYFRAMES ────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.1); }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes shakeRotate {
  0%   { transform: rotate(0deg)   scale(1); }
  25%  { transform: rotate(10deg)  scale(1.1); }
  50%  { transform: rotate(-10deg) scale(1.1); }
  75%  { transform: rotate(10deg)  scale(1.1); }
  100% { transform: rotate(0deg)   scale(1); }
}

/* ── 18. MEDIA QUERIES ────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .icon-1 { left: 0; }
  .icon-2 { right: 0; }
  .icon-3 { left: 0; }
  .icon-4 { right: 0; }

  .schools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 10px;
  }

  /* On tablet, reveal cards on tap (active class set by JS) */
  .card-actions {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .school-card { min-height: 320px !important; height: auto !important; }
  .school-card.active { min-height: 380px !important; }
  .school-card.active .card-movement-wrapper { transform: translateY(-60px) !important; }
  .school-card.active .card-actions {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
  .school-card.active .school-btn { opacity: 1 !important; transform: translateY(0) !important; }

  nav { padding: 1rem 5%; }
}

/* ── Hamburger menu ───────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile */
@media (max-width: 768px) {
  nav { padding: 1rem 5%; }

  .nav-toggle { display: flex; }

  /* Hide the Apply Now CTA button in the top bar; keep hamburger + logo only */
  .nav-apply-btn { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 0.9rem 5%;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .hero { padding: 8rem 5% 4rem; }

  .hero-headline {
    font-size: 1.15rem;
    gap: 6px;
    padding: 0 45px;
    position: relative;
    margin-top: 30px;
  }

  .floating-icon { width: 50px; height: 45px; font-size: 18px; }
  .icon-1 { top: -20px;  left: 10px; }
  .icon-2 { top: -20px;  right: 10px; }
  .icon-3 { bottom: -60px; left: 10px; }
  .icon-4 { bottom: -60px; right: 10px; }
  .hero-visual-wrapper { margin-bottom: 30px; }

  .cta-group { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; }

  section { padding: 4rem 5%; }

  #admission-process { padding: 20px 15px 60px; }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .central-flag { display: none; }

  .corner-orb { width: 45px; height: 45px; font-size: 18px; }
  .card-1 .corner-orb { top: 10px;    left: 10px; }
  .card-2 .corner-orb { top: 10px;    right: 10px; }
  .card-3 .corner-orb { bottom: 10px; left: 10px; }
  .card-4 .corner-orb { bottom: 10px; right: 10px; }

  .process-card { padding: 30px 20px; text-align: center; }
  .process-card h3 { font-size: 2rem; }
}

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

  .school-card {
    height: auto;
    min-height: 320px;
  }

  /* Buttons remain hidden until card is tapped (active class via JS),
     same slide-up-reveal behaviour as desktop hover */

  /* Modal: full-width, single column on mobile */
  .program-modal {
    padding: 20px 10px;
  }

  .modal-content {
    padding: 20px 15px;
    border-radius: 16px;
  }

  .btech-grid {
    grid-template-columns: 1fr;
    max-height: 55vh;
  }

  .modal-title { font-size: 1.2rem; }
}


