/* CWP Blog Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

.cwp-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.cwp-blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.cwp-blog-title {
    font-family: "Poppins", Sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #00184D;
    margin: 0 0 15px 0;
    line-height: 1.2;
    padding-bottom: 0.5rem;
    position: relative;
}

.cwp-blog-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #c0c0c0 0%, #a8a8a8 100%);
    border-radius: 2px;
}

.cwp-blog-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Posts Layout */
.cwp-blog-posts {
    display: grid;
    gap: 30px;
    margin-bottom: 50px;
}

/* Grid Layout */
.cwp-blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* List Layout */
.cwp-blog-list {
    grid-template-columns: 1fr;
}

.cwp-blog-list .cwp-blog-post {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cwp-blog-list .cwp-blog-thumbnail {
    flex: 0 0 300px;
    max-width: 300px;
}

.cwp-blog-list .cwp-blog-content {
    flex: 1;
}

/* Masonry Layout */
.cwp-blog-masonry {
    column-count: 3;
    column-gap: 30px;
}

.cwp-blog-masonry .cwp-blog-post {
    break-inside: avoid;
    margin-bottom: 30px;
    display: inline-block;
    width: 100%;
}

/* Individual Post */
.cwp-blog-post {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

/* Featured Post Layout */
.cwp-blog-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.cwp-blog-featured .cwp-blog-content {
    order: 1;
}

.cwp-blog-featured .cwp-blog-featured-image {
    order: 2;
}

.cwp-blog-featured-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.cwp-blog-featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cwp-blog-featured-img:hover {
    transform: scale(1.05);
}

/* Featured Post Content Styling */
.cwp-blog-featured .cwp-blog-post-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.cwp-blog-featured .cwp-blog-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cwp-blog-featured .cwp-blog-meta {
    margin-bottom: 1.5rem;
}

/* Responsive Featured Layout */
@media (max-width: 768px) {
    .cwp-blog-featured {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .cwp-blog-featured .cwp-blog-content {
        order: 2;
    }
    
    .cwp-blog-featured .cwp-blog-featured-image {
        order: 1;
    }
    
    .cwp-blog-featured-img {
        height: 250px;
    }
    
    .cwp-blog-featured .cwp-blog-post-title {
        font-size: 1.8rem;
    }
}

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

/* Thumbnail */
.cwp-blog-thumbnail {
    position: relative;
    overflow: hidden;
}

.cwp-blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cwp-blog-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2rem;
    border: 2px dashed #dee2e6;
}

.cwp-blog-image-placeholder span {
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 500;
}

.cwp-blog-post:hover .cwp-blog-image {
    transform: scale(1.05);
}

/* Content */
.cwp-blog-content {
    padding: 25px;
}

/* Meta Information */
.cwp-blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.cwp-blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cwp-blog-meta i {
    color: #c0c0c0;
    font-size: 0.8rem;
}

.cwp-blog-category {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, rgba(168, 168, 168, 0.1) 100%);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Post Title */
.cwp-blog-post-title {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.topapp-main h3{
    font-size: 1.6rem !important;
    margin-bottom: 15px !important;
}

.cwp-blog-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cwp-blog-post-title a:hover {
    color: #c0c0c0;
}

/* Excerpt */
.cwp-blog-excerpt {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cwp-blog-excerpt{
    font-size: 1.1rem !important;
}

.cwp-blog-excerpt p {
    margin: 0;
}

/* Read More Link */
.cwp-blog-read-more {
    margin-top: auto;
}

.cwp-blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 25px;
    background: linear-gradient(135deg, #7f31ff 0%, #4279f1 100%);
    box-shadow: 0 2px 10px rgba(127, 49, 255, 0.2);
}

.cwp-blog-link:hover {
    background: linear-gradient(135deg, #7f31ff 0%, #4279f1 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(127, 49, 255, 0.3);
}

/* Pagination */
.cwp-blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    padding: 20px 0;
}

.cwp-pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.cwp-pagination a,
.cwp-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    color: #7f8c8d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 44px;
    height: 44px;
    text-align: center;
}

.cwp-pagination a:hover {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: white;
    border-color: #7f31ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.cwp-pagination .current {
    background: linear-gradient(135deg, #7f31ff 0%, #4279f1 100%);
    color: white;
    border-color: #7f31ff;
    box-shadow: 0 2px 10px rgba(127, 49, 255, 0.2);
}

.cwp-pagination .prev,
.cwp-pagination .next {
    font-weight: 700;
    padding: 12px 20px;
}

.cwp-pagination .prev:hover,
.cwp-pagination .next:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #3b82f6 100%);
}

.cwp-pagination .dots {
    border: none;
    background: none;
    color: #bdc3c7;
    cursor: default;
    padding: 12px 8px;
}

.cwp-pagination .dots:hover {
    background: none;
    transform: none;
    box-shadow: none;
}

/* No Posts */
.cwp-blog-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cwp-blog-container {
        padding: 30px 15px;
    }
    
    .cwp-blog-title {
        font-size: 2rem;
    }
    
    .cwp-blog-subtitle {
        font-size: 1rem;
    }
    
    .cwp-blog-grid {
        grid-template-columns: 1fr;
    }
    
    .cwp-blog-masonry {
        column-count: 1;
    }
    
    .cwp-blog-list .cwp-blog-post {
        flex-direction: column;
    }
    
    .cwp-blog-list .cwp-blog-thumbnail {
        flex: none;
        max-width: 100%;
    }
    
    .cwp-blog-image {
        height: 200px;
    }
    
    .cwp-blog-content {
        padding: 20px;
    }
    
    .cwp-blog-meta {
        gap: 10px;
        font-size: 0.85rem;
    }
    
    .cwp-blog-post-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .cwp-blog-title {
        font-size: 1.75rem;
    }
    
    .cwp-blog-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .cwp-blog-content {
        padding: 15px;
    }
    
    .cwp-blog-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .cwp-pagination {
        gap: 4px;
    }
    
    .cwp-pagination a,
    .cwp-pagination span {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 36px;
        height: 36px;
    }
    
    .cwp-pagination .prev,
    .cwp-pagination .next {
        padding: 8px 14px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cwp-blog-post {
    animation: fadeInUp 0.6s ease-out;
}

.cwp-blog-post:nth-child(1) { animation-delay: 0.1s; }
.cwp-blog-post:nth-child(2) { animation-delay: 0.2s; }
.cwp-blog-post:nth-child(3) { animation-delay: 0.3s; }
.cwp-blog-post:nth-child(4) { animation-delay: 0.4s; }
.cwp-blog-post:nth-child(5) { animation-delay: 0.5s; }
.cwp-blog-post:nth-child(6) { animation-delay: 0.6s; }

/* Loading State */
.cwp-blog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.cwp-blog-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7f31ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
