/* Blog Section Styles */
.blog-section {
    padding: 2rem 1rem;
    min-height: 60vh;
    background: rgba(215, 38, 61, 0.03);
}

/* Blog Modal Custom Scrollbar */
.blog-modal,
.blog-modal-content {
    scrollbar-width: thin;
    scrollbar-color: #d7263d rgba(215, 38, 61, 0.1);
}

.blog-modal::-webkit-scrollbar,
.blog-modal-content::-webkit-scrollbar {
    width: 10px;
}

.blog-modal::-webkit-scrollbar-track,
.blog-modal-content::-webkit-scrollbar-track {
    background: rgba(215, 38, 61, 0.05);
    border-radius: 8px;
}

.blog-modal::-webkit-scrollbar-thumb,
.blog-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d7263d, #b91e35);
    border-radius: 8px;
    border: 1px solid rgba(215, 38, 61, 0.1);
}

.blog-modal::-webkit-scrollbar-thumb:hover,
.blog-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b91e35, #9a1a2e);
}

.blog-empty {
    text-align: center;
    padding: 3rem 0;
    color: #666;
    font-size: 1.1rem;
}

/* Blog Grid */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 2rem 0;
}

/* Blog Card */
.blog-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    width: 75%;
    margin: 0 auto;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(215, 38, 61, 0.15);
    border-radius: 12px;
}

/* Alternating Layout */
.blog-card.image-left {
    flex-direction: row;
}

.blog-card.image-right {
    flex-direction: row-reverse;
}

/* Blog Card Image */
.blog-card-image {
    flex: 0 0 50%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

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

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

/* Blog Card Content */
.blog-card-content {
    flex: 1;
    padding: 0 1rem;
}

.blog-main-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.blog-main-text {
    color: #555;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
}

.blog-secondary-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #34495e;
    margin: 0 0 0.5rem 0;
}

.blog-secondary-text {
    color: #666;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.blog-card-image-secondary {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    margin: 1rem 0;
}

.blog-card-image-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #888;
}

.blog-date {
    font-weight: 500;
}

.blog-language {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 1rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover {
    background: #2980b9;
}

.pagination-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-link {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-link:hover {
    background: #e9ecef;
    color: #212529;
}

.pagination-link.active {
    background: #3498db;
    color: white;
}

.pagination-ellipsis {
    padding: 0.5rem 0.25rem;
    color: #6c757d;
    font-weight: 500;
}

/* Blog Modal */
.blog-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 0 !important;
    box-sizing: border-box;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    margin: 0;
    padding: 0;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 4rem);
    overflow-y: auto;
}

/* Modal Content Styles */
.modal-blog-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.modal-blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.modal-blog-image {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.modal-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-blog-text {
    color: #444;
    line-height: 1.7;
    margin: 1.5rem 0;
    font-size: 1.1rem;
}

.modal-blog-secondary-title {
    font-size: 1.4rem;
    font-weight: 500;
    color: #34495e;
    margin: 2rem 0 1rem 0;
}

.modal-blog-secondary-image {
    width: 100%;
    max-width: 400px;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.modal-blog-secondary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery */
.modal-blog-gallery {
    margin: 2rem 0;
}

.modal-blog-gallery h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #34495e;
    margin: 0 0 1rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fullscreen Gallery */
.gallery-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-fullscreen.active {
    display: flex;
}

.gallery-fullscreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-grid {
        gap: 2.5rem;
    }

    .blog-card {
        flex-direction: column !important;
        text-align: center;
        padding: 1.5rem;
        width: 85%;
    }

    .blog-card-image {
        flex: none;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .blog-card-content {
        padding: 1rem 0 0 0;
    }

    .blog-main-title {
        font-size: 1.3rem;
    }

    .blog-secondary-title {
        font-size: 1.1rem;
    }

    .blog-pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-blog-title {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .blog-section {
        padding: 1rem 0;
    }

    .blog-grid {
        gap: 2rem;
    }

    .blog-card {
        padding: 1rem;
        gap: 1rem;
        width: 90%;
    }

    .blog-card-image {
        height: 150px;
    }

    .blog-main-title {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-blog-title {
        font-size: 1.3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
}