@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;600;700&display=swap');

/* --- Global View Styling --- */
.view-wrapper {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #333;
    background-color: #fff;
}

.breadcrumb {
    color: #800000;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

.category-pill {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 15px;
}
.category-pill.news { background: #d1ecf1; color: #0c5460; }
.category-pill.announcement { background: #fff3cd; color: #856404; }
.category-pill.event { background: #d4edda; color: #155724; }

.main-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.header-meta { color: #666; font-size: 0.95rem; margin-bottom: 30px; }

.post-timestamp {
    color: #888;
    font-style: italic;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* --- Featured Image --- */
.featured-image-wrapper {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 35px;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-image-wrapper img {
    max-width: 100%;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* --- Article Content --- */
.article-body {
    font-family: "Financier Text", Athelas, Cambria, "Source Serif Pro", Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 60px;
    white-space: pre-line; /* Preserves paragraph breaks from textarea */
}
.section-divider { border: none; border-top: 1px solid #eee; margin: 40px 0; }

/* --- Gallery Layout --- */
.gallery-section h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #800000;
    border-left: 5px solid #d4af37; /* Gold accent */
    padding-left: 15px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s;
}
.gallery-card:hover { transform: scale(1.02); }
.gallery-card img { width: 100%; height: 250px; object-fit: cover; display: block; }

.img-caption {
    padding: 12px;
    font-size: 0.85rem;
    color: #666;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    text-align: center;
}

/* --- Recent News --- */
.recent-news-title {
    color: #800000;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 18px;
}
.recent-news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.recent-news-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.recent-news-card:hover {
    border-color: #800000;
    background: #fef8f8;
}
.recent-news-type {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
}
.recent-news-type.news { background: #d1ecf1; color: #0c5460; }
.recent-news-type.announcement { background: #fff3cd; color: #856404; }
.recent-news-type.event { background: #d4edda; color: #155724; }
.recent-news-headline {
    flex-grow: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}
.recent-news-date {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #999;
}

/* --- Lightbox --- */
.lightbox { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.92); justify-content: center; align-items: center; }
.lightbox-wrapper { display: flex; flex-direction: column; align-items: center; max-width: 85%; }
.lightbox-content { max-height: 75vh; max-width: 100%; border: 2px solid rgba(255,255,255,0.2); border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }

#lightboxCounter { color: #fff; margin-top: 15px; font-size: 0.85rem; font-weight: 600; opacity: 0.7; letter-spacing: 1px; }
#lightboxCaption { color: #fff; margin-top: 5px; font-size: 1rem; text-align: center; font-weight: 400; }

.close-lightbox { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; cursor: pointer; z-index: 10000; opacity: 0.6; transition: 0.3s; }
.close-lightbox:hover { opacity: 1; }
.nav-btn { background: none; border: none; color: white; font-size: 45px; padding: 20px; cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); transition: 0.3s; opacity: 0.5; }
.nav-btn:hover { color: #fff; opacity: 1; }
.prev { left: 15px; }
.next { right: 15px; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-btn { font-size: 30px; padding: 10px; }
    .close-lightbox { right: 20px; top: 15px; }
    .featured-image-wrapper { max-height: 260px; }
    .recent-news-card { flex-wrap: wrap; }
}