/* General Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4; /* Light Gray Background */
    color: #333; /* Dark text */
}

/* Color Variables */
:root {
    --color-green-primary: #4CAF50; /* A nice green for links/buttons */
    --color-green-dark: #388E3C; 
    --color-gray-bg: #e0e0e0; /* Light Gray */
    --color-gray-text: #555; /* Medium Gray */
    --color-gray-border: #ccc;
    --color-white: #fff;
    --content-width-desktop: 70%;
    --sidebar-width-desktop: 30%;
    --spacing: 20px;
    /* NEW VARIABLE FOR BREAKING NEWS */
    --color-breaking-red: #cc0000; 
}

/* ========================================= */
/* --- BREAKING NEWS SCROLLING BANNER STYLES --- */
/* ========================================= */

.breaking-news-bar {
    background-color: #f1f1f1; /* Light background for the bar */
    border-bottom: 2px solid var(--color-breaking-red);
    padding: 5px 0;
    overflow: hidden; /* Crucial for clipping the scrolling text */
}

.breaking-news-content {
    display: flex;
    align-items: center;
}

.breaking-news-content .label {
    /* The "BREAKING NEWS:" fixed label */
    background-color: var(--color-breaking-red);
    color: var(--color-white);
    font-weight: bold;
    font-size: 0.9em;
    padding: 5px 10px;
    margin-right: 15px;
    flex-shrink: 0; /* Prevents the label from shrinking */
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.scrolling-text {
    /* This is the container for the text that actually moves */
    margin: 0;
    padding: 0;
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
    
    /* Animation properties */
    white-space: nowrap; /* Forces text onto a single line */
    animation: news-scroll 25s linear infinite; /* Adjust time for speed */
}

/* Defines the scroll animation */
@keyframes news-scroll {
    0% { transform: translateX(100%); } /* Start off-screen right */
    100% { transform: translateX(-100%); } /* End off-screen left */
}

/* ------------------------------------------- */

/* --- Header & Navigation --- */

.main-header {
    background-color: var(--color-gray-bg);
    border-bottom: 2px solid var(--color-green-primary);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area .logo {
    max-width: 150px;
    height: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    padding-top: 10px;
}

.main-nav ul li {
    padding: 5px 0;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.main-nav ul li a:hover {
    background-color: var(--color-green-primary);
    color: var(--color-white);
}

.dropdown-menu {
    display: none;
    list-style: none;
    padding: 5px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* --- Utility Classes --- */
.btn-primary, button.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-green-primary);
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-primary:hover, button.btn-primary:hover {
    background-color: var(--color-green-dark);
}

.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* --- Main Layout --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.content-area {
    padding: var(--spacing) 0;
    min-height: 60vh;
}

.content-and-sidebar {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: var(--spacing);
}

.main-content-stream {
    width: 100%; /* Full width on mobile */
}

.sidebar {
    width: 100%; /* Full width on mobile */
    padding: var(--spacing);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-border);
    border-radius: 5px;
}

/* --- Article/List Styles --- */

.article-list, .archive-list {
    list-style: none;
}

.article-item, .archive-item {
    margin-bottom: var(--spacing);
    padding-bottom: var(--spacing);
    border-bottom: 1px solid var(--color-gray-border);
}

.article-item a, .archive-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-item h3, .archive-item h3 {
    color: #333;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.article-item a:hover h3, .archive-item a:hover h3 {
    color: var(--color-green-primary);
}

.article-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.article-meta {
    font-size: 0.85em;
    color: var(--color-gray-text);
    margin-bottom: 10px;
}

.article-hero img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: var(--spacing);
}

.article-content {
    margin-top: var(--spacing);
    font-size: 1.1em;
}

.article-content p {
    margin-bottom: 1.5em;
}

/* 🔥 FIX: Center all main article blocks for better readability on large screens */
.article-page h1,
.article-page .article-meta,
.article-page .article-hero,
.article-page .article-content,
.article-page .social-share-bar {
    max-width: 750px; 
    margin-left: auto;
    margin-right: auto;
}

/* Optional: Center the title text (h1) for better aesthetics when limited in width */
.article-page h1 {
    text-align: center;
}


/* Admin Specific */
.admin-area ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--spacing);
}

.admin-area ul li a {
    display: inline-block;
    margin-bottom: 5px;
    padding: 5px 0;
    text-decoration: none;
    color: var(--color-green-primary);
}

.auth-form label, .auth-form input[type="text"], .auth-form input[type="email"], .auth-form input[type="password"], .auth-form textarea, .auth-form select {
    display: block;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 15px;
}

.auth-form input:not([type="checkbox"]), .auth-form textarea, .auth-form select {
    padding: 10px;
    border: 1px solid var(--color-gray-border);
    border-radius: 5px;
}

.auth-form textarea {
    resize: vertical;
}

/* Footer */
.main-footer {
    background-color: #222;
    color: var(--color-gray-bg);
    padding: var(--spacing) 5%;
    text-align: center;
}

.main-footer p {
    margin: 5px 0;
    font-size: 0.9em;
}

.ad-placeholder {
    background-color: var(--color-gray-bg);
    border: 1px dashed var(--color-green-primary);
    text-align: center;
    padding: 10px;
    margin: 20px 0;
    color: var(--color-gray-text);
    font-size: 0.9em;
}

/* ========================================= */
/* --- Responsive Adjustments (Desktop/Tablet) --- */
/* ========================================= */

@media (min-width: 768px) {
    /* Header Fixes (Revert stacking) */
    .main-header {
        flex-direction: row;
    }
    .main-nav ul {
        flex-direction: row;
        width: auto;
    }
    .main-nav ul li {
        padding: 0 15px;
    }
    .dropdown-menu {
        position: absolute;
        border: 1px solid var(--color-gray-border);
        background-color: var(--color-white);
    }
    
    /* Main Content Layout (Side-by-Side) */
    .content-and-sidebar {
        flex-direction: row; /* Layout side-by-side */
    }

    .main-content-stream {
        width: var(--content-width-desktop); /* ~70% of available space */
    }

    .sidebar {
        width: var(--sidebar-width-desktop); /* ~30% of available space */
    }

    .article-item {
        display: flex;
        gap: 20px;
    }

    .article-item .text-content {
        flex: 1;
    }

    .article-item img {
        width: 150px;
        height: 150px;
        object-fit: cover;
        flex-shrink: 0;
    }
}

/* ========================================= */
/* --- Social Share Button Styles --- */
/* ========================================= */

.social-share-bar {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--color-gray-border);
    border-bottom: 1px solid var(--color-gray-border);
}

.social-share-bar h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.share-buttons-container {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to wrap on smaller screens */
    gap: 10px; /* Space between the buttons */
    margin-top: 10px;
}

.share-btn {
    /* Base Button Style */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    color: var(--color-white); /* White text by default */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 110px; /* Ensures a minimum button width */
}

/* Network Specific Colors */
.facebook-btn {
    background-color: #3b5998;
}
.facebook-btn:hover {
    background-color: #344e86;
}

.x-btn { /* Formerly Twitter */
    background-color: #000000;
}
.x-btn:hover {
    background-color: #333333;
}

.linkedin-btn {
    background-color: #0077b5;
}
.linkedin-btn:hover {
    background-color: #006093;
}

.truthsocial-btn {
    background-color: #f12d4d; /* Truth Social's pink/red color */
}
.truthsocial-btn:hover {
    background-color: #d12241;
}

/* Copy Link Button Style */
.copy-btn {
    background-color: var(--color-gray-text); /* Medium Gray for Copy Link */
    color: var(--color-white);
}
.copy-btn:hover {
    background-color: #444;
}