@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #0F172A;
    --secondary-color: #34495e;
    --accent-color: #2563EB;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    background-color: var(--border-color); /* Fallback für fehlende Bilder */
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

/* Update Logo Styles for SVG Package */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    height: 48px;
    width: auto;
    display: block;
    background-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('images/hero-hintergrund-bibliothek.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 6rem 1.5rem;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
}

/* Featured Stories (Large Cards) */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

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

.featured-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.featured-content {
    padding: 1.5rem;
}

.category-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #D4AF37;
    margin-bottom: 0.5rem;
}

/* Article Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.article-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.article-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-block {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.category-block:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Almanac Section */
.almanac-section {
    background-color: var(--primary-color);
    color: var(--white);
}

.almanac-section h2 {
    color: var(--white);
}

.almanac-entry {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-left: 4px solid #D4AF37;
    margin-bottom: 1.5rem;
}

.almanac-entry h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

/* Reader Section Layout */
.reader-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.list-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item h4 {
    margin-bottom: 0.3rem;
}

/* Newsletter */
.newsletter {
    background-color: #eceff1;
    text-align: center;
    padding: 4rem 1.5rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
}

/* Page Headers */
.page-header {
    background-color: var(--white);
    padding: 4rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

/* Article Page Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding: 4rem 0;
}

.article-main .intro {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.article-main h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-main p {
    margin-bottom: 1.5rem;
}

/* Sidebar */
.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

/* Search and Filters */
.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-container input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.search-container select {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
}

.form-feedback {
    display: none;
    padding: 1rem;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* Accordion */
.accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: 4px;
    background: var(--white);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 1rem 1.5rem;
    max-height: 1000px; /* arbitrary large value */
    border-top: 1px solid var(--border-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    margin-top: auto;
}

.footer-top {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #bdc3c7;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cookie-content {
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
    .reader-layout, .article-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }
    .nav-links.active {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .brand-logo {
        height: 36px;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .search-container {
        flex-direction: column;
    }
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    .cookie-buttons .btn {
        width: 100%;
    }
}