/* ===== Dark Mode Design ===== */
:root {
    --bg-dark: #0a0f1c;
    --bg-card: #111827;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== Header ===== */
header {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

.search-form {
    display: flex;
    background: var(--bg-card);
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.search-form input {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    outline: none;
}

.search-form button {
    background: var(--primary);
    border: none;
    padding: 0 1rem;
    color: white;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Main Content ===== */
main {
    padding: 2rem 0;
    min-height: 70vh;
}

/* ===== Hero Bereich (optional) ===== */
.hero {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ===== Posts Grid ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.post-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.5);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .content {
    padding: 1.5rem;
}

.post-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-card h2 a {
    color: var(--text-light);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--primary);
}

.post-card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-card .meta i {
    margin-right: 0.25rem;
}

.post-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid var(--border);
}

.pagination a.active,
.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== Einzelbeitrag ===== */
.post-full {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.post-full h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.featured-image {
    width: 100%;
    border-radius: 1rem;
    margin: 1.5rem 0;
}

/* ===== Kommentare ===== */
.comments-section {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.comment-content strong {
    color: var(--text-light);
}

.comment-content small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Galerie ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    background: var(--bg-card);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid var(--border);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ===== Formulare ===== */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-light);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fecaca;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #a7f3d0;
}

/* ===== Footer ===== */
footer {
    background: var(--bg-card);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
        order: 3;
    }

    nav.show {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}