/* version 1.1.3 */
:root {
    --nt-primary: #2563eb;
    --nt-dark: #0f172a;
    --nt-light: #f1f5f9;
    --nt-text: #334155;
    --nt-white: #ffffff;
    --nt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Header Desktop & Base Layout */
.newsthemes-header-global {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--nt-transition);
}

.newsthemes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.newsthemes-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.custom-logo-link img {
    max-width: 160px;
}

/* 2. Branding/Logo */
.newsthemes-branding a {
    font-size: 22px;
    font-weight: 800;
    color: var(--nt-dark);
    text-decoration: none;
    letter-spacing: -1px;
}

.newsthemes-branding a span {
    color: var(--nt-primary);
}

/* --- Main Navigation (Desktop) --- */
.newsthemes-main-navigation > ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.newsthemes-main-navigation ul li {
    position: relative; 
    display: flex;
    align-items: center;
}

.newsthemes-main-navigation ul li a {
    text-decoration: none;
    color: var(--nt-text); /* Pakai variabel Bos */
    font-weight: 700; /* Tebalkan biar kelihatan jelas */
    font-size: 15px;
    transition: var(--nt-transition); /* Pakai variabel Bos */
    display: flex;
    align-items: center;
    gap: 4px;
    height: 80px; /* Pas dengan header-inner */
}

.newsthemes-main-navigation ul li a:hover {
    color: var(--nt-primary); /* Pakai variabel Bos */
}

/* --- Dropdown Sub-Menu --- */

.newsthemes-main-navigation ul li ul.sub-menu {
    position: absolute;
    top: 80px; 
    left: 0;
    display: flex;
    flex-direction: column; 
    background: var(--nt-white); /* Pakai variabel Bos */
    min-width: 220px;
    padding: 10px 0;
    margin: 0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1); /* Pakai tone warna --nt-dark */
    border-radius: 0 0 8px 8px;
    border-top: 2px solid var(--nt-primary);
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--nt-transition);
    z-index: 999;
}

.newsthemes-main-navigation ul li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.newsthemes-main-navigation ul li ul.sub-menu li {
    width: 100%;
    display: block;
}

.newsthemes-main-navigation ul li ul.sub-menu li a {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--nt-text) !important;
    display: block;
    height: auto; 
    line-height: 1.4;
}

.newsthemes-main-navigation ul li ul.sub-menu li a:hover {
    background: var(--nt-light); /* Pakai variabel Bos */
    color: var(--nt-primary);
    padding-left: 25px;
}

/* Arrow Icon */
.newsthemes-menu-icon {
    font-size: 18px;
    transition: var(--nt-transition);
}

.newsthemes-main-navigation ul li:hover > a .newsthemes-menu-icon {
    transform: rotate(180deg);
}

/* 4. Action Area (Right Side) */
.newsthemes-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.newsthemes-btn-member {
    background: var(--nt-dark);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--nt-transition);
}

.newsthemes-btn-member:hover {
    background: var(--nt-primary);
    transform: translateY(-2px);
}

.newsthemes-menu-toggle {
    display: none;
    background: var(--nt-light);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    color: var(--nt-dark);
}

/* --- Mobile Menu --- */
.newsthemes-offcanvas {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--nt-white);
    z-index: 10001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s; /* Tambahkan visibility di sini */
    padding: 30px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    visibility: hidden; /* Sembunyikan secara total saat idle */
}

.newsthemes-offcanvas.is-active {
    right: 0;
    visibility: visible; /* Munculkan saat aktif */
}

.newsthemes-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.newsthemes-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--nt-dark);
    line-height: 1;
}

/* 6. Mobile Menu List & Accordion */
.newsthemes-mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.newsthemes-mobile-menu-list li {
    position: relative;
    border-bottom: 1px solid var(--nt-light);
}

.newsthemes-mobile-menu-list li a {
    display: block;
    padding: 15px 0;
    text-decoration: none;
    color: var(--nt-dark);
    font-weight: 700;
    font-size: 16px;
}

.newsthemes-mobile-menu-list .sub-menu {
    display: none; /* Hidden by default for JS Accordion */
    list-style: none;
    padding-left: 20px;
    background: var(--nt-light);
    border-radius: 8px;
    margin-bottom: 15px;
}

.newsthemes-dropdown-toggle {
    position: absolute;
    right: 0;
    top: 12px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nt-light);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--nt-transition);
}

.newsthemes-mobile-menu-list li.active > .newsthemes-dropdown-toggle {
    transform: rotate(180deg);
    background: var(--nt-primary);
    color: #fff;
}

/* 7. Overlay & Helpers */
.newsthemes-body-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--nt-transition);
}

.newsthemes-body-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

body.newsthemes-no-scroll {
    overflow: hidden;
}

/* 8. Responsive Breakpoints */
@media (max-width: 991px) {
    .newsthemes-main-navigation {
        display: none;
    }
    .newsthemes-menu-icon {
        display: none !important;
    }
    .newsthemes-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .newsthemes-btn-member span {
        display: none;
    }
    .newsthemes-btn-member {
        padding: 10px;
    }
    .newsthemes-offcanvas {
        width: 100%;
        right: -100%;
    }
}

/* version 1.1.22 */
.newsthemes-search-trigger {
    cursor: pointer;
    width: 42px; /* Sedikit lebih lebar biar lega */
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nt-light);
    border-radius: 10px;
    color: var(--nt-dark);
    transition: background 0.2s ease, color 0.2s ease; /* Transisi warna saja */
}

.newsthemes-search-trigger i {
    font-size: 18px;
    width: 20px; /* Kunci lebar icon agar tidak goyang se-pixel pun */
    display: block;
    text-align: center;
    /* JANGAN ada transition atau transform di sini */
}

/* State Aktif (Saat jadi Close) */
.newsthemes-search-trigger.is-active {
    background: #fee2e2;
    color: #ef4444;
}

/* Pastikan TIDAK ADA transform rotate di sini */
.newsthemes-search-trigger.is-active i {
    transform: none; 
}

/* version 1.1.16 */
.newsthemes-search-panel {
    display: none; /* Sembunyi default */
    padding: 15px 0 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.newsthemes-search-form {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.newsthemes-search-form input[type="search"] {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid var(--nt-light);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: var(--nt-transition);
}

.newsthemes-search-form input[type="search"]:focus {
    border-color: var(--nt-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.newsthemes-search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--nt-text);
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
}

.newsthemes-search-form button:hover {
    color: var(--nt-primary);
}