/**
 * WordPress Posts Fetcher Module Styles
 * PrestaShop 9
 */

.wp-posts-fetcher-container {
    margin: 40px 0;
    padding: 20px;
}

.wp-posts-header {
    text-align: center;
    margin-bottom: 40px;
}

.wp-posts-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-bottom: 15px;
    position: relative;
}

.wp-posts-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #25b9d7, #1f8fa9);
}

/* Grid Layout */
.wp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* Post Item */
.wp-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wp-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

/* Post Image */
.wp-post-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.wp-post-item:hover .wp-post-image img {
    transform: scale(1.05);
}

.wp-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Post Content */
.wp-post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Post Meta */
.wp-post-meta {
    margin-bottom: 10px;
}

.wp-post-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.wp-post-date i {
    font-size: 16px;
}

/* Post Title */
.wp-post-content h3.wp-post-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.wp-post-content h3.wp-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-post-content h3.wp-post-title a:hover {
    color: #25b9d7;
}

/* Post Excerpt */
.wp-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.wp-post-excerpt p {
    margin: 0;
}

/* Post Footer */
.wp-post-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wp-post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #25b9d7;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: gap 0.3s ease;
}

.wp-post-read-more:hover {
    gap: 10px;
    color: #1f8fa9;
}

.wp-post-read-more i {
    font-size: 18px;
}

/* Empty State */
.wp-posts-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.wp-posts-empty p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wp-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .wp-posts-fetcher-container {
        padding: 15px;
        margin: 30px 0;
    }

    .wp-posts-title {
        font-size: 28px;
    }

    .wp-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wp-post-image {
        height: 180px;
    }

    .wp-post-content {
        padding: 15px;
    }

    .wp-post-content h3.wp-post-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .wp-posts-title {
        font-size: 24px;
    }

    .wp-post-content h3.wp-post-title {
        font-size: 16px;
    }

    .wp-post-excerpt {
        font-size: 13px;
    }
}
