/* =========================================================
   markus-diesdorf.de – Ev. Kirchspiel Magdeburg Stadtfeld-Diesdorf
   Zentrales Stylesheet (baut auf Bootstrap 5.3 auf)

   Werte übernommen aus dem alten TYPO3-Template
   ("Anpassung Seiten-Layout / Menü / content-Elemente").
   Die Originalwerte stehen jeweils im Kommentar dabei.
   ========================================================= */


/* --- Farben und Variablen --- */
:root {
    /* EKM-Farben aus dem bisherigen Auftritt */
    --gruen: #94c11f;              /* Menüleiste & Fußzeile (EKM-Grün) */
    --gruen-dunkel: #7a9f19;       /* Hover/aktive Zustände auf Grün */
    --blau: #0568ae;               /* h2-Unterzeilen, "Mehr lesen"-Buttons (EKM-Blau) */
    --blau-link: #1779ba;          /* Links & aktiver Menüpunkt (alt: Foundation-Standard) */
    --grau-ueberschrift: #cccccc;  /* h1 – sehr hell, siehe Hinweis in ARBEITSPLAN.md */
    --grau-text: #848a8b;          /* alt: body color */
    --text: #000000;               /* alt: Fließtext schwarz */
    --grau-hell: #f1f1f1;          /* Hintergrund für Info-Boxen */

    /* Breite der Inhaltsspalte (alt: 70 %) – gilt für Logos, Menü, Inhalt und Fußzeile */
    --inhaltsbreite: 80%;

    /* Schrift wie bisher */
    --schrift: Helvetica, Arial, sans-serif;

    /* Bootstrap-Variablen auf unsere Farben umbiegen */
    --bs-link-color: var(--blau-link);
    --bs-link-color-rgb: 23, 121, 186;
    --bs-link-hover-color: var(--blau);
    --bs-body-font-family: var(--schrift);
    --bs-body-color: var(--text);
}


/* =========================================
   GRUNDEINSTELLUNGEN
   ========================================= */
body {
    font-family: var(--schrift);
    color: var(--text);
    background-color: #ffffff;
    font-size: 14px;           /* wie bisher */
    line-height: 1.4rem;       /* wie bisher */
    letter-spacing: 0.02em;    /* alt: 0.02em */
}

/* Inhaltsbreite: siehe --inhaltsbreite oben
   (Tablet bis 768px: 90 %, Handy bis 400px: volle Breite – siehe unten) */
.container-gemeinde {
    max-width: none;
    width: var(--inhaltsbreite);
}

/* Logos und Menü beginnen am Desktop wie bisher genau am Rand der Inhaltsspalte (ohne Innenabstand) */
@media (min-width: 992px) {
    .logoleiste .container-gemeinde,
    .navbar-gemeinde .container-gemeinde {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Überschriften wie bisher: groß, hellgrau, Versalien */
h1, .h1 {
    text-transform: uppercase;
    font-weight: 500;
    color: var(--grau-ueberschrift);
    font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;  /* wie bisher */
    font-size: 1.7em;          /* wie bisher: 23,8px */
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

/* Unterzeile: klein, blau, Versalien */
h2, .h2 {
    text-transform: uppercase;
    font-weight: 400;
    color: var(--blau);
    font-size: 1em;            /* wie bisher */
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h3, .h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* Bildunterschriften */
.bildunterschrift, figcaption {
    color: var(--grau-text);
    font-style: italic;
    font-size: 0.8rem;
}


/* =========================================
   KOPFBEREICH: Logoleiste
   EKM-Logo links, Gemeinde-Doppellogo rechts
   ========================================= */
.logoleiste {
    background-color: #ffffff;
    padding-top: 8px;          /* wie bisher */
    padding-bottom: 10px;
}

.logoleiste img {
    height: 89px;      /* Originalgröße 312 x 89 px wie bisher */
    width: auto;
    max-width: 100%;
}


/* =========================================
   NAVIGATIONSLEISTE (grün, weiße Versalien)
   ========================================= */
.navbar-gemeinde {
    /* Abstände der Menüpunkte wie bisher: 11,2px oben/unten, 16px seitlich */
    --bs-navbar-nav-link-padding-x: 16px;
    --bs-navbar-padding-y: 0;
    background-color: var(--gruen);
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-gemeinde .nav-link {
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;           /* wie bisher */
    line-height: 14px;         /* wie bisher */
    padding-top: 11.2px;
    padding-bottom: 11.2px;
}

.navbar-gemeinde .nav-link:hover,
.navbar-gemeinde .nav-link:focus {
    color: #ffffff;
    background-color: var(--gruen-dunkel);
}

/* Aktive Seite: alt blau auf grün */
.navbar-gemeinde .nav-link.active,
.navbar-gemeinde .nav-link[aria-current="page"] {
    color: var(--blau);
}

/* Hamburger-Button weiß */
.navbar-gemeinde .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}
.navbar-gemeinde .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-gemeinde .navbar-brand-mobil {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
}

/* Untermenüs */
.navbar-gemeinde .dropdown-menu {
    border: 0;
    border-radius: 0;
    background-color: var(--gruen);
    padding: 0;
}
.navbar-gemeinde .dropdown-item {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;           /* wie bisher */
    line-height: 14px;
    padding: 11.2px 16px;
}
.navbar-gemeinde .dropdown-item:hover,
.navbar-gemeinde .dropdown-item:focus {
    background-color: var(--gruen-dunkel);
    color: #ffffff;
}
.navbar-gemeinde .dropdown-item.active {
    background-color: var(--gruen);
    color: var(--blau);
}
/* Einrückung für die 3. Ebene (z.B. Markus > Geschichte) */
.navbar-gemeinde .dropdown-item.ebene-2 {
    padding-left: 2rem;
    font-weight: 400;
    text-transform: none;
}


/* =========================================
   TITELBILD (volle Breite, 1920 x 500)
   ========================================= */
.titelbild img {
    width: 100%;
    height: auto;
    display: block;
}


/* =========================================
   INHALT
   ========================================= */
main {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Abschnitte auf Unterseiten (z.B. Gemeindeleben: Text + Bild im Wechsel) */
.abschnitt + .abschnitt {
    margin-top: 3rem;
}

/* Blauer Button, alt ".mehrlesenbutton" */
.btn-gemeinde {
    background-color: var(--blau);
    border-color: var(--blau);
    color: #ffffff;
    border-radius: 0;
    padding: 0.2rem 1.2rem;
}
.btn-gemeinde:hover,
.btn-gemeinde:focus {
    background-color: var(--blau-link);
    border-color: var(--blau-link);
    color: #ffffff;
}

/* Terminlisten (Gemeindekreise, Christenlehre ...) */
.terminliste {
    list-style: none;
    padding-left: 0;
}
.terminliste li {
    padding: 0.25rem 0;
}
.terminliste strong {
    font-weight: 700;
}


/* =========================================
   STARTSEITE: schmale rechte Spalte
   Gottesdienste des laufenden Monats + Gemeindebrief
   ========================================= */
.seitenspalte h2 {
    margin-top: 0;
}

.gottesdienste-monat {
    margin-bottom: 2rem;
}

/* Ein Tag = eine Zeile im Raster: links das Datum, rechts die Termine des Tages */
.gottesdienste-monat .gd-tag {
    display: grid;
    grid-template-columns: 3.2rem 1fr;
    column-gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #e6e6e6;
}
.gottesdienste-monat .gd-tag:last-child {
    border-bottom: 0;
}
.gottesdienste-monat .gd-datum {
    font-weight: 700;
    white-space: nowrap;
    /* Datum oben (auf einer Linie mit "Diesdorf, 10 Uhr"), Wochentag darunter */
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
}
.gottesdienste-monat .gd-wochentag {
    display: block;            /* Wochentag unter dem Datum */
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--grau-text);
    text-transform: uppercase;
}
.gottesdienste-monat .gd-eintrag + .gd-eintrag {
    margin-top: 0.3rem;
}
/* "Markuskirche, 10 Uhr" */
.gottesdienste-monat .gd-wo {
    font-weight: 700;
}
/* Predigerin / Prediger: kleiner und grau */
.gottesdienste-monat .gd-wer {
    color: var(--grau-text);
    font-size: 0.85em;
    white-space: nowrap;       /* Name nicht mittendrin umbrechen */
}
/* Besondere Sonntage (Ewigkeitssonntag, 1. Advent ...) */
.gottesdienste-monat .gd-anlass {
    color: var(--grau-text);
}

/* Gemeindebrief "Kirchenfenster": Text links, Titelbild rechts */
.kirchenfenster {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: right;
}
.kirchenfenster img {
    width: 60px;
    height: auto;
    flex-shrink: 0;
}


/* =========================================
   KONTAKT: Personenkarten (Foto + Angaben)
   ========================================= */
.person {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.person img {
    width: 115px;
    height: auto;
    flex-shrink: 0;
}
.person p {
    min-width: 0;
    overflow-wrap: anywhere;   /* lange E-Mail-Adressen dürfen umbrechen */
}
/* Personenkarten als Steckbrief: Foto links, Name/Funktion/Kontakt rechts, Sprechzeiten darunter */
.person-kopf {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.person-kopf > div {
    min-width: 0;
}
.person-foto {
    width: 85px;
    height: auto;
    flex-shrink: 0;
    border-radius: 0.25rem;
}
.person-name {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 0;
}
.personenkarte .person-rolle {
    text-transform: none;      /* Funktion in normaler Schreibung, bricht sauber um */
    font-size: 0.95em;
    margin-bottom: 0.5rem;
}
.person-kontakt {
    margin-bottom: 0;
    font-size: 0.9em;          /* E-Mail-Adresse passt neben das Foto */
    white-space: nowrap;
}
.person-kontakt .bi {
    color: var(--gruen-dunkel);
    margin-right: 0.2em;
}
.person-sprechzeiten {
    border-top: 1px solid #eaeaea;
    padding-top: 0.75rem;
}
.sprechzeit-ort {
    color: var(--grau-text);
}
.karte p {
    overflow-wrap: anywhere;   /* lange E-Mail-Adressen dürfen umbrechen */
}

/* Kartenausschnitt (OpenStreetMap) in den Gemeindebüro-Karten */
.kartenausschnitt img {
    width: 180px;
    height: 180px;
    display: block;
    border: 1px solid #eaeaea;
    border-radius: 0.25rem;
}
.kartenausschnitt figcaption {
    font-style: normal;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}
.kartenausschnitt figcaption a {
    color: var(--grau-text);
}

/* Karten wie auf dornheim.tech: weiß, feiner Rand, weicher Schatten */
.karte {
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
}


/* =========================================
   TEXT MIT BILD (alt: TYPO3 "Text & Bild im Text")
   Bild links oder rechts neben dem Text, Text fließt herum
   ========================================= */
.textbild {
    margin-bottom: 1.5rem;
}
.bild-links,
.bild-rechts {
    width: 300px;              /* wie bisher */
    max-width: 45%;
    margin-bottom: 0.5rem;
    display: flex;             /* zwei Bilder nebeneinander, falls vorhanden */
    gap: 10px;
    align-items: flex-start;
}
.bild-links {
    float: left;
    margin-right: 1.5rem;
}
.bild-rechts {
    float: right;
    margin-left: 1.5rem;
}
.bild-links a,
.bild-rechts a {
    flex: 1 1 0;
}
.bild-links img,
.bild-rechts img,
.bild-einzeln img {
    width: 100%;
    height: auto;
    display: block;
}
.bild-einzeln {
    margin-bottom: 1.5rem;
}


/* =========================================
   BILDREIHEN / GALERIEN (Kirchen, Glockenturm)
   drei Bilder pro Zeile, Bilder in natürlichem Format
   ========================================= */
.galerie {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: start;
    margin-bottom: 1.5rem;
}
.galerie img {
    width: 100%;
    height: auto;
    display: block;
}


/* =========================================
   KACHELN (Übersichtsseiten: Unsere Kirchen, Markus, Diesdorf)
   ========================================= */
.linkliste {
    list-style: none;
    padding-left: 0;
}
.linkliste li {
    padding: 0.3rem 0;
}
.kachel a {
    text-decoration: none;
}
.kachel img {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 0.5rem;
}


/* =========================================
   FUSSZEILE (grün)
   ========================================= */
.fusszeile {
    background-color: var(--gruen);
    color: var(--text);
    padding-top: 10px;         /* wie bisher */
    min-height: 80px;          /* wie bisher */
    font-size: 14px;
}
.fusszeile a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 1.5em;           /* wie bisher */
}
.fusszeile a:hover,
.fusszeile a:focus {
    text-decoration: underline;
}


/* =========================================
   RESPONSIVE ANPASSUNGEN
   ========================================= */

/* Inhaltsbreite wie bisher: Tablet 90 %, Handy volle Breite */
@media (max-width: 768px) {
    .container-gemeinde {
        width: 90%;
    }
}
@media (max-width: 400px) {
    .container-gemeinde {
        width: 100%;
    }
}

/* Tablet / Handy (Bootstrap-Breakpoint lg) */
@media (max-width: 991.98px) {
    .navbar-gemeinde .dropdown-menu {
        background-color: transparent;
        padding-left: 1rem;
    }
    .logoleiste img {
        height: 50px;
    }
}

/* Handy: Überschriften kleiner, Gemeindebrief linksbündig */
@media (max-width: 575.98px) {
    /* Bilder neben dem Text werden auf dem Handy zu Bildern über dem Text */
    .bild-links,
    .bild-rechts {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .galerie {
        grid-template-columns: repeat(2, 1fr);
    }
    h1, .h1 {
        font-size: 1.3em;
    }
    .logoleiste img {
        height: 40px;
    }
    .kirchenfenster {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row-reverse;
    }
}
