
/* Wrapper z maksymalną szerokością */
.cpb-wrapper {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

/* Główny kontener z max-width */
.cpb-container {
    max-width: 1200px !important;
    margin: auto;
    align-items: center;
}

/* Nagłówek z tytułem i linkiem */
.cpb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.cpb-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.cpb-view-all {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cpb-view-all:hover {
    color: #007cba;
}

.cpb-view-all svg {
    width: 16px;
    height: 16px;
}

/* Siatka postów */
.cpb-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Karta posta */
.cpb-post-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cpb-post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.cpb-post-link:hover {
    text-decoration: none !important;
}

/* Miniaturka */
.cpb-post-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
    border-radius: 8px;
}

.cpb-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.cpb-placeholder-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Zawartość posta */
.cpb-post-content {
    padding: 15px;
}

.cpb-post-title {
    margin: 0.6em 0 0.6em 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

/* Meta informacje */
.cpb-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #a0a7ab;
}

.cpb-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpb-meta-right {
    margin-left: auto;
}

.cpb-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cpb-author-name {
    font-weight: 500;
    color: #a0a7ab;
}

.cpb-post-date {
    opacity: 0.8;
}

/* Responsywność - duże ekrany */
@media (max-width: 1200px) {
    .cpb-posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsywność - tablety landscape (769px - 1024px) */
@media (max-width: 1024px) {
    .cpb-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Responsywność - tablety portrait */
@media (max-width: 768px) {
    .cpb-wrapper {
        padding: 0 15px;
    }
    
    .cpb-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cpb-post-title {
        font-size: 16px;
    }
}

/* Responsywność - duże telefony */
@media (max-width: 600px) {
    .cpb-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Responsywność - małe telefony */
@media (max-width: 480px) {
    .cpb-wrapper {
        padding: 0 10px;
    }
    
    .cpb-posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cpb-header {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    
    .cpb-title {
        font-size: 20px;
    }
    
    .cpb-view-all {
        font-size: 13px;
        white-space: nowrap;
    }
    
    .cpb-post-content {
        padding: 12px;
    }
    
    .cpb-post-title {
        font-size: 15px;
    }
    
    .cpb-post-meta {
        font-size: 11px;
    }
    
    .cpb-author-avatar {
        width: 28px;
        height: 28px;
    }
}

/* Style dla panelu admina */
.cpb-admin-container {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cpb-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.cpb-instructions h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #23282d;
}

.cpb-instructions code {
    background: #fff;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: inline-block;
    margin: 5px 0;
}
