/* =========================================
   1. Lokale Schriften einbinden (WOFF2)
========================================= */

@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local(''),
         url('fonts/cinzel-v26-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local(''),
         url('fonts/cinzel-v26-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local(''),
         url('fonts/lora-v37-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Lora';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: local(''),
         url('fonts/lora-v37-latin-italic.woff2') format('woff2');
}

/* =========================================
   2. Grundlegende Stilvorgaben & Farben
========================================= */
:root {
    --primary-color: #5b1e32; 
    --secondary-color: #f4f1ea; 
    --text-color: #333333;
    --white: #ffffff;
    --dark-grey: #555555;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lora', serif;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.7;
    font-size: 1.1rem;
    width: 100%;
    /* overflow-x: clip schützt vor horizontalem Scrollen, zerstört aber nicht den Sticky-Header! */
    overflow-x: clip; 
}

/* Fallback für ältere iPads, falls clip nicht erkannt wird */
@supports not (overflow-x: clip) {
    body {
        overflow-x: hidden;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
}

/* =========================================
   3. Header und Navigation
========================================= */
header {
    background-color: rgba(255, 255, 255, 0.92); 
    -webkit-backdrop-filter: blur(12px); 
    backdrop-filter: blur(12px); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); 
    position: -webkit-sticky; 
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 4rem; /* Standard-Ränder */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6rem; /* Ihr bewährter Airbag */
}

/* --- Veredeltes Logo mit Symbol --- */
.logo {
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    line-height: 1.1;
    transition: transform 0.3s ease; 
    padding: 0.5rem 0; 
}

.logo-icon {
    height: 60px; 
    width: auto; 
    transition: transform 0.3s ease; 
}

.logo-text {
    text-align: left; 
    white-space: nowrap; /* NEU: Verbietet den Umbruch von "Basilika Loretto" */
}

.logo-text span {
    font-family: var(--font-body);
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #888;
    margin-top: 0.3rem;
    text-transform: uppercase; 
    letter-spacing: 2px; 
    opacity: 0.7; 
    transition: all 0.3s ease; 
}

.logo:hover { transform: translateY(-2px); }
.logo:hover .logo-icon { transform: scale(1.05); }
.logo:hover .logo-text span {
    color: var(--primary-color); 
    opacity: 1; 
    letter-spacing: 3px; 
}

/* Mobiles Menü Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

/* Navigation - Desktop (Mariazell-Prinzip) */
nav {
    display: flex;
    gap: 25px; /* <--- Die magischen 35px für die perfekte Desktop-Balance! */
    align-items: center; 
    transition: gap 0.4s ease;
}

nav a {
    font-family: var(--font-body);
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s, font-size 0.4s ease;
    white-space: nowrap;
}

nav a:hover { color: var(--primary-color); }

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    display: inline-block;
    font-size: 0.7em;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

#main-nav > a, .dropdown-link {
    position: relative;
    padding-bottom: 5px; 
}

#main-nav > a::after, .dropdown-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

#main-nav > a:hover::after,
.dropdown:hover .dropdown-link::after,
#main-nav > a.active::after {
    width: 100%;
    left: 0;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px); 
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    border-top: 3px solid var(--primary-color); 
    flex-direction: column;
    z-index: 1001;
    padding: 0.5rem 0;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.dropdown-menu a {
    padding: 0.8rem 1.5rem;
    display: block;
    color: var(--dark-grey);
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover {
    background-color: #faf9f6;
    color: var(--primary-color);
    padding-left: 2rem; 
}

@media (min-width: 1024px) { 
    .dropdown-menu {
        display: flex; /* Immer flexibel im DOM für saubere Hover-Animationen */
        visibility: hidden;
        pointer-events: none;
    }
    
    /* Brücke gegen Abrutschen beim Hovern */
    .dropdown::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 25px;
        background: transparent;
    }

    .dropdown:hover .dropdown-menu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0); 
    }
    .dropdown:hover .dropdown-arrow {
        transform: rotate(180deg);
        color: var(--primary-color);
    }
}

/* =========================================
   Navigation - Mobile / Tablet Anpassungen (SLIDE-IN ab 1023px)
========================================= */

/* --- Der EINE Sprung: Mittlerer Desktop & iPad Querformat --- */
@media (max-width: 1380px) and (min-width: 1024px) {
    
    .header-container { 
        padding: 0.8rem 3rem; /* Die perfekten Ränder für das iPad */
        
        /* HIER IST DIE RETTUNG: Wir überschreiben den riesigen 5rem Desktop-Airbag 
           und holen uns den perfekten, kleineren Abstand für das Tablet zurück! */
        gap: 2rem; 
    }
    
    .logo { font-size: 1.4rem; gap: 0.7rem; }
    .logo-icon { height: 45px; } 
    
    nav { gap: 12px; } /* Das Menü rückt zusammen */
    nav a { font-size: 0.95rem; } 
}

@media (max-width: 1023px) { 
    
    .header-container { padding: 0.5rem 1.5rem; }
    
    .logo {
        gap: 0.5rem; 
        padding: 0.2rem 0; 
    }

    .logo-icon { height: 38px; }
    .logo-text { font-size: 1.25rem; }
    .logo-text span {
        font-size: 0.65rem; 
        margin-top: 0.15rem; 
    }

    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem; 
    }

nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0; 
        position: absolute;
        top: 100%; 
        right: 0; 
        width: 260px; 
        max-width: 85vw; 
        background-color: var(--white);
        margin-top: 0;
        padding-top: 0; 
        padding-bottom: 2rem; 
        border-left: 1px solid #eee;
        border-bottom: 1px solid #eee;
        border-radius: 0 0 0 12px; 
        box-shadow: -10px 15px 30px rgba(0,0,0,0.08); 
        
        /* NEU: Das Menü wird "abgeschnitten", statt aus dem Bild geschoben zu werden */
        clip-path: inset(0 0 0 100%);
        opacity: 0;
        visibility: hidden;
        transition: clip-path 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, visibility 0.4s;
        
        max-height: calc(100vh - 60px);
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    nav.active {
        /* NEU: Der Schnitt wird aufgehoben, das Menü wird sichtbar */
        clip-path: inset(0 0 0 0); 
        opacity: 1;
        visibility: visible;
    }

    nav a {
        padding: 0.5rem 1.2rem; /* <--- HIER: Padding leicht reduziert für elegantere Optik (vorher 1.5rem) */
        width: 100%;
        box-sizing: border-box;
        border-bottom: 1px solid #e0e0e0; 
        text-align: left; 
    }

    #main-nav > a::after, .dropdown-link::after { display: none; }

    .dropdown {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .dropdown-link {
        display: flex;
        justify-content: space-between; 
        width: 100%;
        box-sizing: border-box;
    }

    .dropdown-menu {
        position: static; 
        box-shadow: none;
        background-color: #faf9f6; 
        width: 100%;
        padding-left: 0;
        box-sizing: border-box;
        border-left: 3px solid var(--primary-color); 
        border-right: none; 
        border-top: none;
        margin-top: 0;
        display: none;
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        transform: none;
        border-radius: 0;
    }

    .dropdown-menu a {
        padding: 0.4rem 1rem 0.4rem 2.5rem; 
        border-bottom: 1px solid #e0e0e0;
    }
    
    .dropdown-menu a:hover {
        padding-left: 2.5rem; 
        color: var(--primary-color);
    }

    /* Dropdowns per Klick öffnen (.open Klasse) - KEIN Mouse-Hover mehr im mobilen Menü */
    .dropdown.open .dropdown-menu { 
        display: flex; 
    }
    .dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
        color: var(--primary-color);
    }
}

/* =========================================
   4. Hero Section Allgemein
========================================= */
.hero {
    position: relative;
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    box-sizing: border-box; 
    overflow: hidden;
    z-index: 1; 
    padding: clamp(1rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 4vh, 2.5rem);
    min-height: calc(100vh - 85px); 
    min-height: calc(100dvh - 85px);
    width: 100%; 
}

.hero::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/basilika_1.webp') center 20% / cover no-repeat;
    filter: blur(1px);
    z-index: -1;
}

@media (min-width: 1024px) {
    .hero {
        width: 90%;
        max-width: 1400px;
        
        /* KORREKTUR: Zwingt alle Unterseiten-Header auf exakt 40% Bildschirmhöhe. Kein Zoom, keine Übergröße! */
        height: 40vh; 
        min-height: 40vh; 
        
        margin-left: auto;
        margin-right: auto;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    .hero::before { border-radius: inherit; }
}

.hero h1.hero-title {
    margin: 0; 
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    animation: fadeUp 1s ease-out forwards;
}

.welcome-text {
    font-family: var(--font-body); 
    font-style: normal; 
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    color: var(--secondary-color);
    letter-spacing: 1px;
    text-transform: uppercase; 
}

.loretto-text {
    font-family: var(--font-heading); 
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 5rem); 
    color: var(--white);
    letter-spacing: clamp(4px, 1vw, 12px);
    text-transform: uppercase;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .hero h1.hero-title {
        line-height: 1.1;
        gap: 0.6rem;
    }
    .welcome-text { margin-bottom: 0; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero p.hero-subtitle {
    color: var(--white);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    margin: 0;
    max-width: clamp(300px, 80%, 750px);
    opacity: 0; 
    animation: fadeUp 1s ease-out 0.3s forwards; 
}

.hero .btn {
    opacity: 0; 
    animation: fadeUp 1s ease-out 0.6s forwards; 
}

.btn {
    display: inline-block;
    background-color: var(--white); 
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* =========================================
   5. WOW-EFFEKT: SPEZIELLES STARTSEITEN-LAYOUT
========================================= */

.hero-home {
    min-height: 75vh !important; 
    padding-bottom: 10rem !important; 
    justify-content: center;
}

.hero-home::before {
    background: linear-gradient(to bottom, rgba(40, 30, 25, 0.3) 0%, rgba(60, 45, 35, 0.85) 100%), url('bilder/basilika_1.webp') center 20% / cover no-repeat !important;
    filter: none !important; 
}

@media (min-width: 1024px) {
    .hero-home {
        /* NEU: Fixe Höhe auch für die große Startseite */
        height: 85vh !important; 
        min-height: 600px !important;
        margin-bottom: 0 !important; 
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
}

.hero-home .welcome-text {
    font-family: var(--font-body);
    font-style: italic; 
    text-transform: none; 
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    color: var(--white);
    font-weight: 400;
    letter-spacing: 0;
}

.hero-home .loretto-text {
    font-size: clamp(3.5rem, 9vw, 6.5rem); 
    text-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    margin-top: -0.5rem;
}

/* =========================================
   6. Hauptinhalt (Kacheln & Overlap)
========================================= */
.main-content {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.home-content {
    margin-top: -120px !important; 
    position: relative;
    z-index: 10; 
    padding-top: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Zwingend 3 Spalten am Desktop & iPad Querformat */
    gap: 2rem;
}

.card {
    background-color: rgba(255, 255, 255, 0.98); 
    -webkit-backdrop-filter: blur(10px); 
    backdrop-filter: blur(10px); 
    border-top: 4px solid var(--primary-color); 
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column; 
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-link {
    margin-top: auto; 
    align-self: center; 
    padding-top: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.card-link:hover { border-bottom: 1px solid var(--primary-color); }

/* =========================================
   7. Sekundäre kleine Kacheln (Startseite unten)
========================================= */
.grid-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Zwingend 3 Spalten am Desktop & iPad Querformat */
    margin-top: 2rem; 
    gap: 1.5rem; 
}

.card-small {
    padding: 1.5rem; 
    border-top: 2px solid var(--primary-color); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

.card-small h3 {
    font-size: 1.25rem; 
    margin-bottom: 0.5rem;
}

.card-small p {
    font-size: 0.95rem; 
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--dark-grey);
}

.card-small .card-link {
    padding-top: 1rem;
    font-size: 0.95rem; 
}

/* --- Mobiler Umbruch für ALLE Kacheln (iPad Hochformat & Handys) --- */
@media (max-width: 1023px) {
    /* KORREKTUR: Alle Grid-Arten der Unterseiten hier hinzugefügt, 
       damit sie synchron zum Hamburger-Menü einreihig werden! */
    .grid, 
    .grid-small, 
    .team-grid, 
    .pfarrblatt-grid, 
    .info-grid { 
        grid-template-columns: 1fr; /* Zwingend 1 Spalte ab 1023px */
        max-width: 600px; /* Begrenzt die maximale Breite, damit sie nicht absurd riesig werden */
        margin-left: auto;
        margin-right: auto;
    }
}

/* =========================================
   8. Footer
========================================= */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 2rem;
    margin-top: 3rem;
}

footer p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
}

.contact-line {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
}

.contact-part {
    text-align: center;
    white-space: nowrap; 
}

.contact-divider { margin: 0 0.5rem; }

@media (max-width: 600px) {
    .contact-line {
        flex-direction: column; 
        gap: 0.4rem; 
    }
    .contact-divider { display: none; }
}

footer a, footer a:visited {
    color: var(--white) !important; 
    text-decoration: none;
}

footer a:hover { text-decoration: underline; }

.footer-bottom {
    font-size: 0.8rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
}

/* =========================================
   9. SUBPAGE: KALENDER
========================================= */
.hero-kalender::before {
    background: linear-gradient(rgba(60, 45, 35, 0.7), rgba(60, 45, 35, 0.8)), url('bilder/kalender_1.webp') 50% 20% / cover no-repeat !important;
    filter: none !important; 
}

.hero-kalender {
    min-height: 35vh !important;
    padding: 4rem 2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-wrapper {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 1rem;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.calendar-container {
    position: relative;
    width: 100%;
    height: clamp(600px, 75vh, 900px); 
    border: none;
}

.calendar-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.calendar-footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .calendar-wrapper {
        padding: 0.5rem;
        margin-top: -1rem;
    }
    .calendar-container { height: 70vh; }
}

/* =========================================
   10. SUBPAGE: AKTUELL (News) - KONZEPT 3 (Blog-Feed)
========================================= */
.hero-aktuell::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/aktuell_hero.webp') 50% 40% / cover no-repeat !important;
    filter: none !important; 
}

.hero-aktuell {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-aktuell h1.hero-title,
.hero-aktuell .welcome-text,
.hero-aktuell .loretto-text {
    color: var(--white) !important;
}

/* NEU: Alles zentriert untereinander, wie in einem Premium-Blog */
.news-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Zentriert die Kacheln in der Mitte des Bildschirms */
    gap: 4rem; /* Viel Luft zwischen den einzelnen News für ein edles Design */
}

/* Die Kachel ist jetzt immer einzeilig (Bild oben, Text unten), aber mit limitierter Breite */
.news-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 850px; /* Die perfekte Lese-Breite, nicht zu schmal, nicht zu breit */
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-margin-top: 6rem; 
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(91, 30, 50, 0.15); 
}

.news-card:target {
    animation: highlightCard 2s ease-out;
    border-color: var(--primary-color);
}

@keyframes highlightCard {
    0% { box-shadow: 0 0 0 4px rgba(91, 30, 50, 0.4); }
    100% { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
}

/* Der intelligente Bild-Container: Passt sich dem Bild an! */
.news-image-wrapper {
    width: 100%;
    background-color: #f0ede4; 
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 3px solid var(--secondary-color);
    /* Kein starres Seitenverhältnis mehr! Nur eine Maximalhöhe zum Schutz. */
    max-height: 600px; 
}

.news-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain; /* Nichts wird abgeschnitten */
    padding: 0; /* Bei großen Blog-Bildern brauchen wir kein Padding mehr */
}

/* Option für Bilder, die den Container füllen sollen (Klasse .is-photo) */
.news-image.is-photo {
    object-fit: cover;
    height: 100%;
}

/* Lupe für Desktop-Nutzer */
@media (hover: hover) {
    .news-image-wrapper::after {
        content: '🔍 Vergrößern';
        position: absolute;
        background-color: rgba(91, 30, 50, 0.8);
        color: white;
        padding: 0.6rem 1.2rem;
        border-radius: 4px;
        font-size: 0.9rem;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 2; 
    }
    .news-image-wrapper:hover::after { opacity: 1; }
}

.news-content {
    padding: 3rem; /* Großzügiger Innenabstand für edle Wirkung */
    display: flex;
    flex-direction: column;
}

.news-date {
    display: inline-block;
    color: var(--secondary-color);
    background-color: var(--primary-color);
    padding: 0.3rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
    align-self: flex-start;
}

.news-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.2rem;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.news-text {
    color: var(--dark-grey);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.news-details {
    background-color: #faf9f6;
    padding: 1.5rem;
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.news-details p { margin-bottom: 0.5rem; }
.news-details p:last-child { margin-bottom: 0; }

.news-footer {
    margin-top: auto; 
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: flex-end; 
}

.share-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-label {
    font-size: 0.85rem;
    color: #888;
    margin-right: 0.3rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #faf9f6;
    color: var(--dark-grey);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    cursor: pointer; 
    padding: 0; 
}

.share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.share-btn:hover, .share-btn.copied {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Anpassungen (Handy) */
@media (max-width: 768px) {
    .news-card {
        border-radius: 8px;
    }
    .news-content {
        padding: 1.5rem; /* Weniger Abstand auf kleinen Bildschirmen */
    }
    .news-title {
        font-size: 1.6rem;
    }
    .news-image-wrapper, .news-image {
        max-height: 450px; /* Auf dem Handy wird das Bild etwas früher limitiert */
    }
}

/* =========================================
   11. SUBPAGE: BASILIKA 
========================================= */
.hero-basilika::before {
    background-image: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/basilika_2.webp') !important;
    background-size: cover !important;
    background-position: center 22% !important; 
    filter: none !important; 
}

.hero-basilika {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-basilika h1.hero-title,
.hero-basilika .welcome-text,
.hero-basilika .loretto-text {
    color: var(--white) !important;
}

/* Monument Links (Kapellen/Altäre) */
.monument-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.3rem;
    color: var(--primary-color); 
    text-decoration: none;
    font-weight: bold;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    position: relative;
}

h3 .monument-link { font-size: inherit; }

.monument-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.monument-link:hover { color: var(--primary-color); }
.monument-link:hover svg { transform: scale(1.1) translateY(-2px); }

.monument-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.monument-link:hover::after { width: 100%; }


/* =========================================
   12. SUBPAGE: GNADENKAPELLE
========================================= */
.hero-gnadenkapelle::before {
    background-image: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/gnadenkapelle_1.webp') !important;
    background-position: center 38% !important; 
    filter: none !important; 
}

.hero-gnadenkapelle {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-gnadenkapelle h1.hero-title,
.hero-gnadenkapelle .welcome-text,
.hero-gnadenkapelle .loretto-text {
    color: var(--white) !important;
}

/* =========================================
   13. SUBPAGE: DENKMÄLER
========================================= */
.hero-denkmal::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/denkmal_1.webp') 50% 5% / cover no-repeat !important;
    filter: none !important; 
}

.hero-denkmal {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-denkmal h1.hero-title,
.hero-denkmal .welcome-text,
.hero-denkmal .loretto-text {
    color: var(--white) !important;
}

.funde-liste li {
    margin-bottom: 0.8rem;
}

/* =========================================
   14. SUBPAGE: GESCHICHTE
========================================= */
.hero-geschichte::before {
    background-image: linear-gradient(rgba(60, 45, 35, 0.2), rgba(60, 45, 35, 0.4)), url('bilder/basilika_3.webp') !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center 20% !important; 
    filter: none !important; 
}

@media (max-width: 850px) {
    .hero-geschichte::before {
        background-position: 75% 20% !important; 
    }
}

.hero-geschichte {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-geschichte h1.hero-title,
.hero-geschichte .welcome-text,
.hero-geschichte .loretto-text {
    color: var(--white) !important;
}

/* =========================================
   15. SUBPAGE: SEELSORGE
========================================= */
.hero-seelsorge::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/seelsorge_1.webp')  50% 25% / cover no-repeat !important;
    filter: none !important; 
}

.hero-seelsorge {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-seelsorge h1.hero-title,
.hero-seelsorge .welcome-text,
.hero-seelsorge .loretto-text {
    color: var(--white) !important;
}

/* =========================================
   16. SUBPAGE: GOTTESDIENSTE
========================================= */
.hero-gottesdienste::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/gottesdienste_1.webp') 50% 30% / cover no-repeat !important;
    filter: none !important; 
}

.hero-gottesdienste {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-gottesdienste h1.hero-title,
.hero-gottesdienste .welcome-text,
.hero-gottesdienste .loretto-text {
    color: var(--white) !important;
}

/* Styling für die Gottesdienst-Tabellen (Desktop) */
.gottesdienst-table-container {
    width: 100%;
    overflow-x: hidden; 
    margin-bottom: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.gottesdienst-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    text-align: left;
    min-width: 550px; 
    table-layout: fixed; 
}

.gottesdienst-table th:nth-child(1) { width: 28%; }
.gottesdienst-table th:nth-child(2) { width: 36%; }
.gottesdienst-table th:nth-child(3) { width: 36%; }

.gottesdienst-table th,
.gottesdienst-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle; 
}

.gottesdienst-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.gottesdienst-table tr:last-child td {
    border-bottom: none;
}

.gottesdienst-table tr:not(.group-header):nth-child(even) {
    background-color: #faf9f6; 
}

.gottesdienst-table td strong {
    color: var(--primary-color);
}

.gottesdienst-table tr.group-header td {
    background-color: var(--secondary-color);
    border-top: 2px solid var(--primary-color);
    border-bottom: 1px solid #ddd;
    padding-top: 1.2rem;
    padding-bottom: 0.8rem;
}

@media (min-width: 851px) {
    .desktop-block {
        display: block;
    }
}

/* Weinroter Schatten für die Kacheln */
.liturgie-card {
    box-shadow: 0 4px 15px rgba(91, 30, 50, 0.15) !important;
    border: 1px solid rgba(91, 30, 50, 0.05);
}

.liturgie-card:hover {
    box-shadow: 0 8px 25px rgba(91, 30, 50, 0.3) !important;
}

/* Mobile Ansicht für Tabellen (Karten-Layout) */
@media (max-width: 768px) {
    .gottesdienst-table-container {
        box-shadow: none;
        margin-bottom: 1.5rem;
    }
    .gottesdienst-table {
        min-width: 100%;
        border: none;
    }
    .gottesdienst-table thead {
        display: none;
    }
    .gottesdienst-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #eee;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        background-color: var(--white) !important; 
    }
    .gottesdienst-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem 1.2rem;
        border-bottom: 1px solid #f5f5f5;
        text-align: left;
    }
    .gottesdienst-table td:last-child {
        border-bottom: none;
    }
    .gottesdienst-table td::before {
        content: attr(data-label);
        font-family: var(--font-heading);
        font-weight: 700;
        color: var(--primary-color);
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .gottesdienst-table tr.group-header {
        box-shadow: none;
        border: none;
        background-color: transparent !important;
        margin-bottom: 0.5rem;
        margin-top: 2rem;
    }
    .gottesdienst-table tr.group-header td {
        background-color: var(--secondary-color);
        border-top: 2px solid var(--primary-color);
        border-bottom: 1px solid #ddd;
        padding: 1rem;
        text-align: center;
        display: block;
    }
    .gottesdienst-table tr.group-header td::before {
        display: none; 
    }
}

/* MODAL (POP-UP) STYLING für allgemeine Overlays (z.B. Wochenordnung) */
.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

/* Spezifität für das Modal in gottesdienste.html */
#wochenordnung-modal .modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto; 
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show #wochenordnung-modal .modal-content,
#wochenordnung-modal.show .modal-content {
    transform: translateY(0);
}

#wochenordnung-modal .close-modal {
    /* NEU: Sticky statt Absolute, damit das X oben kleben bleibt */
    position: sticky;
    top: -0.5rem;
    float: right;
    z-index: 100;
    
    /* OPTIK: Runder weißer Hintergrund, damit scrollender Text nicht durchscheint */
    background-color: var(--white);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* POSITION-KORREKTUR: Rückt den runden Button perfekt ins rechte obere Eck */
    margin-top: -1rem;
    margin-right: -1rem;
    margin-bottom: 0.5rem;

    /* Bisherige Basis-Werte */
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Leichter Schatten für Tiefe */
}

/* Der neue, moderne Hover-Effekt für den Button */
#wochenordnung-modal .close-modal:hover,
#wochenordnung-modal .close-modal:focus {
    color: var(--white);
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.wochen-tag {
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1.5rem;
    background-color: #faf9f6;
    padding: 1.2rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.wochen-datum {
    display: block;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    /* Reduziert auf 0.6rem, um die unsichtbare Höhe der großen Schrift auszugleichen */
    margin-bottom: 0.6rem; 
}

.wochen-zusatz {
    display: block; 
    font-size: 0.95rem;
    font-weight: normal;
    color: var(--dark-grey); 
    font-style: italic;
    /* Zieht den Zusatz nah heran (0.6rem - 0.5rem = 0.1rem Spalt) */
    margin-top: -0.5rem; 
    /* Bleibt bei 0.8rem, weil die kleine Schrift weniger "Eigenhöhe" hat */
    margin-bottom: 0.8rem; 
}

/* --- GLOBALES DESIGN FÜR GOTTESDIENST-ZEILEN --- */
.messe-zeile {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    margin: 0;
    padding: 0.6rem 0;
    border-top: 1px solid #ddd;
    font-size: 0.95rem;
    line-height: 1.4;
}

.wochen-tag .messe-zeile:last-of-type {
    border-bottom: 1px solid #ddd;
}

/* Verhindert, dass die Uhrzeit jemals gequetscht wird */
.messe-zeile strong {
    flex-shrink: 0;
    margin-right: 0;
}

/* Macht den Zusatztext dezent grau und minimal kleiner */
.messe-zusatz {
    font-size: 0.9em;
    color: var(--dark-grey);
}

/* =========================================
   17. SUBPAGE: SEELSORGETEAM
========================================= */

/* --- Hero Section für das Seelsorgeteam (Neues Bild) --- */
.hero-seelsorgeteam::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/seelsorge_2.webp')  50% 25% / cover no-repeat !important;
    filter: none !important; 
}

.hero-seelsorgeteam {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-seelsorgeteam h1.hero-title,
.hero-seelsorgeteam .welcome-text,
.hero-seelsorgeteam .loretto-text {
    color: var(--white) !important;
}

/* --- Inhalt: Intro & Grid --- */
.team-intro {
    text-align: center;
    font-size: 1.15rem;
    color: var(--dark-grey);
    font-style: italic;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.intro-subtext {
    display: block;
    margin-top: 0.8rem;
}

@media (min-width: 769px) {
    .desktop-line {
        display: block;
    }
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.team-card {
    background-color: #faf9f6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(91, 30, 50, 0.15);
}

.team-photo-wrapper {
    width: 100%;
    /* NEU: Zwingt alle Boxen in das exakt gleiche Porträt-Format (4 Breite zu 5 Höhe). 
       Sie schrumpfen und wachsen jetzt absolut proportional! */
    aspect-ratio: 4 / 5; 
    background-color: #eee;
    overflow: hidden;
}

.team-photo {
    width: 100%;
    height: 100%;
    /* Das Bild füllt die proportionale Box. Es schneidet vielleicht minimalst an 
       den Rändern ab, aber der unruhige Zoom-Effekt beim Skalieren ist komplett weg! */
    object-fit: cover; 
    /* Hält den Fokus auf den Köpfen (oben zentriert), falls beschnitten wird */
    object-position: center top; 
    display: block;
}

.team-info {
    padding: 2rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.team-role {
    color: var(--dark-grey);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.team-name {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    line-height: 1.1; 
}

.team-title {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

.team-description {
    color: var(--dark-grey);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.team-contact {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #eee;
}

.team-contact p {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    word-break: break-all; 
}

.team-contact p:last-child {
    margin: 0;
}

.team-contact a {
    color: var(--dark-grey);
    text-decoration: none;
    transition: color 0.2s;
}

.team-contact a:hover {
    color: var(--primary-color);
}

/* --- Elegante Querformat-Karten für Tablets und schmale Desktops --- */
@media (max-width: 1200px) and (min-width: 650px) {
    
    /* 1. Verhindert die "Zwei nebeneinander"-Ansicht und erzwingt sofort EINE Spalte */
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 850px; 
        margin-left: auto;
        margin-right: auto;
    }

    /* 2. Aktiviert das Side-by-Side Layout */
    .team-card {
        flex-direction: row; 
        align-items: stretch; 
    }
    
    .team-photo-wrapper {
        /* KORREKTUR: Mehr Platz für die Fotos! 
           Jetzt 45% Breite und mindestens 280px, damit nichts schmal wirkt. */
        width: 45%; 
        min-width: 280px; 
        aspect-ratio: auto; 
        flex-shrink: 0; 
    }
    
    .team-info {
        width: auto; 
        flex-grow: 1; 
        justify-content: center; 
        /* Padding minimal angepasst, damit der Text neben dem breiteren Bild noch gut atmen kann */
        padding: 1.5rem 2rem; 
    }
}

/* =========================================
   18. SUBPAGE: PFARRGEMEINDERAT
========================================= */
.hero-pgr::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/pgr_1.webp') 50% 30% / cover no-repeat !important;
    filter: none !important; 
}

.hero-pgr {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-pgr h1.hero-title,
.hero-pgr .welcome-text,
.hero-pgr .loretto-text {
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .mobile-block {
        display: block;
    }
}

/* PGR Cards haben keine Beschreibung, daher kein Rand unter dem Titel */
.pgr-grid .team-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* =========================================
   19. SUBPAGE: PFARRBLATT
========================================= */
.hero-pfarrblatt::before {
    background-image: linear-gradient(rgba(60, 45, 35, 0.7), rgba(60, 45, 35, 0.8)), url('bilder/pfarrblatt_header.webp') !important;
    background-position: center !important; 
    filter: none !important; 
}

.hero-pfarrblatt {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.pfarrblatt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.pfarrblatt-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.pfarrblatt-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.pfarrblatt-cover {
    width: 100%;
    height: 400px; 
    object-fit: contain; 
    background-color: #f9f9f9; 
    object-position: center;
    border-bottom: 3px solid var(--secondary-color);
}

.pfarrblatt-content {
    padding: 2rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pfarrblatt-ausgabe {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.pfarrblatt-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.pfarrblatt-text {
    color: var(--dark-grey);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.pfarrblatt-actions {
    margin-top: auto; 
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-flipbook {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-flipbook:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-pdf {
    background-color: transparent;
    color: var(--dark-grey);
    border: 2px solid #e0e0e0;
}

.btn-pdf:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-card svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   20. SUBPAGE: TAUFE
========================================= */
.hero-taufe::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/taufe.webp') 50% 45% / cover no-repeat !important;
    filter: none !important; 
}

.hero-taufe {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-taufe h1.hero-title,
.hero-taufe .welcome-text,
.hero-taufe .loretto-text {
    color: var(--white) !important;
}

.intro-text {
    text-align: center;
    font-size: 1.15rem;
    color: var(--dark-grey);
    font-style: italic;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.info-card {
    background-color: #faf9f6;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(91, 30, 50, 0.15);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.info-card h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    border-bottom: 1px solid #e0dcd2;
    padding-bottom: 0.5rem;
    line-height: 1.4; 
}

.info-card p, .info-card ul {
    color: var(--dark-grey);
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-card ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.info-card li {
    margin-bottom: 0.5rem;
}

.info-card li:last-child {
    margin-bottom: 0;
}

.cta-anmeldung {
    background-color: var(--white);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
    box-shadow: 0 10px 30px rgba(200, 169, 110, 0.15);
}

.cta-anmeldung h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.cta-anmeldung p {
    color: var(--dark-grey);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
}

@media (max-width: 768px) {
    .info-card {
        padding: 1.5rem;
    }
    .cta-anmeldung {
        padding: 2rem 1.5rem;
    }
}

/* =========================================
   21. SUBPAGE: TRAUUNG
========================================= */
.hero-trauung::before {
    background: linear-gradient(rgba(60, 45, 35, 0.6), rgba(60, 45, 35, 0.8)), url('bilder/trauung_1.webp') 50% 40% / cover no-repeat !important;
    filter: none !important; 
}

.hero-trauung {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-trauung h1.hero-title,
.hero-trauung .welcome-text,
.hero-trauung .loretto-text {
    color: var(--white) !important;
}

/* =========================================
   22. SUBPAGE: KONTAKT
========================================= */
.hero-kontakt::before {
    background: linear-gradient(rgba(60, 45, 35, 0.7), rgba(60, 45, 35, 0.8)), url('bilder/kontakt_1.webp') 50% 50% / cover no-repeat !important;
    filter: none !important; 
}

.hero-kontakt {
    min-height: 40vh !important;
    padding: 4rem 2rem !important;
}

.hero-kontakt h1.hero-title,
.hero-kontakt .welcome-text,
.hero-kontakt .loretto-text {
    color: var(--white) !important;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* Linke Spalte: Infos */
.contact-info-box {
    background-color: #faf9f6;
    padding: 2.5rem;
    border-radius: 8px;
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: fit-content;
}

.info-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.info-text strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.info-text p {
    margin: 0;
    color: var(--dark-grey);
    line-height: 1.5;
}

.info-text a {
    color: var(--dark-grey);
    text-decoration: none;
    transition: color 0.3s;
}

.info-text a:hover {
    color: var(--primary-color);
}

/* ----- DSGVO TWO-CLICK GOOGLE MAPS ----- */
.map-container {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    margin-top: 2.5rem;
    position: relative;
    background-color: #e5e3df; 
}

.map-placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eaeaea;
    background-image: linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-overlay {
    background-color: rgba(60, 45, 35, 0.85);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    max-width: 85%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.map-overlay p {
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.map-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.map-btn:hover {
    background-color: var(--secondary-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: none;
    position: relative;
    z-index: 1;
}

/* Rechte Spalte: Formular */
.contact-form-box {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(91, 30, 50, 0.08);
    border: 1px solid #eee;
    border-top: 4px solid var(--primary-color); /* <--- Hier ist der neue Balken! */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    box-sizing: border-box; 
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 30, 50, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Dynamischer Bereich */
.dynamic-fields {
    display: none;
    background-color: #faf9f6;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--secondary-color);
}

.dynamic-fields.show {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.submit-btn {
    width: 100%;
    box-sizing: border-box; 
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* --- Tablet & iPad Hochformat Anpassung (ab Hamburger-Menü) --- */
@media (max-width: 1023px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Zwingt Boxen ab 1023px untereinander */
        max-width: 700px; 
        margin-left: auto;
        margin-right: auto;
        gap: 2rem;
    }
}

/* --- Mobile Anpassung (Handys) --- */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr; /* Setzt auch Vorname/Nachname untereinander */
        gap: 0; 
    }
    .contact-form-box,
    .contact-info-box {
        padding: 1.5rem; /* Etwas weniger Innenabstand für kleine Bildschirme */
    }
}

/* =========================================
   23. SUBPAGE: IMPRESSUM & DATENSCHUTZ
========================================= */
.hero-impressum::before {
    display: none !important; 
}

.hero-impressum {
    min-height: 35vh !important;
    padding: 4rem 2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color) !important; 
}

.hero-impressum h1.hero-title {
    color: var(--white) !important;
    margin: 0;
    text-align: center; 
}

.legal-content {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--dark-grey);
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.legal-content p, .legal-content ul {
    margin-bottom: 1.2rem;
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-box {
    background-color: #faf9f6;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

.legal-content a {
    color: var(--dark-grey);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.legal-content a:hover {
    color: var(--primary-color);
}

/* =========================================
   24. GLOBALES BILDER-GALERIE MODAL (Lightbox)
========================================= */

/* Dunklerer Hintergrund speziell für die Galerie */
#gallery-modal {
    background-color: rgba(0, 0, 0, 0.95);
}

/* Der Container für Bild und Text */
.modal-content-wrapper {
    position: relative;
    text-align: center;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Das eigentliche Bild */
#gallery-img {
    max-height: 80vh; 
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    transition: opacity 0.15s ease;
    border-radius: 4px;
}

/* Das Schließen-Kreuz (Rechts oben) */
#gallery-modal .close-modal {
	position: absolute;
    top: clamp(15px, 4vh, 30px);
    right: clamp(15px, 10vw, 15%);
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: color 0.2s ease;
    background: none;
    border: none;
    box-shadow: none;
}

#gallery-modal .close-modal:hover {
    color: var(--primary-color, #b89759);
}

/* Die Navigations-Pfeile */
.nav-arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 15px 25px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: 0.2s ease;
    user-select: none;
    z-index: 10000;
}

.nav-arrow:hover {
    color: var(--primary-color, #b89759);
    background-color: rgba(255,255,255,0.1);
    border-radius: 8px;
}

/* Pfeile rücken am Desktop nah ans Bild (max 15%), am Handy bleiben min 10px Abstand */
.prev-btn { left: clamp(10px, 10vw, 15%); }
.next-btn { right: clamp(10px, 10vw, 15%); }

/* Bild-Zähler (z.B. 1 / 5) (Links oben) */
.gallery-counter {
	position: absolute;
    top: clamp(20px, 5vh, 40px);
    left: clamp(15px, 10vw, 15%);
    color: #f1f1f1;
    font-size: 1.1rem;
    letter-spacing: 2px;
    z-index: 10000;
}

/* Bildunterschrift und Titel */
.gallery-text {
    color: #ccc;
    margin-top: 15px;
    text-align: center;
    transition: opacity 0.15s ease;
}

#gallery-title {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

#gallery-desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Anpassungen für Handys */
@media (max-width: 768px) {
    .nav-arrow { 
        font-size: 30px; 
        padding: 10px 15px; 
    }
    .prev-btn { left: 0; }
    .next-btn { right: 0; }
    #gallery-img { max-height: 70vh; }
    #gallery-modal .close-modal { top: 10px; right: 20px; font-size: 35px; }
    .gallery-counter { top: 20px; left: 20px; }
}

/* =========================================
   25. MOBILE OPTIMIERUNG (HERO & OVERLAP)
   (Steht ganz unten, damit es alle anderen Regeln sicher überschreibt!)
========================================= */
@media (max-width: 1023px) {
    
    /* 1. Allgemeine Hero-Höhe reduzieren & Optische Mitte korrigieren */
    .hero { 
        min-height: 35vh !important; 
        /* NEU: Oben weniger und unten mehr Padding. 
           (Reihenfolge: Oben, Rechts, Unten, Links)
           Drückt den Text nach oben in die echte optische Mitte! */
        padding: 1.5rem 1.5rem 4.5rem 1.5rem !important;
        justify-content: center;
    }
    
    /* Startseite bekommt etwas mehr Platz */
    .hero-home {
        min-height: 45vh !important;
        /* NEU: Hier ebenfalls etwas mehr, da der Overlap hier 80px frisst */
        padding-bottom: 7rem !important; 
    }
    
    /* Alle Unterseiten-Heros deutlich verschmälern (ca. 25-30% Reduktion) */
    .hero-kalender, .hero-aktuell, .hero-basilika, .hero-gnadenkapelle, 
    .hero-denkmal, .hero-geschichte, .hero-seelsorge, .hero-seelsorgeteam, 
    .hero-gottesdienste, .hero-pgr, .hero-pfarrblatt, .hero-taufe, 
    .hero-trauung, .hero-kontakt {
        min-height: 28vh !important;
        /* NEU: Asymmetrisches Padding für Unterseiten (Oben 1rem, Unten 4rem) */
        padding: 1rem 1.5rem 4rem 1.5rem !important;
    }

	/* KORREKTUR: Sonderbehandlung für die Kontakt-Seite (dreizeiliger Titel) */
    .hero-kontakt {
        min-height: 30vh !important; /* Minimal höher, damit die 3 Zeilen Platz haben */
        padding: 2rem 1.5rem 4.5rem 1.5rem !important; /* Holt den Text oben wieder etwas runter */
    }

    /* 2. Den Overlap (Kacheln ragen ins Bild) aktivieren */
    .main-content {
        margin-top: -60px !important; /* Zieht den Hauptinhalt 60px ins Bild hinein */
        position: relative;
        z-index: 10;
    }
    
    .home-content {
        margin-top: -80px !important; /* Startseite ragt noch etwas stärker hinein */
    }
}


