/* ===================================================
   BLOG ARCHIVE LAYOUT - CLEANUP & IMPROVEMENTS
   dla /pl/category/blog/ i podobnych stron
   =================================================== */

/* ---- Force full-width layout for archive page ---- */
.main-content,
.main-content #primary,
.main-content #primary.content-area,
.main-content .site-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---- Główna struktura ---- */
.blog-recientes {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* ---- Fix dla Bootstrap row ---- */
.blog-recientes > .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    margin-left: -15px;
    margin-right: -15px;
}

/* Wymuszenie prawidłowej szerokości kolumn */
.blog-recientes .col-md-8,
.blog-recientes .col-md-4 {
    position: relative;
    min-height: 1px;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    float: none !important;
}

.blog-recientes .col-md-8 {
    flex: 0 0 66.666667% !important;
    max-width: 66.666667% !important;
    width: 66.666667% !important;
    min-width: 0;
}

.blog-recientes .col-md-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
    min-width: 0;
}

@media (max-width: 991px) {
    .blog-recientes > .row {
        flex-wrap: wrap !important;
        flex-direction: column !important;
    }

    .blog-recientes .col-md-8,
    .blog-recientes .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ---- Kolumna główna z postami ---- */
.posts-recientes {
    padding-right: 30px;
    overflow: hidden;
}

@media (max-width: 991px) {
    .posts-recientes {
        padding-right: 15px;
    }
}

/* ---- Lista postów ---- */
.blog-recientes .list.box {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.blog-recientes .list-item.box {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
}

.blog-recientes .list-item.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ---- Obrazek posta ---- */
.blog-recientes .post-thumb {
    flex: 0 0 35%;
    max-width: 300px;
    overflow: hidden;
}

.blog-recientes .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 220px;
    transition: transform 0.4s ease;
}

.blog-recientes .list-item.box:hover .post-thumb img {
    transform: scale(1.05);
}

/* ---- Treść posta ---- */
.blog-recientes .post-content {
    flex: 1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
}

.blog-recientes .entry-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-recientes .entry-header h2 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-recientes .entry-header h2 a:hover {
    color: #00963e;
}

/* ---- Usunięcie ramki (outline) przy hover/focus na linkach ---- */
.blog-recientes .entry-header h2 a:focus,
.blog-recientes .entry-header h2 a:active,
.blog-recientes .post-meta a:focus,
.blog-recientes .post-meta a:active,
.blog-recientes .author-meta a:focus,
.blog-recientes .author-meta a:active,
.blog-recientes .author-meta .author:focus,
.blog-recientes .author-meta .author:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

.blog-recientes .entry-header h2 a,
.blog-recientes .post-meta a,
.blog-recientes .author-meta a,
.blog-recientes .author-meta .author {
    outline: none !important;
    text-decoration: none !important;
}

/* ---- Meta informacje ---- */
.blog-recientes .post-meta {
    margin-bottom: 15px;
}

.blog-recientes .author-meta {
    display: flex;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.blog-recientes .author-meta .author {
    color: #00963e;
    font-weight: 500;
}

/* ---- Treść ---- */
.blog-recientes .entry-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-recientes .entry-content p {
    margin: 0;
}

/* Override Storefront underline on entry-content links */
.blog-recientes .entry-content a {
    text-decoration: none;
}

/* ---- Link "Więcej informacji" ---- */
.blog-recientes h5.cs-margin-15px-top {
    margin-top: auto;
}

.blog-recientes h5.cs-margin-15px-top a {
    color: #00963e;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.blog-recientes h5.cs-margin-15px-top a:hover {
    gap: 12px;
}

/* ---- Sidebar ---- */
.kotha-sidebar {
    padding-left: 15px;
}

.kotha-sidebar .widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.kotha-sidebar .widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00963e;
}

/* ---- Widget "O mnie" ---- */
.about-me-content {
    text-align: center;
}

.about-me-img {
    padding: 30px 20px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

.img-me.img-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.img-me.img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-resumen {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* ---- Popularne posty ---- */
.widget-popular-post ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-popular-post li.media {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.widget-popular-post li.media:first-child {
    padding-top: 0;
}

.widget-popular-post li.media:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget-popular-post .media-left {
    flex: 0 0 70px;
}

.widget-popular-post .media-left img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.widget-popular-post .latest-post-content {
    flex: 1;
}

.widget-popular-post .latest-post-content h2 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.widget-popular-post .latest-post-content h2 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget-popular-post .latest-post-content h2 a:hover {
    color: #00963e;
}

.widget-popular-post .latest-post-content p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ---- Paginacja ---- */
.jplist-panel.box.panel-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.jplist-label {
    color: #666;
    font-size: 14px;
}

.jplist-pagination {
    display: flex;
    gap: 5px;
}

.jplist-pagination button {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
}

.jplist-pagination button:hover {
    background: #f5f5f5;
    border-color: #00963e;
    color: #00963e;
}

.jplist-pagination button.active {
    background: #00963e;
    border-color: #00963e;
    color: #ffffff;
}

/* ---- Brak wyników ---- */
.jplist-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

/* ---- Responsywność ---- */
@media (max-width: 991px) {
    .posts-recientes {
        padding-right: 15px;
        margin-bottom: 40px;
    }

    .kotha-sidebar {
        padding-left: 15px;
    }

    .blog-recientes .list-item.box {
        flex-direction: column;
    }

    .blog-recientes .post-thumb {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .blog-recientes .post-thumb img {
        min-height: 200px;
        max-height: 250px;
    }
}

@media (max-width: 767px) {
    .blog-recientes {
        padding-top: 20px;
    }

    .kotha-sidebar {
        margin-top: 30px;
    }

    .blog-recientes .entry-header h2 {
        font-size: 18px;
    }

    .blog-recientes .post-content {
        padding: 20px;
    }

    .jplist-panel.box.panel-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .kotha-sidebar .widget {
        padding: 20px 15px;
    }

    .widget-popular-post .media-left {
        flex: 0 0 60px;
    }

    .widget-popular-post .media-left img {
        width: 60px;
        height: 60px;
    }
}
