/* ------------------------------------------------------------- */
/* 1. GLOBALES RESET & BASIS                                     */
/* ------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    background-color: white;
    line-height: 1.6;
}

/* ------------------------------------------------------------- */
/* 2. HEADER & NAVIGATION ELEMENTE                               */
/* ------------------------------------------------------------- */
header {
    display: grid;
    /* EXAKTE ANPASSUNG: Gleiches Raster wie .main-wrapper */
    grid-template-columns: 15% 70% 15%;
    align-items: center;
    border-bottom: 5px solid rgb(4, 4, 90);
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Box 1 steht nun exakt über der Navbar */
header .box1 {
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

header .box1 img {
    max-width: 150px;
    height: auto;
    display: block;
}

/* Box 2 steht nun exakt über dem Article */
header .box2 {
    text-align: center;
    color: rgb(4, 4, 90);
    padding: 15px 0;
}

header .box2 h1 { 
    font-size: 1.8rem; 
    margin: 0;
}

/* Box 3 steht nun exakt über der Aside */
header .box3 {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Burger Icon Styling (In Header Box 3) */
.menu-icon {
    display: none; /* Auf Desktop unsichtbar */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-icon span {
    display: block;
    width: 30px;
    height: 4px;
    background-color: rgb(4, 4, 90);
    border-radius: 2px;
}

/* ------------------------------------------------------------- */
/* 3. HAUPT-LAYOUT (DAS GRID)                                    */
/* ------------------------------------------------------------- */
.main-wrapper {
    display: grid;
    /* Festlegung der 3 Spalten: Links 15%, Mitte 70%, Rechts 15% */
    grid-template-columns: 15% 70% 15%;
    flex-grow: 1;
    width: 100%;
}

/* Linke Spalte: Navbar */
.navbar {
    background-color: rgb(4, 4, 90);
    min-height: 100%;
}

.navbar ul {
    list-style: none;
    padding: 20px 10px;
}

.navbar li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    font-size: 18px;
    transition: 0.3s;
    border-radius: 5px;
    margin-bottom: 5px;
}

.navbar li a:hover {
    background-color: lightsteelblue;
    color: black;
}

/* Mittlere Spalte: Article */
article {
    padding: 30px;
    background-color: white;
    overflow-wrap: break-word; 
    /* Zentriert auch die Überschrift im Article */
    text-align: center; 
}

/* Rechte Spalte: Sidebar */
aside, .sidebar-right {
    background-color: rgb(4, 4, 90);
    padding: 20px;
    color: white;
    min-height: 100%;
}

/* ------------------------------------------------------------- */
/* 4. FOOTER                                                     */
/* ------------------------------------------------------------- */
.main-footer {
    background-color: rgb(4, 4, 90);
    color: white;
    padding: 40px 0;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ------------------------------------------------------------- */
/* 5. RESPONSIVE DESIGN (MOBILE & TABLET)                        */
/* ------------------------------------------------------------- */

@media (max-width: 991px) {
    header {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }

    header .box1, header .box3 {
        padding: 15px 20px;
    }

    .menu-icon {
        display: flex; 
    }

    header .box2 {
        grid-column: span 2;
        order: 3;
        margin-top: 0;
        border-top: 1px solid #eee;
    }

    .main-wrapper {
        display: flex;
        flex-direction: column;
    }

    .navbar {
        display: none;
        width: 100%;
    }

    .navbar.active {
        display: block; 
    }

    .navbar ul {
        text-align: center;
        padding: 10px 0;
    }

    article, aside {
        width: 100%;
    }
}

/* ------------------------------------------------------------- */
/* 6. NEWS SPEZIFISCHE KLASSEN                                   */
/* ------------------------------------------------------------- */
.news-card-vertical {
    background: white;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    text-align: left; /* Text innerhalb der News-Karten bleibt links */
}

.news-image-container-vertical {
    width: 100%;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-image-container-vertical img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Styling für die Buttons in den Inhalts-Karten */
.btn-news-link {
    display: inline-block;
    background-color: rgb(4, 4, 90); /* Dein Judo-Blau */
    color: #ffffff !important;
    padding: 10px 20px;
    margin-top: 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    font-family: sans-serif;
    border: none;
}

.btn-news-link:hover {
    background-color: rgb(2, 2, 60); /* Etwas dunkler beim Drüberfahren */
    transform: translateY(-2px); /* Kleiner Sprung-Effekt */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: #ffffff !important;
}

.btn-news-link:active {
    transform: translateY(0);
}