/* ==========================================================================
   1. GLOBALE VARIABLEN & RESET
   ========================================================================== */
:root {
    --bg-dark: #09090b;          /* Tiefschwarzer Hintergrund */
    --bg-card: #111115;          /* Etwas helleres Schwarz für Inhaltsboxen */
    --border-color: #1f1f23;     /* Subtile Trennlinien */
    --accent-red: #a91d22;       /* Libertine Rot */
    --text-light: #f4f4f5;       /* Haupttext weißlich */
    --text-muted: #a1a1aa;       /* Gedimmter Text für Metadaten & Beschreibungen */
    --max-width: 1400px;
    --gold-accent: #d4af37;      /* Einheitliches Turnus-Gelb */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease, border-color 0.2s ease;
}

/* ==========================================================================
   NEU: MODERNE HYPERLINK UX (Dezente Linie via Border/Text-Decoration im Fließtext)
   ========================================================================== */
.article-content a,
.ux-link-description a,
.card p a {
    color: var(--text-light);
    text-decoration: underline;
    text-decoration-color: var(--accent-red);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-content a:hover,
.ux-link-description a:hover,
.card p a:hover {
    color: var(--accent-red);
    text-decoration-color: #ffffff;
}

/* ==========================================================================
   GLOBAL CONTROL FOR SECTIONS (85% Desktop / 95% Mobile)
   ========================================================================== */
.header-logo-container,
nav.portal-nav-bar,
.portal-layout,
.portal-main-wrapper,
.content-wrapper,
.main-header {
    width: 85%;
    max-width: var(--max-width);
    margin: 0 auto;
    box-sizing: border-box;
}

/* Bilder innerhalb von Inhaltsblöcken horizontal zentrieren */
.article-content img,
.card img {
    margin: 0 auto;
    display: block;
}

/* ==========================================================================
   UNIFORM UX BUTTONS
   ========================================================================== */
.portal-btn-primary {
    display: inline-block;
    background: var(--accent-red);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.portal-btn-primary:hover {
    background: #c02228;
}

.portal-btn-secondary {
    display: inline-block;
    background: #161619;
    color: var(--text-light) !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none !important;
    font-size: 13px;
    border: 1px solid var(--border-color);
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
}
.portal-btn-secondary:hover {
    background: #222226;
    border-color: var(--accent-red);
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    background-color: #000000;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    padding: 0 20px;
}

.header-custom-text {
    font-size: 13px;
    color: #8a8a93;
    text-align: center;
    padding-top: 5px;
}

.portal-nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0b0b0d;
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.portal-nav-bar a {
    color: #b0b0b5;
    text-decoration: none !important;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s, background 0.2s;
    border-bottom: 2px solid transparent;
}

.portal-nav-bar a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.portal-nav-bar a.active {
    color: var(--accent-red);
    border-bottom: 2px solid var(--accent-red);
    background: rgba(229, 9, 20, 0.03);
}

/* ==========================================================================
   3. LAYOUT & SEITEN-STRUKTUR
   ========================================================================== */
.header-logo-container {
    padding: 40px 20px;
    background-color: var(--bg-dark);
}

.header-logo-container img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    margin: 0 auto;
    display: block;
}

.portal-layout.has-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.main-content-stream {
    min-width: 0; 
}

/* ==========================================================================
   4. INHALTS-ELEMENTE & KARTEN (CARDS)
   ========================================================================== */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 4px solid var(--accent-red);
    padding-left: 15px;
    text-align: left;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.article-content {
    color: #e4e4e7;
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content ul, 
.article-content ol {
    margin-left: 20px;
    margin-bottom: 1.2rem;
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* ==========================================================================
   5. TERMINE & ZEITLEISTE
   ========================================================================== */
.events-legend-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 2rem;
    font-size: 14px;
}

.ux-events-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ux-event-card {
    display: flex;
    gap: 25px;
    background: var(--bg-card);
    border: 1px solid var(--border-color); 
    border-radius: 6px;
    padding: 25px;
    align-items: flex-start;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ux-badge-wrapper {
    flex-shrink: 0;
}

.ux-event-body {
    flex-grow: 1;
}

.ux-event-body h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.ux-event-body p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.ux-event-meta-mobile {
    display: none;
}

.ux-event-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* ==========================================================================
   CLASSES FOR DYNAMIC BLOG FOOTER
   ========================================================================== */
.blog-footer-stream {
    width: 100%;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.blog-footer-heading {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    border-left: 4px solid var(--accent-red);
    padding-left: 12px;
    text-align: left;
}

.blog-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.blog-footer-card {
    background: #111114;
    padding: 20px;
    border-left: 3px solid var(--accent-red);
    margin-bottom: 0;
    text-align: left;
}

.blog-footer-date {
    color: #d4af37;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.blog-footer-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.4;
}

.blog-footer-teaser {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.blog-footer-btn {
    display: inline-block;
    font-size: 12px;
    padding: 6px 14px;
}

.blog-footer-empty {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    text-align: left;
}

/* ==========================================================================
   6. SIDEBAR
   ========================================================================== */
.sidebar-dates-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.sidebar-heading {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-red);
    color: #fff;
}

.sidebar-events-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mini-date-card {
    background: #09090b;
    border: 1px solid #1f1f23;
    border-left: 3px solid var(--accent-red);
    padding: 12px;
    border-radius: 4px;
}

.mini-date-card .meta {
    font-size: 11px;
    color: #d4af37;
    font-weight: bold;
    text-transform: uppercase;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.main-footer {
    background-color: #000000;
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES (HANDY & TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
    .header-logo-container,
    nav.portal-nav-bar,
    .portal-layout,
    .portal-main-wrapper,
    .content-wrapper,
    .main-header {
        width: 95%;
    }
}

@media (max-width: 900px) {
    .portal-layout.has-sidebar {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    /* Das Burger-Icon sichtbar machen */
    .menu-icon {
        display: block;
        cursor: pointer;
        padding: 28px 20px;
        position: relative;
        user-select: none;
        z-index: 1001;
        background-color: #000000;
        width: 100%;
        text-align: right;
    }

    .menu-icon .nav-icon {
        background: #fff;
        display: inline-block;
        height: 2px;
        position: relative;
        transition: background .2s ease-out;
        width: 18px;
    }

    .menu-icon .nav-icon:before,
    .menu-icon .nav-icon:after {
        background: #fff;
        content: '';
        display: block;
        height: 100%;
        position: absolute;
        transition: all .2s ease-out;
        width: 100%;
    }

    .menu-icon .nav-icon:before { top: 5px; }
    .menu-icon .nav-icon:after { top: -5px; }

    .portal-nav-bar.main-nav {
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        border-bottom: none;
    }

    .portal-nav-bar.main-nav a {
        display: block;
        width: 100%;
        padding: 12px 10px;
        border-bottom: none;
        text-align: center;
        border-left: 2px solid transparent;
    }

    .portal-nav-bar.main-nav a:hover,
    .portal-nav-bar.main-nav a.active {
        border-left: 2px solid var(--accent-red);
        background-color: #111115;
    }

    .menu-toggle:checked ~ .portal-nav-bar.main-nav {
        max-height: 600px; 
        border-bottom: 3px solid var(--accent-red);
    }

    .menu-toggle:checked ~ .menu-icon .nav-icon {
        background: transparent;
    }

    .menu-toggle:checked ~ .menu-icon .nav-icon:before {
        transform: rotate(-45deg);
        top: 0;
    }

    .menu-toggle:checked ~ .menu-icon .nav-icon:after {
        transform: rotate(45deg);
        top: 0;
    }

    .ux-event-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 15px;
        gap: 12px;
    }

    .ux-badge-wrapper {
        display: none;
    }

    .ux-event-meta-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: bold;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .ux-event-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .card {
        padding: 15px !important; 
        margin-bottom: 1.5rem;
    }
    
    .article-content, p {
        margin-top: 0 !important;
    }
    
    .events-legend-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
    }
}