/* ==================================================================== */
/* Globales CSS                                                         */
/* Projekt: JS Demo Data and Array                                      */
/* Autor: BRULSIM                                                       */
/* ==================================================================== */

/* Grundlegende Stile für die gesamte Seite */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;          /* Basis Aufteilung fixieren */
    flex-direction: column; 
    height: 100vh;          
    flex-wrap: nowrap;      
}

/**********************/
/* Header-Stile        */
/**********************/
header {
    background-color: #564ac1; /* Violett aus deinem JS-Entwurf beibehalten */
    color: white;
    font-size: 1.2em;
}

header .header-container {
    max-width: 800px;
    margin: auto;
    padding: 20px 5%;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center; /* Vertikal zentrieren */
}

/* Menü-Stile */
header .menu-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

header a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Button-Stile im Header */
header a button {
    background-color: white;
    text-decoration: none;
    color: #564ac1; /* Farbe an violettes Theme angepasst */
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
}

header a button:hover {
    background-color: #3f3593;
    color: white;
}

/**********************/
/* Main-Bereich-Stile */
/**********************/

/* Links in der Liste */
main a {
    display: block;
    padding: 10px;
    background-color: white;
    margin: 10px 0;
    text-decoration: none;
    color: #2f286b;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

main a:hover {
    background-color: #564ac1;
    color: white;
}

/* Main-Bereich-Stile */
main {
    flex-grow: 1;
    padding: 30px 0;
    overflow: auto;
}

main .main-limit {
    padding: 0 5%;
    max-width: 800px;
    margin: auto;
}

/* Formatierung für die Beschreibungsabsätze */
main p {
    line-height: 1.6;
    margin-bottom: 1.5em;
}

/**********************/
/* Feature List Grid  */
/**********************/
#data-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}

.card-icon {
    font-size: 1.5em;
}

.card-title {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.card-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.75em;
    background-color: #564ac1;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.card-body p {
    margin: 0;
    font-size: 0.95em;
    color: #666;
    line-height: 1.5;
}

/**********************/
/* Footer-Stile        */
/**********************/
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px;      /* Etwas mehr Luft gegeben */
}

/**********************/
/* Adaptive Stile     */
/**********************/
@media screen and (max-width: 550px) {
    header h1 {
        font-size: 1.5em;
    } 
    header a button {
        font-size: 0.8em;
    }
}
@media screen and (max-width: 420px) {
    header h1 {
        font-size: 1.2em;
    }          
    header a button {
        font-size: 0.6em;
    }
}
@media screen and (max-width: 370px) {
    header .title-container h1 {
        word-break: break-all;
    }
    header .menu-container {
        flex-direction: column;
    }
}