/*
Theme Name: Warta News
Theme URI: https://example.com/warta-news
Author: Your Name
Author URI: https://example.com
Description: Tema portal berita profesional dengan customizer lengkap untuk mengatur warna, iklan, dan layout berdasarkan kategori. Kompatibel dengan WordPress 6.9.1.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: warta-news
Tags: news, magazine, blog, two-columns, custom-colors, custom-menu, custom-logo, featured-images, sticky-post, threaded-comments, translation-ready

Warta News - Portal Berita WordPress Theme
*/

/* ===================================
   RESET & BASE STYLES
   =================================== */

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

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

a:hover {
    opacity: 0.8;
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */

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

.wrapper {
    background: #fff;
}

/* ===================================
   TOP BAR
   =================================== */

.top-bar {
    background: #1a1a1a;
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

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

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar-right {
    display: flex;
    gap: 10px;
}

.social-links a {
    color: #fff;
    font-size: 0.9rem;
    padding: 5px 8px;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-color, #e74c3c);
}

/* ===================================
   HEADER
   =================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-main {
    padding: 20px 0;
}

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

.site-branding {
    flex: 0 0 auto;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #e74c3c);
    margin: 0;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.header-ad {
    flex: 1;
    text-align: right;
    max-width: 728px;
}

/* ===================================
   NAVIGATION
   =================================== */

.main-navigation {
    background: var(--primary-color, #e74c3c);
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    color: #fff;
    padding: 15px 20px;
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    background: rgba(0,0,0,0.1);
}

/* Submenu */
.nav-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: none;
    list-style: none;
}

.nav-menu li:hover > ul {
    display: block;
}

.nav-menu ul li a {
    padding: 12px 20px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.nav-menu ul li a:hover {
    background: #f5f5f5;
    color: var(--primary-color, #e74c3c);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 15px 20px;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.site-content {
    padding: 30px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

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

/* ===================================
   FEATURED SLIDER
   =================================== */

.featured-slider {
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.slider-item {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px 30px 30px;
    color: #fff;
}

.slider-category {
    display: inline-block;
    background: var(--primary-color, #e74c3c);
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.slider-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.3;
}

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

.slider-meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color, #e74c3c);
    position: relative;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    display: inline-block;
    background: #fff;
    padding-right: 15px;
}

/* ===================================
   POST CARDS
   =================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color, #e74c3c);
    color: #fff;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #1a1a1a;
}

.post-title a:hover {
    color: var(--primary-color, #e74c3c);
}

.post-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: #999;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===================================
   POST LIST (Alternative Layout)
   =================================== */

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-list-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.post-list-item .post-thumbnail {
    height: 150px;
}

/* ===================================
   SIDEBAR
   =================================== */

.sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.widget {
    background: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color, #e74c3c);
    color: #1a1a1a;
}

/* Popular Posts Widget */
.popular-posts-list {
    list-style: none;
}

.popular-post-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-post-item:last-child {
    border-bottom: none;
}

.popular-post-thumb {
    height: 60px;
    overflow: hidden;
    border-radius: 5px;
}

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

.popular-post-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-post-content h4 a:hover {
    color: var(--primary-color, #e74c3c);
}

.popular-post-date {
    font-size: 0.75rem;
    color: #999;
}

/* Ad Widget */
.ad-widget {
    text-align: center;
    padding: 0;
    overflow: hidden;
}

.ad-widget img {
    width: 100%;
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

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

.footer-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget ul li a {
    color: #ccc;
}

.footer-widget ul li a:hover {
    color: var(--primary-color, #e74c3c);
}

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

/* ===================================
   SINGLE POST
   =================================== */

.single-post-header {
    margin-bottom: 30px;
}

.single-post-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.single-post-meta {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.9rem;
}

.single-post-featured {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
}

.single-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin: 30px 0 15px;
    color: #1a1a1a;
}

.single-post-content img {
    margin: 25px 0;
    border-radius: 5px;
}

/* ===================================
   PAGINATION
   =================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    color: #333;
    min-width: 45px;
    text-align: center;
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color, #e74c3c);
    color: #fff;
    border-color: var(--primary-color, #e74c3c);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-ad {
        max-width: 100%;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .nav-menu {
        flex-direction: column;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-list-item {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .single-post-title {
        font-size: 1.6rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-30 {
    margin-top: 30px;
}

/* ===================================
   CUSTOM COLORS (Controlled by Customizer)
   =================================== */

:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --text-color: #333;
    --heading-color: #1a1a1a;
}
