/* =============================================================================
   BLOG POSTS LIST - Featured Hero Layout mit FESTEN Bildgrößen
   =============================================================================

   ANPASSBARE WERTE (suche nach diesen Variablen):
   - --featured-height: Höhe des Featured-Bereichs (Standard: 350px)
   - --card-image-width: Breite der kleinen Artikel-Bilder (Standard: 140px)
   - --card-image-height: Höhe der kleinen Artikel-Bilder (Standard: 120px)

   ============================================================================= */

/* -----------------------------------------------------------------------------
   CSS Variablen - HIER GRÖSSEN ANPASSEN
   ----------------------------------------------------------------------------- */
:root {
    /* === BILDGRÖSSEN === */
    --featured-height: 350px;          /* Höhe des Featured-Artikels */
    --featured-image-width: 55%;       /* Breite des Featured-Bildes */
    --card-image-width: 140px;         /* Breite der kleinen Bilder */
    --card-image-height: 120px;        /* Höhe der kleinen Bilder */

    /* === FARBEN === */
    --blog-primary: #0077b6;           /* Hauptfarbe (Blau) */
    --blog-primary-light: #e0f2fe;     /* Helles Blau */
    --blog-text-dark: #1a1a2e;         /* Dunkler Text */
    --blog-text-muted: #64748b;        /* Grauer Text */
    --blog-text-light: #94a3b8;        /* Heller grauer Text */
    --blog-bg-white: #ffffff;          /* Weisser Hintergrund */
    --blog-bg-light: #f8fafc;          /* Leicht grauer Hintergrund */

    /* === SCHATTEN === */
    --blog-shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
    --blog-shadow-md: 0 4px 24px rgba(0,0,0,0.1);
    --blog-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);

    /* === RADIEN === */
    --blog-radius-md: 16px;
    --blog-radius-lg: 20px;
}

/* -----------------------------------------------------------------------------
   Blog Header
   ----------------------------------------------------------------------------- */
.blog-header {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--light);
}

.blog-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 700;
    animation: fadeIn 0.8s ease-out;
}

.blog-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------------------------------------------------
   Blog Content Container
   ----------------------------------------------------------------------------- */
.blog-content {
    padding: 3rem 2rem 4rem;
    background: var(--blog-bg-light);
    min-height: 60vh;
}

.blog-content .container {
    max-width: 1100px;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Featured Post (FESTE HOEHE!)
   ----------------------------------------------------------------------------- */
.post-featured {
    display: grid;
    grid-template-columns: var(--featured-image-width) 1fr;
    background: var(--blog-bg-white);
    border-radius: var(--blog-radius-lg);
    overflow: hidden;
    box-shadow: var(--blog-shadow-md);
    margin-bottom: 2.5rem;
    transition: box-shadow 0.3s ease;
}

.post-featured:hover {
    box-shadow: var(--blog-shadow-hover);
}

/* Featured Bild Container - FESTE HOEHE */
.post-featured__image {
    position: relative;
    width: 100%;
    height: var(--featured-height);
    max-height: var(--featured-height);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

/* Featured Bild - object-fit cover für korrektes Cropping */
.post-featured__image img {
    width: 100%;
    height: 100%;
    max-height: var(--featured-height);
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.post-featured:hover .post-featured__image img {
    transform: scale(1.03);
}

/* Platzhalter wenn kein Bild */
.post-featured__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255, 255, 255, 0.4);
}

/* Featured Content */
.post-featured__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Meta-Bereich (Kategorie + Featured Badge) */
.post-featured__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-featured__badge {
    color: var(--blog-text-light);
    font-size: 0.8rem;
    font-style: italic;
}

/* Kategorie-Badge */
.post-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--blog-primary), #00b4d8);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-category--small {
    background: var(--blog-primary-light);
    color: var(--blog-primary);
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
}

/* Featured Titel - mit Textbegrenzung */
.post-featured__title {
    font-size: 1.5rem;
    line-height: 1.35;
    margin-bottom: 1rem;
    color: var(--blog-text-dark);
    font-weight: 600;
    /* Begrenzt auf 3 Zeilen */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured Teaser - mit Textbegrenzung */
.post-featured__excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--blog-text-muted);
    margin-bottom: 1.25rem;
    /* Begrenzt auf 3 Zeilen */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured Info (Datum + Lesezeit) */
.post-featured__info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--blog-text-muted);
}

.post-featured__info span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Featured Link */
.post-featured__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    color: var(--blog-primary);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.post-featured__link:hover {
    gap: 0.75rem;
}

/* -----------------------------------------------------------------------------
   Link Styling (entfernt Unterstriche)
   ----------------------------------------------------------------------------- */
.post-featured-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* -----------------------------------------------------------------------------
   Weitere Artikel Überschrift
   ----------------------------------------------------------------------------- */
.posts-section-title {
    font-size: 1.1rem;
    color: var(--blog-text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   Posts Grid (Weitere Artikel)
   ----------------------------------------------------------------------------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* -----------------------------------------------------------------------------
   Post Card (FESTE BILDGROESSE!)
   ----------------------------------------------------------------------------- */
.post-card {
    display: flex;
    gap: 1.25rem;
    background: var(--blog-bg-white);
    border-radius: var(--blog-radius-md);
    padding: 1rem;
    box-shadow: var(--blog-shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--blog-shadow-hover);
    transform: translateY(-2px);
}

/* Card Bild - WICHTIG: Feste Größe! */
.post-card__image {
    width: var(--card-image-width);
    height: var(--card-image-height);
    min-width: var(--card-image-width);
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

/* Platzhalter wenn kein Bild */
.post-card__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255, 255, 255, 0.4);
}

/* Card Content */
.post-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Card Titel - mit Textbegrenzung */
.post-card__title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0.5rem 0;
    color: var(--blog-text-dark);
    font-weight: 600;
    /* Begrenzt auf 2 Zeilen */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Info */
.post-card__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--blog-text-light);
    margin-top: 0.5rem;
}

.post-card__info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Separator */
.post-card__info .separator {
    width: 3px;
    height: 3px;
    background: #cbd5e1;
    border-radius: 50%;
}

/* -----------------------------------------------------------------------------
   Leere Liste / Keine Artikel
   ----------------------------------------------------------------------------- */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--blog-bg-white);
    border-radius: var(--blog-radius-md);
    box-shadow: var(--blog-shadow-sm);
}

.blog-empty p {
    font-size: 1.1rem;
    color: var(--blog-text-muted);
    margin-bottom: 2rem;
}

/* -----------------------------------------------------------------------------
   Zurück-Button
   ----------------------------------------------------------------------------- */
.back-link {
    text-align: center;
    margin-top: 3rem;
}

.back-link .btn {
    background: var(--blog-bg-white);
    color: var(--primary);
    border: 2px solid #e2e8f0;
}

.back-link .btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* -----------------------------------------------------------------------------
   Responsive Design
   ----------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 900px) {
    :root {
        --featured-height: 300px;
        --featured-image-width: 50%;
    }

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

    .post-featured__title {
        font-size: 1.3rem;
    }

    .post-featured__content {
        padding: 1.5rem;
    }

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

    .post-card {
        padding: 1rem;
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --featured-height: 200px;
        --card-image-width: 100px;
        --card-image-height: 100px;
    }

    .blog-header {
        padding: 6rem 1.5rem 2.5rem;
    }

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

    .blog-subtitle {
        font-size: 1rem;
    }

    .blog-content {
        padding: 2rem 1rem 3rem;
    }

    .post-featured {
        grid-template-columns: 1fr;
    }

    .post-featured__image {
        height: 200px;
        max-height: 200px;
    }

    .post-featured__content {
        padding: 1.25rem;
    }

    .post-featured__title {
        font-size: 1.2rem;
    }

    .post-featured__excerpt {
        font-size: 0.9rem;
    }

    .post-featured__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .post-card {
        padding: 0.75rem;
        gap: 1rem;
    }

    .post-card__title {
        font-size: 0.95rem;
    }
}

/* Kleine Mobile */
@media (max-width: 480px) {
    :root {
        --featured-height: 180px;
    }

    .blog-header {
        padding: 5rem 1rem 2rem;
    }

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

    .post-featured__image {
        height: 180px;
        max-height: 180px;
    }

    .post-featured__content {
        padding: 1rem;
    }

    .post-featured__title {
        font-size: 1.1rem;
    }

    .post-featured__meta {
        flex-wrap: wrap;
    }

    .post-card__image {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
}
