:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --background-color: #f8f9fa;
  --card-color: #ffffff;
  --text-color: #34495e;
  --border-color: #e9ecef;
  --accent-color: #1abc9c;
  
  --service-ultraschall-color: #2ecc71;
  --service-mrt-color: #f39c12;
  --service-ct-color: #e74c3c;
  --service-roentgen-color: #9b59b6;
  font-family: 'Inter', sans-serif;
  --background: #f8fafc;
  --text: #1a1a1a;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --footer-bg: #e5e7eb;
  --footer-text: #1a1a1a;
  --card-bg: #fff;
  --border: #d1d5db;
}

body.dark {
  --background: #181c23;
  --text: #222;
  --primary: #60a5fa;
  --primary-hover: #2563eb;
  --footer-bg: #23272f;
  --footer-text: #f3f4f6;
  --card-bg: #eeeeee;
  --border: #374151;
}

body, footer, .institut-card, .footer-column, .app-container {
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  margin: 0 1rem;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
  margin-bottom: 1rem;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 0.75rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
  font-weight: 400;
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* Filter Styles */
.filter-container {
  background-color: var(--card-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filter-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.filter-container h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.filter-container h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 40px;
  background: var(--accent-color);
  border-radius: 50px;
}

.filter-icon {
  margin-right: 0.75rem;
  color: var(--accent-color);
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.filter-section h3 .material-symbols-rounded {
  margin-right: 0.75rem;
  color: var(--secondary-color);
}

.select-wrapper {
  position: relative;
}

.bezirk-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
  color: var(--text-color);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

.bezirk-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.15);
}

.service-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.service-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.03);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.service-checkbox:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.service-ultraschall-bg {
  background-color: rgba(46, 204, 113, 0.1);
  border-left: 3px solid var(--service-ultraschall-color);
}

.service-mrt-bg {
  background-color: rgba(243, 156, 18, 0.1);
  border-left: 3px solid var(--service-mrt-color);
}

.service-ct-bg {
  background-color: rgba(231, 76, 60, 0.1);
  border-left: 3px solid var(--service-ct-color);
}

.service-roentgen-bg {
  background-color: rgba(155, 89, 182, 0.1);
  border-left: 3px solid var(--service-roentgen-color);
}

.service-checkbox input {
  margin-right: 0.5rem;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.service-checkbox span {
  font-weight: 500;
  font-size: 0.9rem;
}

/* Institute Grid */
.institutes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.institut-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
  animation: fadeInUp 0.5s ease forwards;
}

.institut-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.institut-header {
  padding: 1rem 1.25rem;
  background-color: var(--secondary-color);
  position: relative;
  color: white;
  border-radius: 8px;
}

.institut-header h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.3;
}

.institut-bezirk {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.institut-body {
  padding: 1.25rem;
}

.institut-adresse, .kontakt-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.institut-adresse .material-symbols-rounded,
.kontakt-item .material-symbols-rounded {
  margin-right: 0.5rem;
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.no-address {
  color: #a0aec0;
  font-style: italic;
}

.institut-kontakt {
  margin-bottom: 1.25rem;
}

.kontakt-item a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

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

.services-titel {
  font-weight: 500;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.services-titel .material-symbols-rounded {
  margin-right: 0.5rem;
  color: var(--secondary-color);
}

.services-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: white;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.service-ultraschall {
  background-color: var(--service-ultraschall-color);
}

.service-mrt {
  background-color: var(--service-mrt-color);
}

.service-ct {
  background-color: var(--service-ct-color);
}

.service-roentgen {
  background-color: var(--service-roentgen-color);
}

/* Result Summary */
.result-summary {
  background-color: var(--card-color);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--secondary-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

.result-icon {
  margin-right: 0.5rem;
}

/* Reset Button */
.reset-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  margin-top: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  transition: background-color 0.3s, transform 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
}

.reset-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.reset-button .material-symbols-rounded {
  margin-right: 0.5rem;
}

.no-results {
  text-align: center;
  padding: 2rem;
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  color: var(--text-color);
}

.no-results-icon {
  font-size: 2.5rem;
  color: var(--secondary-color);
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

/* Footer Styles */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 0;
  margin-top: 3rem;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-info {
  flex: 1;
  max-width: 400px;
}

.footer-info h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  position: relative;
  padding-bottom: 0.75rem;
  color: var(--primary);
}

.footer-info h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 30px;
  background: var(--accent-color);
  border-radius: 50px;
}

.footer-info p {
  font-weight: 300;
  opacity: 0.9;
  line-height: 1.6;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
  color: var(--primary);
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 20px;
  background: var(--accent-color);
  border-radius: 50px;
}

.footer-column a {
  color: var(--primary);
  text-decoration: none;
  opacity: 0.8;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.footer-column a .material-symbols-rounded {
  margin-right: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-color);
}

.footer-column a:hover {
  opacity: 1;
  transform: translateX(3px);
}

.copyright {
  background-color: rgba(0, 0, 0, 0.15);
  text-align: center;
  padding: 1.25rem 0;
}

.copyright p {
  opacity: 0.8;
  font-weight: 300;
  font-size: 0.85rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .institutes-grid {
    grid-template-columns: 1fr;
  }
  
  .service-checkbox-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  header h1 {
    font-size: 1.75rem;
    margin-top: 3rem;
  }
  
  header p {
    font-size: 0.9rem;
  }
  
  .filter-container,
  .institut-card {
    padding: 1.25rem;
  }
  
  .header-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-controls {
    top: 1rem;
    left: 1rem;
    right: 1rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  
  .footer-info {
    max-width: 100%;
    text-align: center;
  }
  
  .footer-info h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
  }
  
  .footer-column h3 {
    text-align: center;
  }
  
  .footer-column h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-column a {
    justify-content: center;
  }
  
  .footer-column a:hover {
    transform: translateX(0) translateY(-2px);
  }

  main {
    margin: 1.5rem auto;
  }
}

@media (min-width: 768px) and (max-width: 1200px) {
  .institutes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Animation für Institut-Karten */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Verzögerte Animation für Karten */
.institut-card:nth-child(1) { animation-delay: 0.05s; }
.institut-card:nth-child(2) { animation-delay: 0.1s; }
.institut-card:nth-child(3) { animation-delay: 0.15s; }
.institut-card:nth-child(4) { animation-delay: 0.2s; }
.institut-card:nth-child(5) { animation-delay: 0.25s; }
.institut-card:nth-child(6) { animation-delay: 0.3s; }
.institut-card:nth-child(7) { animation-delay: 0.35s; }
.institut-card:nth-child(8) { animation-delay: 0.4s; }
.institut-card:nth-child(9) { animation-delay: 0.45s; }
.institut-card:nth-child(10) { animation-delay: 0.5s; }

.darkmode-toggle {
  background: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.4em 1em;
  border-radius: 2em;
  cursor: pointer;
  margin-left: 1em;
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: background 0.2s, color 0.2s;
}
.darkmode-toggle:hover {
  background: var(--primary);
  color: var(--background);
}

/* Moderner Switch-Toggle */
.darkmode-switch {
  display: flex;
  align-items: center;
  gap: 0.7em;
  cursor: pointer;
  user-select: none;
  z-index: 10;
}

.switch-track {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
}
.switch-thumb {
  width: 20px;
  height: 20px;
  background: #f39c12;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.3s, background 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.switch-checked .switch-track {
  background: var(--primary);
}
.switch-checked .switch-thumb {
  left: 22px;
  background: #f39c12;
}
.switch-icon {
  font-size: 1.2em;
  color: #f39c12;
  transition: color 0.3s;
}
.switch-checked .switch-icon {
  color: #f39c12;
}

/* Button ausblenden, falls Switch verwendet wird */
.darkmode-toggle { display: none; }

body.dark .filter-container {
  background-color: #eeeeee;
}

body.dark .institut-adresse {
  color: var(--text);
}

body.dark .result-summary {
  background-color: #eeeeee;
  color: var(--text);
}

body.dark .bezirk-select {
  background-color: #bcbcbc;
  color: var(--text);
}

.header-controls {
  position: absolute;
  top: 1.5em;
  left: 2em;
  right: 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.language-dropdown {
  position: relative;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.4em 1em;
  border-radius: 2em;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.3em;
  min-width: 120px;
  justify-content: center;
}

.language-dropdown:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.dropdown-icon {
  font-size: 1em;
  transition: transform 0.2s;
}

.language-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 0.5em;
  max-height: 200px;
  overflow-y: auto;
}

.language-option {
  padding: 0.6em 1em;
  cursor: pointer;
  color: #333;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background: #f5f5f5;
}

.language-option.active {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

/* Dark Mode Anpassungen */
body.dark .language-options {
  background: #2d3440;
  border-color: #374151;
}

body.dark .language-option {
  color: #f3f4f6;
  border-bottom-color: #374151;
}

body.dark .language-option:hover {
  background: #374151;
}

body.dark .language-option.active {
  background: #1e3a8a;
  color: #60a5fa;
} 