/* NEWS/BLOG ARCHIVE PAGE - Standard List Layout + Mobile Card Layout */

body.home.blog,
body.archive,
body.blog:not(.single) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.home.blog #page,
body.archive #page,
body.blog:not(.single) #page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.home.blog .site-content,
body.archive .site-content,
body.blog:not(.single) .site-content {
    flex: 1;
}

body.home.blog #colophon,
body.archive #colophon,
body.blog:not(.single) #colophon {
    margin-top: auto;
}

/* Page Header Styling - angepasst an Corporate Design */
body.home.blog .page-header,
body.archive .page-header,
body.blog:not(.single) .page-header {
    padding: 40px;
    background-color: white;
    border: none; 
}

body.blog .page-header .entry-title {
    color: #009a93 !important;
    font-size: 40px;
    letter-spacing: 3.5px;
    text-align: center;
}

body.blog .site-content {
    border: none;    
}

body.blog div#primary.content-area {
    padding-top: 0;
    padding-bottom: 0;
}

/* DESKTOP VERSION - Horizontale Card Layout (≥ 992px) */
@media screen and (min-width: 992px) {
    body.blog .site-content {
        padding: 0 30px 40px;
    }
    
    body.blog div#content-inside {
        margin-bottom: 0;
        border-radius: 0;
        background-color: transparent;
    }

    /* News Grid - eine Spalte für horizontale Cards */
    body.blog .site-main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 900px;
        margin: 0 auto;
    }

    /* Horizontale News-Artikel Karten */
    body.blog .list-article {
        background-color: #fff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
        display: flex;
        flex-direction: row;
        border: none;
        padding: 0;
        margin: 0;
        min-height: 200px;
        /* Animation für Desktop News-Cards - initial unsichtbar */
        opacity: 0;
        transform: translateY(20px);
    }

    /* Animation für Desktop News-Cards wird sichtbar */
    body.blog .list-article.visible {
        opacity: 1;
        transform: translateY(0);
    }

    body.blog .list-article:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    /* Sicherstellen, dass hover-Effekt auch bei sichtbaren Karten funktioniert */
    body.blog .list-article.visible:hover {
        transform: translateY(-3px);
    }

    /* Bild-Container links - bis zum Rand */
    body.blog .list-article-thumb {
        display: block !important;
        width: 40%;
        height: auto;
        min-height: 200px;
        overflow: hidden;
        position: relative;
        float: none;
        margin: 0;
    }

    body.blog .list-article-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    body.blog .list-article:hover .list-article-thumb img {
        transform: scale(1.03);
    }

    /* Content-Bereich rechts */
    body.blog .list-article-content {
        width: 60%;
        padding: 30px 40px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Titel Styling */
    body.blog .entry-header {
        margin-top: 0;
        margin-bottom: 15px;
    }

    body.blog .entry-header .entry-title {
        font-size: 24px !important;
        margin-bottom: 15px !important;
        letter-spacing: 1px !important;
        color: #009a93 !important;
        line-height: 1.3 !important;
        font-family: 'Times New Roman' !important;
        font-weight: 600 !important;
    }

    body.blog .entry-header .entry-title a {
        color: #009a93 !important;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    body.blog .entry-header .entry-title a:hover {
        color: #68bfbb !important;
        text-decoration: none;
    }

    /* Meta-Informationen ausblenden */
    body.blog .list-article-meta {
        display: none !important;
    }

    /* Content Styling */
    body.blog .entry-summary,
    body.blog .entry-content {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
        flex-grow: 1;
        color: #555;
    }

    body.blog .entry-summary p,
    body.blog .entry-content p {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }

    body.blog .entry-summary p:last-child,
    body.blog .entry-content p:last-child {
        margin-bottom: 0 !important;
    }

    /* Read More Button */
    body.blog .more-link {
        display: inline-block;
        margin-top: 15px;
        padding: 10px 25px;
        background-color: #009a93;
        color: white !important;
        text-decoration: none;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: background-color 0.3s ease;
        align-self: flex-start;
    }

    body.blog .more-link:hover {
        background-color: #007a73;
        color: white !important;
        text-decoration: none;
    }
}


/* MOBILE VERSION - Card Layout unter 992px (angelehnt an Über uns Karten) */
@media screen and (max-width: 991px) {
    body.blog .site-content {
        padding: 0 15px 30px;
    }
    
    body.blog div#content-inside {
        margin-bottom: 0;
        border-radius: 0;
        background-color: transparent;
    }
    
    body.home.blog .page-header,
    body.archive .page-header,
    body.blog:not(.single) .page-header {
        padding: 30px 15px;
    }
    
    body.blog .page-header .entry-title {
        font-size: 28px !important;
        letter-spacing: 2px !important;
    }

    /* News Grid - ähnlich wie about-us-container */
    body.blog .site-main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: none;
        margin: 0;
    }

    /* Einzelne News-Artikel als Karten - ähnlich wie about-us-card */
    body.blog .list-article {
        background-color: #fff;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
        display: flex;
        flex-direction: column;
        border: none;
        padding: 0;
        margin: 0;
        /* Animation für News-Cards - initial unsichtbar */
        opacity: 0;
        transform: translateY(20px);
    }

    /* Animation für News-Cards wird sichtbar */
    body.blog .list-article.visible {
        opacity: 1;
        transform: translateY(0);
    }

    body.blog .list-article:hover {
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
        transform: scale(1.02);
    }

    /* Sicherstellen, dass hover-Effekt auch bei sichtbaren Karten funktioniert */
    body.blog .list-article.visible:hover {
        transform: scale(1.02);
    }

    /* Bild-Container - ähnlich wie about-us-card-img */
    body.blog .list-article-thumb {
        display: block !important;
        height: 200px;
        overflow: hidden;
        position: relative;
        width: 100%;
        float: none;
        margin: 0;
    }

    body.blog .list-article-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    body.blog .list-article:hover .list-article-thumb img {
        transform: scale(1.05);
    }

    /* Content-Bereich - ähnlich wie about-us-card Inhalt */
    body.blog .list-article-content {
        padding: 25px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    /* Titel Styling - ähnlich wie about-us-card h3 */
    body.blog .entry-header {
        margin-top: 0;
        margin-bottom: 15px;
    }

    body.blog .entry-header .entry-title {
        font-size: 20px !important;
        margin-bottom: 10px !important;
        letter-spacing: 1px !important;
        color: #009a93 !important;
        line-height: 1.3 !important;
        font-family: 'Times New Roman' !important;
        font-weight: 600 !important;
    }

    body.blog .entry-header .entry-title a {
        color: #009a93 !important;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    body.blog .entry-header .entry-title a:hover {
        color: #68bfbb !important;
        text-decoration: none;
    }

    /* Meta-Informationen AUSBLENDEN wie gewünscht */
    body.blog .list-article-meta {
        display: none !important;
    }

    /* Excerpt/Content Styling - ähnlich wie about-us-card p */
    body.blog .entry-summary,
    body.blog .entry-content {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 0 !important;
        flex-grow: 1;
        color: #555;
    }

    body.blog .entry-summary p,
    body.blog .entry-content p {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }

    body.blog .entry-summary p:last-child,
    body.blog .entry-content p:last-child {
        margin-bottom: 0 !important;
    }

    /* Read More Button */
    body.blog .more-link {
        display: inline-block;
        margin-top: 15px;
        padding: 8px 20px;
        background-color: #009a93;
        color: white !important;
        text-decoration: none;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: background-color 0.3s ease;
        align-self: flex-start;
    }

    body.blog .more-link:hover {
        background-color: #007a73;
        color: white !important;
        text-decoration: none;
    }
}

@media screen and (max-width: 480px) {
    body.blog .page-header .entry-title {
        font-size: 24px !important;
        letter-spacing: 1px !important;
    }
    
    body.blog .list-article-content {
        padding: 20px;
    }
    
    body.blog .entry-header .entry-title {
        font-size: 18px !important;
    }
}

/* Pagination Styling für alle Bildschirmgrößen */
body.blog .navigation.pagination {
    text-align: center;
    margin-top: 40px;
    padding: 30px 0;
}

body.blog .navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

body.blog .navigation.pagination .nav-links .page-numbers {
    padding: 10px 15px;
    background-color: #fff;
    color: #009a93;
    text-decoration: none;
    border: 2px solid #009a93;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

body.blog .navigation.pagination .nav-links .page-numbers:hover,
body.blog .navigation.pagination .nav-links .page-numbers.current {
    background-color: #009a93;
    color: white;
}