/* Career Planning Widget Styles */

/* Common Grid Styles */
.cp-posts-grid {
    display: grid;
    gap: 24px;
    margin: 0;
    padding: 0;
}

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

.cp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Post Card Styles */
.cp-post-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cp-post-card:hover,
.cp-post-card.hovered {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Image Section */
.cp-post-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

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

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

/* Content Section */
.cp-post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cp-post-title {
    font-family: "DM Sans", Sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cp-post-title a {
    color: #262626;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cp-post-title a:hover {
    color: #1aaf5d;
    text-decoration: none;
}

.cp-post-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex: 1;
}

.cp-learn-more {
    color: #1aaf5d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
    margin-top: auto;
    text-align: left;
    display: inline-block;
}

.cp-learn-more:hover {
    color: #148a47;
    text-decoration: underline;
}

/* Grouped Mode Styles */
.cp-grouped-container {
    margin: 0;
}

/* Category Tabs */
.cp-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.cp-tab-button {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    position: relative;
}

.cp-tab-button:hover {
    color: #1aaf5d;
    background: none !important;
}

.cp-tab-button:focus,
.cp-tab-button:focus-visible {
    outline: none;
    background: none !important;
    color: #1aaf5d;
    box-shadow: none !important;
}

.cp-tab-button.active {
    color: #1aaf5d;
    border-bottom-color: #1aaf5d;
    font-weight: 600;
}

/* Tab Content */
.cp-tab-content {
    display: none;
}

.cp-tab-content.active {
    display: block;
}

/* Tag Sections */
.cp-tag-section {
    margin-bottom: 48px;
}

.cp-tag-section:last-child {
    margin-bottom: 0;
}

.cp-tag-title {
    font-family: "DM Sans", Sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #262626;
    display: inline-block;
}

/* Ungrouped Mode Styles */
.cp-ungrouped-container {
    margin: 0;
}

/* Pagination */
.cp-pagination {
    margin-top: 40px;
    text-align: center;
}

.cp-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: #f8f9fa;
    color: #262626;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cp-pagination .page-numbers:hover,
.cp-pagination .page-numbers.current {
    background: #262626;
    color: white;
}

.cp-pagination .page-numbers.prev,
.cp-pagination .page-numbers.next {
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cp-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cp-posts-grid {
        gap: 16px;
    }
    
    .cp-columns-4,
    .cp-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cp-post-image {
        height: 150px;
    }
    
    .cp-post-content {
        padding: 16px;
    }
    
    .cp-post-title {
        font-size: 16px;
    }
    
    .cp-tag-title {
        font-size: 20px;
    }
    
    .cp-category-tabs {
        justify-content: center;
    }
    
    .cp-tab-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cp-columns-2 {
        grid-template-columns: 1fr;
    }
    
    .cp-post-image {
        height: 120px;
    }
    
    .cp-category-tabs {
        flex-direction: column;
    }
    
    .cp-tab-button {
        width: 100%;
        text-align: center;
    }
}
