/* CSS for WordPress Blocks Frontend */

/* Common styles for both blocks */
.wp-block-custom-image-with-buttons,
.wp-block-custom-latest-articles {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Image with Buttons Block Styles */
.wp-block-custom-image-with-buttons .main-post {
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 40px;
}

.wp-block-custom-image-with-buttons .main-post h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.wp-block-custom-image-with-buttons .main-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.wp-block-custom-image-with-buttons .image-container {
    flex: 1;
    min-width: 400px;
}

.wp-block-custom-image-with-buttons .image-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.wp-block-custom-image-with-buttons .image-container img:hover {
    transform: scale(1.02);
}

.wp-block-custom-image-with-buttons .content-and-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
}

.wp-block-custom-image-with-buttons .post-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.wp-block-custom-image-with-buttons .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.wp-block-custom-image-with-buttons .action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wp-block-custom-image-with-buttons .print-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.wp-block-custom-image-with-buttons .print-btn:hover {
    background: linear-gradient(45deg, #219a52, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.wp-block-custom-image-with-buttons .download-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.wp-block-custom-image-with-buttons .download-btn:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

/* Latest Articles Block Styles */
.wp-block-custom-latest-articles .similar-posts-section {
    margin-top: 50px;
}

.wp-block-custom-latest-articles .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.wp-block-custom-latest-articles .section-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.wp-block-custom-latest-articles .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #3498db, #e74c3c);
    border-radius: 2px;
}

.wp-block-custom-latest-articles .section-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.wp-block-custom-latest-articles .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 40px;
    width: 100%;
}

.wp-block-custom-latest-articles .post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
}

.wp-block-custom-latest-articles .post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.wp-block-custom-latest-articles .post-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wp-block-custom-latest-articles .post-card:hover .post-image {
    transform: scale(1.05);
}

.wp-block-custom-latest-articles .post-content {
    padding: 25px;
}

.wp-block-custom-latest-articles .post-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wp-block-custom-latest-articles .post-excerpt {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.wp-block-custom-latest-articles .post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wp-block-custom-latest-articles .view-more-btn {
    display: inline-block;
    margin: 40px auto 0;
    padding: 12px 30px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.wp-block-custom-latest-articles .view-more-btn:hover {
    background: linear-gradient(45deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.wp-block-custom-latest-articles .category-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-block-custom-image-with-buttons .main-post h1 {
        font-size: 2rem;
    }

    .wp-block-custom-image-with-buttons .main-content {
        flex-direction: column;
        text-align: center;
    }

    .wp-block-custom-image-with-buttons .image-container {
        min-width: auto;
    }

    .wp-block-custom-image-with-buttons .action-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        margin-top: 20px;
    }

    .wp-block-custom-latest-articles .section-title {
        font-size: 1.8rem;
    }

    .wp-block-custom-latest-articles .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .wp-block-custom-latest-articles .posts-grid {
        grid-template-columns: 1fr;
    }

    .wp-block-custom-image-with-buttons .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .wp-block-custom-image-with-buttons .action-btn {
        width: 100%;
    }
}