/* Blog Section Styles */
.blog-section-wrapper {
    font-family: 'Arial', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-section-header h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.blog-section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-section-container {
    position: relative;
    min-height: 300px;
}

.blog-section-posts {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Show 4 columns */
    gap: 20px; /* Adjust gap as needed */
}

/* For responsive behavior on smaller screens */
@media (max-width: 1200px) {
    .blog-section-posts {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .blog-section-posts {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

.blog-section-post {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-section-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.blog-section-post-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-section-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-section-post:hover .blog-section-post-img img {
    transform: scale(1.05);
}

.blog-section-post-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    line-height: 1.2;
}

.blog-section-post-date span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.blog-section-post-date small {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.blog-section-post-content {
    padding: 20px;
}

.blog-section-post-content h3 {
    margin: 0 0 15px;
    font-size: 1.3rem;
}

.blog-section-post-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-section-read-more {
    display: inline-block;
    color: #667eea;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-section-read-more:hover {
    color: #764ba2;
}

/* Loading Spinner */
.blog-section-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.blog-section-spinner.show {
    display: block;
}

.blog-section-spinner-circle {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: blog-section-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error Message */
.blog-section-error {
    display: none;
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
}

.blog-section-error.show {
    display: block;
}

.blog-section-retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.blog-section-retry-btn:hover {
    background: #764ba2;
}

/* Modal Styles */
.blog-section-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.blog-section-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-section-modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: blog-section-modal-fade 0.3s ease;
}

@keyframes blog-section-modal-fade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.blog-section-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-section-modal-title {
    margin: 0;
    color: #333;
}

.blog-section-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.blog-section-modal-body {
    padding: 20px;
}

.blog-section-modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.blog-section-modal-date {
    color: #666;
    font-size: 0.9rem;
}

.blog-section-share-btns {
    display: flex;
    gap: 10px;
}

.blog-section-share-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-section-modal-post-content {
    line-height: 1.6;
    color: #333;
}

.blog-section-modal-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-section-modal-content {
        width: 95%;
    }
    
    .blog-section-share-btns {
        flex-wrap: wrap;
    }
}