/* Additional Modern Animations and Effects */
body.loaded {
  animation: pageLoad 0.8s ease-out;
}

@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Enhanced button hover effects */
.menu-button:active {
  transform: scale(0.95);
}

/* Improved slide transitions */
.mySlides {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.5s ease-in-out;
}

.mySlides.active {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced navigation modal animation */
.navigation-modal {
  transition: all 0.3s ease-out;
}

.navigation-modal.active .modal-content {
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Improved dot indicators */
.dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  transition: transform 0.3s ease;
  z-index: -1;
}

.dot:hover::before,
.dot.active::before {
  transform: translate(-50%, -50%) scale(1);
}

/* Loading states for images */
.slide-image {
  transition: opacity 0.3s ease;
}

.slide-image:not([src]) {
  opacity: 0.3;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Enhanced accessibility focus states */
button:focus,
.nav-card:focus,
.dot:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth navbar transition on scroll */
.navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Print styles */
@media print {
  .navbar,
  .navigation-modal,
  .prev,
  .next,
  .dots-container {
    display: none !important;
  }
  
  .hero-section {
    page-break-after: avoid;
  }
  
  .slide-image {
    max-height: 400px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --secondary-color: #ff6600;
    --text-primary: #000000;
    --text-secondary: #333333;
  }
}

/* Reduced motion support */
@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;
  }
}