/* ============================================
   BEAUTIFUL PAGE TRANSITIONS FOR OSCHADBANK CLONE
   ============================================ */

/* Page wrapper for transitions */
.page-wrapper {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Page transition container */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), 
              transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

.page-transition.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}

/* ============================================
   FADE TRANSITIONS
   ============================================ */

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.fade-out {
  animation: fadeOut 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

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

/* ============================================
   SLIDE TRANSITIONS
   ============================================ */

.slide-left {
  animation: slideLeft 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.slide-right {
  animation: slideRight 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.slide-up {
  animation: slideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.slide-down {
  animation: slideDown 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

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

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

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

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.scroll-reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.scroll-reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   MODAL TRANSITIONS
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              visibility 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  margin: 50px auto;
  padding: 30px;
  transform: scale(0.7) translateY(-50px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ============================================
   LOADING SPINNER (OSCHADBANK STYLE)
   ============================================ */

.oschadbank-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.oschadbank-spinner .spinner-circle {
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* ============================================
   BUTTON TRANSITIONS
   ============================================ */

.btn-transition {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-transition::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-transition:hover::before {
  left: 100%;
}

.btn-transition:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   STAGGERED ANIMATIONS
   ============================================ */

.stagger-animation .stagger-item {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerFadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.stagger-animation .stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation .stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation .stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation .stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation .stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation .stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-animation .stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-animation .stagger-item:nth-child(8) { animation-delay: 0.8s; }
.stagger-animation .stagger-item:nth-child(9) { animation-delay: 0.9s; }
.stagger-animation .stagger-item:nth-child(10) { animation-delay: 1.0s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
  .page-transition {
    transform: translateY(10px);
  }
  
  .modal-content {
    margin: 20px auto;
    width: 95%;
  }
  
  .scroll-reveal,
  .scroll-reveal-left,
  .scroll-reveal-right {
    transform: translateY(20px);
  }
  
  .scroll-reveal.revealed,
  .scroll-reveal-left.revealed,
  .scroll-reveal-right.revealed {
    transform: translateY(0);
  }
}

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

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

.no-transition {
  transition: none !important;
  animation: none !important;
}

.fast-transition {
  transition-duration: 0.2s !important;
  animation-duration: 0.2s !important;
}

.slow-transition {
  transition-duration: 0.8s !important;
  animation-duration: 0.8s !important;
}