body.blog-body {
    align-items: center;
    justify-content: center;
    padding: 0px;
    padding-top: 10vh;
    padding-bottom: 40px;
    background-image: url('blogphoto.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 70vh;
}

.blog-container {
    width: min(750px, 100%);
    background: rgba(23, 37, 84, 0.3);
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.blog-header h1 {
    margin-bottom: 4px;
    font-size: 1.6rem;
    color: #fbbf24;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.blog-subtitle {
    color: #fde68a;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.blog-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.blog-nav a {
    color: #fbbf24;
    text-decoration: none;
    border-bottom: 1px dashed rgba(251, 191, 36, 0.6);
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.blog-nav a:hover {
    color: #fde68a;
    border-bottom-color: rgba(253, 230, 138, 0.9);
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.blog-post {
    background: rgba(15, 30, 50, 0.3);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}

.blog-post h2 {
    color: #fbbf24;
    margin-bottom: 6px;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.blog-meta {
    color: #fde68a;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.blog-preview {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.blog-body-text {
    color: #f1f5f9;
    font-size: 1rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Modal/Popup styles */
.blog-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.blog-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.blog-modal {
    background: rgba(23, 37, 84, 0.98);
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 20px;
    padding: 28px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.blog-modal-overlay.active .blog-modal {
    transform: scale(1);
}

.blog-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fbbf24;
    font-size: 2rem;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    transition: all 0.2s ease;
}

.blog-modal-close:hover {
    color: #fde68a;
    transform: scale(1.1);
}

.blog-modal h2 {
    color: #fbbf24;
    font-size: 1.6rem;
    margin-bottom: 8px;
    padding-right: 40px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.blog-modal .blog-meta {
    color: #fde68a;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.blog-modal .blog-body-text {
    color: #f1f5f9;
    font-size: 1rem;
    line-height: 1.7;
}

.blog-empty {
    color: #fde68a;
    padding: 20px;
    border: 2px dashed rgba(251, 191, 36, 0.4);
    border-radius: 14px;
    text-align: center;
    background: rgba(15, 30, 60, 0.6);
    backdrop-filter: blur(4px);
}

@media (max-width: 700px) {
    body.blog-body {
        padding-top: 35vh;
    }
    
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-nav {
        align-items: flex-start;
    }
    
    .blog-list {
        grid-template-columns: 1fr;
    }
}
