/* 
  ZAHNPRAXIS SOLBERGER MVZ - FULLY ANIMATED
  ✨ Smooth Transitions, Scroll Animations, Hover Effects
  ✨ Performance Optimized (GPU Accelerated)
*/

:root {
  --primary: #084943;
  --secondary: #D9A679;
  --accent: #2B6E63;
  --light: #F5F5F5;
  --white: #FFFFFF;
  --text: #333333;
  --text-light: #666666;
  --border: #E0E0E0;
}

/* ============ SMOOTH SCROLLING ============ */
html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Avenir Light', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============ HEADER ANIMATIONS ============ */
header {
  background: var(--white);
  border-bottom: 2px solid var(--light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  animation: slideDown 0.6s ease-out;
}

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

/* ============ NAV ANIMATIONS ============ */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

nav .logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  animation: fadeInUp 0.8s ease-out;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav li {
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

nav li:nth-child(1) { animation-delay: 0.1s; }
nav li:nth-child(2) { animation-delay: 0.2s; }
nav li:nth-child(3) { animation-delay: 0.3s; }
nav li:nth-child(4) { animation-delay: 0.4s; }
nav li:nth-child(5) { animation-delay: 0.5s; }

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
  position: relative;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav a:hover {
  color: var(--primary);
}

nav a:hover::before {
  width: 100%;
}

/* ============ HERO SECTION ANIMATIONS ============ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  padding: 80px 2rem;
  text-align: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
  animation: fadeInUp 1s ease-out;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.95);
  animation: fadeInUp 1s ease-out 0.2s;
  animation-fill-mode: both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.4s;
  animation-fill-mode: both;
}

/* ============ BUTTON ANIMATIONS ============ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

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

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(8, 73, 67, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: #c89560;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(217, 166, 121, 0.3);
}

/* ============ SECTION ANIMATIONS ============ */
section {
  padding: 60px 2rem;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.8s ease-out;
}

section h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
  animation: slideInUp 0.8s ease-out;
}

section h3 {
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  animation: slideInLeft 0.6s ease-out;
}

section p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1rem;
  animation: fadeIn 0.8s ease-out 0.2s;
  animation-fill-mode: both;
}

/* ============ HIGHLIGHT SECTION ANIMATIONS ============ */
.highlight-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  border-radius: 12px;
  padding: 40px;
  margin: 40px 0;
  animation: scaleInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.4s ease-out;
}

.highlight-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(8, 73, 67, 0.2);
}

.highlight-section h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.highlight-section p {
  color: rgba(255,255,255,0.95);
}

/* ============ CARD ANIMATIONS ============ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

.card:hover {
  box-shadow: 0 16px 32px rgba(8, 73, 67, 0.15);
  transform: translateY(-8px);
  border-color: var(--primary);
}

.card h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  transition: color 0.3s ease-out;
}

.card:hover h4 {
  color: var(--accent);
}

.card p {
  color: var(--text-light);
}

/* ============ CIRCULAR ELEMENT ANIMATIONS ============ */
.circle-item {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  margin: 1rem auto;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.circle-item:hover {
  transform: scale(1.1) rotate(5deg);
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(8, 73, 67, 0.3);
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============ GRID ANIMATIONS ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.grid > * {
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.grid > *:nth-child(1) { animation-delay: 0s; }
.grid > *:nth-child(2) { animation-delay: 0.1s; }
.grid > *:nth-child(3) { animation-delay: 0.2s; }
.grid > *:nth-child(4) { animation-delay: 0.3s; }
.grid > *:nth-child(5) { animation-delay: 0.4s; }
.grid > *:nth-child(6) { animation-delay: 0.5s; }

/* ============ FOOTER ANIMATIONS ============ */
footer {
  background: var(--primary);
  color: var(--white);
  padding: 40px 2rem;
  margin-top: 60px;
  animation: slideUp 0.8s ease-out;
}

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

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column {
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.footer-column:nth-child(1) { animation-delay: 0s; }
.footer-column:nth-child(2) { animation-delay: 0.1s; }
.footer-column:nth-child(3) { animation-delay: 0.2s; }
.footer-column:nth-child(4) { animation-delay: 0.3s; }

.footer-column h4 {
  color: var(--white);
  margin-bottom: 1rem;
  transition: color 0.3s ease-out;
}

.footer-column a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease-out;
  position: relative;
  padding-left: 10px;
}

.footer-column a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease-out;
  transform: translateY(-50%);
}

.footer-column a:hover {
  color: var(--secondary);
  transform: translateX(5px);
}

.footer-column a:hover::before {
  width: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.8);
  animation: fadeIn 1s ease-out 0.4s;
  animation-fill-mode: both;
}

/* ============ FORM ANIMATIONS ============ */
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  margin-bottom: 1rem;
  background: var(--white);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: slideInLeft 0.6s ease-out;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 73, 67, 0.1);
  transform: translateX(3px);
}

/* ============ KEYFRAME ANIMATIONS ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

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

/* ============ ACCESSIBILITY - RESPECT prefers-reduced-motion ============ */
@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;
  }
}

/* ============ UTILITY CLASSES ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-white {
  color: var(--white);
}

.bg-primary {
  background: var(--primary);
  color: var(--white);
}

.bg-light {
  background: var(--light);
}

.shadow {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease-out;
}

.shadow:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* ============ LINKS ============ */
a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a:hover {
  color: var(--accent);
}

/* ============ RESPONSIVE ANIMATIONS ============ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  nav ul {
    gap: 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  nav li {
    animation: fadeInUp 0.6s ease-out;
  }

  nav li:nth-child(1) { animation-delay: 0s; }
  nav li:nth-child(2) { animation-delay: 0.05s; }
  nav li:nth-child(3) { animation-delay: 0.1s; }
}
