/*
 * ChorVoices – konsolidiertes Template-Stylesheet
 * Stand: 9. November 2026
 * Vollständiger Ersatz der bisherigen template.css.
 * Einheitliche Inhaltsbreite, rechtsbündiges Mobilmenü und Porträtumfluss.
 * Terminkarten: voices-event--probe / voices-event--konzert am <li>.
 * Ohne Typklasse gilt der Probenstil. Farben zentral im Terminabschnitt.
 */

/* 1. Farben und Grundlagen */

:root {
  color-scheme: dark;
  --bg: #101116;
  --panel: #1a1c25;
  --text: #f3f2ef;
  --muted: #c2c3cd;
  --cyan: #65dfe6;
  --lime: #c5de59;
  --violet: #b998ed;
  --line: #343542;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 90% 10%, #33244055, transparent 48%), var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan);
  text-underline-offset: 0.22em;
}

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

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 5px;
}

h1, h2, h3 {
  line-height: 1.17;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.15;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
}

h3 {
  font-size: 1.4rem;
}

p {
  max-width: 74ch;
}

/* 2. Inhaltsrahmen: einheitlich auf allen Seiten */

.container {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.hero {
  padding-block: 4rem;
}

.content-area {
  padding-block: 3rem;
  min-height: 35vh;
  text-align: left;
}

.content-area > * {
  width: 100%;
  max-width: 58rem;
  margin-inline: 0;
}

.content-area p {
  max-width: none;
}

.voices-about, .voices-home-intro {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  text-align: inherit;
}

.section {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}

.voices-join {
  background: linear-gradient(110deg, #252038, #19262a);
  padding: 2rem;
  border-radius: 1rem;
  margin-block: 2rem;
}

/* 3. Kopfbereich und Logo */

.site-header {
  border-bottom: 0;
  background: #101116e8;
  position: relative;
}

.site-header::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--lime), #ef88c6);
  opacity: 0.65;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  max-width: 100%;
  width: 220px;
  flex-shrink: 0;
  align-items: flex-start;
  gap: 0.4rem;
}

.brand img {
  max-height: none;
  object-fit: contain;
  object-position: left;
  display: block;
  width: 100%;
  height: auto;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 650;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.035em;
  line-height: 1.5;
  width: 100%;
  text-align: center;
}

/* 4. Navigation und Schaltflächen */

.primary-nav ul, .site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a, .site-footer a {
  text-decoration: none;
}

.primary-nav a {
  color: var(--text);
  font-size: 0.95rem;
}

.primary-nav .current > a, .primary-nav .active > a {
  color: var(--cyan);
  text-decoration: underline;
}

.primary-nav ul ul {
  display: block;
  padding: 0.6rem;
}

.menu-toggle, .btn, button, input[type="submit"] {
  font: inherit;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: #101116;
  border-radius: 0.35rem;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
}

.btn {
  display: inline-block;
  text-decoration: none;
}

.btn:hover {
  color: #101116;
  background: var(--lime);
}

.menu-toggle {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--violet);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.menu-toggle:hover, .menu-toggle[aria-expanded="true"] {
  border-color: var(--cyan);
  background: var(--panel);
  color: var(--cyan);
}

.menu-toggle:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}

/* 5. Startseite */

.voices-home-kicker {
  margin: 0 0 1rem;
  color: var(--lime);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.voices-home-lead {
  max-width: 38ch;
  margin: 0 0 1.5rem;
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.45;
}

.content-area .voices-home-lead {
  max-width: 38ch;
}

.voices-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.voices-home-actions p {
  margin: 0;
}

.voices-home-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--violet);
  border-radius: 0.4rem;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.voices-home-actions p:first-child a {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--bg);
}

.voices-home-actions a:hover, .voices-home-actions a:focus-visible,
.voices-home-actions p:first-child a:hover, .voices-home-actions p:first-child a:focus-visible {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--bg);
}

/* 6. Chorleiter: Textumfluss auf großen Displays */

.voices-conductor {
  display: flow-root;
}

.voices-conductor-portrait {
  float: left;
  width: 280px;
  max-width: 40%;
  margin: 0.4rem 1.75rem 1rem 0;
}

.voices-conductor-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

/* 7. Termine: Farben hier zentral ändern.
   Probe:   <li class="voices-event--probe"> (auch Standard ohne Klasse)
   Konzert: <li class="voices-event--konzert">
   Abstände, Raster und Typografie bleiben für beide Varianten gleich. */

.voices-events {
  --event-probe-accent: var(--cyan);
  --event-probe-background: rgba(101, 223, 230, 0.055);
  --event-konzert-accent: var(--lime);
  --event-konzert-background: rgba(197, 222, 89, 0.085);
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.voices-events > li {
  --event-accent: var(--event-probe-accent);
  --event-background: var(--event-probe-background);
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1.5rem;
  margin: 0 0 1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--event-accent);
  border-radius: 8px;
  background: var(--event-background);
  overflow-wrap: anywhere;
}

.voices-events > li.voices-event--probe {
  --event-accent: var(--event-probe-accent);
  --event-background: var(--event-probe-background);
}

.voices-events > li.voices-event--konzert {
  --event-accent: var(--event-konzert-accent);
  --event-background: var(--event-konzert-background);
}

.voices-events .voices-event-date {
  margin: 0;
  color: var(--event-accent);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.voices-events .voices-event-body {
  min-width: 0;
}

.voices-events .voices-event-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

.voices-events .voices-event-body p {
  margin: 0.35rem 0;
}

.voices-events .voices-event-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

/* 8. Notenlinie und Fußbereich */

.music-line {
  width: min(1180px, calc(100% - 3rem));
  margin: 3rem auto 0;
  display: flex;
  gap: 1rem;
  align-items: center;
  color: var(--violet);
  font-family: "Segoe UI Symbol", "Noto Music", serif;
  font-size: 2.7rem;
  line-height: 1.3;
}

.music-line i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--lime), #ef88c6);
}

.music-line span:last-child {
  color: #ef88c6;
}

.site-footer {
  margin-top: 1rem;
  padding-block: 2rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

/* 9. Formulare, Tabellen und Joomla-Meldungen */

input, textarea, select {
  max-width: 100%;
  background: #20222d;
  color: var(--text);
  border: 1px solid #727585;
  border-radius: 0.25rem;
  padding: 0.65rem;
  font: inherit;
}

label {
  display: block;
}

fieldset {
  border: 1px solid var(--line);
}

table {
  border-collapse: collapse;
  max-width: 100%;
}

td, th {
  padding: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.alert, joomla-alert {
  display: block;
  background: var(--panel);
  padding: 1rem;
  border-left: 3px solid var(--cyan);
  margin-block: 1rem;
}

.text-muted, .article-info {
  color: var(--muted);
}

/* 10. Zugänglichkeit: [hidden] bleibt für das Menüskript maßgeblich */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--lime);
  color: #101116;
  padding: 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* 11. Mobile Darstellung: bis 900 px */

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-block: 0.75rem;
  }

  .brand {
    width: 185px;
    min-width: 0;
    max-width: calc(100% - 5.5rem);
  }

  .primary-nav {
    width: 100%;
    flex-basis: 100%;
    text-align: right;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-end;
  }

  .primary-nav li {
    text-align: right;
  }

  .menu-toggle:not([hidden]) {
    display: block;
    margin-left: auto;
  }

  .container {
    width: calc(100% - 2rem);
  }

  .hero {
    padding-block: 2rem;
  }

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

  .content-area {
    padding-block: 2rem;
  }

}

/* Kleine Displays: bis 600 px */

@media (max-width: 600px) {
  .brand {
    width: 165px;
    gap: 0.3rem;
  }

  .brand-title {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .brand-tagline {
    font-size: 0.6875rem;
    letter-spacing: 0.015em;
  }

  .site-footer a {
    display: inline-block;
    padding-block: 0.5rem;
  }

  .voices-events > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    padding: 1.1rem;
  }

  .voices-conductor-portrait {
    float: none;
    width: min(280px, 100%);
    max-width: 100%;
    margin: 1rem auto 1.5rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

}
