/*
Theme Name: Skeleton-QW
Theme URI: https://themesapp.com
Author: ThemesApp
Author URI: https://themesapp.com
Description: Tema super ringan, lebar 970px, submenu hover-only, tanpa bullet point.
Version: 1.0.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skeleton-qw
*/

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.6; }
a { text-decoration: none; color: #0073aa; }

/* WRAPPER: Lebar 970px di desktop */
.site-wrapper {
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
}

/* HEADER */
.site-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}
.site-logo {
    font-size: 1.5rem;
    font-weight: bold;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    position: relative;
}
.nav-menu a {
    color: #333;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
}

/* SUBMENU - Hanya muncul saat hover + tanpa bullet point */
.menu-item-has-children {
    position: relative;
}
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 200px;
    list-style: none; /* Hilangkan bullet point di level utama */
    padding: 0.5rem 0;
    margin: 0;
    z-index: 999;
}
.sub-menu li {
    list-style: none; /* Hilangkan bullet point di setiap item */
    padding: 0;
}
.sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    white-space: nowrap;
}
.sub-menu a:hover {
    background: #f5f5f5;
}
.menu-item-has-children:hover > .sub-menu {
    display: block;
}

/* SEARCH ICON */
.search-icon {
    margin-left: auto;
    font-weight: bold;
    cursor: pointer;
}

/* SEARCH FORM */
.search-form {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    padding: 0.75rem;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 999;
    width: 240px;
}
.search-form .search-field {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ccc;
    font-size: 0.875rem;
}
.search-form .search-submit {
    width: 100%;
    padding: 0.5rem;
    background: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

/* RESPONSIVE: Di mobile, search form jadi full width */
@media (max-width: 768px) {
    .search-form {
        width: 100%;
        left: 0;
        right: auto;
    }
}


/* MAIN LAYOUT */
.site-main {
    display: flex;
    padding: 1rem;
    gap: 2rem;
}
.content {
    flex: 1;
}
.sidebar {
    width: 260px;
}

/* FOOTER */
.site-footer {
    background: #f9f9f9;
    padding: 1.5rem;
    font-size: 0.875rem;
    border-top: 1px solid #eee;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.footer-links a {
    color: #555;
}
.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.close-btn {
    background: #000;
    color: #fff;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 970px) {
    .site-main {
        flex-direction: column;
        padding: 1rem 1rem 2rem;
    }
    .sidebar {
        width: 100%;
    }
    .footer-links,
    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-meta {
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: relative;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        width: 100%;
        padding: 1rem;
        border: 1px solid #eee;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .nav-menu.active {
        display: flex;
    }

    /* Di mobile, submenu tetap muncul saat menu dibuka */
    .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        display: block !important;
    }
}
