/**
 * =========================================================================
 * UNIFIED PRELOADER STYLES - Mäxx Foto Website
 * =========================================================================
 * 
 * Einheitliche Preloader-Animation für alle Seiten mit pulsierendem Ball
 */

/* Preloader Container */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Pulsierender Ball */
.pulse-loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pulse-ball {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #c97148, #b56541);
  border-radius: 50%;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(201, 113, 72, 0.3);
}

.pulse-ball::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid rgba(201, 113, 72, 0.2);
  border-radius: 50%;
  animation: pulse-ring 2s ease-in-out infinite;
}

.pulse-ball::after {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 1px solid rgba(201, 113, 72, 0.1);
  border-radius: 50%;
  animation: pulse-ring 2s ease-in-out infinite 0.5s;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(201, 113, 72, 0.3);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 40px rgba(201, 113, 72, 0.6);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Optional: Lade-Text */
.pulse-loader-text {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: #c1b6b2;
  font-family: Cambria, Georgia, serif;
  font-size: 14px;
  opacity: 0.8;
  animation: fade 2s ease-in-out infinite;
}

@keyframes fade {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .pulse-loader {
    width: 60px;
    height: 60px;
  }
  
  .pulse-ball {
    width: 30px;
    height: 30px;
  }
  
  .pulse-loader-text {
    font-size: 12px;
    bottom: -30px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .pulse-ball,
  .pulse-ball::before,
  .pulse-ball::after,
  .pulse-loader-text {
    animation: none;
  }
  
  .pulse-ball {
    animation: pulse-reduced 3s ease-in-out infinite;
  }
}

@keyframes pulse-reduced {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

.camera-lens::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.camera-flash {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 15px;
  height: 8px;
  background-color: #555;
  border-radius: 3px;
  animation: flash 2s ease-in-out infinite;
}

.camera-button {
  position: absolute;
  top: -5px;
  right: 25px;
  width: 10px;
  height: 10px;
  background-color: rgb(201, 113, 72);
  border-radius: 50%;
}

.camera-strap {
  position: absolute;
  top: 45px;
  left: 15px;
  width: 50px;
  height: 10px;
  background-color: rgb(201, 113, 72);
  border-radius: 5px;
}

@keyframes flash {
  0%, 80% { 
    box-shadow: none; 
    background-color: #555;
  }
  85% { 
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.9);
    background-color: white;
  }
  90% { 
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.5);
    background-color: #eee;
  }
  100% { 
    box-shadow: none; 
    background-color: #555;
  }
}
