/* =====================================================
   SZABIST HYDERABAD — GLOBAL 3D ANIMATIONS
   GPU-Accelerated | Smooth | No Jank
   Uses transform3d for compositor-layer animations
   ===================================================== */

/* ── Respect user motion preferences ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 3D perspective containers ── */
.perspective-container {
  perspective: 1200px;
  perspective-origin: center center;
}

/* =====================================================
   SCROLL-TRIGGERED ENTRY ANIMATIONS
   (activated by JS via Intersection Observer)
   ===================================================== */

/* Default hidden state */
.anim-fade-up,
.anim-fade-down,
.anim-fade-left,
.anim-fade-right,
.anim-zoom-in,
.anim-flip-x,
.anim-flip-y,
.anim-rotate-in,
.anim-slide-up-3d {
  opacity: 0;
  will-change: transform, opacity;
}

/* Fade Up — cards, sections */
.anim-fade-up {
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fade Down */
.anim-fade-down {
  transform: translate3d(0, -40px, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fade Left */
.anim-fade-left {
  transform: translate3d(-50px, 0, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fade Right */
.anim-fade-right {
  transform: translate3d(50px, 0, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Zoom In */
.anim-zoom-in {
  transform: scale3d(0.85, 0.85, 1);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 3D Flip X (horizontal flip in) */
.anim-flip-x {
  transform: perspective(800px) rotateX(25deg) translate3d(0, 30px, 0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 3D Flip Y (vertical flip in) */
.anim-flip-y {
  transform: perspective(800px) rotateY(30deg) translate3d(20px, 0, 0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Rotate In */
.anim-rotate-in {
  transform: rotate3d(0, 0, 1, -8deg) scale3d(0.9, 0.9, 1);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Slide Up 3D — for hero titles */
.anim-slide-up-3d {
  transform: perspective(600px) translate3d(0, 60px, -30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Activated state (JS adds .is-visible) ── */
.is-visible.anim-fade-up,
.is-visible.anim-fade-down,
.is-visible.anim-fade-left,
.is-visible.anim-fade-right,
.is-visible.anim-zoom-in,
.is-visible.anim-flip-x,
.is-visible.anim-flip-y,
.is-visible.anim-rotate-in,
.is-visible.anim-slide-up-3d {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotateX(0) rotateY(0) rotate3d(0, 0, 1, 0deg);
}

/* ── Stagger delays (applied via JS data-delay or CSS classes) ── */
.anim-delay-1 { transition-delay: 0.1s !important; }
.anim-delay-2 { transition-delay: 0.2s !important; }
.anim-delay-3 { transition-delay: 0.3s !important; }
.anim-delay-4 { transition-delay: 0.4s !important; }
.anim-delay-5 { transition-delay: 0.5s !important; }
.anim-delay-6 { transition-delay: 0.6s !important; }
.anim-delay-7 { transition-delay: 0.7s !important; }
.anim-delay-8 { transition-delay: 0.8s !important; }

/* =====================================================
   3D HOVER EFFECTS — Tilt Cards
   ===================================================== */

/* 3D Card Tilt (JS-enhanced on hover) */
.card-3d-tilt {
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease, transform 0.15s ease;
  will-change: transform;
}

.card-3d-tilt:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(46, 49, 146, 0.12);
}

/* Inner content lifts in 3D space */
.card-3d-tilt .card-3d-inner {
  transform-style: preserve-3d;
}

.card-3d-tilt .card-3d-label {
  transform: translateZ(20px);
  transition: transform 0.15s ease;
}

/* =====================================================
   CONTINUOUS / LOOPING ANIMATIONS
   ===================================================== */

/* Float — hero icons, stat icons */
@keyframes float3d {
  0%, 100% { transform: translate3d(0, 0px, 0); }
  50%       { transform: translate3d(0, -10px, 0); }
}

.anim-float {
  animation: float3d 3.5s ease-in-out infinite;
  will-change: transform;
}

.anim-float-slow {
  animation: float3d 5s ease-in-out infinite;
  will-change: transform;
}

/* Pulse glow — badges, CTAs */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 49, 146, 0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(46, 49, 146, 0); }
}

.anim-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Shimmer — skeleton loaders / loading states */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.anim-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* Spin slow — decorative rings */
@keyframes spinSlow {
  from { transform: rotate3d(0, 0, 1, 0deg); }
  to   { transform: rotate3d(0, 0, 1, 360deg); }
}

.anim-spin-slow {
  animation: spinSlow 8s linear infinite;
  will-change: transform;
}

/* Breathe scale */
@keyframes breathe {
  0%, 100% { transform: scale3d(1, 1, 1); }
  50%       { transform: scale3d(1.04, 1.04, 1); }
}

.anim-breathe {
  animation: breathe 4s ease-in-out infinite;
  will-change: transform;
}

/* =====================================================
   NAVBAR 3D ENHANCEMENTS
   ===================================================== */

/* Navbar link underline slide */
.modern-navbar .nav-link {
  position: relative;
  overflow: hidden;
}

.modern-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: linear-gradient(90deg, #2E3192, #1a1f7a);
  transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              right 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}

.modern-navbar .nav-link:hover::after,
.modern-navbar .nav-link.active::after {
  left: 8px;
  right: 8px;
}

/* Dropdown items slide-in */
.modern-navbar .dropdown-menu .dropdown-item {
  transition: background-color 0.2s ease,
              transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              padding-left 0.2s ease;
}

.modern-navbar .dropdown-menu .dropdown-item:hover {
  transform: translate3d(6px, 0, 0);
  padding-left: 1.4rem;
}

/* =====================================================
   HERO / SECTION BACKGROUNDS — Particle Canvas
   ===================================================== */

.hero-particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* =====================================================
   STAT COUNTER — Number Roll
   ===================================================== */

.stat-modern-number,
.stat-number {
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

/* =====================================================
   GLASSMORPHISM ENHANCED CARDS
   ===================================================== */

.glass-card-3d {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(46, 49, 146, 0.06);
  transition: box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.glass-card-3d:hover {
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(46, 49, 146, 0.12);
}

/* =====================================================
   BUTTON HOVER — 3D PRESS EFFECT
   ===================================================== */

.btn-modern,
.btn-3d {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.15s ease;
}

.btn-modern::before,
.btn-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.btn-modern:hover::before,
.btn-3d:hover::before {
  transform: translate3d(0, 0, 0);
}

.btn-modern:active,
.btn-3d:active {
  transform: translate3d(0, 2px, 0) scale3d(0.98, 0.98, 1);
}

/* PAGE TRANSITION OVERLAY — removed (blue screen animation disabled) */

/* =====================================================
   SECTION TITLE — GRADIENT UNDERLINE
   ===================================================== */

.section-title-modern {
  position: relative;
  display: inline-block;
}

.section-title-modern::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #2E3192, #7b80d8);
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title-modern.title-underline-visible::after {
  width: 60%;
}

/* =====================================================
   FOOTER LINK HOVER
   ===================================================== */

footer a {
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
  display: inline-block;
}

footer a:hover {
  transform: translate3d(0, -2px, 0);
}

/* =====================================================
   ICON BOUNCE ON HOVER
   ===================================================== */

.icon-hover-bounce {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-hover-bounce:hover i,
.icon-hover-bounce:hover .fa-solid,
.icon-hover-bounce:hover .fa-regular {
  transform: translate3d(0, -4px, 0) scale3d(1.1, 1.1, 1);
}

.card-modern i.fa-3x,
.resource-card i.resource-icon,
.milestone-card .icon i {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.25s ease;
  display: inline-block;
}

.card-modern:hover i.fa-3x,
.resource-card:hover i.resource-icon,
.milestone-card:hover .icon i {
  transform: translate3d(0, -5px, 0) scale3d(1.12, 1.12, 1) rotate3d(0, 0, 1, 5deg);
}

/* =====================================================
   SCROLL-PROGRESS BAR
   ===================================================== */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2E3192, #7b80d8, #ffc107);
  z-index: 10000;
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
  will-change: width;
}

/* =====================================================
   CUSTOM CURSOR GLOW (desktop only)
   ===================================================== */

@media (hover: hover) and (pointer: fine) {
  .cursor-glow {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 49, 146, 0.6), transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate3d(-50%, -50%, 0);
    transition: transform 0.08s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    will-change: transform;
    mix-blend-mode: multiply;
  }

  .cursor-glow.cursor-hover {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(46, 49, 146, 0.4), transparent 70%);
  }
}

/* =====================================================
   3D TILT IMAGE — About / Faculty / Gallery
   ===================================================== */

.img-3d-wrap {
  transform-style: preserve-3d;
  perspective: 800px;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}

.img-3d-wrap img {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.img-3d-wrap:hover img {
  transform: scale3d(1.04, 1.04, 1);
}

/* =====================================================
   BACKGROUND MESH GRADIENT ANIMATION
   ===================================================== */

@keyframes meshMove {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.bg-mesh-animate {
  background: linear-gradient(-45deg, #1a237e, #2E3192, #0d47a1, #283593);
  background-size: 400% 400%;
  animation: meshMove 12s ease infinite;
}

/* =====================================================
   TICKER / ANNOUNCEMENT ANIMATIONS
   ===================================================== */

.ticker-badge-pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* =====================================================
   PERFORMANCE: disable heavy effects on low-power mode
   ===================================================== */

@media (prefers-reduced-motion: no-preference) {
  .backdrop-blur-anim {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* =====================================================
   ADVANCED UI: ANIMATED GRADIENT TEXT
   ===================================================== */

.text-gradient-animated {
  background: linear-gradient(
    to right,
    #2E3192,
    #7b80d8,
    #ffc107,
    #2E3192
  );
  background-size: 300% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shineText 5s linear infinite;
}

@keyframes shineText {
  to {
    background-position: 300% center;
  }
}

/* =====================================================
   ADVANCED UI: GLOWING SWEEP BUTTONS
   ===================================================== */

.btn-glow-sweep {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
}

.btn-glow-sweep::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  z-index: -1;
  transition: all 0.6s ease;
}

.btn-glow-sweep:hover::before {
  left: 200%;
}

.btn-glow-sweep:hover {
  box-shadow: 0 0 15px rgba(46, 49, 146, 0.4);
  transform: translateY(-2px);
}

/* =====================================================
   ADVANCED UI: GLASSMORPHISM PLUS (Inner Border + Glow)
   ===================================================== */

.glass-card-plus {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.glass-card-plus:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(46, 49, 146, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Optional: Subtle glare sweep inside glass card */
.glass-card-plus::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.glass-card-plus:hover::after {
  left: 150%;
}

/* =====================================================
   ADVANCED UI: FLOATING GLOW ORBS (Background)
   ===================================================== */
.bg-glow-container {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.bg-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
  animation: orbFloat 10s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-glow-orb.primary {
  width: 300px;
  height: 300px;
  background: var(--brand, #2E3192);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.bg-glow-orb.accent {
  width: 250px;
  height: 250px;
  background: var(--accent, #ffcc00);
  bottom: -10%;
  right: -5%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(50px, 50px, 0) scale(1.1);
  }
}
