/* --- DESIGN SYSTEM VARIABLES --- */
:root {
  --background: #f8f7fa;
  --foreground: #3d3c4f;
  --card: #ffffff;
  --card-foreground: #3d3c4f;
  --popover: #ffffff;
  --popover-foreground: #3d3c4f;
  --primary: #8a79ab;
  --primary-foreground: #f8f7fa;
  --secondary: #dfd9ec;
  --secondary-foreground: #3d3c4f;
  --muted: #dcd9e3;
  --muted-foreground: #6b6880;
  --accent: #e6a5b8;
  --accent-foreground: #4b2e36;
  --destructive: #d95c5c;
  --destructive-foreground: #f8f7fa;
  --border: #cec9d9;
  --input: #eae7f0;
  --ring: #8a79ab;
  --chart-1: #8a79ab;
  --chart-2: #e6a5b8;
  --chart-3: #77b8a1;
  --chart-4: #f0c88d;
  --chart-5: #a0bbe3;
  --sidebar: #f1eff5;
  --sidebar-foreground: #3d3c4f;
  --sidebar-primary: #8a79ab;
  --sidebar-primary-foreground: #f8f7fa;
  --sidebar-accent: #e6a5b8;
  --sidebar-accent-foreground: #4b2e36;
  --sidebar-border: #d7d2e0;
  --sidebar-ring: #8a79ab;
  --font-sans: 'Lato', sans-serif;
  --font-serif: 'Lora', serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
  --radius: 0.5rem;
  --shadow-x: 1px;
  --hero-overlay: rgba(0, 0, 0, 0.3); /* Lighter overlay for light theme */
  --hero-text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  --hero-subtitle-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  --shadow-x: 1px;
  --shadow-y: 2px;
  --shadow-blur: 5px;
  --shadow-spread: 1px;
  --shadow-opacity: 0.06;
  --shadow-color: hsl(0 0% 0%);
  --shadow-2xs: 1px 2px 5px 1px hsl(0 0% 0% / 0.03);
  --shadow-xs: 1px 2px 5px 1px hsl(0 0% 0% / 0.03);
  --shadow-sm: 1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 1px 2px 0px hsl(0 0% 0% / 0.06);
  --shadow: 1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 1px 2px 0px hsl(0 0% 0% / 0.06);
  --shadow-md: 1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 2px 4px 0px hsl(0 0% 0% / 0.06);
  --shadow-lg: 1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 4px 6px 0px hsl(0 0% 0% / 0.06);
  --shadow-xl: 1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 8px 10px 0px hsl(0 0% 0% / 0.06);
  --shadow-2xl: 1px 2px 5px 1px hsl(0 0% 0% / 0.15);
  --tracking-normal: 0em;
  --spacing: 0.25rem;
}

.dark {
  --background: #1a1823;
  --foreground: #e0ddef;
  --card: #232030;
  --card-foreground: #e0ddef;
  --popover: #232030;
  --popover-foreground: #e0ddef;
  --primary: #a995c9;
  --primary-foreground: #1a1823;
  --secondary: #5a5370;
  --secondary-foreground: #e0ddef;
  --muted: #242031;
  --muted-foreground: #a09aad;
  --accent: #372e3f;
  --accent-foreground: #f2b8c6;
  --destructive: #e57373;
  --destructive-foreground: #1a1823;
  --border: #302c40;
  --input: #2a273a;
  --ring: #a995c9;
  --chart-1: #a995c9;
  --chart-2: #f2b8c6;
  --chart-3: #77b8a1;
  --chart-4: #f0c88d;
  --chart-5: #a0bbe3;
  --sidebar: #16141e;
  --sidebar-foreground: #e0ddef;
  --sidebar-primary: #a995c9;
  --sidebar-primary-foreground: #1a1823;
  --sidebar-accent: #372e3f;
  --sidebar-accent-foreground: #f2b8c6;
  --sidebar-border: #2a273a;
  --sidebar-ring: #a995c9;
  --hero-overlay: rgba(26, 24, 35, 0.6); /* Darker overlay for dark theme */
  --hero-text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  --hero-subtitle-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* --- GLOBALE STILE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--card-foreground);
}

h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--primary);
}

section {
  padding: 80px 0;
}

/* --- FLOATING THEME TOGGLE --- */
.floating-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.dark .floating-theme-toggle {
  background: rgba(35, 32, 48, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.floating-theme-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--foreground);
}

/* --- HERO SECTION --- */
#home {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--primary-foreground);
  position: relative;
  overflow: hidden;
}

#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./img/night-sea-concert.jpg') no-repeat center center/cover;
  filter: brightness(0.7);
  z-index: -2;
}

#home::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-overlay);
  z-index: -1;
  transition: background 0.3s ease; /* Smooth theme transition */
}

.hero-content {
  z-index: 1;
}

.hero-content h1 {
  font-size: 5rem;
  margin-bottom: 10px;
  color: var(--card-foreground);
  text-shadow: var(--hero-text-shadow);
}

.hero-content .artists {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 30px;
  color: var(--card-foreground);
  text-shadow: var(--hero-subtitle-shadow);
}

.hero-content .date-time {
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: var(--card-foreground);
  text-shadow: var(--hero-subtitle-shadow);
}

.cta-button {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 30px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.cta-button:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- K�NSTLER-SEKTION --- */
#artists {
  background-color: var(--background);
}

.artists-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.artist-card {
  flex: 1;
  min-width: 280px;
  text-align: center;
  background-color: var(--card);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artist-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.artist-card .photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid var(--primary);
}

.artist-card h3 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  color: var(--card-foreground);
}

.artist-card .instrument {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted-foreground);
  margin-bottom: 15px;
}

.artist-card p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted-foreground);
}

/* --- SOCIAL MEDIA --- */
.artist-card .social-media {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.artist-card .social-media a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.artist-card .social-media a:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.artist-card .social-media svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.social-media .instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-media .facebook {
  background: #1877f2;
}
.social-media .youtube {
  background: #ff0000;
}
.social-media .website {
  background: var(--muted-foreground);
}

/* --- AKKORDION-STILE --- */
.program-accordion {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  background-color: var(--card);
  color: var(--card-foreground);
  padding: 20px;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--primary);
  text-align: left;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background-color: var(--muted);
}

.accordion-header strong {
  color: var(--foreground);
  margin-right: 10px;
}

.accordion-header::after {
  content: '\002B'; /* Plus-Zeichen */
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
  transform: rotate(45deg); /* Plus wird zu Kreuz */
}

.accordion-content {
  background-color: var(--card);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding: 0 20px;
}

.accordion-item.active .accordion-content {
  max-height: 500px; /* >AB0B>G=> 1>;LH>5 7=0G5=85 4;O A>45@60=8O */
  padding: 0 20px 20px 20px;
}

.accordion-content p {
  color: var(--muted-foreground);
}

/* --- ANMELDEFORMULAR-SEKTION --- */
#voranmeldung {
  background-color: var(--muted);
}

.registration-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--card-foreground);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--input);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(138, 121, 171, 0.2);
}

.form-group textarea {
  resize: vertical;
}

.submit-button {
  width: 100%;
  padding: 12px 20px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.submit-button:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.submit-button:disabled {
  background-color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spinner {
  display: inline-block;
}

.form-message {
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-weight: 500;
  animation: fadeIn 0.3s ease-in;
}

.form-message.success {
  background-color: rgba(119, 184, 161, 0.2);
  border: 1px solid var(--chart-3);
  color: var(--chart-3);
}

.form-message.error {
  background-color: rgba(242, 184, 198, 0.2);
  border: 1px solid var(--chart-2);
  color: var(--chart-2);
}

/* --- DETAILS-SEKTION --- */
#details {
  background-color: var(--background);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}

.details-item {
  background-color: var(--card);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.details-item .details-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  fill: var(--primary);
}

.details-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--card-foreground);
}

.details-item p {
  font-weight: 400;
  color: var(--muted-foreground);
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 30px 20px;
  background-color: var(--card);
  font-size: 0.9rem;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
}

/* --- ANIMATIONEN --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }
  .hero-content .artists {
    font-size: 1.4rem;
  }
  h2 {
    font-size: 2.2rem;
  }
  .artists-grid {
    flex-direction: column;
  }
  .registration-form {
    padding: 25px;
  }
}

/* --- ACCESSIBILITY IMPROVEMENTS --- */

/* Skip to content link for screen readers */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 9999;
  transition: top 0.3s;
  font-weight: 600;
}

.skip-to-content:focus {
  top: 6px;
}

/* Enhanced Focus Indicators */
.floating-theme-toggle:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cta-button:focus,
.submit-button:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.artist-card a:focus,
.accordion-header:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary: #6a59ab;
    --foreground: #1d1c2f;
    --border: #3a3949;
  }

  .dark {
    --primary: #b9a5e9;
    --foreground: #f0f0ff;
    --border: #6a6979;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Required field indicator */
.required {
  color: var(--destructive);
  font-weight: bold;
  margin-left: 2px;
}

/* Form help text */
.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Consent Checkbox Styling */
.consent-group {
  background: var(--muted);
  padding: 20px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  margin: 20px 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.consent-label {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--foreground);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.consent-label::before {
  content: '';
  display: none;
}

#consent {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 4px;
  appearance: none;
  background-color: var(--card);
  transition: all 0.3s ease;
  position: relative;
}

#consent:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

#consent:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: bold;
}

#consent:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#consent:hover {
  border-color: var(--primary);
}

.consent-help {
  color: var(--primary);
  font-weight: 500;
  margin-top: 8px;
}

/* Newsletter Checkbox Styling */
.newsletter-group {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  margin: 20px 0;
  border: 1px solid var(--border);
}

.newsletter-label {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--foreground);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.newsletter-label::before {
  content: '';
  display: none;
}

#newsletter {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 4px;
  appearance: none;
  background-color: var(--card);
  transition: all 0.3s ease;
  position: relative;
}

#newsletter:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

#newsletter:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-foreground);
  font-size: 14px;
  font-weight: bold;
}

#newsletter:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#newsletter:hover {
  border-color: var(--accent);
}

.newsletter-help {
  color: var(--accent-foreground);
  font-weight: 400;
  margin-top: 8px;
  font-size: 0.85rem;
}

/* Mobile responsiveness for consent */
@media (max-width: 768px) {
  .checkbox-wrapper {
    gap: 10px;
  }

  .consent-label {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .consent-group {
    padding: 15px;
    margin: 15px 0;
  }

  .newsletter-label {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .newsletter-group {
    padding: 15px;
    margin: 15px 0;
  }
}

/* Improved focus for form elements */
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(138, 121, 171, 0.1);
}

/* Google Maps Button */
.maps-button-container {
  text-align: center;
  margin-top: 40px;
}

.maps-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background-color: var(--accent);
  color: var(--accent-foreground);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.maps-button:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.maps-button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.maps-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

.maps-icon {
  width: 18px;
  height: 18px;
  stroke: var(--accent-foreground);
  stroke-width: 2;
  fill: none;
}

/* Responsive Maps Button */
@media (max-width: 768px) {
  .maps-button {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .maps-icon {
    width: 16px;
    height: 16px;
  }
}

/* Konzept Section Responsive Styles */
@media (max-width: 768px) {
  #konzept .container {
    padding: 40px 15px;
  }

  #konzept .fade-in {
    padding: 40px 15px !important;
  }

  #konzept h2 {
    font-size: 2rem;
    margin-bottom: 25px;
  }

  .konzept-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  #konzept h3 {
    font-size: 1.2rem;
  }

  #konzept h4 {
    font-size: 1.1rem !important;
  }

  #konzept .cta-button {
    width: 100%;
    text-align: center;
    padding: 15px 25px !important;
  }
}

/* --- BOT PROTECTION CSS --- */

/* Email protection styles */
[data-protected-email] {
  cursor: pointer;
  position: relative;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
  transition: all 0.3s ease;
}

[data-protected-email]:hover {
  border-bottom-style: solid;
  background-color: var(--muted);
  padding: 2px 4px;
  border-radius: 2px;
}

[data-protected-email]:hover::after {
  content: " (Klicken zum Anzeigen)";
  font-size: 0.7em;
  color: var(--muted-foreground);
  margin-left: 0.3em;
  opacity: 0.7;
}

/* Honeypot element hiding */
.honeypot-container {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
