
:root {
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
}

html {
  scroll-behavior: smooth;
}

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

.role-card,
.module-card,
.team-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.role-card:hover,
.module-card:hover,
.team-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 20px 40px rgba(30, 60, 114, 0.3);
}

.role-card i,
.module-card i,
.team-card i {
  transition: all 0.3s ease;
}

.role-card:hover i,
.module-card:hover i,
.team-card:hover i {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 0 8px rgba(30, 60, 114, 0.5));
}

.cta-btn,
.login-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-btn::before,
.login-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-btn:hover::before,
.login-btn:hover::before {
  width: 300px;
  height: 300px;
}

.cta-btn:hover,
.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(30, 60, 114, 0.4);
}

.hero-image img {
  transition: transform 0.3s ease;
}

.hero:hover .hero-image img {
  transform: scale(1.05);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar {
  animation: slideDown 0.5s ease-out;
}

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

.hero-text h2 {
  background: linear-gradient(135deg, #3d444a, #4a5259, #7e9ac8);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 3s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

.logo:active {
  animation: glitch 0.3s;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 2em;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.floating-particle {
  position: absolute;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

[data-aos] {
  transition-property: transform, opacity;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing-effect {
  overflow: hidden;
  border-right: 3px solid var(--color-primary);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}


@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleUp {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulseShadow {
  0% {
    box-shadow: 0 0 0 0 rgba(66, 99, 140, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(66, 99, 140, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(66, 99, 140, 0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes progress {
  from {
    width: 0%;
  }
  to {
    width: var(--progress-width, 100%);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(66, 99, 140, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(66, 99, 140, 0.8);
  }
}

@keyframes drawCheck {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.animate-fadeIn {
  animation: fadeIn var(--transition-base) ease-out;
}

.animate-fadeInUp {
  animation: fadeInUp var(--transition-slow) ease-out;
}

.animate-fadeInDown {
  animation: fadeInDown var(--transition-slow) ease-out;
}

.animate-fadeInLeft {
  animation: fadeInLeft var(--transition-slow) ease-out;
}

.animate-fadeInRight {
  animation: fadeInRight var(--transition-slow) ease-out;
}

.animate-scaleIn {
  animation: scaleIn var(--transition-base) ease-out;
}

.animate-bounceIn {
  animation: bounceIn var(--transition-slow) ease-out;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 1s ease infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-rotate {
  animation: rotate 1s linear infinite;
}

/* Stagger item - NO usar opacity:0 para evitar conflictos con sidebar */
.stagger-item {
  /* La animación del sidebar ya está en dashboard.css */
}


.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Logo Dashboard Hover Effect */
.logo-hover {
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.logo-hover:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.hover-grow {
  transition: transform var(--transition-base);
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(66, 99, 140, 0.4);
}

.hover-shadow {
  transition: box-shadow var(--transition-base);
}

.hover-shadow:hover {
  box-shadow: var(--shadow-xl);
}

.hover-brightness {
  transition: filter var(--transition-base);
}

.hover-brightness:hover {
  filter: brightness(1.1);
}

.hover-icon-scale i,
.hover-icon-scale svg {
  transition: transform var(--transition-base);
}

.hover-icon-scale:hover i,
.hover-icon-scale:hover svg {
  transform: scale(1.2);
}

.hover-border-pulse {
  position: relative;
  transition: border-color var(--transition-base);
}

.hover-border-pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid transparent;
  transition: border-color var(--transition-base);
  pointer-events: none;
}

.hover-border-pulse:hover::after {
  border-color: rgba(66, 99, 140, 0.5);
  animation: pulseShadow 1.5s ease-out;
}


.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 12px;
  margin: 8px 0;
}

.skeleton-title {
  height: 20px;
  width: 60%;
  margin: 12px 0;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 200px;
  border-radius: 12px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(66, 99, 140, 0.1);
  border-top-color: #3d444a;
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 6px;
}

.dots-loading {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.dots-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d444a;
  animation: bounce 1.4s infinite ease-in-out both;
}

.dots-loading span:nth-child(1) { animation-delay: -0.32s; }
.dots-loading span:nth-child(2) { animation-delay: -0.16s; }


.transition-all {
  transition: all var(--transition-base);
}

.transition-fast {
  transition: all var(--transition-fast);
}

.transition-slow {
  transition: all var(--transition-slow);
}

.transition-colors {
  transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}

.transition-transform {
  transition: transform var(--transition-base);
}

.transition-opacity {
  transition: opacity var(--transition-base);
}

.transition-shadow {
  transition: box-shadow var(--transition-base);
}


.entrance-header {
  animation: slideInDown 0.6s ease-out;
}

.entrance-sidebar {
  animation: slideInLeft 0.5s ease-out;
}

.entrance-content {
  animation: fadeInUp 0.8s ease-out;
}

.entrance-card {
  animation: scaleIn 0.5s ease-out;
}

.entrance-list-item {
  opacity: 0;
  animation: fadeInLeft 0.5s ease-out forwards;
}

.entrance-list-item:nth-child(1) { animation-delay: 0.1s; }
.entrance-list-item:nth-child(2) { animation-delay: 0.15s; }
.entrance-list-item:nth-child(3) { animation-delay: 0.2s; }
.entrance-list-item:nth-child(4) { animation-delay: 0.25s; }
.entrance-list-item:nth-child(5) { animation-delay: 0.3s; }


.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

.btn-hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn-hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-hover-lift:active {
  transform: translateY(0);
}

.btn-hover-pulse:hover {
  animation: pulse 0.6s ease-in-out;
}


.modal-fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}

.modal-scale-in {
  animation: scaleIn var(--transition-slow) cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-slide-up {
  animation: slideInUp var(--transition-slow) ease-out;
}

.modal-backdrop-fade {
  animation: fadeIn var(--transition-fast) ease-out;
}


.input-focus {
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.input-focus:focus {
  border-color: #3d444a;
  box-shadow: 0 0 0 3px rgba(66, 99, 140, 0.1);
}

.input-error {
  animation: shake 0.5s ease-in-out;
  border-color: #ef5350 !important;
}

.input-success {
  border-color: #43a047 !important;
  animation: glow 1s ease-in-out;
}

.label-float {
  transition: transform var(--transition-base), font-size var(--transition-base), color var(--transition-base);
}


.notification-slide-in {
  animation: slideInRight var(--transition-slow) ease-out;
}

.notification-fade-out {
  animation: fadeInRight var(--transition-base) ease-in reverse;
}

.toast-enter {
  animation: slideInUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}


.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.parallax {
  transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1);
}


.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

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

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid #3d444a;
  white-space: nowrap;
  animation: typing 3.5s steps(40) 1s normal both, blink 0.75s step-end infinite;
}

.checkmark {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.8s ease-out forwards;
}

.progress-fill {
  animation: progress 1.5s ease-out forwards;
}

.count-up {
  animation: countUp 0.8s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter {
  animation: countUp 0.6s ease-out;
}

.pattern-bg {
  background-image: 
    linear-gradient(30deg, rgba(30, 60, 114, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(30, 60, 114, 0.05) 87.5%, rgba(30, 60, 114, 0.05)),
    linear-gradient(150deg, rgba(30, 60, 114, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(30, 60, 114, 0.05) 87.5%, rgba(30, 60, 114, 0.05)),
    linear-gradient(30deg, rgba(30, 60, 114, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(30, 60, 114, 0.05) 87.5%, rgba(30, 60, 114, 0.05)),
    linear-gradient(150deg, rgba(30, 60, 114, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(30, 60, 114, 0.05) 87.5%, rgba(30, 60, 114, 0.05));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

/* ============================================
   DASHBOARD SPECIFIC ANIMATIONS
   ============================================ */

/* Stat Cards Animation - Enhanced hover only (base animation in dashboard.css) */
.stat-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(74, 82, 89, 0.18);
}

/* Counter Number Animation */
@keyframes countNumber {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.stat-number {
  animation: countNumber 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

/* Table Row Animation */
@keyframes tableRowEnter {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.data-table tbody tr {
  animation: tableRowEnter 0.4s ease forwards;
  opacity: 0;
  transition: background-color 0.2s ease;
}

.data-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.data-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.data-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.data-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.data-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.5s; }

.data-table tbody tr:hover {
  background-color: rgba(74, 82, 89, 0.04);
}

/* Course Card Animation */
@keyframes courseCardEnter {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.course-card {
  animation: courseCardEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.15s; }
.course-card:nth-child(3) { animation-delay: 0.2s; }
.course-card:nth-child(4) { animation-delay: 0.25s; }
.course-card:nth-child(5) { animation-delay: 0.3s; }
.course-card:nth-child(6) { animation-delay: 0.35s; }
.course-card:nth-child(7) { animation-delay: 0.4s; }
.course-card:nth-child(8) { animation-delay: 0.45s; }

.course-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 32px rgba(74, 82, 89, 0.2);
}

/* Section Title Animation */
@keyframes titleSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-title {
  animation: titleSlideIn 0.6s ease forwards;
}

/* NO aplicar animaciones de título a la sección de Status */
.dashboard-content > h2:not(.status-admin-container *) {
  animation: titleSlideIn 0.6s ease forwards;
}

/* Button Hover Effects */
.btn-primary,
.btn-secondary,
.btn-action {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(74, 82, 89, 0.2);
}

.btn-primary:active,
.btn-secondary:active,
.btn-action:active {
  transform: translateY(0);
}

/* Icon Animation on Hover - Solo sidebar, no status */
.sidebar-menu button i {
  transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-menu button:hover i {
  transform: scale(1.15) rotate(-5deg);
}

/* Progress Bar Animation */
@keyframes progressFill {
  0% {
    width: 0%;
  }
}

.progress-fill,
.progress-bar-fill {
  animation: progressFill 1s ease-out forwards;
  transition: width 0.5s ease;
}

/* Form Input Focus Animation */
.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.form-input:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: #4a5259;
  box-shadow: 0 0 0 3px rgba(74, 82, 89, 0.1);
  transform: scale(1.01);
}

/* Card Container Animation */
@keyframes containerFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.card-container,
.cards-grid,
.table-container {
  animation: containerFadeIn 0.4s ease forwards;
}

/* Badge Pulse Animation */
.notification-badge {
  animation: pulse 2s ease-in-out infinite;
}

/* Empty State Animation */
@keyframes emptyStateFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.empty-state i,
.no-data-icon {
  animation: emptyStateFloat 3s ease-in-out infinite;
}

/* Modal Animation Enhancement - Sin override de SweetAlert2 para evitar problemas de cierre */
/* Las animaciones de SweetAlert2 se manejan internamente */

/* Avatar Hover Effect */
.user-avatar-header,
.avatar {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.user-avatar-header:hover,
.avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(74, 82, 89, 0.2);
}

/* Status Indicator Pulse */
@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-online,
.status-active {
  animation: statusPulse 2s ease-in-out infinite;
}

/* Loading Skeleton for Content */
.content-skeleton {
  background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Subtle Background Gradient Animation */
@keyframes subtleGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-bg-subtle {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f5f5f5 100%);
  background-size: 200% 200%;
  animation: subtleGradient 8s ease infinite;
}

/* Tooltip Animation */
@keyframes tooltipFade {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-tooltip]:hover::after {
  animation: tooltipFade 0.2s ease forwards;
}

/* Action Button Group Animation */
.action-buttons button,
.btn-group button {
  transition: all 0.2s ease;
}

.action-buttons button:hover,
.btn-group button:hover {
  transform: scale(1.05);
}

/* Dropdown Animation */
@keyframes dropdownOpen {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-menu,
.select-dropdown {
  animation: dropdownOpen 0.2s ease forwards;
}

/* Tab Switching Animation */
.tab-content {
  animation: fadeInUp 0.4s ease forwards;
}

/* Checkbox/Radio Animation */
input[type="checkbox"],
input[type="radio"] {
  transition: transform 0.2s ease;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  animation: bounceIn 0.3s ease;
}

/* Success/Error State Animation */
@keyframes successShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.input-success {
  animation: successShake 0.3s ease;
  border-color: #43a047 !important;
}

.input-error {
  animation: shake 0.4s ease;
  border-color: #ef5350 !important;
}

/* List Item Animation */
.list-item,
.payment-item,
.notification-item {
  animation: fadeInLeft 0.4s ease forwards;
  opacity: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.list-item:hover,
.payment-item:hover,
.notification-item:hover {
  transform: translateX(4px);
  background-color: rgba(74, 82, 89, 0.03);
}

.list-item:nth-child(1) { animation-delay: 0.05s; }
.list-item:nth-child(2) { animation-delay: 0.1s; }
.list-item:nth-child(3) { animation-delay: 0.15s; }
.list-item:nth-child(4) { animation-delay: 0.2s; }
.list-item:nth-child(5) { animation-delay: 0.25s; }

/* Profile Card Animation */
@keyframes profileReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.profile-card,
.user-profile {
  animation: profileReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Chart Container Animation */
.chart-container,
.stats-chart {
  animation: scaleIn 0.6s ease forwards;
  opacity: 0;
  animation-delay: 0.2s;
}

/* Floating Action Button */
.fab {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 24px rgba(74, 82, 89, 0.3);
}

/* Search Bar Animation */
.search-container,
.search-box {
  transition: width 0.3s ease, box-shadow 0.3s ease;
}

.search-container:focus-within,
.search-box:focus-within {
  box-shadow: 0 4px 12px rgba(74, 82, 89, 0.15);
}

/* Tag/Badge Hover */
.tag,
.badge {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.tag:hover,
.badge:hover {
  transform: scale(1.05);
}

/* Accordion Animation */
@keyframes accordionOpen {
  0% {
    opacity: 0;
    max-height: 0;
  }
  100% {
    opacity: 1;
    max-height: 500px;
  }
}

.accordion-content.open {
  animation: accordionOpen 0.3s ease forwards;
}

/* Pagination Animation */
.pagination button,
.page-number {
  transition: all 0.2s ease;
}

.pagination button:hover,
.page-number:hover {
  transform: scale(1.1);
  background-color: rgba(74, 82, 89, 0.1);
}

/* Filter Button Animation */
.filter-btn,
.filter-tag {
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 82, 89, 0.15);
}

.filter-btn.active,
.filter-tag.active {
  animation: pulse 0.3s ease;
}

/* ============================================
   DYNAMIC CONTENT ANIMATIONS
   For elements generated via JavaScript
   ============================================ */

/* Dynamic Card Grid Animation */
#catalogo-cursos-container > div,
#mis-cursos-container > div {
  animation: courseCardEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#catalogo-cursos-container > div:nth-child(1) { animation-delay: 0.05s; }
#catalogo-cursos-container > div:nth-child(2) { animation-delay: 0.1s; }
#catalogo-cursos-container > div:nth-child(3) { animation-delay: 0.15s; }
#catalogo-cursos-container > div:nth-child(4) { animation-delay: 0.2s; }
#catalogo-cursos-container > div:nth-child(5) { animation-delay: 0.25s; }
#catalogo-cursos-container > div:nth-child(6) { animation-delay: 0.3s; }

#mis-cursos-container > div:nth-child(1) { animation-delay: 0.05s; }
#mis-cursos-container > div:nth-child(2) { animation-delay: 0.1s; }
#mis-cursos-container > div:nth-child(3) { animation-delay: 0.15s; }
#mis-cursos-container > div:nth-child(4) { animation-delay: 0.2s; }

/* Smooth Loading States */
.loading-fade {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

/* Section Content Reveal */
#mainContent > * {
  animation: fadeInUp 0.4s ease forwards;
}

/* Stats Grid Animation */
.stats-grid > div,
.stat-cards > div {
  animation: statCardEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Help Section Animation */
.help-section,
.ayuda-section {
  animation: fadeInUp 0.5s ease forwards;
}

/* Chat Elements Animation */
.chat-conversation-item {
  animation: fadeInLeft 0.3s ease forwards;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chat-conversation-item:hover {
  transform: translateX(4px);
}

.admin-chat-message,
.chat-message {
  animation: slideInUp 0.3s ease forwards;
}

/* Alert/Notification Animation */
.alert,
.notification,
.toast {
  animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Scrollbar Fade */
::-webkit-scrollbar-thumb {
  transition: background-color 0.2s ease;
}

/* Focus Ring Animation */
*:focus-visible {
  outline: 2px solid rgba(74, 82, 89, 0.5);
  outline-offset: 2px;
  transition: outline-offset 0.2s ease;
}

/* Button Active State - Excluir status section */
button:not(.status-admin-container *):active,
.btn:not(.status-admin-container *):active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Link Hover Underline Animation */
a.animated-link {
  position: relative;
}

a.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #4a5259;
  transition: width 0.3s ease;
}

a.animated-link:hover::after {
  width: 100%;
}

/* Image Loading Animation */
img.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.lazy-load.loaded {
  opacity: 1;
}

/* Section Transition for SPA */
.spa-animate {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.spa-animate.entering {
  opacity: 0;
  transform: translateY(10px);
}

.spa-animate.entered {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
  .entrance-sidebar {
    animation: slideInLeft 0.3s ease-out;
  }
  
  .entrance-header {
    animation: slideInDown 0.4s ease-out;
  }
  
  .stagger-item {
    animation-duration: 0.3s;
  }
  
  .stat-card,
  .course-card,
  #catalogo-cursos-container > div {
    animation-duration: 0.4s;
  }
}

/* Reduced Motion Support - Already defined but ensuring dashboard elements respect it */
@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .course-card,
  .sidebar-menu button,
  .data-table tbody tr,
  #catalogo-cursos-container > div,
  #mis-cursos-container > div {
    animation: none !important;
    transition: none !important;
  }
  
  .entrance-sidebar,
  .entrance-header,
  .entrance-content {
    animation: none !important;
  }
}

/* Keyframe for smooth stat card entry (referenced in dynamic content) */
@keyframes statCardEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}



