/* ========== Custom Styles for Krankenpflege Vitalis ========== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* Header states */
#header {
  background: transparent;
}

#header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#header.scrolled .header-logo-text {
  color: #93c5fd;
}

#header.scrolled .header-logo-sub {
  color: #94a3b8;
}

#header.scrolled .nav-link {
  color: #cbd5e1;
}

#header.scrolled .nav-link:hover {
  color: #60a5fa;
}

#header.scrolled .header-menu-icon {
  color: #cbd5e1;
}

#header.scrolled .nav-sprechzeiten {
  color: #94a3b8;
}

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

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

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animation-delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

.animation-delay-400 {
  animation-delay: 0.4s;
  opacity: 0;
}

/* Scroll-triggered fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Detail Panel */
#detail-panel {
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

#detail-panel.open {
  transform: translateX(0);
}

#detail-panel-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

#detail-panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Form focus states */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Mobile menu animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
  display: block;
  max-height: 400px;
}

/* Selection color */
::selection {
  background-color: rgba(37, 99, 235, 0.2);
  color: #1e3a8a;
}

/* Custom scrollbar (webkit) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
