/* ============================================
   Majelis Daerah Besuki Barat - Main Stylesheet
   Inspired by Newsup theme (dark blue magazine style)
   ============================================ */

:root {
    --primary: #1a237e;
    --primary-dark: #0d1442;
    --primary-light: #283593;
    --accent: #e53935;
    --accent-hover: #c62828;
    --text: #333;
    --text-light: #666;
    --bg: #f5f5f5;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 4px;
    --font-body: 'Roboto', sans-serif;
    --font-heading: 'Merriweather', serif;
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

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

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

/* Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: #ccc;
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header */
.site-header {
    background: var(--primary);
    padding: 20px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--white);
    letter-spacing: 1px;
    text-align: center;
}
.logo-text p {
    color: #90caf9;
    font-size: 13px;
    text-align: center;
    margin-top: 2px;
}

/* Navigation */
.main-nav {
    background: var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.main-nav .container {
    display: flex;
    align-items: center;
    position: relative;
}
.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.nav-menu > li {
    position: relative;
}
.nav-menu > li > a {
    display: block;
    padding: 14px 16px;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--white);
    background: var(--primary-light);
}

/* Dropdown */
.has-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow);
    list-style: none;
    z-index: 200;
    border-radius: 0 0 var(--radius) var(--radius);
}
.has-dropdown:hover .dropdown {
    display: block;
}
.dropdown li a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.dropdown li a:hover {
    background: #f5f5f5;
    color: var(--primary);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    margin: 5px 0;
    transition: 0.3s;
}

/* Info Bar */
.info-bar {
    background: var(--accent);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}
.info-bar .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.info-label {
    background: var(--white);
    color: var(--accent);
    padding: 2px 10px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    padding: 25px 0 40px;
}
.main-content .container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Content Area */
.content-area {
    min-width: 0;
}

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 20px;
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.post-card-img {
    height: 180px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 48px;
}
.post-card-body {
    padding: 16px;
}
.post-card-cat {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}
.post-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 8px;
}
.post-card-title a {
    color: var(--text);
}
.post-card-title a:hover {
    color: var(--primary);
}
.post-card-meta {
    font-size: 12px;
    color: var(--text-light);
}
.post-card-excerpt {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
}

/* Featured / Large Post */
.post-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}
.post-featured .post-card-img {
    height: 100%;
    min-height: 260px;
}
.post-featured .post-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}
.post-featured .post-card-title {
    font-size: 22px;
}

/* Single Post / Page */
.single-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}
.single-content h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.3;
}
.single-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}
.single-meta .cat-badge {
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}
.single-body {
    font-size: 15px;
    line-height: 1.8;
}
.single-body p {
    margin-bottom: 1em;
}
.single-body h2, .single-body h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin: 1.5em 0 0.5em;
}
.single-body img {
    margin: 1em auto;
    border-radius: var(--radius);
}
.single-body ul, .single-body ol {
    margin: 1em 0 1em 1.5em;
}

/* Sidebar */
.sidebar {
    min-width: 0;
}
.widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.widget-title {
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 16px;
    letter-spacing: 0.5px;
}
.widget-body {
    padding: 16px;
}
.widget-post {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.widget-post:last-child {
    border-bottom: none;
}
.widget-post-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.widget-post-title {
    font-size: 13px;
    line-height: 1.4;
}
.widget-post-title a {
    color: var(--text);
}
.widget-post-title a:hover {
    color: var(--primary);
}
.widget-post-date {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
}

/* Category List */
.cat-list {
    list-style: none;
}
.cat-list li {
    border-bottom: 1px solid var(--border);
}
.cat-list li a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text);
    font-size: 13px;
}
.cat-list li a:hover {
    color: var(--primary);
}
.cat-list .count {
    background: var(--bg);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 25px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text);
}
.pagination a:hover, .pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: #bbb;
    padding: 40px 0 0;
    margin-top: 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}
.footer-col h3 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 12px;
}
.footer-col h4 {
    color: var(--white);
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.footer-col p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 8px;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 6px;
}
.footer-col ul li a {
    color: #bbb;
    font-size: 13px;
}
.footer-col ul li a:hover {
    color: var(--white);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}
.breadcrumb a {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .main-content .container {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .post-featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .logo-text h1 {
        font-size: 20px;
    }
    .nav-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary-dark);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 0;
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-menu > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .has-dropdown .dropdown {
        position: static;
        display: none;
        box-shadow: none;
        background: var(--primary);
    }
    .has-dropdown.open .dropdown {
        display: block;
    }
    .dropdown li a {
        color: #ccc;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-left: 30px;
    }
    .post-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .single-content {
        padding: 20px;
    }
    .single-content h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        font-size: 11px;
    }
    .info-bar {
        font-size: 12px;
    }
}
