/* Blog Modal Styles */

/* Article Modal Overlay */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.article-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content Container */
.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-cream);
    border-radius: 16px 16px 0 0;
}

.modal-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Modal Body */
.modal-body {
    padding: 40px;
}

.modal-body h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.modal-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.modal-icon-large {
    font-size: 5rem;
    text-align: center;
    margin: 30px 0;
    padding: 40px;
    background: var(--accent-color);
    border-radius: 16px;
    color: var(--primary-color);
    overflow: hidden;
    max-height: 400px;
}

.modal-icon-large i {
    font-size: 5rem;
    color: var(--primary-color);
}

.modal-icon-large img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.modal-body h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 30px 0 15px;
}

.modal-body p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #444;
}

.modal-body ul {
    margin-bottom: 20px;
    padding-left: 30px;
}

.modal-body li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #444;
}

/* Clickable blog items */
.blog-item {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.blog-item .card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.blog-item h3 {
    color: var(--text-dark);
    transition: color 0.3s;
}

.blog-item:hover h3 {
    color: var(--primary-color);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .article-modal.active {
        padding: 0;
    }
    
    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .modal-header {
        border-radius: 0;
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .modal-body h1 {
        font-size: 1.5rem;
    }
    
    .modal-icon-large {
        font-size: 4rem;
        padding: 20px;
        max-height: 250px;
    }
    
    .modal-icon-large img {
        max-height: 250px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Close on backdrop click indicator */
.article-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}
