/* ============================================
   Zahnarztpraxis Muster-Website 2 - Custom Styles
   ============================================ */

/* CSS Custom Properties */
:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --warm-600: #57534e;
  --warm-900: #1c1917;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-900: #111827;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--sky-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

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

.fade-in-fast {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

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

.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }

/* Button hover scale */
.btn-primary,
.btn-secondary {
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: scale(1.02);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Service card specific hover */
.service-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.25s ease-in-out;
}

.service-card:hover {
  border-color: var(--sky-600);
  transform: scale(1.02);
}

/* Team card overlay */
.team-card .team-overlay {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.team-card:hover .team-overlay,
.team-card:focus-within .team-overlay {
  opacity: 1;
}

/* Accordion animation */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

.accordion-content.open {
  opacity: 1;
}

.accordion-chevron {
  transition: transform 0.25s ease-in-out;
}

.accordion-chevron.rotated {
  transform: rotate(180deg);
}

/* Count-up number styling */
.count-up {
  font-variant-numeric: tabular-nums;
}

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

.mobile-menu.open {
  max-height: 500px;
}

/* Eyebrow text */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--sky-600);
  font-size: 0.875rem;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Download card hover */
.download-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* News card expandable */
.news-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
  opacity: 0;
}

.news-expand.open {
  opacity: 1;
}

/* Filter tab active */
.filter-tab {
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-tab.active {
  color: var(--sky-600);
  border-bottom: 2px solid var(--sky-600);
}

/* Career card hover */
.career-card {
  transition: box-shadow 0.2s ease-in-out;
}

.career-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-fast,
  .slide-in-left,
  .slide-in-right,
  .scale-in,
  .stagger-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .service-card:hover,
  .card-hover:hover,
  .download-card:hover {
    transform: none;
  }
}
