/*
 * BNK News Custom Stylesheet
 * ---------------------------
 * This file contains custom styles to override or extend Bootstrap
 * and provide the unique look and feel for the BNK News site.
 */

/* --- 1. Base & Typography --- */
body {
    background-color: #f8f9fa; /* Light grey background */
    color: #212529; /* Standard dark text */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- 2. Header & Navigation --- */

/* [FIXED] Top Bar Contrast */
/* * The top bar now correctly uses the .bg-dark and .text-light classes
 * from Bootstrap, so no overriding CSS is needed, fixing the contrast issue.
 */
.top-bar-date {
    font-size: 0.85rem;
}

/* Main Navbar */
.navbar-brand img {
    max-height: 40px;
}

/* Breaking News Banner */
.breaking-news-banner {
    background-color: #d92027; /* Bright red */
    color: #ffffff;
    padding: 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.breaking-news-container {
    display: inline-block;
    padding-left: 100%;
    /* [PERFORMANCE FIX] Use translate3d to force hardware acceleration */
    animation: breaking-news-scroll 30s linear infinite;
    transform: translate3d(0, 0, 0);
}

.breaking-news-label {
    font-weight: bold;
    background-color: #ffffff;
    color: #d92027;
    padding: 0.25rem 0.75rem;
    margin-right: 1rem;
    display: inline-block;
    vertical-align: middle;
}

.breaking-news-item {
    display: inline-block;
    margin: 0 1.5rem;
    vertical-align: middle;
}

.breaking-news-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.breaking-news-link:hover {
    text-decoration: underline;
}

/* Scroll Animation */
@keyframes breaking-news-scroll {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- 3. Main Content & Article --- */
.main-page-wrapper {
    /* (This class is a layout helper in header.php, no styles needed) */
}

/* Article Card Styles */
.article-card {
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    border: none;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.article-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.article-card .card-img-top {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

/* Article Page Styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content a {
    color: #0d6efd;
    text-decoration: underline;
}

.article-content blockquote {
    font-style: italic;
    background: #f8f9fa;
    border-left: 5px solid #0d6efd;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 1rem 0;
}

.figure-caption {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    font-size: 0.9rem;
    color: #6c757d;
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.sponsored-label, .location-label {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    color: #212529;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

/* --- 4. Sidebar --- */
.sidebar {
    /* Sidebar styles are mostly handled by Bootstrap cards */
}

/* Top Stories Sidebar */
.top-story-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

/* --- 5. Footer --- */
.footer-top {
    background-color: #343a40;
    color: #adb5bd;
}

.footer-top a {
    color: #f8f9fa;
    text-decoration: none;
}

.footer-top a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    background-color: #212529;
    color: #adb5bd;
}

.footer-social-icons a {
    color: #adb5bd;
    font-size: 1.25rem;
    margin-left: 1rem;
    transition: color 0.2s ease;
}

.footer-social-icons a:hover {
    color: #ffffff;
}

/* --- 6. Cookie Consent Banner --- */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%; /* Start hidden */
    left: 0;
    width: 100%;
    background-color: #343a40;
    color: #f8f9fa;
    padding: 1.5rem;
    z-index: 1050;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    transition: bottom 0.5s ease-in-out;
}

.cookie-consent-banner.show {
    bottom: 0;
}

.cookie-consent-banner .cookie-text {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* [ACCESSIBILITY FIX] Make link white and underlined for contrast */
.cookie-consent-banner .cookie-text a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-banner .btn {
    min-width: 120px;
    margin: 0.5rem;
}

/* --- 7. Responsive Adjustments --- */
@media (max-width: 767.98px) {
    .article-container {
        border-width: 0 !important; /* Remove card border on mobile */
    }
    .article-container .card-body {
        padding: 0 !important; /* Remove card padding on mobile */
    }
}