/*
Theme Name: Kemakmuran Berkah Timber
Author: Rayzel (Gemini CLI)
Description: Custom WordPress theme for PT. Kemakmuran Berkah Timber.
Version: 1.0
Text Domain: kemakmuran
*/

/* CSS Reset & Basics */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', Arial, sans-serif; color: #333; line-height: 1.6; background-color: #fcfcfc; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; background-color: #fff; box-shadow: 0 0 10px rgba(0,0,0,0.05); }

/* Top Header */
.top-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 40px; }
.logo { font-family: 'Times New Roman', Times, serif; font-size: 28px; color: #004a8f; font-weight: bold; }
.top-right { display: flex; align-items: center; gap: 30px; font-size: 13px; color: #004a8f; }
.top-links a { margin-left: 15px; }
.social-icons { display: flex; gap: 8px; }
.social-icon { width: 28px; height: 28px; border: 1px solid #ccc; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #666; font-size: 13px; transition: all 0.3s; }
.social-icon:hover { border-color: #004a8f; color: #004a8f; }

/* Main Navigation */
.main-nav { background-color: #006bb3; display: flex; justify-content: space-between; align-items: center; padding: 0 15px; }
.nav-links { display: flex; margin: 0; padding: 0; }
.nav-links li { position: relative; }
.nav-links a { display: block; color: white; padding: 18px 20px; font-size: 13px; text-transform: uppercase; border-right: 1px solid rgba(255,255,255,0.1); }
.nav-links li:first-child a { border-left: 1px solid rgba(255,255,255,0.1); }
.nav-links a:hover { background-color: #00528a; }
.menu-item-has-children > a::after { content: ' \25BC'; font-size: 10px; margin-left: 5px; }

/* Sub Menu (Dropdown) Desktop */
.nav-links .sub-menu { display: none; position: absolute; top: 100%; left: 0; background-color: #00528a; min-width: 220px; z-index: 100; box-shadow: 0 4px 6px rgba(0,0,0,0.1); padding: 0; margin: 0; }
.nav-links li:hover > .sub-menu { display: block; }
.nav-links .sub-menu li { width: 100%; border: none; }
.nav-links .sub-menu a { padding: 12px 20px; border: none; border-bottom: 1px solid rgba(255,255,255,0.05); text-transform: none; }
.nav-links .sub-menu a:hover { background-color: #003d73; }
.nav-links .sub-menu .sub-menu { top: 0; left: 100%; } /* Nested Sub-menus */

.search-icon { color: white; padding: 18px 20px; cursor: pointer; border-left: 1px solid rgba(255,255,255,0.1); }

/* Hero Banner */
.hero-banner { position: relative; height: 300px; background-size: cover !important; background-position: center center !important; background-repeat: no-repeat !important; border-bottom: 5px solid #006bb3; }
.hero-text { position: absolute; bottom: 30px; right: 50px; font-family: 'Times New Roman', Times, serif; font-size: 36px; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }

/* Main Layout */
.main-content { display: flex; padding: 40px; gap: 50px; }

/* Sidebar */
.sidebar { width: 250px; flex-shrink: 0; }
.sidebar-title { font-size: 20px; font-weight: 300; color: #555; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-menu, .widget ul { list-style: none; padding:0; margin:0; }
.sidebar-menu li a, .widget ul li a { display: block; padding: 15px 20px; border: 1px solid #eaeaea; margin-bottom: -1px; font-size: 14px; color: #444; background-color: #fbfbfb; transition: background 0.2s; }
.sidebar-menu li a:hover, .widget ul li a:hover { background-color: #f0f0f0; }
.sidebar-image { margin-top: 40px; border: 1px solid #eaeaea; padding: 5px; background: #fff; }
.sidebar-image img { width: 100%; display: block; height: auto; }
.widget { margin-bottom: 40px; }

/* Content Area */
.content-area { flex-grow: 1; min-width: 0; }
.article { margin-bottom: 70px; }
.article-title { font-size: 26px; font-weight: 300; color: #444; margin-bottom: 30px; text-transform: uppercase; line-height: 1.3; }
.article-title a { color: inherit; }
.article-title a:hover { color: #006bb3; }

.article-center-text { text-align: center; font-size: 16px; color: #444; margin-bottom: 30px; line-height: 1.8; }
.article-text { font-size: 15px; color: #555; margin-bottom: 30px; text-align: justify; line-height: 1.7; }
.article-text p { margin-bottom: 15px; }
.article-text img { max-width: 100%; height: auto; }

.article-image { width: 100%; height: auto; margin-bottom: 20px; border: 1px solid #ddd; }
.image-stack { display: flex; flex-direction: column; align-items: center; gap: 30px; margin-top: 20px; }
.image-stack img { max-width: 90%; height: auto; border: 5px solid #f9f9f9; box-shadow: 0 0 10px rgba(0,0,0,0.1); }

/* Article 5 Specific styling */
.info-box { background-color: #f4f8fb; border: 1px solid #e1ecf4; padding: 18px 20px; margin-bottom: 12px; font-size: 15px; color: #006bb3; cursor: pointer; border-radius: 3px; }
.info-box:hover { background-color: #e6f0f7; }

/* Pagination */
.pagination-container { text-align: center; margin-top: 60px; font-size: 14px; color: #666; padding-top: 40px; border-top: 1px solid #eee; }
.pagination-info { margin-bottom: 15px; }
.pagination-links { display: flex; justify-content: center; align-items: center; gap: 5px; }
.pagination-links a, .pagination-links span { padding: 8px 14px; border: 1px solid #ddd; background-color: #f9f9f9; color: #555; border-radius: 3px; }
.pagination-links .active, .pagination-links .current { background-color: #333; color: white; border-color: #333; }
.pagination-links a:hover { background-color: #e9e9e9; }

/* Footer */
.footer { padding: 30px 40px; border-top: 1px solid #eee; font-size: 13px; color: #777; }
.footer-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 25px; }
.breadcrumbs { color: #555; }
.font-sizer { display: flex; gap: 8px; align-items: baseline; }
.font-sizer span { cursor: pointer; color: #555; }
.font-sizer span:nth-child(1) { font-size: 11px; }
.font-sizer span:nth-child(2) { font-size: 14px; }
.font-sizer span:nth-child(3) { font-size: 17px; }

.footer-bottom { display: flex; justify-content: flex-end; align-items: center; position: relative; }
.copyright { text-align: right; }
.back-to-top { background-color: #006bb3; color: white; width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; margin-left: 20px; cursor: pointer; font-size: 18px; position: absolute; right: -20px; bottom: 0; }

/* WP Alignments */
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 15px 15px 0; }
.alignright { float: right; margin: 0 0 15px 15px; }

/* Sidebar Slider CSS */
.sidebar-slider {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #fff;
}
.sidebar-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 1s ease-in-out;
}
.sidebar-slider .slide.active {
    opacity: 1;
    z-index: 2;
}
.sidebar-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Font Sizer CSS */
body.font-size-sm { font-size: 14px; }
body.font-size-md { font-size: 16px; }
body.font-size-lg { font-size: 18px; }
body.font-size-sm .article-text { font-size: 13px; }
body.font-size-md .article-text { font-size: 15px; }
body.font-size-lg .article-text { font-size: 17px; }

/* Responsive Mobile Layout */
@media screen and (max-width: 992px) {
    .main-content {
        flex-direction: column;
        padding: 30px 20px;
    }
    .sidebar {
        width: 100%;
        order: 2;
    }
    .content-area {
        order: 1;
    }
}

@media screen and (max-width: 768px) {
    /* Header & Navigation */
    .top-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    .top-right {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav {
        flex-direction: column;
        padding: 0;
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    .nav-links a, .search-icon {
        border: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    /* Hero Section */
    .hero-banner {
        height: 200px;
    }
    .hero-text {
        font-size: 24px;
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: right;
    }
    
    /* Articles */
    .article-title {
        font-size: 22px;
    }
    .image-stack img {
        max-width: 100%;
    }
    
    /* Footer */
    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .back-to-top {
        position: static;
        margin: 0 auto;
    }
}
