/**
 * reports_view.css
 * Styles for the news/event single-post view and hashtag filter results.
 * Place this file at: assets/css/reports_view.css
 */

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
body {
    background: #fafafa;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
                 Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   SINGLE POST LAYOUT
════════════════════════════════════════════════════════ */
.view-layout {
    display: flex;
    max-width: 100%;
    margin: 0 auto;
    gap: 2rem;
    padding: 2rem;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
}

.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ── Navigation link ────────────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #666;
    text-decoration: none;
    font-size: .9rem;
    margin-bottom: 2rem;
    transition: color .2s;
}

.back-link:hover {
    color: #216c2a;
}

.back-link i {
    font-size: .85rem;
}

/* ── Article shell ──────────────────────────────────────────────────────────── */
.article {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.type-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #216c2a;
    background: #f0fdf4;
    padding: .4rem .8rem;
    border-radius: 2px;
    margin: 0 0 1rem 0;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #666;
    margin: 0 0 2rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.separator {
    color: #ddd;
}

.author {
    font-weight: 500;
}

/* ── Image gallery ──────────────────────────────────────────────────────────── */
.gallery {
    width: 100%;
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.gallery-item {
    width: 100%;
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity .2s;
}

.gallery-item img:hover {
    opacity: .95;
}

.gallery-item.has-more {
    cursor: pointer;
}

/* Single image — full width */
.gallery .gallery-item:only-child {
    grid-column: 1 / -1;
}

.gallery .gallery-item:only-child img {
    width: 100%;
    height: auto;
}

/* "+N more" overlay on third tile */
.more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.more-overlay:hover {
    background: rgba(0, 0, 0, .8);
}

/* ── Article body ───────────────────────────────────────────────────────────── */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 2rem;
}

.hashtag {
    color: #1a73e8;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.hashtag:hover {
    color: #1558b0;
    text-decoration: underline;
}

.auto-link {
    color: #1a73e8;
    text-decoration: underline;
    word-break: break-all;
}

.auto-link:hover {
    color: #1558b0;
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════ */
.sidebar-title {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #666;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: .5rem;
    flex: 1 1 auto;
    min-height: 0;
}

/* Custom scrollbar */
.news-list::-webkit-scrollbar        { width: 6px; }
.news-list::-webkit-scrollbar-track  { background: #f5f5f5; border-radius: 3px; }
.news-list::-webkit-scrollbar-thumb  { background: #ddd; border-radius: 3px; }
.news-list::-webkit-scrollbar-thumb:hover { background: #bbb; }

.news-card {
    display: block;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    flex-shrink: 0;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.news-card-image {
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.news-card-content {
    padding: .75rem;
}

.news-card-type {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #216c2a;
    margin-bottom: .35rem;
}

.news-card-title {
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: .35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-date {
    font-size: .7rem;
    color: #999;
}

/* ═══════════════════════════════════════════════════════
   404 — NOT FOUND
════════════════════════════════════════════════════════ */
.not-found-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.not-found-content {
    text-align: center;
    max-width: 400px;
}

.not-found-content i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.not-found-content h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: .5rem;
}

.not-found-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════
   LIGHTBOX
════════════════════════════════════════════════════════ */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(0, 0, 0, .97);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    transition: opacity .2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: .7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 1.2rem;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background .2s, border-color .2s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .3);
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, .5);
    padding: .5rem 1rem;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   HASHTAG FILTER RESULTS
════════════════════════════════════════════════════════ */
.tag-results-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.tag-results-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.tag-results-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: .75rem 0 .35rem;
}

.tag-results-count {
    font-size: .9rem;
    color: #999;
}

.tag-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.tag-post-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    transition: transform .2s, box-shadow .2s;
}

.tag-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .09);
}

.tag-post-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f5f5f5;
}

.tag-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-post-content {
    padding: 1rem;
}

.tag-post-type {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #216c2a;
    display: block;
    margin-bottom: .4rem;
}

.tag-post-title {
    font-size: .95rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-post-date {
    font-size: .75rem;
    color: #999;
}

.tag-no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #aaa;
}

.tag-no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tag-no-results p {
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media screen and (max-width: 1024px) {
    .view-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: 500px;
    }

    .main-content {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .view-layout        { padding: 1rem; }
    .article-title      { font-size: 1.8rem; }
    .article-content    { font-size: 1rem; }
    .gallery-grid       { grid-template-columns: repeat(2, 1fr); }

    .news-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-y: visible;
    }

    .lightbox-nav       { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
    .lightbox-prev      { left: 1rem; }
    .lightbox-next      { right: 1rem; }
}

@media screen and (max-width: 480px) {
    .view-layout        { padding: .5rem; }
    .article-title      { font-size: 1.5rem; }
    .article-content    { font-size: .95rem; }
    .gallery-grid       { grid-template-columns: 1fr; }
    .news-list          { grid-template-columns: repeat(2, 1fr); }
    .back-link          { margin-bottom: 1rem; }
}
