/*
 * CSS dla systemu blogowego - dostosowany do stylu Wobis
 * Plik: css/blog.css
 */

/* ----- Układ bloga ----- */
.blog-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.blog-main-content {
    flex: 1;
    min-width: 65%;
}

.blog-sidebar {
    flex: 0 0 30%;
    min-width: 300px;
}

.blog-index-header {
    margin-bottom: 30px;
}

.blog-index-header h1 {
    margin-bottom: 10px;
}

.blog-index-header p {
    font-size: 18px;
    color: #666;
}

/* ----- Breadcrumbs ----- */
.blog-breadcrumbs {
    margin: 20px 0;
}

.breadcrumbs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs-list li {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumbs-list li:not(:last-child)::after {
    content: "›";
    margin: 0 10px;
    color: #999;
}

.breadcrumbs-list a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs-list a:hover {
    color: #FDC401;
}

.breadcrumbs-current {
    color: #333;
    font-weight: 500;
}

/* ----- Lista wpisów ----- */
.blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

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

.post-content {
    padding: 20px;
}

.post-header {
    margin-bottom: 15px;
}

.post-category {
    margin-bottom: 10px;
}

.post-category a {
    display: inline-block;
    background-color: #FDC401;
    color: #222;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #FDC401;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #777;
}

.post-date, .post-author, .post-views {
    display: inline-flex;
    align-items: center;
}

.post-meta i {
    margin-right: 5px;
}

.post-excerpt {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    background-color: #f5f5f5;
    color: #666;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-link:hover {
    background-color: #e5e5e5;
    color: #333;
}

.read-more-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #FDC401;
    color: #222;
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.read-more-btn:hover {
    background-color: #e0af00;
    transform: translateX(5px);
}

/* ----- Pojedynczy wpis ----- */
.blog-post {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.blog-post .post-header {
    padding: 25px 25px 0;
}

.blog-post .post-title {
    font-size: 28px;
    margin-bottom: 15px;
}

.blog-post .post-meta {
    margin-bottom: 20px;
}

.blog-post .post-featured-image {
    margin-bottom: 25px;
}

.blog-post .post-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.blog-post .post-content {
    padding: 0 25px 25px;
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.blog-post .post-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
}

.blog-post .post-content h3 {
    font-size: 20px;
    margin: 25px 0 12px;
}

.blog-post .post-content p {
    margin-bottom: 15px;
}

.blog-post .post-content ul,
.blog-post .post-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.blog-post .post-content li {
    margin-bottom: 8px;
}

.blog-post .post-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
}

.blog-post .post-content blockquote {
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 5px solid #FDC401;
    font-style: italic;
    color: #555;
}

.blog-post .post-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* ----- Social Share ----- */
.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-title {
    font-size: 14px;
    color: #777;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.share-link.facebook {
    background-color: #3b5998;
}

.share-link.twitter {
    background-color: #1da1f2;
}

.share-link.linkedin {
    background-color: #0077b5;
}

.share-link.email {
    background-color: #777;
}

.share-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* ----- Powiązane wpisy ----- */
.related-posts {
    margin-top: 40px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f2f2f2;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-post .post-details {
    padding: 15px;
}

.related-post .post-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.related-post .post-meta {
    font-size: 12px;
}

/* ----- Paginacja ----- */
.blog-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination-list li {
    display: inline-block;
}

.pagination-list a, .pagination-list span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-item.active span {
    background-color: #FDC401;
    color: #222;
    font-weight: 600;
}

.pagination-list a:hover {
    background-color: #f5f5f5;
}

.pagination-ellipsis span {
    background-color: transparent;
    box-shadow: none;
}

.pagination-prev, .pagination-next {
    font-weight: 600;
}

.pagination-prev.disabled span,
.pagination-next.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ----- Sidebar Widgets ----- */
.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f2f2f2;
}

/* Search Widget */
.search-form {
    position: relative;
}

.search-form-group {
    position: relative;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 12px 20px;
    padding-right: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-form input[type="text"]:focus {
    border-color: #FDC401;
    outline: none;
}

.search-submit {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background-color: transparent;
    border: none;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}

.search-submit:hover {
    color: #FDC401;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f2;
}

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

.category-item a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.category-item a:before {
    content: "›";
    margin-right: 8px;
    color: #FDC401;
    font-weight: 700;
}

.category-item a:hover,
.category-item a.active {
    color: #FDC401;
}

/* Popular Posts Widget */
.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts-list .post-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f2f2f2;
}

.popular-posts-list .post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-posts-list .post-thumbnail {
    flex: 0 0 80px;
    margin-right: 15px;
}

.popular-posts-list .post-thumbnail img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

.popular-posts-list .post-details {
    flex: 1;
}

.popular-posts-list .post-title {
    font-size: 15px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-posts-list .post-date {
    font-size: 12px;
    color: #888;
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f5f5f5;
    color: #666;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.tag-item:hover {
    background-color: #FDC401;
    color: #222;
}

.tag-count {
    font-size: 11px;
    opacity: 0.8;
}

/* Info Widget */
.info-widget .widget-content {
    text-align: center;
}

.info-widget p {
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FDC401;
    color: #222;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #e0af00;
}

.btn-primary {
    background-color: #FDC401;
    color: #222;
}

/* No Posts */
.blog-no-posts {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    text-align: center;
}

.blog-no-posts p {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

/* Category and Tag Headers */
.category-header,
.tag-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.category-title,
.tag-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-description,
.tag-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.category-meta,
.tag-meta {
    font-size: 14px;
    color: #888;
}

/* Responsywność */
@media (max-width: 991px) {
    .blog-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        width: 100%;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

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

    .blog-post .post-title {
        font-size: 24px;
    }

    .pagination-list a, .pagination-list span {
        min-width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .post-meta {
        flex-direction: column;
        gap: 5px;
    }

    .post-category a {
        font-size: 10px;
    }

    .blog-post .post-title {
        font-size: 20px;
    }

    .sidebar-widget {
        padding: 15px;
    }
}