/* Karla-Schrift von Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;700&display=swap');

/* Allgemeiner Stil & Basislayout */
body {
    font-family: 'Karla', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 900px;
    background-color: #fff;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    position: relative; /* Für das Overlay */
    z-index: 1; /* Stellt sicher, dass es über dem Hintergrund liegt */
}

/* Navigations-Menü */
.main-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dotted #ccc;
}

.main-nav-list {
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #777;
}

/* Header */
.section-heading {
    border-bottom: 2px solid #5cb85c;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.welcome-message {
    color: #555;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

/* Layout für Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card .card-header {
    background-color: #5cb85c;
    color: #fff;
    padding: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.info-card .card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #444;
}

.card-text {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Formular-Elemente */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-field {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-field:focus {
    outline: none;
    border-color: #5cb85c;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.2);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    justify-content: flex-start;
}

.button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background-color: #5cb85c;
    color: #fff;
}

.button-primary:hover {
    background-color: #4cae4c;
}

.button-secondary {
    background-color: #eee;
    color: #555;
    border: 1px solid #ccc;
}

.button-secondary:hover {
    background-color: #e0e0e0;
}

.button-success {
    background-color: #5cb85c;
    color: #fff;
}

.button-success:hover {
    background-color: #4cae4c;
}

.button-danger {
    background-color: #d9534f;
    color: #fff;
}

.button-danger:hover {
    background-color: #c9302c;
}

.button-info {
    background-color: #5bc0de;
    color: #fff;
}

.button-info:hover {
    background-color: #46b8da;
}

.button-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Listen-Layout für die Seiten */
.page-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.page-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.page-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.page-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.page-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-item-actions form {
    margin: 0;
}

.published-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.published-true {
    background-color: #5cb85c; /* Grün */
}

.published-false {
    background-color: #aaa; /* Grau */
}

/* Generische Abstand-Klassen */
.spacing-bottom-small { margin-bottom: 1rem !important; }
.spacing-bottom-medium { margin-bottom: 1.5rem !important; }
.spacing-bottom-large { margin-bottom: 2rem !important; }

/* Media Queries für mobile Ansicht */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .main-container {
        padding: 1rem;
    }

    .row, .column {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Hauptmenü im mobilen Modus */
    .main-nav-list {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
    }

    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }

    /* Card-Layout im mobilen Modus */
    .card-grid {
        grid-template-columns: 1fr;
    }

    /* Formular-Buttons im mobilen Modus */
    .button-group {
        flex-direction: column;
    }

    .button-group .button {
        width: 100%;
    }

    /* Liste im mobilen Modus */
    .page-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .page-item-content,
    .page-item-actions {
        width: 100%;
    }

    .page-item-content {
        margin-bottom: 1rem;
    }

    .page-item-actions .button {
        flex-grow: 1; /* Buttons füllen die Breite */
    }
}
