/**
 * Desktop Styles (>=1024px)
 */

:root {
    --color-primary: #c1272d;
    --color-secondary: #1a73e8;
    --color-text: #222222;
    --color-text-muted: #666666;
    --color-bg: #ffffff;
    --color-gray: #f4f4f4;
    --color-border: #eaeaea;
    --color-card-bg: #ffffff;
    
    --font-body: 'Lato', sans-serif;
    --font-heading: 'Merriweather', serif;
    
    --font-size-base: 16px;
    --font-size-h1: 2rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.25rem;
}

:root[data-theme="dark"] {
    --color-text: #e0e0e0;
    --color-text-muted: #aaaaaa;
    --color-bg: #121212;
    --color-gray: #1e1e1e;
    --color-border: #333333;
    --color-card-bg: #1e1e1e;
}

:root.large-font-mode {
    --font-size-base: 20px;
    --font-size-h1: 2.4rem;
    --font-size-h2: 1.8rem;
    --font-size-h3: 1.5rem;
}
body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    margin-top: 0;
}
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

a {
    color: var(--color-secondary);
    text-decoration: none;
}
a:hover {
    color: var(--color-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-left {
    width: 70%;
    padding: 0 15px;
}

.col-right {
    width: 30%;
    padding: 0 15px;
    border-left: 1px solid #eaeaea;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.main-navigation li {
    margin: 0 15px;
}
.main-navigation a {
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
}
.main-navigation a:hover {
    color: var(--color-primary);
}

/* Headline Grid — moved to widget-headline.css */

/* ==========================================================================
   Single Post Specific Styles
   ========================================================================== */
.single-desktop.container {
    max-width: 1033px;
    padding: 0 24px;
}

.single-top-breadcrumb {
    margin-bottom: 12px;
}
.single-top-breadcrumb p {
    margin: 0;
    font-size: 14px;
    color: #666;
}
.single-top-breadcrumb a {
    color: #666;
    text-decoration: none;
}
.single-top-breadcrumb a:hover {
    color: var(--color-primary);
}
.single-top-breadcrumb .bc-sep {
    margin: 0 6px;
    color: #ccc;
}

.single-top-divider {
    width: 100%;
    height: 1px;
    background-color: #eaeaea;
    margin-bottom: 25px;
}

.single-desktop .entry-title {
    font-family: var(--font-body); /* Matching the article font (sans-serif) */
    font-size: 42px;
    font-weight: 900;
    line-height: 1.15;
    color: #111;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.single-desktop .entry-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #222;
    margin-bottom: 25px;
    /* Limit text to exactly 3 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.single-desktop .entry-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 0;
    margin-bottom: 15px;
}

.single-desktop .entry-meta {
    font-size: 15px;
    line-height: 1.5;
    color: #666;
}

.single-desktop .entry-meta .author {
    color: #1a73e8; /* Blue matching Tirto */
    font-weight: 700;
    text-decoration: none;
}
.single-desktop .entry-meta .author:hover {
    text-decoration: underline;
}

.btn-share-header {
    background: #fff;
    border: 1px solid #ccc;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-share-header:hover {
    background: #f4f4f4;
}

/* Thumbnail & Caption Style */
.single-post-thumbnail {
    margin-bottom: 30px;
    width: 100%;
}
.single-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.single-post-thumbnail-caption {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 0 5px; /* Slight inset so it aligns nicely under the image visually */
}
.single-post-thumbnail-caption .caption-corner {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 1.5px solid #666;
    border-bottom: 1.5px solid #666;
    margin-top: 5px; /* Aligns the L-shape with the text baseline/center */
    flex-shrink: 0;
}
.single-post-thumbnail-caption .caption-text {
    font-size: 14.5px;
    color: #666;
    line-height: 1.5;
    font-family: var(--font-body);
}

/* Article Content Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-family: var(--font-heading);
    color: #111;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}
.entry-content h1 { font-size: 28px; }
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }
.entry-content h4 { font-size: 18px; }
.entry-content h5 { font-size: 16px; }
.entry-content h6 { font-size: 15px; }

/* Article End Section */
.article-end-section {
    margin-top: 40px;
    font-family: var(--font-body);
}
.baca-juga-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    margin-right: -15px;
}
.baca-juga-header strong {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}
.baca-juga-line {
    flex-grow: 1;
    height: 1px;
    background-color: #eaeaea;
}
.baca-juga-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.baca-juga-list li {
    padding: 16px 15px 16px 0;
    border-bottom: 1px dotted #ccc;
    margin-right: -15px;
}
.baca-juga-list li:last-child {
    border-bottom: none;
}
.baca-juga-list a {
    color: #1a73e8;
    font-size: 17px;
    text-decoration: none;
    line-height: 1.4;
}
.baca-juga-list a:hover {
    text-decoration: underline;
}
.article-end-divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 20px -15px 20px 0;
}
.article-end-divider:last-child {
    margin-bottom: 0;
}
.article-end-tags-author {
    font-size: 15px;
    color: #555;
    margin-bottom: 25px;
}
.article-end-tags-author a {
    color: #1a73e8;
    text-decoration: none;
}
.article-end-tags-author a.text-uppercase {
    text-transform: uppercase;
}
.article-end-tags-author a:hover {
    text-decoration: underline;
}
.article-end-meta {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}
.article-end-meta p {
    margin: 0;
}
.article-end-meta strong {
    color: #000;
}

/* Bottom Related Grid (5 Columns) */
.bottom-related-grid {
    margin-bottom: 50px;
    font-family: var(--font-body);
}
.bottom-related-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    border-top: 2px solid #000;
    border-bottom: 1px dotted #ccc;
    padding-top: 12px;
    padding-bottom: 10px;
}
.bottom-related-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: #000;
}
.bottom-related-more {
    color: #1a73e8;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}
.bottom-related-more:hover {
    text-decoration: underline;
}
.bottom-related-posts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
.bottom-related-item {
    padding: 0 15px;
    border-right: 1px solid #eaeaea;
}
.bottom-related-item:first-child {
    padding-left: 0;
}
.bottom-related-item:last-child {
    padding-right: 0;
    border-right: none;
}
.bottom-related-thumb {
    display: block;
    margin-bottom: 12px;
}
.bottom-related-thumb img {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    object-fit: cover;
    display: block;
}
.bottom-related-meta {
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    color: #777;
}
.bottom-related-meta .cat-name {
    color: #1a73e8;
    font-weight: 700;
    margin-right: 8px;
    position: relative;
}
.bottom-related-meta .cat-name::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background-color: #ccc;
}
.bottom-related-meta .meta-date {
    margin-left: 4px;
}
.bottom-related-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}
.bottom-related-title a {
    color: #000;
    text-decoration: none;
}
.bottom-related-title a:hover {
    color: #1a73e8;
}

/* Flash News Section (3 Columns) */
.bottom-flash-news {
    margin-bottom: 50px;
    font-family: var(--font-body);
}
.flash-news-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.flash-news-col {
    padding: 0 20px;
    border-right: 1px dotted #ccc;
}
.flash-news-col:first-child {
    padding-left: 0;
}
.flash-news-col:last-child {
    padding-right: 0;
    border-right: none;
}
.flash-news-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px dotted #eaeaea;
}
.flash-news-item:first-child {
    padding-top: 20px;
}
.flash-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.flash-news-content {
    flex-grow: 1;
    padding-right: 15px;
}
.flash-news-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
}
.flash-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.flash-news-meta {
    font-size: 13px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    color: #777;
}
.flash-news-meta .cat-name {
    color: #1a73e8;
    font-weight: 700;
    margin-right: 8px;
    position: relative;
}
.flash-news-meta .cat-name::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background-color: #ccc;
}
.flash-news-meta .meta-date {
    margin-left: 4px;
}
.flash-news-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}
.flash-news-title a {
    color: #000;
    text-decoration: none;
}
.flash-news-title a:hover {
    color: #1a73e8;
}

/* Popular Widget Specific */
.popular-thumb-wrap {
    position: relative;
    display: block;
}
.popular-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: #1c3fa6;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    font-family: var(--font-body);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
    .col-left, .col-right {
        width: 100%;
        border-left: none;
    }
    .home-desktop .col-right {
        order: -1; /* Push sidebar (including Flash News) to the top above main content */
    }
    
    /* Reorder Pilihan Editor below Flash News on Single Article */
    .single-desktop {
        display: flex;
        flex-direction: column;
    }
    .single-desktop .row {
        display: contents;
    }
    .single-desktop .single-top-breadcrumb { order: 1; }
    .single-desktop .single-top-divider { order: 2; }
    .single-desktop .col-left { order: 3; }
    .single-desktop .bottom-related-grid { order: 4; }
    .single-desktop .bottom-flash-news { order: 5; }
    .single-desktop .col-right { order: 6; margin-top: 20px; }
    .single-desktop .bottom-popular-grid { order: 7; }
}

/* =========================================
   DARK MODE OVERRIDES
   ========================================= */
:root[data-theme="dark"] body {
    background: var(--color-bg) !important;
    color: var(--color-text) !important;
}
:root[data-theme="dark"] .headline-widget-section,
:root[data-theme="dark"] .editor-pick-section,
:root[data-theme="dark"] .flashnews-section,
:root[data-theme="dark"] .newsplus-section,
:root[data-theme="dark"] .insider-section,
:root[data-theme="dark"] .daijeng-section,
:root[data-theme="dark"] .populer-section,
:root[data-theme="dark"] .decode-section,
:root[data-theme="dark"] .infografik-section,
:root[data-theme="dark"] .video-section,
:root[data-theme="dark"] .photo-section,
:root[data-theme="dark"] .weekly-section,
:root[data-theme="dark"] .card-widget,
:root[data-theme="dark"] .sidebar-widget,
:root[data-theme="dark"] .post-card,
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .main-navigation,
:root[data-theme="dark"] .megamenu-panel,
:root[data-theme="dark"] .entry-content,
:root[data-theme="dark"] .search-results {
    background: var(--color-card-bg) !important;
    border-color: var(--color-border) !important;
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] h5,
:root[data-theme="dark"] h6,
:root[data-theme="dark"] p,
:root[data-theme="dark"] a,
:root[data-theme="dark"] .widget-title,
:root[data-theme="dark"] .post-title,
:root[data-theme="dark"] .post-title a,
:root[data-theme="dark"] .article-title,
:root[data-theme="dark"] .article-title a,
:root[data-theme="dark"] .homepage-widget-title,
:root[data-theme="dark"] .headline-title,
:root[data-theme="dark"] .editor-pick-title {
    color: var(--color-text) !important;
}

:root[data-theme="dark"] a:hover,
:root[data-theme="dark"] .post-title a:hover,
:root[data-theme="dark"] .article-title a:hover {
    color: var(--color-primary) !important;
}

:root[data-theme="dark"] .post-meta,
:root[data-theme="dark"] .post-meta span,
:root[data-theme="dark"] .widget-meta,
:root[data-theme="dark"] .widget-meta span,
:root[data-theme="dark"] .entry-meta,
:root[data-theme="dark"] .entry-meta span {
    color: var(--color-text-muted) !important;
}

:root[data-theme="dark"] .category-badge,
:root[data-theme="dark"] .section-title h2::before,
:root[data-theme="dark"] .headline-overlay .category-badge {
    color: #fff !important;
}

:root[data-theme="dark"] .search-form input[type="search"] {
    background: var(--color-gray) !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}

:root[data-theme="dark"] .btn-share-header {
    background: var(--color-gray) !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}

:root[data-theme="dark"] .site-footer {
    background: #111 !important;
    color: #ccc !important;
}
