/* ==========================================================================
   1. DESIGN SYSTEM & VARIABLEN
   ========================================================================== */
:root {
    --color-primary: #101f36;   /* Edles Johannisblau */
    --color-accent: #c5a059;    /* Mattgold / Messing */
    --color-bg: #f8f9fa;        /* Off-White */
    --color-surface: #ffffff;   /* Weiß für Karten & Boxen */
    --color-text: #212529;      /* Anthrazit für perfekte Lesbarkeit */
    --color-muted: #6c757d;

    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   2. GLOBALE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: 80px; 
    scroll-behavior: smooth;  
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7; /* Auf 1.7 erhöht für bessere Lesbarkeit */
    font-size: 16px;
}

h1, h2, h3, h4 { /* h4 hinzugefügt */
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Vereinheitlicht alle Standard-Absätze auf der gesamten Webseite */
p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1.2rem;
}

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

/* ==========================================================================
   3. NAVIGATION (STICKY HEADER)
   ========================================================================== */
.main-header {
    background-color: var(--color-primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
    font-weight: bold;
}

.logo-img {
    height: 55px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.03);
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    transition: color 0.3s;
    font-weight: 600;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-accent);
}

/* Burger Menu Button (Mobil) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--color-accent);
    transition: all 0.3s;
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero-section {
    background: linear-gradient(rgba(16, 31, 54, 0.85), rgba(16, 31, 54, 0.85)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23c5a059" stroke-width="0.5" opacity="0.1"/></svg>');
    color: white;
    text-align: center;
    padding: 8rem 2rem;
}

.hero-section h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem; /* Sorgt für feinen Abstand zum Untertitel */
}

/* NEU: Gezieltes Styling für den Untertitel für maximale Lesbarkeit */
.hero-section .subtitle {
    color: #ffffff;          /* Garantiert klares, leuchtendes Weiß */
    font-size: 1.25rem;      /* Etwas größer als zuvor */
    font-weight: 500;        /* Minimal kräftiger für besseren Kontrast */
    letter-spacing: 0.03em;  /* Leicht edel auseinandergezogen */
    opacity: 0.95;           /* Volle Deckkraft */
}

.geometry-divider {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent);
    margin: 2rem auto 0;
}

/* ==========================================================================
   5. LAYOUT & TEXT-KAPITEL
   ========================================================================== */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Einheitliche Struktur für jedes Kapitel */
.text-page-section {
    margin-bottom: 5rem;
    scroll-margin-top: 100px;
    width: 100%;
}

/* Optionale Hintergrundkarte zur visuellen Auflockerung (z.B. Loge) */
.text-page-section.bg-surface-card {
    background-color: var(--color-surface);
    padding: 60px 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02), inset 0 -1px 3px rgba(0,0,0,0.02);
    border-radius: 4px;
}

/* Die goldene Symmetrie-Klasse für optimalen Lesefluss auf Desktop */
.section-container-narrow {
    max-width: 750px;
    margin: 0 auto;
    text-align: left;
}

/* Systemweite Überschriften mit harmonisiertem goldenen Strich */
.text-page-section h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 14px;
    text-align: left;
    letter-spacing: 0.05em;
}

.text-page-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 65px;
    height: 3px;
    background-color: var(--color-accent);
}

/* --- LISTENELEMENTE & TEXTBLÖCKE --- */

/* 1. Liste für Freimaurerei-Aufnahmen */
.lodge-requirements-list {
    list-style-type: none;
    padding-left: 0;
    margin: 30px 0;
    text-align: left;
}

.lodge-requirements-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 24px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.lodge-requirements-list li::before {
    content: "•";
    position: absolute;
    left: 5px;
    top: -2px;
    color: var(--color-primary);
    font-size: 1.4rem;
}

.lodge-requirements-list li strong {
    color: var(--color-primary);
    font-weight: 600;
}

.lodge-requirements-list li:last-child {
    margin-bottom: 0;
}

/* 2. Liste für das "Wir"-Kapitel (Quadratische Punkte) */
.lodge-styled-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.lodge-styled-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.7;
    text-align: justify;
}

.lodge-styled-list li::before {
    content: '■'; 
    position: absolute;
    left: 5px;
    top: 1px;
    color: var(--color-accent);
    font-size: 0.75rem;
}

/* Textblock für das "Loge"-Kapitel */
.lodge-text-block p {
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
    line-height: 1.7;
    text-align: justify;
    color: var(--color-text);
}

/* Das edle Lessing-Zitat */
.classic-blockquote {
    margin: 35px 0;
    padding: 15px 0 15px 24px;
    border-left: 4px solid var(--color-primary);
    font-style: italic;
    font-size: 1.15rem;
    color: #444444;
    line-height: 1.6;
    background-color: rgba(16, 31, 54, 0.02);
    border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   6. ALLGEMEINE KOMPONENTEN (GRIDS & CARDS)
   ========================================================================== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.card-featured {
    background-color: var(--color-surface);
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.8rem 2rem;
    font-weight: bold;
    border-radius: 2px;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: #b38f48;
}

/* --- TERMINE / AKTUELL --- */
.appointments-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appointment-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(12, 35, 64, 0.04);
    border-left: 4px solid var(--color-accent);
    align-items: center;
}

.appointment-date {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    white-space: nowrap;
    background: rgba(16, 31, 54, 0.03);
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
}

.appointment-details {
    font-size: 1.05rem;
    color: #333333;
}

.appointment-time {
    display: block;
    font-size: 0.85rem;
    color: #666666;
    margin-bottom: 4px;
}

/* --- SPEZIFISCHE LINK-LISTE --- */
.lodge-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lodge-links-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 1.1rem;
    line-height: 1.5;
}

/* Stilvoller kleiner Richtungspfeil anstelle eines Standardpunkts */
.lodge-links-list li::before {
    content: "➔"; 
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent); /* Mattgold */
    font-size: 0.9rem;
}

.lodge-links-list a {
    color: var(--color-primary); /* Johannisblau */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

/* Visuelles Feedback beim Drüberfahren */
.lodge-links-list a:hover {
    color: var(--color-accent);
    border-bottom: 1px solid var(--color-accent);
}

.lodge-links-list li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   7. RESPONSIVE TABELLE (ARBEITSPLAN)
   ========================================================================== */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-surface);
    margin-top: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.schedule-table th, .schedule-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.schedule-table th {
    background-color: var(--color-primary);
    color: white;
    font-family: var(--font-heading);
}

/* ==========================================================================
   8. MODERNES KONTAKTFORMULAR (CSS GRID)
   ========================================================================== */
.contact-container {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}

.contact-subtitle {
    color: #555555;
    margin-bottom: 35px;
    font-size: 1.05rem;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px 24px;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(12, 35, 64, 0.06);
    text-align: left;
}

/* Grid-Spalten-Zuweisung */
.col-12 { grid-column: span 12; }
.col-9  { grid-column: span 9; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333333;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    background-color: #ffffff;
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 31, 54, 0.08);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical; /* Schutz des Grids: Nur vertikal ziehbar */
}

.btn-submit {
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 31, 54, 0.15);
}

.btn-submit:hover {
    background-color: #1a3256;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 31, 54, 0.25);
}

.btn-submit:active {
    transform: translateY(1px);
}

.form-status {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    display: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-status.success {
    display: block;
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-status.error {
    display: block;
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--color-primary);
    color: #a0a0a0;
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 2px solid var(--color-accent);
}

.footer-nav a {
    color: #a0a0a0;
    text-decoration: none;
}

/* ==========================================================================
   10. GLOBALE RESPONSIVE ANPASSUNGEN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    /* Menü-Transformation zu Mobil-Overlay */
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        padding: 2rem 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav li {
        margin: 1rem 0;
    }

    /* Kapitel-Abstände auf Smartphones komprimieren */
    .text-page-section {
        margin-bottom: 3.5rem;
    }

    .text-page-section h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    /* Blocksatz für flüssigere Lesbarkeit auf Mobilgeräten abschalten */
    .lodge-styled-list li, 
    .lodge-text-block p {
        font-size: 1rem;
        text-align: left;
    }

    /* Grids klappen sauber einspaltig untereinander */
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-featured {
        padding: 1.75rem;
    }

    .hero-section {
        padding: 4rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    /* Tabelle transformiert sich zu mobilen Info-Karten */
    .schedule-table, .schedule-table tbody, .schedule-table tr, .schedule-table td {
        display: block;
        width: 100%;
    }

    .schedule-table thead {
        display: none; /* Versteckt den Tabellenkopf im Mobilmodus */
    }

    .schedule-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--color-accent);
        padding: 1rem;
        background: white;
    }

    .schedule-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #f4f3ef;
    }

    .schedule-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: var(--color-primary);
    }
}

@media (max-width: 600px) {
    /* Mobil-Optimierung für das Grid-Kontaktformular */
    .contact-form-grid {
        padding: 25px 20px;
        gap: 16px 0;
    }

    .contact-form-grid > .form-group {
        grid-column: span 12; /* Alle Formularfelder nehmen die volle Breite ein */
    }
}

/* ==========================================================================
   SECTION: GESCHICHTE (HISTORIE)
   ========================================================================== */
.history-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr; /* Asymmetrisch: Text hat mehr Platz */
    gap: 50px;
    align-items: start;
}

/* Bild-Karten in der Sidebar */
.history-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.history-card {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--color-accent); /* Mattgoldene Akzentlinie oben */
    margin: 0;
}

.history-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    object-fit: cover;
}

.history-card figcaption {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--color-text);
    text-align: center;
}

.history-card figcaption strong {
    color: var(--color-primary);
}

/* Spezifisches Styling für das Porträt */
.portrait-card img {
    max-width: 220px;
    margin: 0 auto 15px auto;
}

.portrait-card .role {
    display: block;
    margin-top: 8px;
    font-style: italic;
    font-size: 0.88rem;
    color: var(--color-muted);
}

/* Kasten für bedeutende Brüder */
.famous-brothers-box {
    margin-top: 40px;
    background-color: var(--color-surface);
    border: 1px solid rgba(197, 160, 89, 0.3); /* Sanfter Goldrand */
    border-left: 5px solid var(--color-accent); /* Markanter Goldbalken links */
    padding: 25px;
    border-radius: 4px;
}

.famous-brothers-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
}

.brothers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brothers-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.05rem;
}

.brothers-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.brothers-list a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.brothers-list a:hover {
    color: var(--color-accent);
}

.brothers-list .dates {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-left: 5px;
}

/* --- Responsive Anpassung für Tablets & Smartphones --- */
@media (max-width: 992px) {
    .history-grid {
        grid-template-columns: 1fr; /* Wechselt auf einspaltig */
        gap: 40px;
    }
    
    .history-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Bilder nebeneinander falls Platz ist */
        gap: 20px;
    }
}