/* Vorlage "MGV Tradition" – Männergesangverein 1895 Kiefersfelden e.V. (nach Entwurf E) */

/* Farben und Grundwerte: hier zentral ändern */
:root {
  --rot: #9B1519;
  --rot-dunkel: #5E0C10;
  --gold: #B8862B;
  --gold-hell: #D9B26A;
  --creme: #FAF3E8;
  --creme-hell: #FFF6E6;
  --sand: #F3E6D2;
  --karte: #FFFBF4;
  --linie: #E0CBAA;
  --text: #2A1A14;
  --text-leise: #5C463C;
  --breite: 1160px;
  --schrift: 'Alegreya Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --schrift-titel: 'Alegreya', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 20px;
  line-height: 1.6;
}

a { color: var(--rot); text-underline-offset: 3px; }
a:hover { color: var(--rot-dunkel); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--schrift-titel); font-weight: 800; }

.wrap { max-width: var(--breite); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.sprungmarke { position: absolute; left: -9999px; top: 0; background: var(--text); color: #FFFFFF; padding: 12px 18px; z-index: 10; }
.sprungmarke:focus { left: 12px; top: 12px; color: #FFFFFF; }

/* ---------- Kopf ---------- */
.kopf-innen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 26px;
  padding-bottom: 16px;
}
.logo { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--rot); }
.logo:hover { color: var(--rot-dunkel); }
.logo-zusatz {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--schrift-titel); font-style: italic; font-size: 21px; line-height: 1.2;
}
.zierlinie { display: block; width: 64px; height: 0; border-top: 3px double var(--gold); }
.logo-name { font-family: var(--schrift-titel); font-weight: 800; font-size: 46px; line-height: 1.1; }

.menu-knopf {
  display: none;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--creme-hell);
  background: var(--rot);
  border: 2px solid var(--gold-hell);
  border-radius: 10px;
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
}
.menu-knopf-strich, .menu-knopf-strich::before, .menu-knopf-strich::after {
  display: block; width: 18px; height: 2px; background: var(--creme-hell); position: relative;
}
.menu-knopf-strich::before, .menu-knopf-strich::after { content: ''; position: absolute; left: 0; }
.menu-knopf-strich::before { top: -6px; }
.menu-knopf-strich::after { top: 6px; }

/* Menüband */
.menuband { background: var(--rot); border-top: 4px solid var(--gold); border-bottom: 4px solid var(--gold); }
.menuband ul.menu {
  list-style: none; margin: 0; padding: 12px 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px;
}
.menuband ul.menu a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 22px; border: 2px solid var(--gold-hell); border-radius: 10px;
  color: var(--creme-hell); text-decoration: none; font-size: 19px;
}
.menuband ul.menu a:hover { background: var(--rot-dunkel); color: var(--creme-hell); }
.menuband ul.menu li.menu-current > a,
.menuband ul.menu li.menu-parent > a { background: var(--creme-hell); border-color: var(--creme-hell); color: var(--rot); font-weight: 700; }
.menuband ul.menu ul { display: none; }

/* ---------- Titelbild ---------- */
.titelbild { padding-top: 36px; }
.titelbild-rahmen { border: 3px solid var(--gold); border-radius: 14px; padding: 8px; background: var(--karte); }
.titelbild-rahmen p { margin: 0; }
.titelbild-rahmen img {
  display: block;
  width: 100% !important;
  height: 520px !important;
  object-fit: cover;
  object-position: 50% 70%;
  border-radius: 8px;
}

/* ---------- Unterseiten-Navigation ---------- */
.unternavigation { margin-top: 28px; }
.untermenu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.untermenu a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 6px 16px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--karte); color: var(--text); text-decoration: none; font-size: 17px;
}
.untermenu li.menu-current > a { background: var(--rot); border-color: var(--rot); color: var(--creme-hell); }
.untermenu ul { display: none; }

/* ---------- Einstieg: Hauptinhalt, daneben die rote Kachel ---------- */
.einstieg { padding-top: 48px; padding-bottom: 48px; }
.einstieg.mit-kachel { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }

.inhalt > :first-child { margin-top: 0; }
.inhalt h1 { font-size: 50px; line-height: 1.1; margin: 0 0 18px; max-width: 920px; }
.inhalt h2 { font-size: 34px; line-height: 1.2; margin: 44px 0 14px; color: var(--rot); }
.inhalt h3 { font-size: 26px; line-height: 1.25; margin: 30px 0 10px; }
.inhalt p, .inhalt ul, .inhalt ol { max-width: 760px; }
.inhalt p { margin: 0 0 18px; }
.inhalt h1 + p { font-size: 22px; color: var(--text-leise); }
/* Kleine Zeile über der Hauptüberschrift, z. B. "Willkommen beim MGV …" */
.inhalt p:has(+ h1) { font-family: var(--schrift-titel); font-style: italic; font-size: 23px; color: var(--rot); margin-bottom: 8px; }

/* Bilder passen sich immer der Breite an – auch wenn im Editor eine feste Größe steht */
.inhalt img, .termine img, .kachel img { max-width: 100% !important; height: auto !important; border-radius: 10px; }
.inhalt figure { margin: 24px 0; }

/* Tabellen: am Handy seitlich verschiebbar */
.inhalt table { border-collapse: collapse; width: 100% !important; margin: 16px 0 28px; font-size: 18px; background: var(--karte); }
.inhalt th, .inhalt td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--linie); }
.inhalt th { background: var(--sand); }

.inhalt video, .kachel video { width: 100%; height: auto; border-radius: 10px; background: #000000; }

/* ---------- Kacheln ---------- */
.kachel { background: var(--karte); border-radius: 10px; padding: 8px; box-shadow: inset 0 0 0 1px var(--linie); }
.kachel-innen { border: 2px solid var(--gold-hell); border-radius: 6px; padding: 26px 28px; height: 100%; }
.kachel h2, .kachel h3 { font-size: 32px; line-height: 1.15; margin: 0 0 12px; color: var(--rot); }
.kachel p { margin: 0 0 12px; }
.kachel p:last-child { margin-bottom: 0; }
.kachel a { font-weight: 700; }

.kachel-rot { background: var(--rot); box-shadow: none; color: var(--creme-hell); }
.kachel-rot h2, .kachel-rot h3, .kachel-rot a, .kachel-rot a:hover { color: var(--creme-hell); }
.kachel-rot strong { color: #F2D9A6; }
/* Zwei Noten als Schmuck oben rechts in der roten Kachel */
.kachel-rot .kachel-innen {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='56' viewBox='0 0 64 56' fill='none' stroke='%23F2D9A6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='14' cy='44' rx='8' ry='6' fill='%23F2D9A6'/%3E%3Cellipse cx='44' cy='38' rx='8' ry='6' fill='%23F2D9A6'/%3E%3Cpath d='M21 43 V10 L51 4 V37'/%3E%3Cpath d='M21 18 L51 12'/%3E%3C/svg%3E") no-repeat right 22px top 22px;
}
.kachel-rot h2:first-child, .kachel-rot h3:first-child { padding-right: 76px; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; padding-top: 56px; padding-bottom: 64px; }

/* ---------- Termine als Kärtchen ----------
   Im Bereich "Termine (Kärtchen)": Erweiterung "MGV Termine" (Modus Kärtchen)
   oder von Hand eine Aufzählung, pro Punkt Datum fett, danach der Text. */
.termine-band { background: var(--sand); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.termine { padding-top: 56px; padding-bottom: 56px; }
.termine h2 { font-size: 38px; line-height: 1.2; margin: 0 0 24px; color: var(--rot); }
.termine ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.termine li {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 18px; align-items: center;
  margin: 0; padding: 14px 18px 14px 0; min-height: 96px; overflow-wrap: break-word;
  background: var(--karte); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--linie);
  font-size: 19px; line-height: 1.4;
}
.termine li > strong:first-child {
  align-self: stretch; margin: -14px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 12px 4px; background: var(--rot); color: var(--creme-hell);
  font-size: 16px; font-weight: 700; line-height: 1.1;
}
.termine li > strong:first-child .wt,
.termine li > strong:first-child .mon { font-size: 15px; font-weight: 400; }
.termine li > strong:first-child .zahl { font-family: var(--schrift-titel); font-size: 36px; font-weight: 800; }
.termine p { margin: 20px 0 0; }
.termine p a { font-weight: 700; }

/* ---------- Fuß ---------- */
.fuss { background: var(--rot); border-top: 4px solid var(--gold); color: var(--creme-hell); font-size: 17px; }
.fuss a { color: var(--creme-hell); }
.fuss a:hover { color: #F2D9A6; }
.fuss-innen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 48px; padding-top: 40px; padding-bottom: 20px; }
.fuss-text { display: flex; flex-direction: column; gap: 4px; }
.fuss-text strong { font-family: var(--schrift-titel); font-size: 22px; }
.fuss-text p { margin: 0; }
.fussmenu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.fussmenu a { display: inline-block; padding: 6px 0; }
.foerderhinweis { padding-bottom: 32px; }
.foerderhinweis p { margin: 0; padding-top: 16px; border-top: 1px solid #C9545A; font-style: italic; color: #F7E2C6; }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .kopf-innen { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .logo { align-items: flex-start; flex: 1 1 auto; min-width: 0; }
  .logo-zusatz { font-size: 16px; gap: 8px; }
  .zierlinie { width: 22px; }
  .logo-name { font-size: clamp(17px, 5.2vw, 24px); overflow-wrap: anywhere; }
  .menu-knopf { display: inline-flex; flex: none; gap: 8px; padding: 8px 12px; }
  .menuband { display: none; }
  .menuband.offen { display: block; }
  .menuband ul.menu { flex-direction: column; align-items: stretch; gap: 8px; }
  .menuband ul.menu a { display: flex; }
  .titelbild { padding-top: 16px; }
  .titelbild-rahmen img { height: 240px !important; }
  .einstieg { padding-top: 32px; padding-bottom: 32px; }
  .einstieg.mit-kachel { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .inhalt h1 { font-size: 34px; }
  .inhalt h2, .termine h2 { font-size: 27px; }
  .inhalt table { display: block; overflow-x: auto; }
  .kachel-innen { padding: 22px; }
  .kachel h2, .kachel h3 { font-size: 27px; }
  .termine { padding-top: 40px; padding-bottom: 40px; }
  .kacheln { padding-top: 40px; padding-bottom: 48px; }
}

/* ---------- Druck ---------- */
@media print {
  .menuband, .menu-knopf, .unternavigation, .sprungmarke { display: none !important; }
  body { font-size: 12pt; background: #FFFFFF; }
  .kachel-rot, .fuss { background: none; color: #000000; border: 1px solid #000000; }
  .kachel-rot h2, .kachel-rot a, .fuss a { color: #000000; }
  .termine li > strong:first-child { background: none; color: #000000; border-right: 1px solid #000000; }
}

/* ---------- Kontaktformular (Miniform) – ab 1.0.2 ---------- */
.inhalt .miniform { max-width: 760px; margin: 28px 0 10px; }
.inhalt .miniform form { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px 22px; }
.inhalt .miniform .onethird,
.inhalt .miniform .twothird,
.inhalt .miniform .full { float: none !important; width: auto !important; margin: 0 !important; padding: 0; }
.inhalt .miniform .full { grid-column: 1 / -1; }
.inhalt .miniform label { display: block; width: 100% !important; margin: 0; }
.inhalt .miniform label > span { display: block; font-weight: 700; font-size: 18px; margin: 0 0 6px; color: var(--text); }
.inhalt .miniform label > span span { color: var(--rot); }
.inhalt .miniform input[type=text],
.inhalt .miniform input[type=email],
.inhalt .miniform textarea {
  width: 100%; box-sizing: border-box; padding: 11px 14px; margin: 0;
  font: inherit; font-size: 18px; color: var(--text);
  background: #FFFFFF; border: 1px solid var(--linie); border-radius: 10px;
}
.inhalt .miniform textarea { min-height: 170px; resize: vertical; }
.inhalt .miniform input:focus,
.inhalt .miniform textarea:focus { outline: 3px solid var(--gold-hell); outline-offset: 1px; border-color: var(--gold); }
.inhalt .miniform .grouping { margin: 0; padding: 0; background: none; border: 0; }
.inhalt .miniform table.captcha_table { width: auto !important; margin: 0; background: none; font-size: 18px; }
.inhalt .miniform table.captcha_table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inhalt .miniform table.captcha_table td { padding: 0; border: 0; background: none; }
.inhalt .miniform table.captcha_table .text_captcha { font-weight: 700; white-space: nowrap; }
.inhalt .miniform table.captcha_table input { width: 80px !important; text-align: center; }
.inhalt .miniform .captcha_expl { color: var(--text-leise); font-size: 16px; }
.inhalt .miniform button.submit {
  display: inline-block; width: auto; margin: 4px 0 0; padding: 12px 30px;
  font: inherit; font-size: 19px; font-weight: 700; color: #FFFFFF;
  background: var(--rot); border: 2px solid var(--gold); border-radius: 12px; cursor: pointer;
}
.inhalt .miniform button.submit:hover { background: var(--rot-dunkel); }
.inhalt .miniform .mf-datenschutz { margin: 14px 0 0; font-size: 16px; color: var(--text-leise); }
.inhalt .miniform input.error, .inhalt .miniform textarea.error, .inhalt .miniform .grouping.error {
  background: #FFFFFF; color: var(--text); font-weight: normal; padding: 11px 14px; border: 2px solid var(--rot); margin: 0;
}
.inhalt .miniform .grouping.error { padding: 8px 10px; border-radius: 10px; }
.inhalt .miniform > div.error, .inhalt .miniform > div.ok {
  margin: 0 0 20px; padding: 14px 18px; border-radius: 10px; font-weight: 700; font-size: 18px;
}
.inhalt .miniform > div.error { background: #FBE9E7; color: var(--rot-dunkel); border: 1px solid var(--rot); }
.inhalt .miniform > div.ok { background: var(--sand); color: var(--text); border: 1px solid var(--gold); }
@media (max-width: 640px) {
  .inhalt .miniform form { grid-template-columns: 1fr; }
}

/* ---------- Bildergalerie (Another Image Gallery) – ab 1.0.5 ---------- */
.inhalt .imagegallery { float: none !important; width: auto !important; }
.inhalt .imagegallery hr { display: none; }
.inhalt .imagegallery .pagenumbers { text-align: left; margin: 0 0 20px; font-size: 17px; line-height: 2; }
.inhalt .imagegallery .pagenumbers a:link,
.inhalt .imagegallery .pagenumbers a:visited { color: var(--rot); text-decoration: underline; }
.inhalt .imagegallery .pagenumbers strong { color: var(--text); }
.inhalt .imagegallery .pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; text-align: left; }
.inhalt .imagegallery .picturelink { float: none !important; margin: 0 !important; }
.inhalt .imagegallery .picturelink br { display: none; }
.inhalt .imagegallery .picturelink img {
  display: block; width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 10px; background: var(--sand);
}
.inhalt .imagegallery .picturelink a:hover img { outline: 3px solid var(--gold-hell); }
.inhalt .imagegallery .filename { display: block; margin-top: 6px; font-size: 15px; line-height: 1.3; color: var(--text-leise); text-align: left; overflow-wrap: anywhere; }
.inhalt .imagegallery .clear { clear: both; }
.inhalt .imagegallery::after { content: ""; display: block; clear: both; }
/* Einzelbild-Ansicht */
.inhalt .imagegallery .pictures:has(> img) { display: block; text-align: center; }
.inhalt .imagegallery .pictures > img { width: auto !important; max-width: 100% !important; height: auto !important; max-height: 80vh; border-radius: 10px; }
.inhalt .imagegallery .pictures > a { display: inline-block; margin: 16px 10px 0; font-weight: 700; color: var(--rot); }
@media (max-width: 640px) {
  .inhalt .imagegallery .pictures { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
