.news-detail-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}
.news-detail-cover {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.news-detail-content {
    padding: 40px;
}
.news-detail-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.news-detail-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0 0 24px;
    line-height: 1.3;
}
.news-detail-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
}
.news-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}
.news-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 40px;
}
.news-detail-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}
.news-detail-gallery img:hover {
    transform: scale(1.03);
}
.news-detail-attachments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}
.news-detail-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    margin-right: 10px;
    margin-bottom: 10px;
}
.news-detail-file:hover {
    background: #e5e7eb;
}

/* Modal Styles for News Gallery */
.news-gallery-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.news-gallery-modal.is-open { opacity: 1; visibility: visible; }
.news-gallery-modal__backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(4px);
}
.news-gallery-modal__dialog {
    position: relative; width: 100vw; height: 100vh;
    display: flex; flex-direction: column; overflow: hidden; pointer-events: none;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.news-gallery-modal.is-open .news-gallery-modal__dialog {
    transform: scale(1);
}

@keyframes slideRight {
    0% { opacity: 0; transform: translateX(60px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideLeft {
    0% { opacity: 0; transform: translateX(-60px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes popImage {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
.animate-slide-right { animation: slideRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slide-left { animation: slideLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-pop { animation: popImage 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.news-gallery-modal__close {
    position: absolute; top: 20px; right: 24px; background: rgba(0,0,0,0.5); border: none;
    font-size: 2rem; color: #fff; cursor: pointer; z-index: 10; pointer-events: auto;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background 0.2s;
}
.news-gallery-modal__close:hover { background: rgba(0,0,0,0.8); }
.news-gallery-modal__stage {
    flex: 1; position: relative; overflow: hidden; pointer-events: auto;
    touch-action: none; cursor: grab; display: flex; align-items: center; justify-content: center;
}
.news-gallery-modal__stage.is-grabbing { cursor: grabbing; }
.news-gallery-modal__img {
    height: auto; width: auto; max-height: 90vh; max-width: 90vw;
    object-fit: contain; display: block;
    transform-origin: center center; will-change: transform; transition: transform 0.1s ease-out;
}
.news-gallery-controls {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #fff; border-radius: 30px; display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); z-index: 10; pointer-events: auto;
}
.news-gallery-controls button {
    background: #f3f4f6; border: none; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    font-size: 1.2rem; color: #4b5563; transition: all 0.2s;
}
.news-gallery-controls button:hover { background: #e5e7eb; color: #111827; }
.news-gallery-controls span { font-weight: 500; font-size: 0.95rem; min-width: 50px; text-align: center; color: #374151; }

.news-gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; cursor: pointer; transition: background 0.2s; z-index: 5; pointer-events: auto;
}
.news-gallery-nav:hover { background: rgba(255,255,255,0.2); }
.news-gallery-nav--prev { left: 20px; }
.news-gallery-nav--next { right: 20px; }

