/*
Theme Name: SeKata News (Detik-Style Portal)
Theme URI: https://sekata.id
Author: Albert Wei
Description: Tema WordPress portal berita cepat, responsif, dan padat informasi bergaya Detik dengan slot iklan siap pakai, breaking news ticker, headline grid, dan post views counter bawaan.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: sekata-news
*/

:root {
    --primary: #21409a;
    --primary-dark: #162c6e;
    --accent: #e52d27;
    --bg-body: #f4f5f7;
    --bg-white: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --container: 1140px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.55;
    font-size: 15px;
}

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

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 15px;
}

/* Topbar */
.topbar {
    background: #111827;
    color: #d1d5db;
    font-size: 12px;
    padding: 6px 0;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar-links {
    display: flex;
    gap: 14px;
    list-style: none;
}

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

/* Main Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

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

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--primary);
}

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

.site-tagline {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.header-search form {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: #f9fafb;
    width: 300px;
    max-width: 100%;
}

.header-search input[type="search"] {
    border: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 13px;
    flex: 1;
    outline: none;
}

.header-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.header-search button:hover {
    background: var(--primary-dark);
}

/* Main Navigation (Detik Gradient Bar) */
.main-nav {
    background: linear-gradient(90deg, var(--primary) 0%, #1d5bbf 100%);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu li a {
    display: block;
    padding: 11px 15px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 8px 12px;
    cursor: pointer;
}

/* Breaking News Ticker */
.breaking-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.breaking-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.breaking-label {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.breaking-ticker {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breaking-ticker a {
    display: none;
}

.breaking-ticker a.active {
    display: inline;
}

/* Ad Slots */
.ad-slot {
    text-align: center;
    margin: 14px auto;
}

.ad-placeholder {
    background: #e5e7eb;
    border: 1px dashed #9ca3af;
    color: #6b7280;
    font-size: 12px;
    padding: 14px;
    border-radius: 4px;
}

/* Hero Headline Grid (Detik Style) */
.hero-section {
    margin-top: 16px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 12px;
}

.hero-main {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    min-height: 360px;
}

.hero-main img,
.hero-sub-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-main:hover img,
.hero-sub-card:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 10%, rgba(0,0,0,0.25) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #fff;
}

.badge-cat {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    width: fit-content;
}

.hero-main .hero-title {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.28;
    margin-bottom: 6px;
}

.hero-main .hero-title a:hover {
    color: #fbbf24;
}

.hero-meta {
    font-size: 12px;
    color: #d1d5db;
}

.hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
}

.hero-sub-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    min-height: 174px;
}

.hero-sub-card .hero-overlay {
    padding: 14px;
}

.hero-sub-card .hero-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.hero-sub-card .hero-title a:hover {
    color: #fbbf24;
}

/* Main Content + Sidebar Layout */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 36px;
}

.box-panel {
    background: var(--bg-white);
    border-radius: 6px;
    padding: 18px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.section-heading h2,
.section-heading h3 {
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.section-heading a {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

/* News Feed Stream (Detik Newsfeed List) */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

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

.news-thumb {
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e5e7eb;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.news-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}

.news-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Category Block Grid (2 Columns) */
.cat-blocks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.cat-mini-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-mini-list li {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.cat-mini-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cat-mini-list h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 3px;
}

/* Sidebar Popular Posts (Terpopuler Numbered List) */
.popular-list {
    list-style: none;
    counter-reset: pop-counter;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-list li {
    counter-increment: pop-counter;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.popular-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-list li::before {
    content: "#" counter(pop-counter);
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    min-width: 28px;
    line-height: 1.2;
}

.popular-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    display: block;
    margin-bottom: 3px;
}

/* Single Article Page */
.breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

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

.single-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.28;
    color: #111827;
    margin-bottom: 10px;
}

.single-meta {
    font-size: 13px;
    color: var(--text-muted);
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.single-featured {
    margin-bottom: 18px;
    border-radius: 6px;
    overflow: hidden;
}

.single-featured figcaption {
    font-size: 12px;
    color: var(--text-muted);
    background: #f9fafb;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.entry-content {
    font-size: 16px;
    line-height: 1.75;
    color: #1f2937;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content h2,
.entry-content h3 {
    margin: 22px 0 10px;
    color: #111827;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    background: #f3f4f6;
    padding: 12px 16px;
    margin: 16px 0;
    font-style: italic;
}

.share-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.share-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff !important;
}

.share-wa { background: #25d366; }
.share-fb { background: #1877f2; }
.share-x  { background: #111827; }

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.post-tags a {
    background: #eef2ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Related Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.related-card img {
    border-radius: 4px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 8px;
}

.related-card h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    padding: 7px 13px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
}

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

/* Footer */
.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 36px 0 20px;
    border-top: 4px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #374151;
}

.footer-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

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

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

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 18px;
}

/* Responsive */
@media (max-width: 920px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-main {
        min-height: 270px;
    }
    .hero-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .content-layout {
        grid-template-columns: 1fr;
    }
    .cat-blocks-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-side,
    .related-grid {
        grid-template-columns: 1fr;
    }
    .news-item {
        grid-template-columns: 125px 1fr;
        gap: 10px;
    }
    .news-title {
        font-size: 15px;
    }
    .news-excerpt {
        display: none;
    }
    .single-title {
        font-size: 22px;
    }
}
