﻿.news-article {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.news-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.news-meta span {
    color: white !important;
}

.featured-image-container {
    position: relative;
    width: 100%;
    max-height: 500px;
    min-height: 300px;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.featured-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.featured-image-container:hover .featured-image {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.featured-image-container:hover .image-overlay {
    opacity: 1;
}

.content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
}

    .content-body p {
        margin-bottom: 1.5rem;
        text-align: justify;
    }

.gallery-header {
    position: relative;
}

.gallery-controls {
    display: flex;
    gap: 0.5rem;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.gallery-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.gallery-image-container:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-image-container:hover .gallery-overlay {
    opacity: 1;
}

#imageModal .modal-content {
    background: rgba(0, 0, 0, 0.95);
}

#imageModal .modal-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
}

#imageModal .modal-footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
}

.image-viewer-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 100px;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: grab;
}

    .modal-image:active {
        cursor: grabbing;
    }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white !important;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
}

    .nav-btn:hover {
        opacity: 1;
        background: rgba(0, 0, 0, 0.9) !important;
        transform: translateY(-50%) scale(1.1);
    }

.nav-btn-prev {
    right: 20px;
}

.nav-btn-next {
    left: 20px;
}

.zoom-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

    .zoom-indicator.show {
        opacity: 1;
    }

.thumbnails-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .thumbnail:hover {
        border-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }

    .thumbnail.active {
        border-color: #007bff;
        box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
    }

.other-news-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.share-buttons a,
.share-buttons button {
    transition: transform 0.2s ease;
}

    .share-buttons a:hover,
    .share-buttons button:hover {
        transform: translateY(-2px);
    }

@media (max-width: 1200px) {
    .featured-image-container {
        max-height: 450px;
        min-height: 250px;
    }

    .gallery-image-container {
        min-height: 180px;
        max-height: 250px;
    }

    .image-viewer-container {
        padding: 80px 80px;
    }
}

@media (max-width: 992px) {
    .featured-image-container {
        max-height: 400px;
        min-height: 220px;
    }

    .gallery-image-container {
        min-height: 160px;
        max-height: 220px;
    }

    .image-viewer-container {
        padding: 80px 60px;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
    }

    .nav-btn-prev {
        right: 10px;
    }

    .nav-btn-next {
        left: 10px;
    }
}

@media (max-width: 768px) {
    .news-article {
        padding: 1rem;
    }

    .news-title {
        font-size: 1.8rem;
    }

    .featured-image-container {
        max-height: 300px;
        min-height: 200px;
    }

    .gallery-image-container {
        min-height: 140px;
        max-height: 200px;
    }

    .admin-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .share-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .image-viewer-container {
        padding: 80px 40px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }

    .zoom-indicator {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
}

@media (max-width: 576px) {
    .featured-image-container {
        max-height: 250px;
        min-height: 180px;
    }

    .gallery-image-container {
        min-height: 120px;
        max-height: 180px;
    }

    .image-overlay,
    .gallery-overlay {
        font-size: 1.2rem;
    }

    .image-viewer-container {
        padding: 70px 20px;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .nav-btn-prev {
        right: 5px;
    }

    .nav-btn-next {
        left: 5px;
    }

    #imageModal .modal-header .btn-group {
        display: flex;
        flex-wrap: wrap;
    }

        #imageModal .modal-header .btn-group .btn {
            padding: 0.25rem 0.5rem;
            font-size: 0.8rem;
        }
}
