/* ==========================================================================
   POLITICAL PARTY WEBSITE - NEWS & ARTICLE COMPONENT STYLES
   ========================================================================== */

:root {
    /* Brand Colors */
    --party-blue: #040181;
    --party-blue-hover: #030166;
    --party-yellow: #faec04;
    
    /* Typography & Neutral Colors */
    --text-dark: #1e293b;
    --text-body: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    
    /* Layout & Effects */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;
    --transition-standard: all 0.3s ease;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Reset/Base For These Sections */
.news-section,
.article-page-wrapper {
    background-color: var(--bg-light);
    padding: 6rem 1.5rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    /* margin-top: 100px; */
}


/* ==========================================================================
   SECTION 1: NEWS GRID (INDEX PAGE)
   ========================================================================== */

.news-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* Header */
.news-header {
    text-align: center;
    margin-bottom: 4rem;
}

.news-title {
    color: var(--party-blue);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.news-divider {
    height: 4px;
    width: 60px;
    background-color: var(--party-blue);
    margin: 0 auto;
    border-radius: var(--radius-pill);
}

/* Responsive Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Cards */
.news-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-standard);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Image Wrappers & Zoom Effect */
.news-image-wrapper {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

/* Card Content Details */
.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Card Footer */
.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.news-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.news-read-more {
    color: var(--party-blue);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition-standard);
}

.news-read-more:hover {
    color: var(--party-blue-hover);
}

/* Global/Shared Primary Button Style */
.news-actions {
    display: flex;
    justify-content: center;
}

.btn-primary {
    background-color: var(--party-blue);
    color: white;
    padding: 0.875rem 2.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-standard);
    box-shadow: 0 4px 14px 0 rgba(4, 1, 129, 0.25);
}

.btn-primary:hover {
    background-color: var(--party-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(4, 1, 129, 0.35);
}


/* ==========================================================================
   SECTION 2: ARTICLE DETAIL PAGE (TWO-COLUMN EDITORIAL STYLE)
   ========================================================================== */

/* Main 2-Column Responsive Layout Wrapper */
.article-layout-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    max-width: 1240px;
    margin: 0 auto;
}

/* Changes layout to two columns on wide viewports */
@media (min-width: 1024px) {
    .article-layout-container {
        grid-template-columns: 8fr 4fr;
    }
}

/* Left Column Styling */
.article-main-content {
    min-width: 0; /* Prevents text overflow breaks in grid layouts */
}

.article-header {
    text-align: left; /* Shifted left to balance the column aesthetic */
    margin-bottom: 2rem;
}

.article-title {
    color: var(--party-blue);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Article Featured Hero Image */
.article-hero {
    margin: 0 0 3rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Rich Text Formatting Container */
.article-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-body);
}

.article-content p {
    margin-bottom: 1.75rem;
    text-align: justify;
}

.article-content h2, 
.article-content h3 {
    color: var(--party-blue);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content h2 { font-size: 1.65rem; }
.article-content h3 { font-size: 1.35rem; }

.article-content ul, 
.article-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--party-blue);
    background-color: var(--card-bg);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--party-blue);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Back Button Footer Area */
.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    background-color: var(--party-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-standard);
}

.btn-back:hover {
    background-color: var(--party-yellow);
    color: var(--party-blue);
}


/* ==========================================================================
   RIGHT COLUMN: SIDEBAR WIDGETS
   ========================================================================== */

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Sticky placement rule on desktop screens */
@media (min-width: 1024px) {
    .article-sidebar {
        position: sticky;
        top: 7rem;
        align-self: start;
    }
}

/* Widget Card Container Architecture */
.sidebar-widget {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--party-blue);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Meta Data Detail Layout Layout inside Widget */
.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-icon {
    width: 24px;
    height: 24px;
    color: var(--party-blue);
    flex-shrink: 0;
}

.meta-details {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Random News List styling */
.random-news-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.random-news-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    align-items: center;
    transition: var(--transition-standard);
}

.random-thumb-wrapper {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.random-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.random-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.random-item-title {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    /* Basic line-clamp logic to handle massive titles inside list */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.random-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hover behaviors for miniature widgets links */
.random-news-item:hover .random-item-title {
    color: var(--party-blue);
}

.random-news-item:hover .random-thumb {
    transform: scale(1.08);
}

.party-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--party-yellow);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    font-family: 'Inter', system-ui, sans-serif;
}

.navbar-container {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Brand & Logo Layout */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    height: 100%;
    z-index: 1010;
}

/* Let the logo crest overlap past the bottom of the bar natively */
.logo-wrapper {
    background: transparent;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 100px; /* Controls exact crest spill size override */
    width: auto;
    object-fit: contain;
    transform: translateY(12px);
    transition: var(--transition-standard);
}

.brand-text {
    color: var(--party-blue);
    font-weight: 800;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: none;
}

@media (min-width: 768px) {
    .brand-text { display: block; }
}

/* Desktop Navigation Wrapper Grid */
.navbar-menu-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

@media (min-width: 1200px) {
    .navbar-menu-desktop { display: flex; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--party-blue);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-standard);
    opacity: 0.85;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

/* Modern minimalist underline glow indicator */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--party-blue);
    border-radius: var(--radius-pill);
    transition: var(--transition-standard);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Action Area Button Grouping */
.nav-actions-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-nav-outline {
    border: 2px solid var(--party-blue);
    color: var(--party-blue);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-standard);
}

.btn-nav-outline:hover {
    background-color: var(--party-blue);
    color: white;
}

.btn-nav-solid {
    background-color: var(--party-blue);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-standard);
}

.btn-nav-solid:hover {
    background-color: var(--party-blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile Toggle Hamburger Icon Settings */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--party-blue);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1010;
}

@media (min-width: 1200px) {
    .mobile-menu-toggle { display: none; }
}

.toggle-icon {
    width: 28px;
    height: 28px;
}

/* Responsive Menu Drawer Layer dropdown styling */
.navbar-menu-mobile {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    z-index: 999;
}

@media (min-width: 1200px) {
    .navbar-menu-mobile { display: none !important; }
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-standard);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: var(--bg-light);
    color: var(--party-blue);
    padding-left: 1.25rem;
}

/* Dropdown structural partition divider line */
.mobile-nav-links .divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* High contrast modifications inside responsive dropdown blocks */
.mobile-nav-link.dynamic-accent {
    color: var(--party-orange);
    background-color: rgba(255, 129, 0, 0.05);
}
.mobile-nav-link.dynamic-accent:hover {
    background-color: rgba(255, 129, 0, 0.1);
}

.mobile-nav-link.dynamic-solid {
    background-color: var(--party-blue);
    color: white;
    text-align: center;
}
.mobile-nav-link.dynamic-solid:hover {
    background-color: var(--party-blue-hover);
}

