/* Modal Overlay */
.blog-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
}

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

/* Modal Content Container */
.blog-modal .modal-content {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.blog-modal .modal-header {
    flex: 0 0 auto;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    z-index: 10;
}

.blog-modal .modal-header .modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    font-family: "Roboto", serif;
}

.blog-modal .modal-header .close {
    font-size: 40px;
    font-weight: 900;
    cursor: pointer;
    background: none;
    border: none;
    color: #92bd26;
    transition: color 0.2s ease;
}

.blog-modal .modal-header .close:hover {
    color: #000;
}

/* Modal Body */
.blog-modal .modal-body {
    flex: 1 1 auto;
    padding: 20px;
    overflow-y: auto;
}

/* Scrollbar Styling */
.blog-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.blog-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.blog-modal .modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.blog-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Blog Container Layout */
.blog-modal .blog-container {
    display: flex;
    gap: 24px;
}

.blog-modal .blog-left-column {
    flex: 2;
}

.blog-modal .blog-right-column {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
}

/* Blog Content Styles */
.blog-modal .blog-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
}

.blog-modal .blog-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #666;
    font-size: 14px;
    font-family: "Roboto", serif;
}

.blog-modal .blog-post-meta svg {
    width: 16px;
    height: 16px;
}

.blog-modal .b-subject {
    font-family: "Roboto", serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.blog-modal .b-description {
    font-family: "Roboto", serif;
    line-height: 1.6;
    color: #444;
}

/* Right Column - Related Posts */
.blog-modal .blog-right-column .title {
    font-family: "Roboto", serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    margin-left: 10px;
}

.blog-modal .blog-categories {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 6px;
}

.blog-modal .blog-categories::-webkit-scrollbar {
    width: 6px;
}

.blog-modal .blog-categories::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.blog-modal .blog-categories::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Related Post Cards */
.blog-modal .item-card {
    position: relative;
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.blog-modal .item-card:hover {
    transform: translateY(-2px);
}

.blog-modal .item-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.blog-modal .item-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
}

.blog-modal .item-card h4 {
    flex: 1;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: #0f0f0f;
    font-family: "Roboto", serif;
    min-width: 0;
    transition: 
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        font-weight 0.25s ease,
        letter-spacing 0.25s ease;
}

.blog-modal .item-card:hover h4 {
    font-weight: 700;
    /* transform: scale(1.02); */
    letter-spacing: 0.3px;
    transform-origin: left center;
}

.blog-modal .arrow-icon {
    flex-shrink: 0;
    transition: all 0.3s ease;
    transform: rotate(315deg);
    width: 1.3020833333vw;
    height: 1.3020833333vw;
    fill: #92bd26;
}

.blog-modal .item-card:hover .arrow-icon {
    transform: translateX(5px);
}

/* Loading Spinner */
.blog-modal .modal-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.blog-modal .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #9fcd22;
    border-radius: 50%;
    animation: blog-modal-spin 0.8s linear infinite;
}

@keyframes blog-modal-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-modal .blog-container {
        flex-direction: column;
        gap: 16px;
    }

    .blog-modal .blog-right-column {
        max-width: 100%;
        /* width: 100%; */
        margin-top: 16px;
    }

    .blog-modal .item-card:hover {
        transform: none;
    }
    .blog-modal .arrow-icon {
        width: 5vw;
        height: 5vw;
    }
}

@media (max-width: 767px) {
    .blog-modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .blog-modal .modal-header {
        padding: 12px 16px;
    }

    .blog-modal .modal-body {
        padding: 16px;
    }

    .blog-modal .b-subject {
        font-size: 20px;
    }
}