/* CPT Tabs Widget Styles */

.cpt-tabs-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Section Header - Now inside each tab pane */
.cpt-section-header {
    text-align: center;
    margin: 40px 0 50px 0;
    padding-top: 20px;
}

.cpt-section-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.cpt-section-description {
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tabs Controls */
.cpt-tabs-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cpt-tabs-buttons {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.cpt-tab-button {
    padding: 12px 30px;
    background: #e8e8e8;
    color: #333;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 5px 5px 0 0;
    position: relative;
    outline: none;
}

.cpt-tab-button:first-child {
    border-radius: 5px 0 0 0;
}

.cpt-tab-button:last-child {
    border-radius: 0 5px 0 0;
}

.cpt-tab-button:hover {
    background: #d0d0d0;
}

.cpt-tab-button.active {
    background: #5a9db5;
    color: #ffffff;
    font-weight: 600;
}

.cpt-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #5a9db5;
}

/* Search Box */
.cpt-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    max-width: 300px;
    flex: 1;
}

.cpt-search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.cpt-search-button {
    padding: 10px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s ease;
}

.cpt-search-button:hover {
    color: #5a9db5;
}

/* Tabs Content */
.cpt-tabs-content {
    position: relative;
}

.cpt-tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.cpt-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards Grid */
.cpt-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cpt-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cpt-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.cpt-card.hidden {
    display: none;
}

.cpt-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

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

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

.cpt-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cpt-card-badge {
    display: inline-block;
    padding: 5px 12px;
    color: #4E87A0;
    font-size: 16px;
    font-weight: 400;
    border-radius: 3px;
    margin-bottom: 15px;
    align-self: flex-start;
}

.cpt-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.cpt-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cpt-card-title a:hover {
    color: #5a9db5;
}

.cpt-card-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex: 1;
}

.cpt-card-button {
    display: inline-block;
    padding: 12px 24px;
    background: #5a9db5;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.cpt-card-button:hover {
    background: #4a8da5;
    transform: translateX(5px);
}

.cpt-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cpt-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .cpt-section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .cpt-tabs-wrapper {
        padding: 40px 15px;
    }
    
    .cpt-tabs-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cpt-tabs-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cpt-tab-button {
        flex: 1;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .cpt-search-box {
        max-width: 100%;
    }
    
    .cpt-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cpt-section-title {
        font-size: 28px;
    }
    
    .cpt-section-description {
        font-size: 15px;
    }
    
    .cpt-card-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .cpt-section-title {
        font-size: 24px;
    }
    
    .cpt-tab-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .cpt-card-content {
        padding: 20px;
    }
    
    .cpt-card-title {
        font-size: 18px;
    }
    
    .cpt-card-button {
        width: 100%;
    }
}

/* Loading State */
.cpt-tabs-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation for cards appearing */
.cpt-card {
    animation: cardAppear 0.5s ease-in-out;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger animation for multiple cards */
.cpt-card:nth-child(1) { animation-delay: 0.1s; }
.cpt-card:nth-child(2) { animation-delay: 0.2s; }
.cpt-card:nth-child(3) { animation-delay: 0.3s; }
.cpt-card:nth-child(4) { animation-delay: 0.4s; }
.cpt-card:nth-child(5) { animation-delay: 0.5s; }
.cpt-card:nth-child(6) { animation-delay: 0.6s; }

.cpt-download-divider
 {
    display: flex;
    gap: 70px;
}