/* ==========================================================================
   JNEWS (Global Journal Edition) Theme Stylesheet
   Supports Full Dynamic Customizer CSS Variables (Colors, Fonts, Sizes)
   ========================================================================== */

:root {
    --jnews-topbar-bg: #ffffff;
    --jnews-topbar-text: #111111;
    --jnews-menu-bg: #d32f2f;
    --jnews-menu-text: #ffffff;
    --jnews-menu-hover: #fde047;
    --jnews-accent: #d32f2f;
    --jnews-accent-dark: #b91c1c;
    --jnews-badge-bg: #111111;
    --jnews-badge-text: #ffffff;
    --jnews-black: #111111;
    --jnews-text: #111111;
    --jnews-muted: #767676;
    --jnews-excerpt: #555555;
    --jnews-border: #e8e8e8;
    --jnews-bg: #ffffff;
    --jnews-font-sans: 'Noto Sans Devanagari', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --jnews-font-serif: 'Noto Serif Devanagari', 'Georgia', 'Noto Sans Devanagari', serif;
    --jnews-menu-size: 14px;
    --jnews-menu-weight: 700;
    --jnews-lead-size: 30px;
}

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

body {
    font-family: var(--jnews-font-sans);
    background: var(--jnews-bg);
    color: var(--jnews-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--jnews-font-sans);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--jnews-accent);
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   HEADER: TOPBAR & FULL-WIDTH COLORED MENU BAR
   ========================================================================== */
.jnews-header {
    background: var(--jnews-topbar-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.jnews-topbar {
    background: var(--jnews-topbar-bg);
    color: var(--jnews-topbar-text);
    border-bottom: 1px solid var(--jnews-border);
    padding: 14px 0;
}

.jnews-topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.jnews-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jnews-icon-btn {
    background: none;
    border: none;
    color: var(--jnews-topbar-text);
    font-size: 19px;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.15s ease;
}

.jnews-icon-btn:hover {
    color: var(--jnews-accent);
}

.jnews-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jnews-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.8px;
    color: var(--jnews-topbar-text);
    line-height: 1.1;
}

.jnews-brand-link:hover {
    color: var(--jnews-topbar-text);
}

.jnews-brand-tagline {
    font-size: 11.5px;
    color: var(--jnews-muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-top: 3px;
}

.jnews-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.jnews-header-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--jnews-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jnews-login-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--jnews-topbar-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jnews-saved-btn {
    background: var(--jnews-accent);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 9px 16px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: opacity 0.2s ease;
}

.jnews-saved-btn:hover {
    opacity: 0.92;
    color: #ffffff !important;
}

/* Primary Full-Width Category Navigation Bar (Variable Background & Font Color) */
.jnews-navbar {
    background: var(--jnews-menu-bg);
    color: var(--jnews-menu-text);
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.jnews-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.jnews-nav-list > li {
    position: relative;
}

.jnews-nav-list > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 4px;
    font-size: var(--jnews-menu-size);
    font-weight: var(--jnews-menu-weight);
    color: var(--jnews-menu-text);
    border-bottom: 3px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.jnews-nav-list > li > a:hover,
.jnews-nav-list > li > a.active {
    color: var(--jnews-menu-hover);
    border-bottom-color: var(--jnews-menu-hover);
}

/* Dropdown menu in navbar */
.jnews-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid var(--jnews-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 1100;
    list-style: none;
}

.jnews-nav-list > li:hover .jnews-dropdown {
    display: block;
}

.jnews-dropdown li a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #222222;
}

.jnews-dropdown li a:hover {
    background: #f8fafc;
    color: var(--jnews-accent);
}

/* Search Bar Drop-down */
.jnews-search-drawer {
    display: none;
    background: #fafafa;
    border-bottom: 1px solid var(--jnews-border);
    padding: 14px 0;
}

.jnews-search-form {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.jnews-search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d4d4d8;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.jnews-search-form input:focus {
    border-color: var(--jnews-accent);
}

.jnews-search-form button {
    background: var(--jnews-accent);
    color: #ffffff;
    border: none;
    padding: 0 22px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
}

/* ==========================================================================
   COMMON JNEWS TYPOGRAPHY, BADGES & META
   ========================================================================== */
.jnews-cat-badge {
    display: inline-block;
    background: var(--jnews-badge-bg);
    color: var(--jnews-badge-text) !important;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 7px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.jnews-cat-badge:hover {
    background: var(--jnews-accent);
    color: #ffffff !important;
}

.jnews-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 8px;
}

.jnews-meta .jnews-author {
    color: #888888;
}

.jnews-meta .jnews-author strong {
    color: var(--jnews-accent);
    font-weight: 800;
}

.jnews-excerpt {
    font-family: var(--jnews-font-serif);
    color: var(--jnews-excerpt);
    font-size: 13.5px;
    line-height: 1.6;
    margin-top: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jnews-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.jnews-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.jnews-thumb-wrap:hover img {
    transform: scale(1.03);
}

.jnews-play-corner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42px;
    height: 42px;
    background: #ffffff;
    color: var(--jnews-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 2;
    transition: color 0.2s ease;
}

.jnews-thumb-wrap:hover .jnews-play-corner {
    color: var(--jnews-accent);
}

/* Section Heading with Double Top Border & Accent Square Dot */
.jnews-section-header {
    border-top: 2px solid var(--jnews-black);
    border-bottom: 1px solid var(--jnews-border);
    padding: 10px 0;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jnews-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--jnews-black);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.jnews-section-dot {
    width: 7px;
    height: 7px;
    background: var(--jnews-accent);
    display: inline-block;
    flex-shrink: 0;
}

/* ==========================================================================
   SECTION 1: 3-COLUMN EDITORIAL HERO GRID
   ========================================================================== */
.jnews-hero-section {
    padding: 28px 0 36px;
}

.jnews-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.4fr) minmax(0, 1.45fr);
    gap: 28px;
    width: 100%;
}

.jnews-hero-grid.order-center-left-right {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.15fr) minmax(0, 1.45fr);
}

.jnews-hero-grid.order-left-right-center {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.45fr) minmax(0, 2.4fr);
}

/* Left Column: Stacked Category-Badge Stories */
.jnews-hero-left {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jnews-left-item {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--jnews-border);
}

.jnews-left-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.jnews-left-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--jnews-black);
    letter-spacing: -0.2px;
}

/* Center Column: Lead Story + 2 Sub-Feature Cards */
.jnews-lead-card {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--jnews-border);
}

.jnews-lead-thumb {
    height: 365px;
    width: 100%;
    margin-bottom: 16px;
}

.jnews-lead-title {
    font-size: var(--jnews-lead-size);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--jnews-black);
    margin-bottom: 10px;
}

.jnews-lead-excerpt {
    font-family: var(--jnews-font-serif);
    font-size: 15px;
    line-height: 1.65;
    color: var(--jnews-excerpt);
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jnews-center-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.jnews-subcard-thumb {
    height: 168px;
    margin-bottom: 12px;
}

.jnews-subcard-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.32;
    letter-spacing: -0.2px;
    color: var(--jnews-black);
}

/* Right Column: Top Feature + Mini Horizontal Cards + Bottom Widget */
.jnews-right-topcard {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--jnews-border);
}

.jnews-right-topthumb {
    height: 195px;
    margin-bottom: 12px;
}

.jnews-right-toptitle {
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.32;
    letter-spacing: -0.25px;
    color: var(--jnews-black);
}

.jnews-right-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.jnews-mini-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--jnews-border);
}

.jnews-mini-thumb {
    width: 96px;
    height: 68px;
}

.jnews-mini-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--jnews-black);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Join Our Newsletter Dark Box */
.jnews-newsletter-box {
    background: var(--jnews-black);
    color: #ffffff;
    padding: 26px 22px;
    margin-top: 20px;
    text-align: center;
}

.jnews-newsletter-box h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
}

.jnews-newsletter-box p {
    font-family: var(--jnews-font-serif);
    font-size: 12.5px;
    color: #a3a3a3;
    line-height: 1.55;
    margin-bottom: 16px;
}

.jnews-newsletter-box input {
    width: 100%;
    padding: 10px 12px;
    background: #1f1f1f;
    border: 1px solid #333333;
    color: #ffffff;
    font-size: 12.5px;
    margin-bottom: 10px;
    outline: none;
    text-align: center;
}

.jnews-newsletter-box button {
    width: 100%;
    padding: 10px 14px;
    background: var(--jnews-accent);
    color: #ffffff;
    border: none;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.jnews-newsletter-box button:hover {
    opacity: 0.9;
}

/* ==========================================================================
   MODULAR HOMEPAGE SECTIONS (EXCLUSIVE, POPULAR, 4-COL MATRIX, 3-COL, SPLIT)
   ========================================================================== */
.jnews-exclusive-section {
    padding: 15px 0 36px;
}

.jnews-exclusive-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.jnews-exclusive-thumb {
    height: 300px;
    margin-bottom: 14px;
}

.jnews-exclusive-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: var(--jnews-black);
}

.jnews-exclusive-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--jnews-border);
}

.jnews-exclusive-small-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.38;
    color: var(--jnews-black);
}

/* 3-Column Visual Cards Layout */
.jnews-threecol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* Magazine Split Layout (1 Large Left + 4 Compact Right) */
.jnews-magsplit-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
}

/* Horizontal Promo / Ad Banner */
.jnews-banner-section {
    padding: 10px 0 34px;
    display: flex;
    justify-content: center;
}

.jnews-promo-banner {
    width: 100%;
    max-width: 970px;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 55%, #d1d5db 100%);
    border: 1px solid #e5e7eb;
    padding: 24px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 4px;
}

/* Most Popular News Dark Showcase */
.jnews-popular-section {
    padding: 10px 0 42px;
}

.jnews-popular-box {
    background: var(--jnews-black);
    color: #ffffff;
    padding: 36px;
    display: grid;
    grid-template-columns: 1fr 2.1fr;
    gap: 32px;
    align-items: stretch;
}

.jnews-popular-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.jnews-popular-info h2 {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
}

.jnews-popular-info p {
    font-family: var(--jnews-font-serif);
    font-size: 13.5px;
    color: #a3a3a3;
    line-height: 1.6;
}

.jnews-popular-subscribe {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.jnews-popular-subscribe input {
    flex: 1;
    background: #1f1f1f;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 10px 12px;
    font-size: 12px;
    outline: none;
}

.jnews-popular-subscribe button {
    background: var(--jnews-accent);
    color: #ffffff;
    border: none;
    padding: 0 18px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    cursor: pointer;
}

.jnews-popular-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.jnews-overlay-card {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #222222;
    display: flex;
    align-items: flex-end;
}

.jnews-overlay-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.jnews-overlay-card:hover img {
    transform: scale(1.05);
}

.jnews-overlay-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.88) 100%);
}

.jnews-overlay-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

.jnews-overlay-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.32;
    color: #ffffff;
}

.jnews-overlay-title a {
    color: #ffffff !important;
}

.jnews-overlay-title a:hover {
    color: var(--jnews-menu-hover) !important;
}

/* 4-Column Category Matrix */
.jnews-catmatrix-section {
    padding: 6px 0 46px;
}

.jnews-catmatrix-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.jnews-catcol-lead-thumb {
    height: 155px;
    margin-bottom: 12px;
}

.jnews-catcol-lead-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--jnews-black);
}

.jnews-catcol-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jnews-catcol-item {
    padding-top: 12px;
    border-top: 1px solid var(--jnews-border);
}

.jnews-catcol-item-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.38;
    color: #222222;
}

/* ==========================================================================
   SHARED LAYOUT CLASSES FOR ARTICLE, CATEGORY, TAG, SEARCH & 404 PAGES
   ========================================================================== */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.3fr) minmax(280px, 1fr);
    gap: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
    gap: 24px;
}

.archive-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.jnews-footer {
    background: #0f0f12;
    color: #d4d4d8;
    padding: 48px 0 24px;
    margin-top: 30px;
    border-top: 3px solid var(--jnews-accent);
}

.jnews-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid #27272a;
}

.jnews-footer-heading {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #ffffff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jnews-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.jnews-footer-links a {
    color: #a1a1aa;
}

.jnews-footer-links a:hover {
    color: #ffffff;
}

.jnews-footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #71717a;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
    .jnews-hero-grid,
    .jnews-hero-grid.order-center-left-right,
    .jnews-hero-grid.order-left-right-center {
        grid-template-columns: 1fr 1.4fr;
    }
    .jnews-hero-left {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        order: 3;
    }
    .jnews-catmatrix-grid,
    .jnews-exclusive-bottom {
        grid-template-columns: repeat(2, 1fr);
    }
    .jnews-threecol-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .jnews-popular-box,
    .jnews-magsplit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .jnews-topbar-inner {
        grid-template-columns: auto 1fr auto;
    }
    .jnews-brand-link {
        font-size: 22px;
    }
    .jnews-header-date,
    .jnews-login-link {
        display: none;
    }
    .jnews-saved-btn {
        padding: 7px 10px;
        font-size: 10px;
    }
    .jnews-nav-list {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 18px;
        padding: 0 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .jnews-nav-list::-webkit-scrollbar {
        display: none;
    }
    .jnews-nav-list > li > a {
        white-space: nowrap;
        padding: 11px 2px;
    }
    .jnews-hero-grid,
    .jnews-hero-grid.order-center-left-right,
    .jnews-hero-grid.order-left-right-center {
        grid-template-columns: 1fr;
    }
    .jnews-hero-left {
        grid-template-columns: 1fr;
        order: 2;
    }
    .jnews-lead-thumb {
        height: 235px;
    }
    .jnews-lead-title {
        font-size: 23px;
    }
    .jnews-center-subgrid,
    .jnews-exclusive-top,
    .jnews-exclusive-bottom,
    .jnews-popular-cards,
    .jnews-catmatrix-grid,
    .jnews-threecol-grid,
    .jnews-magsplit-grid,
    .article-layout,
    .jnews-footer-grid {
        grid-template-columns: 1fr;
    }
    .jnews-popular-box {
        padding: 22px;
    }
}
