/* Page Header */
.page-header {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.page-header h1 {
    color: white;
    font-size: 3.5em;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .page-header {
        height: 250px;
        margin-bottom: 30px;
    }

    .page-header h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .page-header {
        height: 200px;
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.8em;
    }
}

/* Article Grid (3 columns) */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
}

.article-item {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 2px solid #ebebeb;
}

.article-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(129, 0, 0, 0.25);
}

.article-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.article-item h3 {
    padding: 20px;
    margin: 0;
    text-align: center;
    background: #f9f9f9;
    color: #333;
    font-size: 1.3em;
}

@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 30px;
    }
    
    .page-header h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
        margin: 30px auto;
    }

    .article-cover {
        height: 300px;
    }

    .article-item h3 {
        font-size: 1.1em;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .article-grid {
        padding: 0 15px;
        gap: 15px;
        margin: 20px auto;
    }

    .article-cover {
        height: 250px;
    }

    .article-item h3 {
        font-size: 1em;
        padding: 12px;
    }
}

/* Gallery Styles */
.news-gallery {
    padding-bottom: 40px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

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

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

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}

.close {
    position: absolute;
    right: 30px;
    top: 20px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close:hover {
    color: #810000;
}

.modal-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 1001;
}

.prev, .next {
    background: #810000;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.prev:hover, .next:hover {
    background: #600000;
}

.slide-counter {
    color: white;
    font-size: 16px;
    min-width: 60px;
    text-align: center;
}

@media (max-width: 1024px) {
    .modal-content {
        max-width: 92%;
        max-height: 85vh;
    }

    .close {
        right: 25px;
        top: 15px;
        font-size: 35px;
    }

    .modal-nav {
        bottom: 25px;
        padding: 13px 20px;
        gap: 15px;
    }

    .prev, .next {
        padding: 9px 14px;
        font-size: 18px;
    }

    .slide-counter {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-item img {
        height: 200px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .close {
        right: 15px;
        top: 10px;
        font-size: 30px;
    }

    .modal-nav {
        bottom: 20px;
        padding: 12px 15px;
        gap: 10px;
    }

    .prev, .next {
        padding: 8px 12px;
        font-size: 16px;
    }

    .slide-counter {
        font-size: 14px;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 97%;
        max-height: 75vh;
    }

    .close {
        right: 10px;
        top: 5px;
        font-size: 24px;
    }

    .modal-nav {
        bottom: 15px;
        padding: 10px 12px;
        gap: 8px;
    }

    .prev, .next {
        padding: 6px 10px;
        font-size: 14px;
    }

    .slide-counter {
        font-size: 12px;
        min-width: 45px;
    }
}
