/* ===== FARBDEFINITIONEN ===== */
:root {
    --font-primary: 'Avenir Next', 'Avenir Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary-color: #C1A78E;    /* Pastell-Braun (Header) */
    --secondary-color: #D3D3D3;  /* Pastell-Grau (Footer) */
    --background-color: #8A8A8A; /* Mittleres Grau (Hintergrund) */
    --text-color: #4A4A4A;        /* Dunkelgrau (Text) */
    --light-gray: #E8E8E8;       /* Sehr helles Grau (In-Depth) */
}

/* ===== GRUNDDESIGN ===== */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--background-color); /* #8A8A8A */
    text-align: justify; /* BLOCKSATZ für alle Texte */
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: var(--primary-color); /* Pastell-Braun */
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-nav {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1.5rem;
}

.main-nav li a {
    color: var(--background-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.main-nav li a:hover {
    opacity: 0.8;
}

/* ===== FOOTER (OHNE BUTTONS) ===== */
footer {
    text-align: center; /* Footer bleibt zentriert */
    padding: 1.5rem;
    background-color: var(--secondary-color); /* Pastell-Grau */
    color: var(--text-color);
    margin-top: 2rem;
}

/* ===== BUTTONS (NUR IN KAPITELN) ===== */
.chapter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.button {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s, background-color 0.3s;
}

.button.bluesky {
    background-color: #0288D1;
    color: white;
}

.button.bluesky:hover {
    background-color: #0277BD;
    opacity: 0.9;
}

.button.in-depth {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.button.in-depth:hover {
    background-color: #C0C0C0;
}

/* ===== BLOG & KAPITEL ===== */
.blog-main, .chapter-main, .portfolio-main, .vlog-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--background-color);
}

.blog-header, .chapter-hero, .vlog-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    text-align: center; /* Titel bleibt zentriert */
}

.blog-subtitle {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin: 0.5rem 0 0;
    font-style: italic;
    text-align: center; /* Untertitel bleibt zentriert */
}

/* ===== KAPITEL-KARTEN (Blog) ===== */
.chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chapter-card {
    background: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.chapter-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.chapter-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.chapter-title {
    padding: 1.5rem;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    text-align: center;
}

/* ===== VIDEO-CONTAINER (Vlog) ===== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* ===== PORTFOLIO-GRID ===== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    background: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.portfolio-content {
    padding: 1.5rem;
    text-align: left; /* Portfolio-Inhalte linksbündig */
}

.portfolio-content h3 {
    margin: 0 0 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    text-align: left; /* Überschriften linksbündig */
}

.portfolio-content p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
    text-align: justify; /* BLOCKSATZ für Portfolio-Texte */
}

/* ===== IN-DEPTH-SECTION ===== */
.in-depth-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--light-gray);
    border-radius: 8px;
    text-align: justify; /* BLOCKSATZ für In-Depth-Texte */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .main-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .chapter-list, .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .blog-title {
        font-size: 2rem;
    }

    .chapter-hero, .vlog-hero {
        height: 300px;
    }

    .chapter-hero h1, .vlog-hero h1 {
        font-size: 2rem;
    }

    /* Blocksatz auf mobilen Geräten deaktivieren (bessere Lesbarkeit) */
    body, .portfolio-content p, .in-depth-section {
        text-align: left;
    }
}