/* =========================================== */
/* ENHANCED CARD DEPTH 2026 */
/* Award-winning 3D card transformations */
/* =========================================== */

:root {
  --card-depth-intensity: 20px;
  --card-tilt-max: 15deg;
  --card-scale-hover: 1.02;
  --card-shadow-depth: 0 20px 60px rgba(0, 0, 0, 0.15);
  --card-shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.2);
  --card-transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* =========================================== */
/* CARD DEPTH BASE */
/* =========================================== */

#main-content-section .card {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform var(--card-transition),
              box-shadow var(--card-transition);
  will-change: transform;
}

#main-content-section .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--card-transition);
  z-index: -1;
  filter: blur(20px);
  transform: translateZ(-20px);
}

/* =========================================== */
/* 3D TILT EFFECTS */
/* =========================================== */

#main-content-section .card.card-3d {
  transform-style: preserve-3d;
}

#main-content-section .card.card-3d:hover {
  transform: translateY(calc(-1 * var(--card-depth-intensity))) 
             scale(var(--card-scale-hover));
  box-shadow: var(--card-shadow-hover),
              0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Tilt on mouse move */
#main-content-section .card.card-3d-tilt {
  transform-style: preserve-3d;
}

#main-content-section .card.card-3d-tilt:hover {
  transform: translateY(calc(-1 * var(--card-depth-intensity))) 
             scale(var(--card-scale-hover));
}

/* =========================================== */
/* CARD LIFT EFFECTS */
/* =========================================== */

#main-content-section .card.card-lift {
  transition: transform var(--card-transition),
              box-shadow var(--card-transition);
}

#main-content-section .card.card-lift:hover {
  transform: translateY(calc(-1 * var(--card-depth-intensity)));
  box-shadow: var(--card-shadow-hover);
}

/* Strong lift */
#main-content-section .card.card-lift-strong:hover {
  transform: translateY(calc(-1 * var(--card-depth-intensity) * 1.5));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

/* Subtle lift */
#main-content-section .card.card-lift-subtle:hover {
  transform: translateY(calc(-1 * var(--card-depth-intensity) * 0.5));
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* =========================================== */
/* CARD SCALE EFFECTS */
/* =========================================== */

#main-content-section .card.card-scale {
  transition: transform var(--card-transition),
              box-shadow var(--card-transition);
}

#main-content-section .card.card-scale:hover {
  transform: scale(var(--card-scale-hover));
  box-shadow: var(--card-shadow-hover);
}

/* Strong scale */
#main-content-section .card.card-scale-strong:hover {
  transform: scale(1.05);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.22);
}

/* Subtle scale */
#main-content-section .card.card-scale-subtle:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

/* =========================================== */
/* CARD ROTATE EFFECTS */
/* =========================================== */

#main-content-section .card.card-rotate {
  transition: transform var(--card-transition),
              box-shadow var(--card-transition);
}

#main-content-section .card.card-rotate:hover {
  transform: rotateY(5deg) rotateX(-5deg) 
             translateY(calc(-1 * var(--card-depth-intensity)));
  box-shadow: var(--card-shadow-hover);
}

/* Strong rotate */
#main-content-section .card.card-rotate-strong:hover {
  transform: rotateY(10deg) rotateX(-10deg) 
             translateY(calc(-1 * var(--card-depth-intensity) * 1.2));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

/* =========================================== */
/* CARD PERSPECTIVE EFFECTS */
/* =========================================== */

#main-content-section .card.card-perspective {
  transform-style: preserve-3d;
  perspective: 1000px;
}

#main-content-section .card.card-perspective .card-body {
  transform-style: preserve-3d;
  transition: transform var(--card-transition);
}

#main-content-section .card.card-perspective:hover .card-body {
  transform: translateZ(20px);
}

/* =========================================== */
/* CARD DEPTH SHADOWS */
/* =========================================== */

#main-content-section .card.card-depth-shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
              0 8px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--card-transition);
}

#main-content-section .card.card-depth-shadow:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
              0 16px 48px rgba(0, 0, 0, 0.1),
              0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Strong depth shadow */
#main-content-section .card.card-depth-shadow-strong {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
              0 16px 48px rgba(0, 0, 0, 0.1);
}

#main-content-section .card.card-depth-shadow-strong:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15),
              0 24px 72px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(99, 102, 241, 0.15);
}

/* =========================================== */
/* CARD GLOW EFFECTS */
/* =========================================== */

#main-content-section .card.card-glow {
  position: relative;
}

#main-content-section .card.card-glow::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  filter: blur(10px);
  transition: opacity var(--card-transition);
}

#main-content-section .card.card-glow:hover::after {
  opacity: 0.6;
}

#main-content-section .card.card-glow:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4),
              var(--card-shadow-hover);
}

/* =========================================== */
/* CARD BORDER EFFECTS */
/* =========================================== */

#main-content-section .card.card-border-glow {
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

#main-content-section .card.card-border-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--card-transition);
  z-index: -1;
}

#main-content-section .card.card-border-glow:hover::before {
  opacity: 1;
}

/* =========================================== */
/* CARD CONTENT LAYERING */
/* =========================================== */

#main-content-section .card .card-body {
  position: relative;
  z-index: 1;
}

#main-content-section .card .card-header {
  position: relative;
  z-index: 2;
}

#main-content-section .card .card-footer {
  position: relative;
  z-index: 2;
}

/* =========================================== */
/* CARD STACK EFFECT */
/* =========================================== */

#main-content-section .card.card-stack {
  position: relative;
}

#main-content-section .card.card-stack::before,
#main-content-section .card.card-stack::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
  z-index: -1;
  opacity: 0.5;
  transition: transform var(--card-transition),
              opacity var(--card-transition);
}

#main-content-section .card.card-stack::before {
  transform: translateY(4px) scale(0.98);
}

#main-content-section .card.card-stack::after {
  transform: translateY(8px) scale(0.96);
  opacity: 0.3;
}

#main-content-section .card.card-stack:hover::before {
  transform: translateY(8px) scale(0.96);
}

#main-content-section .card.card-stack:hover::after {
  transform: translateY(12px) scale(0.94);
}

/* =========================================== */
/* RESPONSIVE ADJUSTMENTS */
/* =========================================== */

@media (max-width: 768px) {
  :root {
    --card-depth-intensity: 10px;
    --card-scale-hover: 1.01;
  }
  
  /* Reduce 3D effects on mobile */
  #main-content-section .card.card-rotate:hover,
  #main-content-section .card.card-rotate-strong:hover {
    transform: translateY(calc(-1 * var(--card-depth-intensity)));
  }
  
  /* Simplify stack effect on mobile */
  #main-content-section .card.card-stack::before,
  #main-content-section .card.card-stack::after {
    display: none;
  }
}

/* =========================================== */
/* ACCESSIBILITY */
/* =========================================== */

@media (prefers-reduced-motion: reduce) {
  #main-content-section .card {
    transition: none !important;
    transform: none !important;
  }
  
  #main-content-section .card:hover {
    transform: none !important;
  }
  
  #main-content-section .card::before,
  #main-content-section .card::after {
    display: none;
  }
}

/* =========================================== */
/* PERFORMANCE OPTIMIZATIONS */
/* =========================================== */

#main-content-section .card {
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

#main-content-section .card.card-3d,
#main-content-section .card.card-3d-tilt,
#main-content-section .card.card-perspective {
  will-change: transform;
}

