/* Posts Listing Shortcode - Modern Elegant Design */

/* Override Elementor container restrictions */
.posts-listing-shortcode.elegant-posts {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2c3e50;
    line-height: 1.6;
    width: 100% !important;
    max-width: none !important;
}

/* Override e-con-inner width restrictions */
.posts-listing-shortcode.elegant-posts .e-con-inner,
.posts-listing-shortcode.elegant-posts .elementor-container,
.posts-listing-shortcode.elegant-posts .elementor-section,
.posts-listing-shortcode.elegant-posts .elementor-widget-container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure grid takes full width */
.posts-listing-shortcode.elegant-posts .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100% !important;
    max-width: none !important;
}

/* Post Card */
.posts-listing-shortcode.elegant-posts .post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.posts-listing-shortcode.elegant-posts .post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Post Thumbnail */
.posts-listing-shortcode.elegant-posts .post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 240px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.posts-listing-shortcode.elegant-posts .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.posts-listing-shortcode.elegant-posts .post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.posts-listing-shortcode.elegant-posts .thumbnail-link {
    display: block;
    position: relative;
    height: 100%;
    text-decoration: none;
}

.posts-listing-shortcode.elegant-posts .thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.posts-listing-shortcode.elegant-posts .post-card:hover .thumbnail-overlay {
    opacity: 1;
}

.posts-listing-shortcode.elegant-posts .read-more-icon {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.posts-listing-shortcode.elegant-posts .no-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 48px;
}

/* Post Content */
.posts-listing-shortcode.elegant-posts .post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Post Meta */
.posts-listing-shortcode.elegant-posts .post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.posts-listing-shortcode.elegant-posts .post-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.posts-listing-shortcode.elegant-posts .post-categories a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.posts-listing-shortcode.elegant-posts .post-categories a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Style for category names without links */
.posts-listing-shortcode.elegant-posts .post-categories {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 0.5rem;
}

.posts-listing-shortcode.elegant-posts .post-date {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.posts-listing-shortcode.elegant-posts .post-date svg {
    color: #94a3b8;
}

/* Post Title */
.posts-listing-shortcode.elegant-posts .post-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1e293b;
}

.posts-listing-shortcode.elegant-posts .post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.posts-listing-shortcode.elegant-posts .post-title a:hover {
    color: #667eea;
}

/* Post Excerpt */
.posts-listing-shortcode.elegant-posts .post-excerpt {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Post Footer */
.posts-listing-shortcode.elegant-posts .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Post Author */
.posts-listing-shortcode.elegant-posts .post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.posts-listing-shortcode.elegant-posts .author-avatar img {
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s ease;
}

.posts-listing-shortcode.elegant-posts .post-card:hover .author-avatar img {
    border-color: #667eea;
}

.posts-listing-shortcode.elegant-posts .author-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
}

/* Read More Link */
.posts-listing-shortcode.elegant-posts .read-more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
}

.posts-listing-shortcode.elegant-posts .read-more-link:hover {
    background: #667eea;
    color: white;
    transform: translateX(4px);
}

.posts-listing-shortcode.elegant-posts .read-more-link svg {
    transition: transform 0.3s ease;
}

.posts-listing-shortcode.elegant-posts .read-more-link:hover svg {
    transform: translateX(2px);
}

/* Pagination */
.posts-listing-shortcode.elegant-posts .pagination {
    text-align: center;
    margin-top: 3rem;
}

.posts-listing-shortcode.elegant-posts .pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.posts-listing-shortcode.elegant-posts .pagination li {
    margin: 0;
}

.posts-listing-shortcode.elegant-posts .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    justify-content: center;
}

.posts-listing-shortcode.elegant-posts .pagination .page-numbers:hover,
.posts-listing-shortcode.elegant-posts .pagination .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* No Posts */
.posts-listing-shortcode.elegant-posts .no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.posts-listing-shortcode.elegant-posts .no-posts-icon {
    margin-bottom: 1.5rem;
    color: #94a3b8;
}

.posts-listing-shortcode.elegant-posts .no-posts h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

.posts-listing-shortcode.elegant-posts .no-posts p {
    margin: 0;
    font-size: 1rem;
    color: #64748b;
}

/* Layout Variations */
.posts-listing-shortcode.elegant-posts.layout-list .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.posts-listing-shortcode.elegant-posts.layout-list .post-card {
    flex-direction: row;
    max-height: 200px;
}

.posts-listing-shortcode.elegant-posts.layout-list .post-thumbnail {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.posts-listing-shortcode.elegant-posts.layout-list .post-content {
    padding: 1.5rem;
}

/* Custom Grid Classes */
.posts-listing-shortcode.elegant-posts.grid-2 .posts-grid {
    grid-template-columns: repeat(2, 1fr);
}

.posts-listing-shortcode.elegant-posts.grid-3 .posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

.posts-listing-shortcode.elegant-posts.grid-4 .posts-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .posts-listing-shortcode.elegant-posts .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .posts-listing-shortcode.elegant-posts.grid-3 .posts-grid,
    .posts-listing-shortcode.elegant-posts.grid-4 .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-listing-shortcode.elegant-posts .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .posts-listing-shortcode.elegant-posts.grid-2 .posts-grid,
    .posts-listing-shortcode.elegant-posts.grid-3 .posts-grid,
    .posts-listing-shortcode.elegant-posts.grid-4 .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-listing-shortcode.elegant-posts .post-content {
        padding: 1.25rem;
    }
    
    .posts-listing-shortcode.elegant-posts .post-title {
        font-size: 1.125rem;
    }
    
    .posts-listing-shortcode.elegant-posts.layout-list .post-card {
        flex-direction: column;
        max-height: none;
    }
    
    .posts-listing-shortcode.elegant-posts.layout-list .post-thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .posts-listing-shortcode.elegant-posts .posts-grid {
        gap: 1rem;
    }
    
    .posts-listing-shortcode.elegant-posts .post-thumbnail {
        height: 200px;
    }
    
    .posts-listing-shortcode.elegant-posts .post-content {
        padding: 1rem;
    }
    
    .posts-listing-shortcode.elegant-posts .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .posts-listing-shortcode.elegant-posts .pagination .page-numbers {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .posts-listing-shortcode.elegant-posts .post-card {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .posts-listing-shortcode.elegant-posts .post-title {
        color: #f1f5f9;
    }
    
    .posts-listing-shortcode.elegant-posts .post-excerpt {
        color: #94a3b8;
    }
    
    .posts-listing-shortcode.elegant-posts .post-date {
        color: #94a3b8;
    }
    
    .posts-listing-shortcode.elegant-posts .author-name {
        color: #94a3b8;
    }
    
    .posts-listing-shortcode.elegant-posts .post-footer {
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .posts-listing-shortcode.elegant-posts .pagination .page-numbers {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
        color: #94a3b8;
    }
    
    .posts-listing-shortcode.elegant-posts .no-posts {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Latest Posts Grid Styles */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    padding: 2rem 0;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
}

.post-placeholder .dashicons {
    font-size: 2.5rem;
    opacity: 0.6;
}

.post-content {
    padding: 1.25rem;
}

.post-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.post-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.post-date {
    font-size: 0.85rem;
    color: #868e96;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.read-more {
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Posts Responsive Design */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1rem 0;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1rem;
    }
    
    .post-excerpt {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-image {
        height: 160px;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Posts Listing Simple - 3 posts per row */
.posts-listing-shortcode.elegant-posts.layout-grid .posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .posts-listing-shortcode.elegant-posts.layout-grid .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .posts-listing-shortcode.elegant-posts.layout-grid .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .posts-listing-shortcode.elegant-posts.layout-grid .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
} 