/*
Theme Name: Media Saku News
Theme URI: https://mediasaku.web.id/
Author: Agung Budi Santoso
Description: Premium News Portal WordPress theme.
Version: 2.23.0
*/


:root {
    --primary-color: #0f172a; /* Dark Blue/Slate */
    --accent-color: #dc2626; /* News Red */
    --bg-color: #f3f4f6;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --font-ui: 'Inter', sans-serif;
    --font-serif: 'Merriweather', serif;
}

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

img, video {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    width: 100%;
    position: relative;
}

.site {
    overflow-x: hidden;
    width: 100%;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

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

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

/* Top Bar & Breaking News */
.top-bar {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.85rem;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    height: 40px;
}

.breaking-label {
    background-color: var(--accent-color);
    color: #fff;
    padding: 0 15px;
    font-weight: 700;
    line-height: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 15px;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    min-width: 0;
}

.breaking-ticker span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 45s linear infinite;
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 25px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.site-title a {
    color: var(--primary-color);
}

.site-title span {
    color: var(--accent-color);
}

.site-branding .custom-logo {
    max-width: 280px;
    height: auto;
    display: block;
}

.header-search {
    width: 300px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-ui);
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 3px;
    cursor: pointer;
}

/* Navigation */
.main-navigation {
    background-color: #fff;
    border-bottom: 4px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    text-align: left;
    outline: none;
    transition: background 0.2s;
}

.menu-toggle:hover, .menu-toggle:focus {
    background: #1e293b;
}

.menu-toggle .hamburger {
    display: inline-block;
    position: relative;
    width: 22px;
    height: 2px;
    background: #fff;
    vertical-align: middle;
    margin-right: 12px;
    transition: all 0.3s;
}
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: #fff;
    left: 0;
    transition: all 0.3s;
}
.menu-toggle .hamburger::before { top: -7px; }
.menu-toggle .hamburger::after { bottom: -7px; }

/* Active Hamburger (X) */
.menu-toggle.is-active .hamburger {
    background: transparent;
}
.menu-toggle.is-active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}
.menu-toggle.is-active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

.main-navigation ul {
    display: flex;
    list-style: none;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.main-navigation a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Layout */
.content-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    margin: 40px auto;
}

.page-full-width {
    grid-column: 1 / -1;
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

.main-column {
    min-width: 0;
}



/* Category Badge */
.cat-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff !important;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}

/* Headline Hero */
.headline-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.headline-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.headline-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px;
    color: #fff;
}

.headline-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.headline-title a {
    color: #fff;
}

.headline-title a:hover {
    color: var(--accent-color);
}

.headline-meta {
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 600;
}

/* Section Title */
.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.news-item-img {
    width: 320px;
    flex-shrink: 0;
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-item-content {
    padding: 20px;
    flex: 1;
}

.news-item-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

.news-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.news-item-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Single Post */
.single-post-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 600;
}

.breadcrumb a {
    color: var(--primary-color);
}

.single-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.share-text {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.share-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff !important;
    border-radius: 4px;
    transition: opacity 0.2s, transform 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.share-btn.fb { background-color: #1877F2; }
.share-btn.tw { background-color: #000000; }
.share-btn.wa { background-color: #25D366; }

.single-thumbnail {
    margin-bottom: 30px;
}

.single-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
}

.entry-content {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

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

/* Rich Typography inside Article */
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
    font-family: var(--font-ui);
    color: var(--primary-color);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 800;
    line-height: 1.4;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content blockquote {
    border-left: 5px solid var(--accent-color);
    padding: 15px 20px;
    margin: 1.5em 0;
    background: #f8fafc;
    font-style: italic;
    font-size: 1.15rem;
    color: #475569;
}

/* Elegant Tables */
.entry-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.entry-content th, .entry-content td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.entry-content th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: var(--primary-color);
}

.entry-content tr:nth-child(even) {
    background-color: #f8fafc;
}

.wp-block-table {
    overflow-x: auto;
    margin-bottom: 1.5em;
    max-width: 100%;
    display: block;
}

/* Baca Juga Widget in Content */
.baca-juga {
    background-color: #f8fafc;
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    margin: 25px 0;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-ui);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.baca-juga strong {
    color: var(--accent-color);
    margin-right: 5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.baca-juga a {
    color: var(--primary-color);
}

.baca-juga a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Sidebar Widgets */
.sidebar-column .widget {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 35px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: none;
    border-top: 4px solid var(--primary-color);
    overflow: hidden;
}

/* Target all widget headings (Block & Classic) */
.sidebar-column .widget h2,
.sidebar-column .widget .widget-title {
    background: var(--primary-color);
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 15px 25px;
    margin: -25px -25px 20px -25px;
    border-left: 5px solid var(--accent-color);
    display: block;
    line-height: 1.4;
}

.sidebar-column .widget h2 span,
.sidebar-column .widget .widget-title span {
    background: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}

.sidebar-column .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-column .widget ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-left: 20px;
}

.sidebar-column .widget ul li::before {
    content: '\25B8'; /* Triangle bullet */
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-color);
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s;
}

.sidebar-column .widget ul li:hover::before {
    transform: translateX(4px);
}

.sidebar-column .widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-column .widget ul li a {
    color: var(--text-main);
}

.sidebar-column .widget ul li a:hover {
    color: var(--accent-color);
}

/* Custom Element inside Sidebar Widget */
.sidebar-column .widget .textwidget,
.sidebar-column .widget select,
.sidebar-column .widget input {
    padding: 15px 20px;
    font-size: 0.95rem;
    width: 100%;
}


/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    padding: 60px 0 20px 0;
    margin-top: 60px;
    border-top: 5px solid var(--accent-color);
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* Remove white box from footer widgets */
.site-footer .widget {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    margin-bottom: 0;
}

.site-footer .widget-title,
.footer-widget-area .widget-title {
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
    padding-bottom: 15px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.site-footer .widget ul,
.footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .widget ul li,
.footer-widget-area ul li {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}

.site-footer a,
.site-footer .widget ul li a,
.footer-widget-area ul li a {
    color: #cbd5e1;
    transition: all 0.2s;
    display: inline-block;
}

.site-footer a:hover,
.site-footer .widget ul li a:hover,
.footer-widget-area ul li a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* Override paragraph color inside footer widget */
.site-footer .textwidget,
.footer-widget-area p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #fff;
    font-weight: 700;
}

.footer-bottom a:hover {
    color: var(--accent-color);
}

/* Pagination */
.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 18px;
    background: #fff;
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-numbers.current {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tag-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-right: 5px;
}

.tag-pill {
    display: inline-block;
    background-color: #f1f5f9;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
}

.tag-pill:hover {
    background-color: var(--accent-color);
    color: #fff !important;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.2);
}

/* Related Posts */
.related-posts-section {
    margin: 40px 0;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.related-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

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

.related-card:hover .related-thumb img {
    transform: scale(1.05);
}

.related-title {
    padding: 15px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    margin: 0;
}

.related-card a:hover .related-title {
    color: var(--accent-color);
}

/* Ad Placeholders */
.ad-placeholder {
    background-color: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
}

.ad-placeholder.leaderboard-ad {
    max-width: 728px;
    height: 90px;
    margin: 0 auto;
}

.ad-placeholder.rectangle-ad {
    max-width: 300px;
    height: 250px;
    margin-left: auto;
    margin-right: auto;
}

.ad-placeholder.banner-ad {
    max-width: 468px;
    height: 60px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   NAVIGATION DROPDOWNS
   ========================================= */
.main-navigation li {
    position: relative;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 220px;
    z-index: 1000;
    border-top: 3px solid var(--primary-color);
    padding: 0;
    margin: 0;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li.focus > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 600;
    text-transform: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
}

.main-navigation .sub-menu li:last-child > a {
    border-bottom: none;
}

.main-navigation .sub-menu a:hover {
    background-color: #111827; /* Dark almost black block */
    color: #ffffff;
    padding-left: 25px;
}

.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 3px solid var(--primary-color);
}

.main-navigation .menu-item-has-children > a::after {
    content: '\25BE';
    margin-left: 8px;
    font-size: 0.8rem;
    vertical-align: middle;
}

.main-navigation .sub-menu .menu-item-has-children > a::after {
    content: '\25B8';
    float: right;
}

/* =========================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================= */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        width: 100%;
        margin-top: 40px;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar-column {
        width: 100%;
    }

    .news-item {
        flex-direction: column;
    }
    
    .news-item-img {
        width: 100%;
        height: 250px;
    }
    
    .headline-card img {
        height: 300px;
    }
    
    .headline-title {
        font-size: 1.5rem;
    }
    
    .single-title {
        font-size: 1.8rem;
    }
    
    .single-post-container {
        padding: 20px;
    }
    
    .main-navigation .container {
        padding: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        border-top: 1px solid var(--border-color);
    }
    
    .main-navigation ul.toggled {
        display: flex;
    }
    
    .main-navigation a {
        padding: 15px 20px;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation li:last-child > a {
        border-bottom: none;
    }
    
    .main-navigation .sub-menu {
        position: static;
        display: flex !important;
        flex-direction: column;
        box-shadow: none;
        border-top: none;
        background-color: #f8f9fa;
        min-width: 100%;
        border-left: 4px solid var(--border-color);
    }
    
    .main-navigation .sub-menu a {
        padding-left: 30px;
    }
    
    .main-navigation .sub-menu .sub-menu a {
        padding-left: 40px;
    }
    
    .main-navigation .menu-item-has-children > a::after {
        float: right;
        content: '\25BE';
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .site-footer .widget-title, 
    .footer-widget-area .widget-title {
        border-bottom: none;
        display: inline-block;
        border-bottom: 2px solid var(--accent-color);
        margin-bottom: 15px;
    }
}

/* Mobile Portrait (max-width: 480px) */
@media (max-width: 480px) {
    .top-bar-inner {
        flex-direction: column;
        height: auto;
        padding: 8px 0;
        text-align: center;
    }
    
    .breaking-label {
        margin-right: 0;
        margin-bottom: 5px;
        line-height: 25px;
        display: inline-block;
        padding: 2px 10px;
        border-radius: 3px;
        font-size: 0.75rem;
    }
    
    .header-search {
        width: 100%;
    }
    
    .headline-card img {
        height: 220px;
    }
    
    .social-share {
        justify-content: center;
    }
    
    .share-text {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .share-btn {
        flex: 1;
        text-align: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .related-thumb {
        height: 200px;
    }
    
    .ad-placeholder.leaderboard-ad,
    .ad-placeholder.banner-ad {
        height: auto;
        min-height: 80px;
        padding: 15px;
    }
}

.custom-ad-container {
    max-width: 100%;
    text-align: center;
}

/* Popular Posts Widget */
.widget-popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-popular-posts li {
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}
.widget-popular-posts li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}
.widget-popular-posts a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    align-items: center;
}
.widget-popular-posts .thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}
.widget-popular-posts .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.widget-popular-posts .info {
    flex: 1;
}
.widget-popular-posts .title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 5px;
    transition: color 0.2s;
}
.widget-popular-posts a:hover .title {
    color: var(--primary-color);
}
.widget-popular-posts .date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Auto Table of Contents */
.mediasaku-toc {
    background-color: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    margin-bottom: 25px;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
    .mediasaku-toc {
        display: block;
        width: 100%;
    }
}
.mediasaku-toc .toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}
.mediasaku-toc .toc-title {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mediasaku-toc .toc-toggle {
    font-size: 0.8rem;
    font-weight: 600;
}
.single-content .mediasaku-toc .toc-toggle a,
.mediasaku-toc .toc-toggle a {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    border: none !important;
    background: #e2e8f0 !important;
    padding: 4px 10px !important;
    border-radius: 4px;
    transition: all 0.2s;
    box-shadow: none !important;
}
.single-content .mediasaku-toc .toc-toggle a:hover,
.mediasaku-toc .toc-toggle a:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}
.mediasaku-toc .toc-list,
.mediasaku-toc .toc-sublist {
    list-style: decimal;
    padding: 0;
    margin: 0;
    padding-left: 20px;
}
.mediasaku-toc .toc-list > li {
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-muted);
}
.mediasaku-toc .toc-list > li:last-child {
    margin-bottom: 0;
}
.single-content .mediasaku-toc .toc-list a,
.mediasaku-toc .toc-list a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-weight: 600;
    border: none !important;
    box-shadow: none !important;
}
.single-content .mediasaku-toc .toc-list a:hover,
.mediasaku-toc .toc-list a:hover {
    text-decoration: underline !important;
}
.mediasaku-toc .toc-sublist {
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 12px;
}
.mediasaku-toc .toc-sublist > li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.single-content .mediasaku-toc .toc-sublist a,
.mediasaku-toc .toc-sublist a {
    color: var(--text-main) !important;
    font-weight: 400;
}
