/* 1. FARB-VARIABLEN */
:root {
    --nhg-blau: #1b008a; 
    --nhg-rot: #ff1317;
    /* Transparentes F5F6FE (0.85 steht für 85% Deckkraft) */
    --box-bg-trans: rgba(245, 246, 254, 0.65); 
    --box-border: #CDCEFF; 
}

/* 2. GRUND-HINTERGRUND */
body {
    background-color: #fafafa !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. HEADER BEREICH */
header.header {
    border-top: 25px solid var(--nhg-blau) !important; 
    border-bottom: 10px solid var(--nhg-rot) !important;
    background-image: url('https://nibelungenheimgesell2033.live-website.com/images/banners/header.jpg') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
    min-height: 250px !important;
    position: relative;
    display: block !important;
    z-index: 10;
}

/* 4. DAS WAPPEN */
header.header::before {
    content: "";
    position: absolute;
    top: 20px;
    right: 30px;
    width: 150px; 
    height: 200px; 
    background-image: url('https://nibelungenheimgesell2033.live-website.com/images/banners/Wappen.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    z-index: 100;
}

/* 5. MENÜ TRANSPARENZ */
.container-nav, .navbar, .container-header, .nhg-container, nav.navbar {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
}

ul.nhg-nav, .nhg-nav ul {
    display: flex !important;
    justify-content: flex-end !important;
    flex-wrap: wrap;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 !important;
}

ul.nhg-nav > li a {
    background-color: var(--nhg-blau) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    text-decoration: none !important;
    font-weight: bold;
    display: block;
    border-radius: 2px;
}

ul.nhg-nav > li:hover > a {
    background-color: var(--nhg-rot) !important;
}

/* 6. UNTERMENÜ */
ul.nhg-nav li ul {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 180px;
}

ul.nhg-nav li:hover > ul {
    display: block !important;
}

/* 7. TEXTUR UNTER DEM BANNER */
.site-grid {
    background-image: url('https://nibelungenheimgesell2033.live-website.com/images/banners/Middle_texture.jpg') !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
}

/* 8. HAUPTTEIL (Transparent & Dynamische Höhe) */
.container-component, 
main.content,
.grid-child.container-component {
    background-color: var(--box-bg-trans) !important; /* Transparente Färbung */
    padding: 30px !important;
    border: 2px solid var(--box-border) !important; 
    max-width: 900px !important;
    margin: 20px auto !important;
    height: auto !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* 9. REINIGUNG */
.navbar-brand, .brand-logo, .site-title, .site-description, .navbar-toggler {
    display: none !important;
}

/* 10. NHG FUSSZEILE (FOOTER) - ABSOLUT ZENTRIERT */
footer.footer, 
.footer, 
.nhg-footer {
    background-color: var(--nhg-blau) !important;
    color: #ffffff !important;
    padding: 30px 15px !important;
    margin-top: 30px;
    border-top: 4px solid var(--nhg-rot);
    
    /* Zwingt den Inhalt in die Mitte, egal welche Spalte */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* Container-Breite im Footer aufheben */
footer.footer .container, 
footer.footer .grid-child {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* Styling für die Links */
.nhg-footer a, 
footer.footer a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: bold;
    margin: 0 10px;
    display: inline-block;
}

.nhg-footer a:hover, 
footer.footer a:hover {
    color: var(--nhg-rot) !important;
    text-decoration: underline !important;
}


/* Stellt sicher, dass die Karten innerhalb der Box genug Platz haben */
.nhg-welcome-box .nhg-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding-top: 10px;
}

/* Die Karten in der Box etwas dezenter schattieren, da die Box schon einen Schatten hat */
.nhg-welcome-box .nhg-menu-card {
    background: #fdfdfd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(27, 0, 138, 0.2); /* Etwas feinerer Rand */
}

/* Die Überschrift in der Karte */
.nhg-menu-card h2 {
    color: #1b008a;
    font-weight: bold;
    margin-top: 5px;
}

/* Der kleine rote Strich unter der Box-Überschrift */
.nhg-red-line {
    width: 60px;
    height: 3px;
    background-color: #ff1317; /* Dein NHG Rot */
    margin: 0 auto 25px auto;
    border-radius: 2px;
}

/* Der Blocksatz mit Silbentrennung */
.nhg-text-justify {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
}

/* Die Box-Struktur (wie bei den Speisekarten) */
.nhg-welcome-box {
    background: #ffffff;
    border: 2px solid #1b008a;
    border-radius: 12px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto 40px auto;
    box-shadow: 0 4px 15px rgba(27, 0, 138, 0.1);
}

.nhg-main-title {
    color: #1b008a;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 30px;
}
/* ALLGEMEINER BLOCKSATZ-STIL */
.nhg-text-justify {
    text-align: justify;
    text-justify: inter-word; /* Verbessert die Abstände im Blocksatz */
    hyphens: auto;           /* Aktiviert die Silbentrennung */
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* BOX-DESIGN (identisch zum Willkommenstext) */
.nhg-welcome-box {
    background: #ffffff;
    border: 2px solid #1b008a;
    border-radius: 12px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto 40px auto;
    box-shadow: 0 4px 15px rgba(27, 0, 138, 0.1);
}

/* TITEL-STYLING */
.nhg-main-title {
    color: #1b008a;
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* KARTEN-LAYOUT INNERHALB DER BOX */
.nhg-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.nhg-menu-card {
    border: 1px solid rgba(27, 0, 138, 0.2);
    padding: 20px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #1b008a !important;
    width: 200px;
    text-align: center;
    transition: all 0.3s ease;
}

.nhg-menu-card:hover {
    border-color: #ff1317;
    transform: translateY(-5px);
}

/* Mobil-Korrektur: Blocksatz auf kleinen Screens oft unruhig */
@media (max-width: 768px) {
    .nhg-text-justify {
        text-align: left;
    }
    .nhg-welcome-box {
        padding: 20px;
    }
}


/* 13. POPUP STYLING (MOBIL OPTIMIERT & SCROLLBAR) */
.nhg-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    /* Ermöglicht Scrollen falls Box zu hoch ist */
    overflow-y: auto; 
    padding: 20px;
}

.nhg-popup-box {
    background: #F5F6FE;
    padding: 30px;
    border: 5px solid var(--nhg-blau);
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: 4px;
    text-align: center;
    /* Mobil-Fix: Box begrenzt Höhe und wird intern scrollbar */
    max-height: 90vh;
    overflow-y: auto;
}

.nhg-popup-close-x {
    position: absolute;
    top: 5px; right: 15px;
    font-size: 35px;
    cursor: pointer;
    color: var(--nhg-rot);
    z-index: 100;
}

.nhg-popup-btn {
    display: inline-block;
    margin-top: 20px;
    background: var(--nhg-blau);
    color: white !important;
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .nhg-text-justify { text-align: left; }
    .nhg-welcome-box { padding: 20px; }
    ul.nhg-nav { justify-content: center; }
}

./* Newsletter */
.nhg-form-wrapper input[type="email"] {
    border: 2px solid var(--nhg-blau) !important;
    outline: none;
    transition: border-color 0.3s;
}

.nhg-form-wrapper input[type="email"]:focus {
    border-color: var(--nhg-rot) !important;
}

.acym_introtext {
    margin-bottom: 20px;
    text-align: center; /* Oder justify, je nach Wunsch */
    line-height: 1.6;
}

.acym_posttext {
    border-top: 1px solid rgba(27, 0, 138, 0.1);
    padding-top: 15px;
    margin-top: 10px;
    text-align: center;
}

/* --- NHG Styling gezielt für jsvisit mit der Klasse 'nhg-counter' --- */

/* Wir sprechen das Modul über die vergebene Klasse an */
.nhg-counter {
    border: 1px solid #ddd !important;
    background-color: #ffffff !important;
    padding: 15px !important;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

/* Die NHG-Balken oben */
.nhg-counter::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: #1b008a; /* NHG Blau */
}

.nhg-counter::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff1317; /* NHG Rot */
}

/* Zahlen-Styling innerhalb dieses speziellen Moduls */
.nhg-counter .jsvisit_stat td[align="right"], 
.nhg-counter .jsvisit_number {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #1b008a !important;
    font-size: 1.1rem;
}

/* Abstände in der jsvisit-Statistik optimieren */
.nhg-counter .jsvisit_stat table {
    margin-top: 15px;
    border: none;
}

.nhg-counter .jsvisit_stat td {
    padding: 6px 0 !important;
    border-bottom: 1px solid #eee; /* Dezentere Linien */
    font-size: 14px;
}

/* Den Text "Total: 170.639" besonders hervorheben */
.nhg-counter .jsvisit_stat tr:last-child td {
    border-bottom: none;
    font-weight: bold;
    color: #ff1317; /* NHG Rot für die Gesamtzahl */
    font-size: 1.1em;
}

/* Die Prozentanzeige (Deutschland) etwas dezenter */
.nhg-counter .jsvisit_stat td[width="100%"] {
    color: #666;
    font-style: italic;
}