﻿/* UP CMS - News Enhancement CSS */

/* NEWS DETAIL LAYOUT */
.news-detail { max-width: 900px; margin: 0 auto; padding: 0 0 4rem; }
.news-detail__cover { width: 100%; max-height: 480px; overflow: hidden; border-radius: var(--radius-lg, 12px); margin-bottom: 2rem; }
.news-detail__cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-detail__hero-body { padding: 0 1.5rem 1.5rem; }
.news-detail__title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.25; color: var(--ink, #1A1F2E); margin: 0.75rem 0; }
.news-detail__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; color: var(--ink-40, #6b7280); font-size: 0.875rem; }
.news-detail__author, .news-detail__date { display: inline-flex; align-items: center; gap: 0.35rem; }
.news-detail__layout { padding: 0 1.5rem; }
.news-detail__body { max-width: 72ch; }
.news-detail__summary { font-size: 1.125rem; line-height: 1.7; color: var(--ink, #1A1F2E); border-left: 4px solid var(--red, #CC1B1B); padding-left: 1rem; margin-bottom: 2rem; font-style: italic; }
.news-detail__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ink-08, #e5e7eb); }
.news-detail__tags-label { font-size: 0.8125rem; color: var(--ink-40, #6b7280); margin-right: 0.25rem; }
.news-badge--archived { display: inline-block; background: #f3f4f6; color: #6b7280; font-size: 0.75rem; font-weight: 600; padding: 0.2em 0.75em; border-radius: 99px; text-transform: uppercase; }
.news-section-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink, #1A1F2E); margin: 2.5rem 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--ink-08, #e5e7eb); }

/* FEATURE 1: IMAGE GALLERY */
.news-gallery { margin-top: 2.5rem; }
.news-gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 768px) { .news-gallery__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .news-gallery__grid { grid-template-columns: 1fr; } }
.news-gallery__item { position: relative; display: block; overflow: hidden; border-radius: var(--radius-md, 8px); aspect-ratio: 4/3; cursor: zoom-in; text-decoration: none; }
.news-gallery__thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.news-gallery__item:hover .news-gallery__thumb { transform: scale(1.04); }
.news-gallery__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.38); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s ease; }
.news-gallery__item:hover .news-gallery__overlay { opacity: 1; }
.news-gallery__item:focus-visible { outline: 3px solid var(--red, #CC1B1B); outline-offset: 2px; }
.glightbox-clean .gclose, .glightbox-clean .gnext, .glightbox-clean .gprev { background: rgba(0,0,0,0.65); border-radius: 50%; }
.glightbox-clean .gclose:hover, .glightbox-clean .gnext:hover, .glightbox-clean .gprev:hover { background: var(--red, #CC1B1B); }

/* FEATURE 2: FILE ATTACHMENTS */
.news-attachments { margin-top: 2.5rem; }
.news-attachments__list { display: flex; flex-direction: column; gap: 0.625rem; }
.news-attach-card { display: flex; align-items: center; gap: 1rem; padding: 0.875rem 1rem; border: 1px solid var(--ink-08, #e5e7eb); border-radius: var(--radius-md, 8px); background: #fff; text-decoration: none; color: var(--ink, #1A1F2E); transition: border-color 0.2s, box-shadow 0.2s; }
.news-attach-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,.08); background: #fafafa; text-decoration: none; color: inherit; }
.news-attach-card--pdf   { border-left: 4px solid #E53935; }
.news-attach-card--word  { border-left: 4px solid #1565C0; }
.news-attach-card--excel { border-left: 4px solid #2E7D32; }
.news-attach-card--file  { border-left: 4px solid #757575; }
.news-attach-card__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.news-attach-card__icon svg { width: 22px; height: 22px; }
.news-attach-card--pdf   .news-attach-card__icon { background: #FFEBEE; color: #E53935; }
.news-attach-card--word  .news-attach-card__icon { background: #E3F2FD; color: #1565C0; }
.news-attach-card--excel .news-attach-card__icon { background: #E8F5E9; color: #2E7D32; }
.news-attach-card--file  .news-attach-card__icon { background: #F5F5F5; color: #757575; }
.news-attach-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.news-attach-card__name { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-attach-card__meta { font-size: 0.8125rem; color: var(--ink-40, #6b7280); }
.news-attach-card__download { flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #9ca3af; transition: color 0.2s; }
.news-attach-card__download svg { width: 18px; height: 18px; }
.news-attach-card:hover .news-attach-card__download { color: var(--ink, #1A1F2E); }
@media (max-width: 480px) { .news-attach-card { padding: 0.75rem; gap: 0.75rem; } .news-attach-card__download { display: none; } }

/* FEATURE 3: CONTENT TABLE STYLING */
.news-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0 0 0; border-radius: var(--radius-md, 8px); box-shadow: 0 0 0 1px var(--ink-08, #e5e7eb); }
.news-table-wrap table { margin: 0; }
.news-content table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: 0.9375rem; line-height: 1.55; }
.news-content table thead tr,
.news-content table thead tr th,
.news-content table tr:first-child th { background-color: #C70202 !important; color: #fff !important; font-weight: 700; }
.news-content table th { font-weight: 700; font-size: 0.875rem; text-transform: uppercase; padding: 0.75rem 1rem; text-align: left; border: none; white-space: nowrap; }
.news-content table td { padding: 0.6875rem 1rem; border-bottom: 1px solid var(--ink-08, #e5e7eb); border-right: 1px solid var(--ink-04, #f3f4f6); vertical-align: top; }
.news-content table td:last-child { border-right: none; }
.news-content table tbody tr:nth-child(odd)  { background-color: #fff; }
.news-content table tbody tr:nth-child(even) { background-color: #fdf4f4; }
.news-content table tbody tr:hover { background-color: #fce8e8; }
.news-content table td:first-child { font-weight: 600; }
@media (max-width: 768px) { .news-content table { display: block; overflow-x: auto; } }
.news-content p:empty, .news-content p:has(br:only-child) { display: none; }
/* Fix: tabela me border=1 nga TinyMCE nuk duhet te overflow-je */
.news-content table {
    table-layout: fixed;
    box-sizing: border-box;
}
.news-content table td,
.news-content table th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}
.news-table-wrap {
    max-width: 100%;
}