@import "/schriften/schriften.css";

/* --------------------------------------------------------------------------
   Gestaltungswerte, aus der bisherigen Seite uebernommen.
   Die Farben stammen aus der Impreza-Palette, die Schriftgroessen aus
   deren Typografie-Einstellung. Wer etwas aendern will, aendert es hier.
   -------------------------------------------------------------------------- */
:root {
    --ekbo: #62358c;
    --ekbo-dunkel: #4a2769;
    --ekbo-hell: #f7f5fa;

    --grund: #ffffff;
    --grund-getoent: var(--ekbo-hell);
    --ueberschrift: #2c2a33;
    --text: #4a4852;
    --leise: #767380;
    --linie: #e8e8e8;

    --breite: 1140px;
    --rundung: 0.3rem;
    --abstand: clamp(3rem, 6vw, 5.5rem);
    --kopfhoehe: 4.5rem;

    --schrift: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --grad: clamp(1rem, 0.9rem + 0.35vw, 1.1875rem);   /* 16 -> 19 px */
    --zeile: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Damit ein Sprungziel nicht unter der Kopfzeile verschwindet. */
    scroll-padding-top: calc(var(--kopfhoehe) + 1rem);
}

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

body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift);
    font-size: var(--grad);
    font-weight: 400;
    line-height: var(--zeile);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ueberschrift);
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.5rem); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.125rem); }
h3 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem); }
h4 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ekbo); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--ekbo-dunkel); }

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

:where(a, button, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--ekbo);
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Kopfzeile ---------------------------------------------------------- */

.kopf {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--linie);
}

.kopf-innen {
    max-width: var(--breite);
    margin-inline: auto;
    padding: 0 1.25rem;
    min-height: var(--kopfhoehe);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.kopf-logo { flex: 0 0 auto; display: flex; align-items: center; }
.kopf-logo img { height: 2.5rem; width: auto; }

.kopf-name {
    font-size: 0.8rem;
    line-height: 1.25;
    color: var(--leise);
    max-width: 15ch;
}

.navigation { margin-left: auto; }

.navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation a {
    display: block;
    padding: 0.4rem 0;
    color: var(--text);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.navigation a:hover { color: var(--ekbo); }

/* Die Sprungnavigation hebt hervor, wo man gerade steht. */
.navigation a[aria-current="true"] {
    color: var(--ekbo);
    border-bottom-color: var(--ekbo);
}

.nav-schalter {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--linie);
    border-radius: var(--rundung);
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

@media (max-width: 940px) {
    .kopf-innen { flex-wrap: wrap; padding-block: 0.6rem; }
    .nav-schalter { display: block; }
    .navigation { flex-basis: 100%; margin-left: 0; }
    .navigation[hidden] { display: none; }
    .navigation ul { flex-direction: column; gap: 0; padding-block: 0.5rem; }
    .navigation a { padding: 0.65rem 0; border-bottom: 1px solid var(--linie); }
    .navigation a[aria-current="true"] { border-bottom-color: var(--ekbo); }
}

/* --- Abschnitte --------------------------------------------------------- */

.abschnitt { padding-block: var(--abstand); }
.abschnitt.getoent { background: var(--grund-getoent); }

.innen {
    max-width: var(--breite);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.schmal { max-width: 44rem; }

.vorspann {
    font-size: 1.1em;
    color: var(--text);
    max-width: 44rem;
}

/* --- Ankunft ------------------------------------------------------------ */

.ankunft { padding-block: clamp(3.5rem, 9vw, 7rem); }

.ankunft p {
    font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
    line-height: 1.5;
    max-width: 30ch;
    color: var(--ueberschrift);
    text-wrap: balance;
}

.knopf {
    display: inline-block;
    margin-top: 1.75rem;
    padding: 0.8em 1.6em;
    background: var(--ekbo);
    color: #fff;
    border-radius: var(--rundung);
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s;
}

.knopf:hover { background: var(--ekbo-dunkel); color: #fff; }

/* --- Ausklapper --------------------------------------------------------- */

details { margin-top: 0.9rem; }

details > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    color: var(--ekbo);
    font-size: 0.95rem;
    list-style: none;
    padding: 0.3rem 0;
}

details > summary::-webkit-details-marker { display: none; }

details > summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s;
}

details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details[open] > summary { margin-bottom: 0.4rem; }

/* Fragen und Impressum: jede Zeile eine eigene Klappe mit Trennlinie. */
.klappliste { border-top: 1px solid var(--linie); }

.klappliste > details {
    margin: 0;
    border-bottom: 1px solid var(--linie);
}

.klappliste > details > summary {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    color: var(--ueberschrift);
    font-size: 1.05rem;
}

.klappliste > details > summary:hover { color: var(--ekbo); }
.klappliste > details > div { padding-bottom: 1.25rem; }

/* --- Kirchen ------------------------------------------------------------ */

.kirche {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    padding-block: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--linie);
}

.kirche:first-of-type { border-top: 0; padding-top: 1rem; }

.kirche-bild img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--rundung);
}

.kirche h3 { margin-top: 0; }

@media (max-width: 760px) {
    .kirche { grid-template-columns: 1fr; }
}

/* --- Bilderreihen ------------------------------------------------------- */

.bilderreihe {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0;
    list-style: none;
}

.bilderreihe img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--rundung);
    background: var(--grund-getoent);
}

/* Kirchenaufnahmen liegen quer, Plakate hochkant. */
.bilderreihe.quer {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
}

.bilderreihe.quer img { aspect-ratio: 4 / 3; }

.plakate {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: 1.25rem;
    margin-top: 0;
}

.plakate img { aspect-ratio: auto; }

/* Ein Bild gross ansehen. <dialog> statt Leuchtkasten-Bibliothek. */
.bilderreihe button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: var(--rundung);
}

.leuchtkasten {
    max-width: min(95vw, 1100px);
    max-height: 92vh;
    padding: 0;
    border: 0;
    border-radius: var(--rundung);
    background: transparent;
}

.leuchtkasten::backdrop { background: rgba(15, 19, 31, 0.88); }
.leuchtkasten img { max-height: 88vh; width: auto; margin-inline: auto; border-radius: var(--rundung); }

.leuchtkasten-zu {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

/* --- Gemeindebrief ------------------------------------------------------ */

.beitrag {
    padding-block: 1.75rem;
    border-top: 1px solid var(--linie);
    max-width: 44rem;
}

.beitrag:first-of-type { border-top: 0; }
.beitrag h4 { margin-bottom: 0.35rem; }

.beitrag-anriss, .beitrag-rest {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--leise);
}

.beitrag-rest > p:first-child { margin-top: 0; }

/* Anriss und Fortsetzung sollen wie ein Fliesstext wirken, nicht wie zwei
   Bloecke - deshalb sitzt die Klappe direkt am Absatzende. */
.beitrag details { margin-top: 0.25rem; }

/* --- Kontakt ------------------------------------------------------------ */

.personen {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.person {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.person.ohne-bild { grid-template-columns: 1fr; }

.person img {
    width: 7.5rem;
    height: 7.5rem;
    object-fit: cover;
    border-radius: 50%;
}

.person h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.person p { font-size: 0.95rem; margin-bottom: 0.5rem; }

@media (max-width: 420px) {
    .person { grid-template-columns: 1fr; }
}

/* --- Kalender ----------------------------------------------------------- */

.kalender {
    margin-top: 1.5rem;
    border: 1px solid var(--linie);
    border-radius: var(--rundung);
    overflow: hidden;
    background: #fff;
}

.kalender iframe { width: 100%; height: 640px; border: 0; display: block; }

/* --- Fusszeile ---------------------------------------------------------- */

.fuss {
    padding-block: 2.5rem;
    border-top: 1px solid var(--linie);
    font-size: 0.9rem;
    color: var(--leise);
}

.fuss a { color: var(--leise); }
.fuss a:hover { color: var(--ekbo); }

/* Nur fuer Vorlese-Programme sichtbar. */
.nur-vorlesen {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.zum-inhalt {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    z-index: 100;
    background: var(--ekbo);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: var(--rundung);
}

.zum-inhalt:focus { left: 0.5rem; color: #fff; }

@media print {
    .kopf, .nav-schalter, .knopf { display: none; }
    details { display: block; }
    details > summary { display: none; }
    .abschnitt { padding-block: 1.5rem; }
}

/* --------------------------------------------------------------------------
   Redaktionsmodus. Nur sichtbar, wenn die Seite mit ?redaktion aufgerufen
   wurde - fuer alle anderen Besucher existiert nichts davon.
   -------------------------------------------------------------------------- */

.redaktion .redaktion-stelle {
    outline: 1px dashed rgba(98, 53, 140, 0.35);
    outline-offset: 4px;
    border-radius: 2px;
    cursor: text;
    transition: outline-color 0.15s, background 0.15s;
}

.redaktion .redaktion-stelle:hover {
    outline: 2px solid var(--ekbo);
    background: rgba(98, 53, 140, 0.05);
}

.redaktion-feld {
    margin: 0.5rem 0 1rem;
    padding: 0.85rem;
    border: 2px solid var(--ekbo);
    border-radius: var(--rundung);
    background: #fff;
    box-shadow: 0 6px 24px rgba(15, 19, 31, 0.12);
}

.redaktion-woher {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: var(--leise);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}

.redaktion-feld textarea {
    width: 100%;
    min-height: 7rem;
    padding: 0.7rem;
    border: 1px solid var(--linie);
    border-radius: var(--rundung);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    resize: vertical;
    box-sizing: border-box;
}

.redaktion-feld textarea:focus {
    outline: 2px solid var(--ekbo);
    outline-offset: 1px;
    border-color: transparent;
}

.redaktion-knoepfe {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.redaktion-knoepfe button {
    padding: 0.5em 1.1em;
    border: 1px solid var(--ekbo);
    border-radius: var(--rundung);
    background: var(--ekbo);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.redaktion-knoepfe button[data-tun="abbrechen"] {
    background: none;
    color: var(--ekbo);
}

.redaktion-knoepfe button:disabled { opacity: 0.5; cursor: default; }

.redaktion-stand { font-size: 0.85rem; color: var(--leise); }

.redaktion-balken {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.7rem 1rem;
    background: var(--ueberschrift);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
}

.redaktion-balken.ist-gut      { background: #2f6b3a; }
.redaktion-balken.ist-schlecht { background: #8c2f2f; }

.redaktion-text { flex: 1 1 12rem; min-width: 0; }

.redaktion-aktionen {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.redaktion-balken button {
    padding: 0.5em 1.1em;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--rundung);
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.redaktion-balken button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.redaktion-balken button:disabled { opacity: 0.55; cursor: default; }

/* Der Anmeldeknopf ist das, was man hier zuerst tun soll. */
.redaktion-anmelden {
    background: #fff !important;
    color: var(--ueberschrift) !important;
    border-color: #fff !important;
    font-weight: 600;
}


}
