/* =====================================
   MULTIPRESS MAIN CSS (v1.3.0 FINAL - FIXED)
   - Uses global variables.css
   - Dark newsroom UI
===================================== */

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

/* ================= BASE ================= */
html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--text);
    line-height: 1.7;
    background: radial-gradient(circle at top, var(--primary-soft), var(--bg-dark));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================= CONTAINER ================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================= TYPOGRAPHY ================= */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: var(--text);
    letter-spacing: -0.3px;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }

p {
    margin-bottom: 15px;
    color: var(--text-light);
    opacity: 0.9;
}

/* ================= LINKS ================= */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--secondary-glow);
}

/* ================= HERO ================= */
.hero,
.page-hero {
    background: radial-gradient(circle at center, var(--primary-soft), var(--bg-dark));
    color: var(--text-inverse);
    padding: 100px 0;
    text-align: center;
}

/* ================= LAYOUT (FIXED GRID STABILITY) ================= */
.layout {
    display: grid;
    grid-template-columns: 2fr minmax(0, 1fr);
    gap: var(--spacing-lg);
    margin-top: 50px;
}

.content {
    width: 100%;
}

/* ================= HOME NEWS LAYOUT ================= */
.news-layout {
    display: grid;
    grid-template-columns: 2fr minmax(0, 1fr);
    gap: var(--spacing-md);
}

/* ================= POST GRID ================= */
.post-grid,
.program-grid {
    display: grid;
    gap: var(--spacing-md);
}

.post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ================= UNIFIED POST CARD SYSTEM ================= */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);

    display: flex;
    flex-direction: column;

    transition: transform 0.25s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

/* IMAGE ALWAYS FULL WIDTH */
.post-image {
    width: 100%;
    overflow: hidden;
}

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

/* CONTENT */
.post-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-title {
    font-size: var(--text-lg);
    margin: 0;
}

.post-meta {
    font-size: 13px;
    color: var(--text-muted);
}

/* ================= FEATURED POST ================= */
.featured-post {
    margin-bottom: 40px;
}

.featured-image img {
    width: 100%;
    border-radius: var(--radius);
}

.featured-content {
    padding: 15px 0;
}

/* ================= SIDEBAR ================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* ================= MOST POPULAR (FIXED & CLEAN) ================= */
.most-popular {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.most-popular .post-card,
.most-popular .popular-item {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* FULL WIDTH IMAGE FIX */
.most-popular .post-image img,
.most-popular img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* CONTENT */
.most-popular .post-content {
    padding: var(--spacing-sm);
}

/* TITLE */
.most-popular .post-title {
    font-size: var(--text-md);
    line-height: 1.4;
    margin: 0;
}

/* ================= PAGINATION ================= */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 5px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
}

.pagination .current {
    background: var(--gradient-primary);
    color: #fff;
}

/* ================= UTILITIES ================= */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }

/* ================= GLOBAL DARK TEXT RULE ================= */
.site-header,
.site-footer,
.ticker,
.bg-dark,
.bg-red {
    color: var(--text-inverse);
}

/* ================= MICRO INTERACTIONS ================= */
button,
.btn {
    transition: all 0.25s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
}

/* ================= FOCUS ================= */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--secondary-glow);
    outline-offset: 2px;
}

/* ================= SELECTION ================= */
::selection {
    background: var(--accent);
    color: #fff;
}

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-glow);
}

/* ================= ANIMATION ================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ================= MOBILE ================= */
@media (max-width: 992px) {
    .layout,
    .news-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }

    .container {
        width: 92%;
    }
}

/* ================= INTERNAL LINKS ================= */
.auto-internal-links a {
    color: var(--accent);
    font-weight: 600;
}

.auto-internal-links a:hover {
    color: var(--accent-alt);
    text-decoration: underline;
}
.post-card .post-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.post-card .post-image {
    width: 100%;
}

.post-card .post-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.most-popular .post-card,
.most-popular .popular-item {
    width: 100%;
}

.most-popular .post-link {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.most-popular .post-title,
.most-popular .post-meta,
.most-popular p {
    color: var(--text) !important;
    opacity: 1 !important;
}
