/* ============================================================
   ADAMYA CAREER INSTITUTE — 3D ANIMATIONS & EFFECTS
   animations3d.css  (link after Site.css in Site.master)
   ============================================================ */

/* ── CANVAS PARTICLE BG ─────────────────────────────────── */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* ── 3D PERSPECTIVE ROOT ────────────────────────────────── */
.hero, .vm-sec, .quote-banner {
  perspective: 1200px;
}

/* ── TILT CARD BASE ─────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.3s ease;
  will-change: transform;
  cursor: pointer;
}
.tilt-card:hover {
  box-shadow: 0 30px 80px rgba(79,70,229,0.3), 0 0 0 1px rgba(79,70,229,0.12) !important;
}
.tilt-card .tilt-inner {
  transform: translateZ(20px);
  transform-style: preserve-3d;
}
.tilt-card .tilt-icon {
  transform: translateZ(30px);
}
.tilt-card h4, .tilt-card h3 {
  transform: translateZ(15px);
  display: block;
}
.tilt-card p {
  transform: translateZ(8px);
  display: block;
}

/* ── 3D FLIP CARD for Team ───────────────────────────────── */
.flip-card-wrapper {
  perspective: 1000px;
  height: 280px;
}
.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.flip-card-wrapper:hover .flip-card {
  transform: rotateY(180deg);
}
.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  overflow: hidden;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.flip-front {
  background: #fff;
  border: 1.5px solid #e2e8f0;
}
.flip-back {
  background: var(--gradient-primary);
  transform: rotateY(180deg);
  color: #fff;
}
.flip-back h4 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.flip-back p  { color: rgba(255,255,255,0.85); font-size: 0.83rem; line-height: 1.65; }
.flip-back .fb-icon { font-size: 2.5rem; color: rgba(255,255,255,0.3); margin-bottom: 16px; }

/* ── GLOWING BORDER CARDS ────────────────────────────────── */
.glow-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle, 0deg),
    #4f46e5,
    #06b6d4,
    #10b981,
    #f59e0b,
    #ef4444,
    #8b5cf6,
    #4f46e5
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: rotateBorder 4s linear infinite paused;
}
.glow-card:hover::before {
  opacity: 1;
  animation-play-state: running;
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotateBorder {
  to { --angle: 360deg; }
}
.glow-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(22px - 2px);
  background: #fff;
  z-index: -1;
}
.vm-sec .glow-card::after { background: rgba(255,255,255,0.05); }

/* ── FLOATING 3D ORBS ─────────────────────────────────────── */
.orb-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 10s ease-in-out infinite;
  opacity: 0.5;
}
.orb-1 { width: 300px; height: 300px; background: radial-gradient(circle, #4f46e5, transparent); top: -80px; right: 10%; animation-delay: 0s; }
.orb-2 { width: 200px; height: 200px; background: radial-gradient(circle, #06b6d4, transparent); bottom: 10%; left: 5%; animation-delay: -3s; }
.orb-3 { width: 250px; height: 250px; background: radial-gradient(circle, #f59e0b, transparent); top: 40%; right: 30%; animation-delay: -6s; }
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33%       { transform: translateY(-40px) rotate(120deg) scale(1.1); }
  66%       { transform: translateY(20px) rotate(240deg) scale(0.9); }
}

/* ── 3D TEXT EFFECT ──────────────────────────────────────── */
.text-3d {
  text-shadow:
    1px 1px 0 rgba(79,70,229,0.3),
    2px 2px 0 rgba(79,70,229,0.2),
    3px 3px 0 rgba(79,70,229,0.15),
    4px 4px 0 rgba(79,70,229,0.1),
    5px 5px 15px rgba(79,70,229,0.4);
}

/* ── MORPHING BLOB ────────────────────────────────────────── */
.blob-bg {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(40px);
  opacity: 0.15;
  animation: blobMorph 8s ease-in-out infinite;
  pointer-events: none;
}
.blob-1 { width: 400px; height: 400px; background: #4f46e5; top: -50px; left: -100px; animation-delay: 0s; }
.blob-2 { width: 300px; height: 300px; background: #06b6d4; bottom: -60px; right: -80px; animation-delay: -4s; }
@keyframes blobMorph {
  0%,100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25%      { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50%      { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75%      { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* ── CURSOR GLOW ─────────────────────────────────────────── */
.cursor-glow {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.8), transparent 70%);
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear;
  mix-blend-mode: screen;
}
.cursor-trail {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(129,140,248,0.6);
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: all 0.15s ease;
}

/* ── 3D SCROLL REVEAL VARIANTS ──────────────────────────── */
.reveal-3d-left {
  opacity: 0;
  transform: perspective(800px) rotateY(-30deg) translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.8,0.3,1);
}
.reveal-3d-right {
  opacity: 0;
  transform: perspective(800px) rotateY(30deg) translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.8,0.3,1);
}
.reveal-3d-up {
  opacity: 0;
  transform: perspective(800px) rotateX(20deg) translateY(50px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.8,0.3,1);
}
.reveal-3d-scale {
  opacity: 0;
  transform: perspective(800px) scale(0.8) translateZ(-100px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.8,0.3,1);
}
.reveal-3d-left.in,
.reveal-3d-right.in,
.reveal-3d-up.in,
.reveal-3d-scale.in {
  opacity: 1;
  transform: perspective(800px) rotateY(0deg) rotateX(0deg) translateX(0) translateY(0) translateZ(0) scale(1);
}
/* Stagger delays */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }

/* ── NEON GLOW BUTTON ────────────────────────────────────── */
.btn-neon {
  position: relative;
  overflow: hidden;
}
.btn-neon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient-primary);
  z-index: -1;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-neon:hover::after { opacity: 0.7; }

/* ── HERO FLOATING CARDS 3D ──────────────────────────────── */
.fc {
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.fc:hover {
  transform: translateZ(15px) scale(1.05) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2) !important;
}

/* ── STRIP ITEM 3D HOVER ──────────────────────────────────── */
.strip-item {
  transform-style: preserve-3d;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.strip-item:hover {
  transform: translateY(-8px) rotateX(8deg) scale(1.02) !important;
  box-shadow: 0 20px 40px rgba(79,70,229,0.2) !important;
}

/* ── CONTACT CARD 3D ──────────────────────────────────────── */
.contact-card {
  transform-style: preserve-3d;
  transition: all 0.3s ease !important;
}
.contact-card:hover {
  transform: translateX(8px) rotateY(-5deg) !important;
  box-shadow: -8px 12px 30px rgba(79,70,229,0.15) !important;
}

/* ── COURSE CARD 3D HOVER ────────────────────────────────── */
.course-card {
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.course-card:hover {
  transform: translateY(-12px) rotateX(5deg) !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.18) !important;
}
.course-card:hover .course-img img {
  transform: scale(1.08) !important;
}

/* ── VM CARD 3D ───────────────────────────────────────────── */
.vm-card {
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.vm-card:hover {
  transform: translateY(-10px) rotateY(-5deg) !important;
}

/* ── SOCIAL BUTTON 3D SPIN ────────────────────────────────── */
.soc-btn {
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.soc-btn:hover {
  transform: translateY(-5px) rotateZ(15deg) scale(1.2) !important;
}

/* ── FEATURE CARD ICON BOUNCE ────────────────────────────── */
.feat-icon {
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.feat-card:hover .feat-icon {
  transform: translateY(-8px) rotateY(20deg) scale(1.1) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
}

/* ── SERVICE CARD ────────────────────────────────────────── */
.svc-card {
  transform-style: preserve-3d;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.svc-card:hover {
  transform: translateY(-10px) rotateX(6deg) !important;
  box-shadow: 0 25px 50px rgba(79,70,229,0.15) !important;
}
.svc-card:hover .svc-icon {
  transform: translateZ(25px) rotateY(15deg) scale(1.1) !important;
}

/* ── MEDIA ITEM 3D ────────────────────────────────────────── */
.media-item {
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.media-item:hover {
  transform: scale(1.04) rotateX(3deg) translateZ(20px) !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4) !important;
  z-index: 5;
}

/* ── SECTION TAG FLOAT ────────────────────────────────────── */
.sec-tag {
  animation: tagFloat 3s ease-in-out infinite;
}
@keyframes tagFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── BRAND LOGO GLOW ─────────────────────────────────────── */
.brand-logo-img {
  transition: all 0.3s ease !important;
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(79,70,229,0.4); }
  50%       { box-shadow: 0 8px 30px rgba(79,70,229,0.7), 0 0 0 4px rgba(79,70,229,0.15); }
}

/* ── NUMBER COUNTER GLOW ─────────────────────────────────── */
.stat-num {
  text-shadow: 0 0 20px rgba(129,140,248,0.5);
  animation: numGlow 2s ease-in-out infinite;
}
@keyframes numGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(129,140,248,0.4); }
  50%       { text-shadow: 0 0 40px rgba(129,140,248,0.8), 0 0 60px rgba(129,140,248,0.4); }
}

/* ── HERO IMAGE 3D FLOAT ─────────────────────────────────── */
.hero-img {
  animation: heroImgFloat 6s ease-in-out infinite !important;
}
@keyframes heroImgFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  25%       { transform: translateY(-15px) rotateX(3deg) rotateY(2deg); }
  50%       { transform: translateY(-8px) rotateX(-2deg) rotateY(-3deg); }
  75%       { transform: translateY(-18px) rotateX(2deg) rotateY(1deg); }
}

/* ── PAGE TRANSITION ─────────────────────────────────────── */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--gradient-primary);
  z-index: 99999;
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}
.page-enter { animation: pageEnter 0.5s cubic-bezier(0.4,0,0.2,1) forwards; }
.page-exit  { animation: pageExit  0.4s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes pageEnter { 0%{transform:scaleX(1)} 100%{transform:scaleX(0);transform-origin:right center} }
@keyframes pageExit  { 0%{transform:scaleX(0)} 100%{transform:scaleX(1)} }

/* ── TYPEWRITER CURSOR ───────────────────────────────────── */
.typewriter-cursor::after {
  content: '|';
  animation: blinkCursor 0.8s step-end infinite;
  color: #818cf8;
  margin-left: 2px;
}
@keyframes blinkCursor { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── SHINE SWEEP ON HOVER ────────────────────────────────── */
.shine-hover {
  position: relative;
  overflow: hidden;
}
.shine-hover::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 10;
}
.shine-hover:hover::before { left: 150%; }

/* ── FOOTER LINK LIFT ────────────────────────────────────── */
.footer-links li a {
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.footer-links li a:hover {
  transform: translateX(10px) translateZ(10px) !important;
  text-shadow: 0 0 12px rgba(129,140,248,0.5);
}

/* ── RIPPLE EFFECT ON BUTTONS ────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ── ABOUT IMAGE PARALLAX ────────────────────────────────── */
.about-main-img {
  transition: transform 0.1s ease !important;
  transform-style: preserve-3d;
}

/* ── QUOTE SECTION 3D ────────────────────────────────────── */
.quote-inner h2 {
  animation: quoteFloat 4s ease-in-out infinite;
}
@keyframes quoteFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50%       { transform: translateY(-6px) rotateX(2deg); }
}

/* ── LOADING SPINNER ─────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 60px; height: 60px;
  border: 3px solid rgba(79,70,229,0.3);
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }
.loader-text {
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 16px;
  letter-spacing: 2px;
  animation: loaderPulse 1.2s ease-in-out infinite;
}
@keyframes loaderPulse { 0%,100%{opacity:0.5} 50%{opacity:1} }
.loader-inner { display:flex;flex-direction:column;align-items:center;gap:0; }

/* ── VM ICON 3D SPIN ─────────────────────────────────────── */
.vm-icon {
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.vm-card:hover .vm-icon {
  transform: rotateY(360deg) scale(1.15) !important;
}

/* ── TEAM AVATAR PULSE ───────────────────────────────────── */
.team-avatar {
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.flip-front:hover .team-avatar {
  transform: scale(1.1) rotateZ(5deg) !important;
}

/* ── ANNOUNCEMENT BAR SHIMMER ────────────────────────────── */
.ann-bar .ann-content {
  position: relative;
  overflow: hidden;
}
.ann-bar .ann-content::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmerBar 2.5s ease-in-out infinite;
}
@keyframes shimmerBar {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* ── SCROLL PROGRESS BAR ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, #4f46e5, #06b6d4, #10b981);
  z-index: 10001;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(79,70,229,0.5);
}

/* ── 3D GRID PERSPECTIVE ─────────────────────────────────── */
.feat-grid, .courses-grid, .svc-grid {
  perspective: 1500px;
}

/* Nav underline handled in Site.css */

/* Disable heavy effects on mobile */
@media (max-width: 768px) {
  .tilt-card { transform: none !important; }
  .cursor-glow, .cursor-trail { display: none; }
  #particleCanvas { display: none; }
  .flip-card-wrapper { height: auto; perspective: none; }
  .flip-card { transform: none !important; }
  .flip-back { transform: none; position: static; }
  .flip-front { display: none; }
  .flip-card-wrapper:hover .flip-card { transform: none !important; }
}
