/*
Theme Name: FastBlog
Theme URI: https://example.com/fastblog
Author: Developer
Author URI: https://example.com
Description: Tema WordPress super cepat dengan slot iklan dan panel settings lengkap
Version: 2.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fastblog
*/

/* ========== CSS RESET & BASE ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--fb-text, #333);
    background: var(--fb-body-bg, #f5f5f5)
}

a {
    color: var(--fb-primary);
    text-decoration: none
}

a:hover {
    color: var(--fb-secondary);
    text-decoration: underline
}

/* Links in content should be underlined for accessibility */
.post-content a,
.post-meta a,
.breadcrumb a,
.comment-content a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px
}

.post-content a:hover,
.post-meta a:hover {
    text-decoration-thickness: 2px
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

ul,
ol {
    list-style: none
}

/* ========== LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px
}

.site-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0
}

.main-content {
    flex: 1;
    min-width: 0
}

.sidebar {
    width: 300px;
    flex-shrink: 0
}

/* ========== FLOATING SIDE ADS ========== */
.side-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99;
    width: 120px
}

.side-ad-left {
    left: 5px
}

.side-ad-right {
    right: 5px
}

.side-ad .ad-slot {
    margin: 0
}

/* Site Wrapper - always has space for side ads */
.site-wrapper {
    margin: 0 130px;
    transition: margin .3s
}

/* Responsive adjustments */
@media(max-width:1200px) {
    .site-wrapper {
        margin: 0 100px
    }

    .side-ad {
        width: 90px
    }
}

@media(max-width:992px) {
    .site-wrapper {
        margin: 0 15px
    }

    .side-ad {
        display: none
    }
}

/* ========== HEADER ========== */
.site-header {
    background: var(--fb-header-bg, #fff);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1)
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 15px
}

.site-logo img {
    max-height: 50px;
    width: auto
}

.site-logo .site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--fb-primary)
}

.header-ad {
    max-width: 728px
}

/* ========== NAVIGATION ========== */
.main-nav {
    background: linear-gradient(to bottom, var(--fb-primary), var(--fb-secondary))
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap
}

.main-nav li {
    position: relative
}

.main-nav a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    font-weight: 500;
    transition: background .2s
}

.main-nav a:hover,
.main-nav .current-menu-item>a {
    background: rgba(0, 0, 0, .2);
    color: #fff
}

.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--fb-secondary);
    min-width: 200px;
    z-index: 100
}

.main-nav li:hover>.sub-menu {
    display: block
}

.main-nav .sub-menu a {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.nav-search {
    margin-left: auto;
    padding: 8px 15px
}

.nav-search input {
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    width: 150px
}

.menu-toggle {
    display: none;
    background: var(--fb-primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1rem
}

/* ========== AD SLOTS ========== */
.ad-slot {
    text-align: center;
    margin: 15px 0;
    overflow: hidden
}

.ad-slot img {
    max-width: 100%;
    height: auto
}

/* ========== POSTS ========== */
.post-card {
    background: var(--fb-card-bg, #fff);
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
}

.post-card-inner {
    display: flex;
    gap: 20px;
    padding: 20px
}

.post-thumb {
    width: 180px;
    flex-shrink: 0
}

.post-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 3px
}

.post-info {
    flex: 1;
    min-width: 0
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4
}

.post-title a {
    color: var(--fb-text, #333)
}

.post-title a:hover {
    color: var(--fb-primary)
}

.post-meta {
    font-size: .85rem;
    color: var(--fb-text-muted, #595959);
    margin-bottom: 8px
}

.post-meta a {
    color: var(--fb-primary)
}

.post-excerpt {
    font-size: .9rem;
    color: var(--fb-text-muted, #555);
    line-height: 1.5
}

.post-excerpt p {
    margin: 0
}

/* Featured Post */
.featured-post .post-card-inner {
    flex-direction: column
}

.featured-post .post-thumb {
    width: 100%
}

.featured-post .post-thumb img {
    height: 200px
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    gap: 5px;
    padding: 20px 0;
    flex-wrap: wrap
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: var(--fb-card-bg, #fff);
    border: 1px solid var(--fb-border, #ddd);
    border-radius: 3px;
    color: var(--fb-text, #333)
}

.pagination .current,
.pagination a:hover {
    background: var(--fb-primary);
    color: #fff;
    border-color: var(--fb-primary)
}

/* ========== SIDEBAR ========== */
.widget {
    background: var(--fb-card-bg, #fff);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fb-primary);
    color: var(--fb-text, #333)
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fb-border, #eee)
}

.widget ul li:last-child {
    border: none
}

.widget ul li a {
    color: var(--fb-text-muted, #555)
}

.widget ul li a:hover {
    color: var(--fb-primary)
}

/* Search Widget */
.search-form {
    display: flex
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px
}

.search-form button {
    padding: 10px 15px;
    background: var(--fb-primary);
    color: #fff;
    border: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer
}

/* Recent Posts Widget */
.recent-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fb-border, #eee)
}

.recent-post-item:last-child {
    border: none
}

.recent-post-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px
}

.recent-post-info {
    flex: 1;
    min-width: 0
}

.recent-post-title {
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px
}

.recent-post-title a {
    color: var(--fb-text, #333)
}

.recent-post-title a:hover {
    color: var(--fb-primary)
}

.recent-post-date {
    font-size: .8rem;
    color: var(--fb-text-muted, #666666)
}

/* ========== SINGLE POST ========== */
.single-post-header {
    margin-bottom: 20px
}

.single-post-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3
}

.single-post-meta {
    font-size: .9rem;
    color: #595959;
    margin-bottom: 20px
}

.single-post-meta a {
    color: var(--fb-primary)
}

.single-featured-image {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden
}

.single-featured-image img {
    width: 100%
}

.post-content {
    background: var(--fb-card-bg, #fff);
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
}

.post-content p {
    margin-bottom: 1rem
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 1.5rem 0 1rem;
    font-weight: 600
}

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem
}

.post-content ul {
    list-style: disc
}

.post-content ol {
    list-style: decimal
}

.post-content blockquote {
    border-left: 4px solid var(--fb-primary);
    padding: 15px 20px;
    margin: 1.5rem 0;
    background: #f9f9f9;
    font-style: italic
}

.post-content img {
    border-radius: 4px;
    margin: 1rem 0
}

.post-content a {
    color: var(--fb-primary);
    text-decoration: underline
}

/* Post Tags */
.post-tags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee
}

.post-tags a {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: .85rem;
    margin: 3px;
    color: #555
}

.post-tags a:hover {
    background: var(--fb-primary);
    color: #fff
}

/* Share Buttons */
.share-buttons {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee
}

.share-buttons-title {
    font-weight: 600;
    margin-bottom: 10px
}

.share-buttons a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 3px;
    color: #fff;
    margin-right: 5px
}

.share-fb {
    background: #3b5998
}

.share-tw {
    background: #1da1f2
}

.share-wa {
    background: #25d366
}

.share-tg {
    background: #0088cc
}

/* Related Posts */
.related-posts {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
}

.related-posts-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fb-primary)
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px
}

.related-post-item {
    text-align: center
}

.related-post-thumb {
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 8px
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.related-post-title {
    font-size: .85rem;
    line-height: 1.4
}

.related-post-title a {
    color: #333
}

.related-post-title a:hover {
    color: var(--fb-primary)
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 4px
}

.nav-previous,
.nav-next {
    flex: 1
}

.nav-next {
    text-align: right
}

.nav-label {
    font-size: .8rem;
    color: #666666;
    margin-bottom: 5px
}

.nav-title {
    font-weight: 500;
    color: #333
}

.nav-title:hover {
    color: var(--fb-primary)
}

/* ========== COMMENTS ========== */
.comments-area {
    margin-top: 30px;
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
}

.comments-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px
}

.comment-list {
    margin-bottom: 30px
}

.comment {
    padding: 15px 0;
    border-bottom: 1px solid #eee
}

.comment:last-child {
    border: none
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px
}

.comment-author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%
}

.comment-author-name {
    font-weight: 600
}

.comment-date {
    font-size: .8rem;
    color: #666666
}

.comment-content p {
    margin: 0
}

.comment-reply a {
    font-size: .85rem;
    color: var(--fb-primary)
}

/* Comment Form */
.comment-form-wrap {
    padding-top: 20px;
    border-top: 1px solid #eee
}

.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical
}

.comment-form button {
    background: var(--fb-primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem
}

.comment-form button:hover {
    background: var(--fb-secondary)
}

/* ========== FOOTER ========== */
.site-footer {
    background: #333;
    color: #ccc;
    padding: 30px 0;
    margin-top: 30px
}

.footer-content {
    text-align: center
}

.footer-ad {
    margin-bottom: 20px
}

.copyright {
    font-size: .9rem
}

.copyright a {
    color: #fff
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--fb-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all .3s
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible
}

.back-to-top:hover {
    background: var(--fb-secondary)
}

/* ========== 404 PAGE ========== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 4px
}

.error-404 h1 {
    font-size: 5rem;
    color: var(--fb-primary);
    margin-bottom: 20px
}

.error-404 p {
    font-size: 1.2rem;
    margin-bottom: 30px
}

.error-404 .search-form {
    max-width: 400px;
    margin: 0 auto
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    padding: 10px 0;
    font-size: .85rem;
    color: #595959
}

.breadcrumb a {
    color: var(--fb-primary)
}

.breadcrumb span {
    margin: 0 8px
}

/* ========== PAGE VIEW COUNTER ========== */
.post-views {
    font-size: .85rem;
    color: #595959
}

.post-views svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px
}

/* ========== BACA JUGA ========== */
.baca-juga {
    background: linear-gradient(135deg, #fff8f0, #fff);
    border-left: 4px solid var(--fb-primary);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .08)
}

.baca-juga strong {
    display: block;
    color: var(--fb-primary);
    margin-bottom: 10px;
    font-size: 1rem
}

.baca-juga ul {
    margin: 0;
    padding: 0;
    list-style: none
}

.baca-juga ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee
}

.baca-juga ul li:last-child {
    border: none
}

.baca-juga ul li a {
    color: #333;
    font-size: .95rem;
    text-decoration: none;
    transition: color .2s
}

.baca-juga ul li a:hover {
    color: var(--fb-primary)
}

/* ========== RESPONSIVE ========== */
@media(max-width:992px) {
    .sidebar {
        width: 100%
    }

    .site-content {
        flex-direction: column
    }
}

@media(max-width:768px) {
    .header-top {
        flex-direction: column;
        text-align: center
    }

    .header-ad {
        order: 2;
        width: 100%;
        overflow-x: auto
    }

    /* Mobile Menu Improvements */
    .main-nav {
        position: relative
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--fb-primary);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2)
    }

    .main-nav.active ul {
        display: flex
    }

    .main-nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1)
    }

    .main-nav ul li:last-child {
        border-bottom: none
    }

    .main-nav ul li a {
        padding: 14px 20px;
        text-align: left
    }

    .main-nav .sub-menu {
        position: static;
        background: rgba(0, 0, 0, 0.15);
        box-shadow: none
    }

    .main-nav .sub-menu a {
        padding-left: 35px
    }

    .menu-toggle {
        display: block;
        width: 100%;
        padding: 14px 20px;
        background: var(--fb-primary);
        color: #fff;
        border: none;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        text-align: center
    }

    .menu-toggle:hover {
        background: var(--fb-secondary)
    }

    /* Mobile Post Cards */
    .post-card-inner {
        flex-direction: column
    }

    .post-thumb {
        width: 100%
    }

    .post-thumb img {
        height: 200px;
        width: 100%;
        object-fit: cover
    }

    .post-info {
        padding: 15px
    }

    .post-title {
        font-size: 1.1rem
    }

    /* Mobile Sidebar */
    .sidebar {
        margin-top: 20px;
        padding: 0
    }

    .widget {
        margin-bottom: 15px
    }

    /* Mobile Single Post */
    .single-post-title {
        font-size: 1.4rem
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px
    }

    .post-navigation {
        flex-direction: column;
        gap: 15px
    }

    .nav-next {
        text-align: left
    }

    /* Mobile Recent Posts Widget */
    .recent-post-item {
        padding: 12px 0
    }

    .recent-post-thumb {
        width: 70px;
        height: 70px
    }

    .recent-post-title {
        font-size: 0.95rem
    }
}

@media(max-width:480px) {
    .container {
        padding: 0 15px
    }

    .related-posts-grid {
        grid-template-columns: 1fr
    }

    .post-thumb img {
        height: 180px
    }

    .single-post-title {
        font-size: 1.2rem
    }

    .widget-title {
        font-size: 1rem
    }

    /* Search form mobile */
    .search-form input[type="search"] {
        padding: 12px
    }

    .search-form button {
        padding: 12px 15px
    }
}