/* =====================================================================
   ZENITH ACADEMY - Coaching Institute Website
   Custom Stylesheet
   Color Palette:
     --navy      #142452  (primary - trust, authority)
     --navy-dark #0B1730  (deep backgrounds)
     --blue      #1E3A8A  (secondary)
     --gold      #FFB703  (accent - energy, achievement)
     --gold-dark #E09A00
     --ink       #1F2430  (body text)
     --muted     #5B6478
   Typography: Poppins (headings) + Inter (body)
   ===================================================================== */

:root {
  --navy: #142452;
  --navy-dark: #0B1730;
  --blue: #1E3A8A;
  --gold: #FFB703;
  --gold-dark: #E09A00;
  --ink: #1F2430;
  --muted: #5B6478;
  --light-bg: #F6F8FC;
  --white: #ffffff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --transition: 0.3s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--navy);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.section-padding { padding: 100px 0; }
.bg-light-alt { background-color: var(--light-bg); }
.bg-navy { background-color: var(--navy); }

.text-accent { color: var(--gold); }
.text-accent-light { color: #FFD873; }

/* =====================================================================
   PRELOADER
   ===================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}
#preloader.no-transition {
  transition: none;
}
.preloader-logo {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader-z {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--gold);
  animation: preloaderPulse 1.4s ease-in-out infinite;
}
.preloader-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 183, 3, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes preloaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
#mainNavbar {
  padding: 18px 0;
  background: transparent;
  z-index: 1030;
}
/* .scrolled is the fallback path only (no-GSAP / reduced-motion — see
   script.js section 3). When GSAP is active, animations.js scrub-ties
   this same background/padding/shadow change directly to scroll
   position instead, so no CSS transition is defined here: stacking one
   on top of GSAP's per-frame scrub updates would just make it lag. */
#mainNavbar.scrolled {
  background: rgba(20, 36, 82, 0.97);
  backdrop-filter: blur(8px);
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.brand-text {
  color: var(--white);
  font-weight: 500;
  font-size: 1.15rem;
}
.brand-text strong { color: var(--gold); font-weight: 700; }

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  padding: 8px 14px !important;
  position: relative;
  transition: color var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--gold);
}
.navbar-toggler {
  border: none;
  color: var(--white);
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  filter: invert(1);
}

.btn-cta {
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 600;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-cta:hover {
  background: var(--gold-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255, 183, 3, 0.35);
  color: var(--navy);
}

/* =====================================================================
   HERO SECTION - Ken Burns zoom background + parallax feel
   ===================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 60px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1900&q=80');
  background-size: cover;
  background-position: center;
  animation: kenBurns 20s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes kenBurns {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(11,23,48,0.92) 30%, rgba(20,36,82,0.75) 65%, rgba(20,36,82,0.4) 100%);
  z-index: 1;
}
.hero-section .container { z-index: 2; }
.hero-eyebrow {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.hero-title {
  color: var(--white);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 30px;
}
.hero-cta { margin-bottom: 50px; }
.hero-cta .btn-outline-light { border-radius: 50px; font-weight: 600; padding: 10px 24px; transition: all var(--transition); }
.hero-cta .btn-outline-light:hover { background: var(--white); color: var(--navy); transform: translateY(-3px); }

.hero-stats { color: var(--white); }
.hero-stat-num {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
}
.hero-stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 1.4rem;
  z-index: 2;
  animation: bounceDown 2s infinite;
  opacity: 0.8;
}
@keyframes bounceDown {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* =====================================================================
   INNER PAGE BANNER (about, courses, faculty, results, notes, videos,
   gallery, testimonials, contact) - compact hero replacement
   ===================================================================== */
.page-banner {
  position: relative;
  padding: 160px 0 70px;
  background:
    linear-gradient(115deg, rgba(11,23,48,0.93) 30%, rgba(20,36,82,0.82) 100%),
    url('https://images.unsplash.com/photo-1544531585-9847b68c8c86?auto=format&fit=crop&w=1600&q=80') center/cover;
  text-align: center;
}
.page-banner-overlay { position: absolute; inset: 0; }
.page-banner h1 {
  position: relative;
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 10px;
}
.page-banner p {
  position: relative;
  color: rgba(255,255,255,0.8);
  max-width: 620px;
  margin: 0 auto 18px;
}
.page-banner .breadcrumb { position: relative; display: inline-flex; }
.page-banner .breadcrumb-item, .page-banner .breadcrumb-item a { color: rgba(255,255,255,0.65); }
.page-banner .breadcrumb-item.active { color: var(--gold); }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* =====================================================================
   404 ERROR PAGE
   Reuses .hero-bg/.hero-overlay (same Ken Burns background + gradient
   as the homepage hero) for visual consistency, just in a shorter,
   centered section instead of a full 100vh hero.
   ===================================================================== */
.error-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 0 80px;
}
.error-section .container { position: relative; z-index: 2; }
.error-code {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 60px rgba(255,183,3,0.35);
  margin-bottom: 0;
}
.error-title {
  color: var(--white);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 10px 0 18px;
}
.error-text {
  color: rgba(255,255,255,0.8);
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}
.error-cta { margin-bottom: 46px; }
.error-links-label {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.error-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 50px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.error-chip:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}

/* =====================================================================
   SECTION HEADINGS
   ===================================================================== */
.section-eyebrow {
  color: var(--gold-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 18px;
}
.section-text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* =====================================================================
   ABOUT SECTION
   ===================================================================== */
.about-img-wrap { position: relative; }
.about-img-main {
  transition: transform 0.5s ease;
}
.about-img-wrap:hover .about-img-main { transform: scale(1.02); }
.about-img-badge {
  position: absolute;
  bottom: -20px;
  right: -10px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 40px rgba(20,36,82,0.18);
}
.about-img-badge i {
  color: var(--gold-dark);
  font-size: 1.6rem;
}
.about-img-badge strong { display: block; color: var(--navy); font-family: 'Poppins', sans-serif; }
.about-img-badge span { font-size: 0.8rem; color: var(--muted); }

.about-checklist {
  list-style: none;
  padding: 0;
  margin: 22px 0;
}
.about-checklist li {
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 500;
}
.about-checklist i { color: var(--gold-dark); margin-right: 10px; }

.counter-row { margin-top: 30px; border-top: 1px solid #e7eaf2; padding-top: 26px; }
.counter-row > div { margin-bottom: 10px; }
.counter {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
}
.counter-suffix {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-dark);
}
.stat-label { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.bg-navy .counter { color: var(--white); }
.bg-navy .counter-suffix { color: var(--gold); }
.bg-navy .stat-label { color: rgba(255,255,255,0.6); }

/* =====================================================================
   STAT RING (SVG progress ring drawn in sync with each counter's
   count-up, via GSAP ScrollTrigger — see initCounters() in animations.js)
   ===================================================================== */
.stat-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
.stat-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.stat-ring-track {
  fill: none;
  stroke: rgba(20,36,82,0.08);
  stroke-width: 6;
}
.bg-navy .stat-ring-track { stroke: rgba(255,255,255,0.12); }
.stat-ring-progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.7; /* 2 * PI * 52 */
  stroke-dashoffset: 326.7; /* empty until animations.js animates it in */
}
.stat-ring-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stat-ring-content .counter,
.stat-ring-content .counter-suffix { font-size: 1.35rem; }
@media (max-width: 575.98px) {
  .stat-ring-wrap { width: 96px; height: 96px; }
  .stat-ring-content .counter,
  .stat-ring-content .counter-suffix { font-size: 1.1rem; }
}

/* Generic icon box card - used for Mission, Infrastructure, etc. */
.icon-box-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  height: 100%;
  box-shadow: 0 6px 24px rgba(20,36,82,0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}
.icon-box-card:hover { transform: translateY(-8px); box-shadow: 0 22px 44px rgba(20,36,82,0.18); }
.icon-box-card .icon-box-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: transform var(--transition);
}
.icon-box-card:hover .icon-box-icon { transform: rotate(-6deg) scale(1.08); }
.icon-box-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.icon-box-card p { color: var(--muted); font-size: 0.92rem; margin: 0; line-height: 1.7; }

/* =====================================================================
   CARD BASE HOVER MICRO-INTERACTIONS (shared)
   ===================================================================== */
.card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

/* =====================================================================
   COURSE CARDS
   ===================================================================== */
.course-card {
  background: var(--white);
  box-shadow: 0 6px 24px rgba(20,36,82,0.08);
  position: relative;
  transition: box-shadow 0.4s ease;
}
.course-card:hover {
  box-shadow: 0 22px 44px rgba(255,183,3,0.28);
}
/* Fallback lift for touch/no-JS/no-GSAP devices — see .no-tilt on <body>.
   When GSAP tilt IS active, it owns translateY/rotateX/rotateY directly. */
.no-tilt .course-card:hover,
.no-tilt .topper-card:hover {
  transform: translateY(-8px);
}
/* Glare overlay that follows the cursor during 3D tilt (animations.js
   sets --glare-x / --glare-y on mousemove) */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255,255,255,0.45), transparent 60%);
  transition: opacity 0.3s ease;
  z-index: 5;
}
.course-card:hover .card-glare,
.topper-card:hover .card-glare { opacity: 1; }
.course-card-img { position: relative; overflow: hidden; height: 190px; }
.course-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.course-card:hover .course-card-img img { transform: scale(1.1); }
.course-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  text-transform: uppercase;
}
.course-title { font-size: 1.15rem; margin-bottom: 12px; }
.course-mini-text { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.course-meta { list-style: none; padding: 0; margin-bottom: 18px; }
.course-meta li { color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.course-meta i { color: var(--gold-dark); width: 18px; }
.btn-know-more {
  color: var(--navy);
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--transition), color var(--transition);
}
.btn-know-more:hover { gap: 14px; color: var(--gold-dark); }
.btn-know-more { cursor: pointer; }

/* Course card action row (Know More + Study Material toggle) */
.course-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.btn-study-material {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--light-bg);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid #e2e7f1;
  border-radius: 50px;
  padding: 7px 16px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-study-material:hover { background: #eef1f8; color: var(--gold-dark); }
.btn-study-material .toggle-chevron {
  font-size: 0.75rem;
  transition: transform var(--transition);
}
.btn-study-material[aria-expanded="true"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-study-material[aria-expanded="true"] .toggle-chevron { transform: rotate(180deg); }

/* Study Material accordion panel - slides down/fades in via Bootstrap
   collapse; individual note rows get a staggered fade-in handled in JS */
.course-notes-collapse { }
.course-notes-inner {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #dfe4ef;
}
.note-empty-msg {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}
.note-mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-mini-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--light-bg);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.note-mini-item.note-mini-visible { opacity: 1; transform: translateY(0); }
.note-mini-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(229, 73, 61, 0.1);
  color: #E5493D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.note-mini-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.note-mini-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-mini-meta { font-size: 0.75rem; color: var(--muted); }
.note-mini-download {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background var(--transition), transform var(--transition);
}
.note-mini-download:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-2px); }

/* Course detail modal */
.course-modal .modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; }
.course-modal .modal-header { background: var(--navy); color: var(--white); border: none; }
.course-modal .modal-header .btn-close { filter: invert(1); }
.course-modal .modal-title { font-family: 'Poppins', sans-serif; }
.course-modal .modal-body ul { padding-left: 20px; color: var(--muted); }
.course-modal .modal-body ul li { margin-bottom: 8px; }

/* =====================================================================
   FACULTY CARDS
   ===================================================================== */
.faculty-card {
  background: var(--white);
  box-shadow: 0 6px 24px rgba(20,36,82,0.08);
  text-align: center;
}
.faculty-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 44px rgba(20,36,82,0.18);
}
.faculty-img { overflow: hidden; height: 240px; }
.faculty-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.faculty-card:hover .faculty-img img { transform: scale(1.1); }
.faculty-name { font-size: 1.1rem; margin-bottom: 2px; }
.faculty-subject { color: var(--gold-dark); font-weight: 600; margin-bottom: 4px; }
.faculty-qual { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
.faculty-social { display: flex; justify-content: center; gap: 14px; }
.faculty-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.faculty-social a:hover { background: var(--gold); color: var(--navy); }

/* =====================================================================
   FACULTY FLIP CARD
   Hover (desktop) / tap or keyboard focus (touch & a11y) rotates the
   card 180deg on the Y axis to reveal bio, specialization tags and
   achievements on the back face.
   ===================================================================== */
.faculty-card-flip {
  perspective: 1600px;
  outline: none;
}
.faculty-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 430px;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

/* Flip on hover for devices with real hover (mouse/trackpad), and on
   keyboard focus for accessibility */
@media (hover: hover) and (pointer: fine) {
  .faculty-card-flip:hover .faculty-card-inner { transform: rotateY(180deg); }
}
.faculty-card-flip:focus-within .faculty-card-inner,
.faculty-card-flip.is-flipped .faculty-card-inner {
  transform: rotateY(180deg);
}

.faculty-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faculty-card-front { transform: rotateY(0deg); }
.faculty-card-front .faculty-card { box-shadow: 0 6px 24px rgba(20,36,82,0.08); }
.faculty-card-front .faculty-card:hover { transform: none; } /* the whole card flips instead of lifting */
.faculty-card-front .card-body { display: flex; flex-direction: column; justify-content: center; }

.faculty-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue) 100%);
  box-shadow: 0 6px 24px rgba(20,36,82,0.18);
  display: flex;
  align-items: center;
}
.faculty-back-inner {
  padding: 26px 24px;
  text-align: center;
  color: var(--white);
  width: 100%;
}
.faculty-card-back .faculty-name { color: var(--white); }
.faculty-card-back .faculty-subject { color: var(--gold); font-size: 0.85rem; margin-bottom: 12px; }
.faculty-bio {
  color: rgba(255,255,255,0.82);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 14px;
}
.faculty-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.faculty-tag {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,183,3,0.4);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
}
.faculty-achievements {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
}
.faculty-achievements li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 8px;
  line-height: 1.4;
}
.faculty-achievements i { color: var(--gold); margin-top: 3px; flex-shrink: 0; font-size: 0.7rem; }
.faculty-card-back .faculty-social a { background: rgba(255,255,255,0.12); color: var(--white); }
.faculty-card-back .faculty-social a:hover { background: var(--gold); color: var(--navy); }

.faculty-flip-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-dark);
  opacity: 0.75;
}
.faculty-flip-hint i { animation: hintSpin 3s linear infinite; }
@keyframes hintSpin {
  0%, 70%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(180deg); }
}

@media (max-width: 575.98px) {
  .faculty-card-inner { min-height: 400px; }
}

/* =====================================================================
   RESULTS / TOPPERS
   ===================================================================== */
.topper-card {
  position: relative;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
  overflow: hidden;
}
.topper-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,183,3,0.4); }
.topper-card img { transition: transform 0.4s ease; }
.topper-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 3px solid var(--gold);
}
.topper-card h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 4px; }
.topper-exam { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 4px; }
.topper-rank { color: var(--gold); font-weight: 700; margin: 0; }

.bg-navy .carousel-control-prev-icon,
.bg-navy .carousel-control-next-icon { filter: invert(1); }
.bg-navy .carousel-indicators button { background-color: var(--gold); }

/* Filter tab buttons (used on Results + Gallery pages) */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-tabs button {
  border: 1px solid #dbe1ee;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 22px;
  border-radius: 50px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-tabs button:hover { border-color: var(--gold); color: var(--gold-dark); }
.filter-tabs button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.bg-navy .filter-tabs button { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: var(--white); }
.bg-navy .filter-tabs button.active { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.filterable-item { transition: opacity 0.3s ease, transform 0.3s ease; }
.filterable-item.is-hidden { display: none; }

/* =====================================================================
   STUDY MATERIAL / NOTES CARDS
   ===================================================================== */
.note-card {
  background: var(--white);
  box-shadow: 0 6px 24px rgba(20,36,82,0.08);
  text-align: center;
  padding: 10px 0;
}
.note-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 44px rgba(20,36,82,0.18);
}
.note-icon {
  font-size: 2.4rem;
  color: #E5493D;
  margin: 20px 0 6px;
  transition: transform var(--transition);
}
.note-card:hover .note-icon { transform: scale(1.15) rotate(-4deg); }
.note-badge {
  background: var(--light-bg);
  color: var(--navy);
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.note-title { font-size: 1.05rem; margin-bottom: 10px; min-height: 50px; }
.note-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 18px; }
.btn-download {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: 50px;
  padding: 10px;
  transition: background var(--transition), transform var(--transition);
}
.btn-download:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-2px); }

/* =====================================================================
   VIDEO LECTURES
   ===================================================================== */
.video-card { border-radius: var(--radius-lg); overflow: hidden; }
.video-thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(20,36,82,0.1);
  transition: box-shadow var(--transition);
}
.video-card:hover .video-thumb { box-shadow: 0 22px 44px rgba(20,36,82,0.2); }
.video-thumb-inner {
  /* Must be position:absolute + inset:0 to fill Bootstrap's .ratio-16x9
     box (the same rule .ratio > * would apply) — declared explicitly
     here rather than relying on cascade order against the Bootstrap
     CDN stylesheet, since an equal-specificity `position: relative`
     here previously won the tie (this file loads after Bootstrap's)
     and collapsed the whole 16:9 box down to the thumbnail's own
     content height. */
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.video-thumb-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11,23,48,0.35);
  transition: background var(--transition);
}
.video-card:hover .video-thumb-inner::after { background: rgba(11,23,48,0.15); }
.play-btn {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  border: none;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background var(--transition);
}
.video-thumb-inner:hover .play-btn { transform: scale(1.15); background: var(--gold-dark); }
.video-thumb iframe { width: 100%; height: 100%; border: 0; }
.video-title { margin-top: 16px; font-size: 1.05rem; }
.video-sub { color: var(--muted); font-size: 0.85rem; }

/* =====================================================================
   TESTIMONIALS
   ===================================================================== */
.testimonial-card {
  max-width: 680px;
  text-align: center;
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  position: relative;
}
.quote-icon { font-size: 2rem; color: var(--gold); margin-bottom: 16px; }
.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.7;
}
.testimonial-rating { color: var(--gold-dark); margin-bottom: 18px; }
.testimonial-card img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 3px solid var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.testimonial-card h3 { font-size: 1rem; margin-bottom: 2px; }
.testimonial-card span { color: var(--muted); font-size: 0.85rem; }

/* Compact grid variant used on Home preview + Testimonials full page */
.testimonial-card-mini {
  padding: 36px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.testimonial-card-mini:hover { transform: translateY(-8px); box-shadow: 0 22px 44px rgba(20,36,82,0.14); }

/* =====================================================================
   FINAL CTA BANNER (used on Home + inner pages)
   ===================================================================== */
.cta-banner {
  padding: 80px 0;
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 100%);
  text-align: center;
}
.cta-banner h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.8); margin-bottom: 26px; font-size: 1.05rem; }

/* =====================================================================
   GALLERY + LIGHTBOX
   ===================================================================== */
.gallery-item {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.12); }
.gallery-zoom {
  position: absolute;
  inset: 0;
  background: rgba(11,23,48,0.5);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-zoom { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11,23,48,0.94);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: lightboxZoom 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  /* transform-origin is set dynamically to the clicked thumbnail's
     position (see openLightbox() in animations.js) so the image reads
     as growing out from where the user clicked, approximating a
     shared-element transition without a full DOM-morph. */
}
@keyframes lightboxZoom {
  from { transform: scale(0.25); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background var(--transition);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--gold); color: var(--navy); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-map-wrap iframe { display: block; filter: grayscale(15%); }
.contact-info-list { display: flex; flex-direction: column; gap: 18px; }
.contact-info-item { display: flex; align-items: flex-start; gap: 16px; }
.contact-info-item i {
  width: 46px;
  height: 46px;
  background: var(--light-bg);
  color: var(--gold-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-info-item strong { display: block; color: var(--navy); margin-bottom: 2px; }
.contact-info-item span, .contact-info-item a { color: var(--muted); font-size: 0.95rem; }
.contact-info-item a:hover { color: var(--gold-dark); }

.enquiry-form {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.enquiry-form .form-control,
.enquiry-form .form-select {
  border-radius: 10px;
  border: 1px solid #dbe1ee;
  padding: 11px 14px;
}
.enquiry-form .form-control:focus,
.enquiry-form .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(255,183,3,0.2);
}
.enquiry-form .form-label { font-weight: 600; color: var(--navy); font-size: 0.92rem; }

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
  z-index: 1000;
  animation: whatsappPulse 9s ease-out infinite;
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.1); color: var(--white); }
/* A single brief pulse ring near the start of each 9s cycle, then idle
   for the rest — "subtle every 8-10s", not a constant heartbeat. */
@keyframes whatsappPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  8%   { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Back to top — stacked on the same right-hand column as the WhatsApp
   button (60px tall, bottom:26px), just above it with a 10px gap. */
.back-to-top {
  position: fixed;
  bottom: 96px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 1000;
  transition: background var(--transition), transform var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--gold-dark); transform: translateY(-4px); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 70px 0 30px;
}
.footer .navbar-brand { margin-bottom: 16px; }
.footer-about { font-size: 0.92rem; line-height: 1.7; margin-bottom: 18px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.footer-social a:hover { background: var(--gold); color: var(--navy); transform: translateY(-4px); }
.footer-heading { color: var(--white); font-size: 1rem; margin-bottom: 20px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; font-size: 0.92rem; }
.footer-links a:hover { color: var(--gold); }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 40px 0 24px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

/* =====================================================================
   AOS IMAGE SCALE-IN OVERRIDE (fade + slight scale-up)
   ===================================================================== */
[data-aos="img-zoom-in"] {
  transform: scale(0.95);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="img-zoom-in"].aos-animate {
  transform: scale(1);
  opacity: 1;
}

/* =====================================================================
   =====================================================================
   ADVANCED ANIMATION & MICRO-INTERACTION LAYER
   Styles that support assets/js/animations.js (GSAP + ScrollTrigger).
   Every rule in this block that drives real motion is neutralised by
   the prefers-reduced-motion block at the very end of this section.
   =====================================================================
   ===================================================================== */

/* ---- 1. NAVBAR: underline + hamburger morph ---------------------- */
.navbar-nav .nav-link { position: relative; }
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { transform: scaleX(1); }
.navbar-nav .nav-link:not(:hover):not(.active)::after { transform-origin: right; }

.custom-toggler { border: none; padding: 4px; }
.custom-toggler:focus { box-shadow: none; }
.hamburger-box { position: relative; display: inline-block; width: 24px; height: 18px; }
.hamburger-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}
.bar-top { top: 0; }
.bar-mid { top: 8px; }
.bar-bottom { top: 16px; }
/* Bootstrap's collapse JS toggles aria-expanded on every element that
   references the target — including this button — so no extra JS is
   needed to morph the icon into an X. */
.custom-toggler[aria-expanded="true"] .bar-top { top: 8px; transform: rotate(45deg); }
.custom-toggler[aria-expanded="true"] .bar-mid { opacity: 0; }
.custom-toggler[aria-expanded="true"] .bar-bottom { top: 8px; transform: rotate(-45deg); }

/* ---- 2. HERO: split-text words, magnetic buttons, ripple, scroll hint ---- */
.hero-title .word {
  display: inline-block;
  will-change: transform, opacity;
}
.hero-cta .btn { position: relative; overflow: hidden; }
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transform: scale(0);
  pointer-events: none;
  animation: rippleOut 0.6s ease-out forwards;
}
.btn-cta .btn-ripple { background: rgba(20,36,82,0.35); }
@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}

/* ---- 3. CARDS: parallax image micro-shift inside tilt cards ------ */
.course-card-img img,
.topper-card img { will-change: transform; }

/* ---- 4. STUDY MATERIAL FLIP CARDS (courses.php) -------------------
   Distinct visual language for downloads vs. lecture cards: front =
   file icon + title, back = size + download button, CSS 3D flip. */
.note-flip-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.note-flip-card {
  perspective: 1000px;
  height: 130px;
}
.note-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
@media (hover: hover) and (pointer: fine) {
  .note-flip-card:hover .note-flip-inner { transform: rotateY(180deg); }
}
.note-flip-card.is-flipped .note-flip-inner { transform: rotateY(180deg); }
.note-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}
.note-flip-front {
  background: var(--light-bg);
  color: var(--navy);
}
.note-flip-front i { font-size: 1.6rem; color: #E5493D; margin-bottom: 8px; }
.note-flip-front span {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-flip-back {
  background: var(--navy);
  color: var(--white);
  transform: rotateY(180deg);
  gap: 8px;
}
.note-flip-back .note-flip-size { font-size: 0.72rem; color: rgba(255,255,255,0.7); }
.note-flip-back .note-flip-download {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}
.note-flip-back .note-flip-download:hover { transform: scale(1.12); }

/* ---- 6. VIDEOS: hover glow + cross-fade ---------------------------- */
.video-card:hover .video-thumb-inner { transform: scale(1.04); }
.video-thumb-inner { transition: transform 0.4s ease; }
@media (hover: hover) and (pointer: fine) {
  .video-thumb-inner:hover .play-btn {
    animation: playGlow 1.4s ease-in-out infinite;
  }
}
@keyframes playGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,183,3,0.55); }
  50% { box-shadow: 0 0 0 14px rgba(255,183,3,0); }
}

/* ---- 7. HOME TESTIMONIALS CAROUSEL (custom, GSAP-driven) ----------
   Replaces a plain 3-card grid with a slide+scale+blur strip. Markup:
   .zenith-carousel > .zenith-carousel-track > .zenith-carousel-slide* */
.zenith-carousel { position: relative; max-width: 720px; margin: 0 auto; }
.zenith-carousel-viewport { overflow: hidden; border-radius: var(--radius-lg); }
.zenith-carousel-track { display: flex; }
.zenith-carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 4px;
}
.zenith-carousel-slide .testimonial-card { margin: 0 auto; box-shadow: none; }
.zenith-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.zenith-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: #dbe1ee;
  transition: background 0.3s ease, transform 0.3s ease;
}
.zenith-carousel-dot.active { background: var(--gold-dark); transform: scale(1.3); }
.zenith-carousel-progress-track {
  height: 3px;
  background: #e7eaf2;
  border-radius: 3px;
  margin-top: 18px;
  overflow: hidden;
}
.zenith-carousel-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 3px;
}

/* ---- 8. GALLERY: caption overlay + lightbox zoom-from-click ------- */
.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(11,23,48,0.88), transparent);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease 0.05s;
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0s, 0.12s; /* background arrives first, text follows */
}
.lightbox img { transform-origin: var(--zoom-origin-x, 50%) var(--zoom-origin-y, 50%); }

/* ---- 9. CONTACT: floating labels + button morph -------------------- */
.zenith-floating { position: relative; }
.zenith-floating::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  pointer-events: none;
}
.zenith-floating:focus-within::after { transform: scaleX(1); }
.zenith-floating > label { transition: color 0.3s ease; }
.zenith-floating:focus-within > label { color: var(--gold-dark); }
.zenith-floating .form-control:focus,
.zenith-floating .form-select:focus {
  box-shadow: none;
  border-color: #dbe1ee;
}

.btn-morphing {
  transition: none; /* GSAP/JS owns width+radius during the morph */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  overflow: hidden;
}
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(20,36,82,0.25);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-morphing.btn-success-state { background: #2ecc71 !important; }
.btn-morphing.btn-error-state { background: #e74c3c !important; }
.btn-morphing.btn-success-state i,
.btn-morphing.btn-error-state i { color: var(--white); font-size: 1.1rem; }

/* Added animations: notes download button — brief loading -> checkmark
   morph before/as the file downloads (see initNoteDownloadMorph() in
   animations.js). Reuses the .btn-spinner keyframe, sized down to fit
   the 30px circular download button. */
.note-flip-download.is-processing,
.note-flip-download.is-success { pointer-events: none; }
.note-flip-download .btn-spinner-sm {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(20,36,82,0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.note-flip-download.is-success { background: #2ecc71; color: var(--white); }

.flash-message.js-flash { position: relative; }

/* ---- 10. FOOTER: social icon bounce -------------------------------- */
.footer-social a { transition: background var(--transition), color var(--transition), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.footer-social a:hover { transform: scale(1.18) translateY(-4px); }

/* ---- EXIT-INTENT POPUP (desktop, once per session) ------------------
   Functional lead-capture, not a decorative effect — the popup itself
   always shows/hides regardless of prefers-reduced-motion; only how it
   animates in is affected (the global reduced-motion block zeroes the
   transition duration below, so it just appears instantly instead). */
.exit-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,23,48,0.72);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.exit-popup-overlay.active { display: flex; opacity: 1; }
.exit-popup-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 40px 34px 30px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.exit-popup-overlay.active .exit-popup-card { transform: translateY(0); opacity: 1; }
.exit-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.exit-popup-close:hover { background: var(--gold); color: var(--navy); }
.exit-popup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.exit-popup-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.exit-popup-card > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }
.exit-popup-form .form-control {
  border-radius: 10px;
  border: 1px solid #dbe1ee;
  padding: 11px 14px;
}
.exit-popup-form .form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(255,183,3,0.2);
}
.exit-popup-error { color: #e74c3c; font-size: 0.8rem; margin-top: 6px; text-align: left; min-height: 1em; }
.exit-popup-skip { margin: 16px 0 0; }
.exit-popup-skip a { color: var(--muted); font-size: 0.85rem; text-decoration: underline; }
.exit-popup-skip a:hover { color: var(--navy); }
.exit-popup-success { padding: 10px 0 4px; }
.exit-popup-success i { font-size: 2.2rem; color: #2ecc71; margin-bottom: 10px; display: block; }
.exit-popup-success p { color: var(--ink); font-size: 0.95rem; margin: 0; }

@media (max-width: 575.98px) {
  .exit-popup-card { padding: 32px 24px 24px; }
}

/* ---- 11. PAGE TRANSITIONS ------------------------------------------
   html.js hides the body until JS confirms it's ready, then fades it
   in; a class is added just before internal navigation to fade out.
   Degrades safely: without JS, html never gets .js, so the fallback
   rule keeps the page visible unconditionally. */
html.js body { opacity: 0; }
html.js body.page-ready { opacity: 1; transition: opacity 0.3s ease; }
html.js body.page-leaving { opacity: 0 !important; transition: opacity 0.2s ease; }
html:not(.js) body { opacity: 1; }

/* =====================================================================
   ACCESSIBILITY: respect prefers-reduced-motion site-wide.
   Neutralises CSS animations/transitions for anyone who has asked the
   OS for reduced motion; JS-driven effects are separately gated by
   window.ZenithMotion.enabled in animations.js / script.js.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js body,
  html.js body.page-ready,
  html.js body.page-leaving {
    opacity: 1 !important;
  }
  .hero-title .word { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================================== */
@media (max-width: 991.98px) {
  .section-padding { padding: 70px 0; }
  #mainNavbar { background: rgba(20,36,82,0.97); padding: 12px 0; }
  .navbar-collapse {
    background: rgba(20,36,82,0.98);
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
  }
  .hero-section { padding-top: 120px; }
}

@media (max-width: 575.98px) {
  .section-padding { padding: 56px 0; }
  .enquiry-form { padding: 26px; }
  .whatsapp-float, .back-to-top { width: 52px; height: 52px; font-size: 1.5rem; }
  .back-to-top { bottom: 88px; } /* 26px + 52px WhatsApp height + 10px gap at this size */
}
