:root {
    --bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --soft: #f8fafc;
    --soft-2: #f3f4f6;
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 16px;
    --container: 1240px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #f7f8fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Theme Engine: Loading State ── */
.wws-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
    color: var(--muted);
    font-size: 15px;
}

.wws-loading p {
    margin: 0;
}

.wws-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: wws-spin 0.7s linear infinite;
}

@keyframes wws-spin {
    to { transform: rotate(360deg); }
}

/* ── Theme nav: sticky below wws-site-header + sub-nav ── */
#wws-journals .navbar-shell,
#wws-journals .site-header,
#wws-journals .header-wrap {
    position: sticky;
    top: calc(var(--wws-header-h, 76px) + var(--wws-subnav-h, 12px));
    z-index: 900;
}

/* ── Remove gap between wws-header and theme content ── */
#wws-journals .navbar-shell {
    padding-top: 0;
}

/* ── Theme_tri footer inside Wawasan shell ── */
#wws-journals ~ .footer,
#wws-journals ~ #siteFooter {
    margin-top: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.wws-container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

/* HEADER */
.wws-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: none;
    transition: transform 0.25s ease;
    will-change: transform;
}

/* ── Scroll-hide: slide up site-header, sub-nav naik ke top:0 ── */
body.wws-scrolled .wws-site-header {
    transform: translateY(-100%);
}

body.wws-scrolled .wws-sub-nav {
    top: 0;
}

body.wws-scrolled #wws-journals .navbar-shell,
body.wws-scrolled #wws-journals .site-header,
body.wws-scrolled #wws-journals .header-wrap,
body.wws-scrolled .navbar-shell,
body.wws-scrolled .site-header,
body.wws-scrolled .header-wrap {
    top: var(--wws-subnav-h, 0px);
}

.wws-header-top {
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.wws-header-top-inner {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

.wws-top-links,
.wws-top-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.wws-top-links a:hover,
.wws-top-actions a:hover {
    color: var(--primary);
}

.wws-header-main {
    background: #001875;
    color: #fff;
}

.wws-header-main .wws-brand-title,
.wws-header-main .wws-brand-subtitle {
    color: #fff;
}

.wws-header-main .wws-brand-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.wws-header-main .wws-nav-trigger {
    color: #fff;
}

.wws-header-main .wws-nav-trigger:hover,
.wws-header-main .wws-nav-item:hover > .wws-nav-trigger,
.wws-header-main .wws-nav-item.wws-is-open > .wws-nav-trigger {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.wws-header-main .wws-nav-caret {
    color: rgba(255, 255, 255, 0.7);
}

.wws-header-main-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: calc(100% - 48px);
    max-width: 100%;
    margin: 0 auto;
}

.wws-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.wws-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.wws-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
}

.wws-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wws-brand-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
}

.wws-brand-subtitle {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
}

/* NAV */
.wws-main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    padding-left: 32px;
    position: relative;
}

.wws-nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wws-nav-item {
    position: relative;
}

.wws-nav-item:has(> .wws-mega-menu) {
    position: static;
}

.wws-nav-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
}

.wws-nav-trigger:hover,
.wws-nav-item:hover>.wws-nav-trigger,
.wws-nav-item.wws-is-open>.wws-nav-trigger {
    background: var(--soft);
    color: var(--primary);
}

.wws-nav-caret {
    font-size: 11px;
    color: #94a3b8;
}

.wws-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    justify-content: flex-end;
}

.wws-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.wws-btn:hover {
    background: var(--soft);
}

.wws-btn-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.wws-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.wws-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
}

/* MEGA MENU */
.wws-mega-menu {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: min(1120px, calc(100vw - 48px));
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 22px;
    display: none;
}

.wws-mega-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.wws-nav-item.wws-is-open>.wws-mega-menu,
.wws-nav-item:hover>.wws-mega-menu {
    display: block;
}

.wws-mega-grid {
    display: grid;
    grid-template-columns: 1.25fr 1.25fr 1.25fr 0.95fr;
    gap: 18px;
}

.wws-mega-col {
    background: #fff;
    border-radius: 16px;
}

.wws-mega-section {
    padding: 10px 6px;
}

.wws-mega-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 0 10px;
}

.wws-mega-link {
    display: block;
    padding: 12px 10px;
    border-radius: 14px;
    transition: 0.2s ease;
}

.wws-mega-link:hover {
    background: var(--soft);
}

.wws-mega-link-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.wws-mega-link-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.wws-mega-feature {
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.wws-mega-feature-badge {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.wws-mega-feature h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.wws-mega-feature p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.wws-mega-feature .wws-btn {
    width: fit-content;
}

/* SIMPLE DROPDOWN */
.wws-simple-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
}

.wws-simple-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.wws-nav-item.wws-is-open>.wws-simple-dropdown,
.wws-nav-item:hover>.wws-simple-dropdown {
    display: block;
}

.wws-simple-link {
    display: block;
    padding: 12px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.wws-simple-link:hover {
    background: var(--soft);
    color: var(--primary);
}

/* MOBILE */
.wws-mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    background: #fff;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wws-mobile-panel-inner {
    padding: 8px 0 20px;
}

.wws-mobile-group {
    border-bottom: 1px solid #f1f5f9;
}

.wws-mobile-group:last-child {
    border-bottom: 0;
}

.wws-mobile-trigger {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 14px 0;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.wws-mobile-trigger .wws-mobile-caret {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.wws-mobile-group.wws-open .wws-mobile-trigger {
    color: var(--primary);
}

.wws-mobile-group.wws-open .wws-mobile-trigger .wws-mobile-caret {
    transform: rotate(180deg);
    color: var(--primary);
}

.wws-mobile-submenu {
    display: none;
    padding: 0 0 12px 0;
}

.wws-mobile-group.wws-open .wws-mobile-submenu {
    display: block;
}

.wws-mobile-section-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 10px 12px 4px;
}

.wws-mobile-section-label:first-child {
    padding-top: 0;
}

.wws-mobile-submenu a {
    display: block;
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.wws-mobile-submenu a:active {
    background: var(--soft);
    color: var(--primary);
}

.wws-mobile-cta {
    display: flex;
    gap: 10px;
    padding-top: 16px;
}

.wws-mobile-cta .wws-btn {
    flex: 1;
    text-align: center;
}

/* ── SUB-NAVIGATION (Journal-level nav) ── */
.wws-sub-nav:empty {
    display: none;
}

.wws-sub-nav {
    position: sticky;
    top: var(--wws-header-h, 76px);
    z-index: 990;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.wws-subnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 48px;
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

.wws-subnav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
}

.wws-subnav-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.wws-subnav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.wws-subnav-brand-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wws-subnav-brand-subtitle {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.2;
}

.wws-subnav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    justify-content: center;
}

.wws-subnav-item {
    position: relative;
}

.wws-subnav-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.15s ease;
    white-space: nowrap;
}

.wws-subnav-link:hover {
    background: var(--soft);
    color: var(--primary);
}

.wws-subnav-caret {
    font-size: 10px;
    color: #94a3b8;
}

/* Dropdown */
.wws-subnav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
    z-index: 100;
}

.wws-subnav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.wws-subnav-has-dropdown.wws-subnav-open > .wws-subnav-dropdown,
.wws-subnav-has-dropdown:hover > .wws-subnav-dropdown {
    display: block;
}

.wws-subnav-dropdown-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: 0.15s ease;
}

.wws-subnav-dropdown-link:hover {
    background: var(--soft);
    color: var(--primary);
}

/* Actions */
.wws-subnav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wws-subnav-search-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    transition: 0.15s ease;
}

.wws-subnav-search-btn:hover {
    background: var(--soft);
    color: var(--primary);
}

.wws-subnav-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: 0.15s ease;
    white-space: nowrap;
}

.wws-subnav-submit:hover {
    background: var(--primary-dark);
    color: #fff;
}

.wws-subnav-mobile-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    place-items: center;
}

@media (max-width: 1080px) {
    .wws-subnav-list {
        display: none;
    }

    .wws-subnav-mobile-toggle {
        display: inline-grid;
    }

    .wws-subnav-submit {
        display: none;
    }

    /* Mobile expanded state */
    .wws-sub-nav.wws-subnav-mobile-open .wws-subnav-inner {
        flex-wrap: wrap;
    }

    .wws-sub-nav.wws-subnav-mobile-open .wws-subnav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding-bottom: 12px;
        border-top: 1px solid var(--border);
        padding-top: 8px;
    }

    .wws-sub-nav.wws-subnav-mobile-open .wws-subnav-link {
        width: 100%;
        justify-content: space-between;
    }

    .wws-sub-nav.wws-subnav-mobile-open .wws-subnav-dropdown {
        position: static;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0 0 0 16px;
        display: block;
        min-width: 0;
    }

    .wws-sub-nav.wws-subnav-mobile-open .wws-subnav-submit {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
}

@media (max-width: 720px) {
    .wws-subnav-brand-title {
        font-size: 13px;
    }

    .wws-subnav-brand-subtitle {
        display: none;
    }

    .wws-subnav-inner {
        min-height: 52px;
    }
}

/* FOOTER */
.wws-site-footer {
    margin-top: 0;
    background: #1e293b;
    border-top: 1px solid #334155;
}

.wws-footer-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.wws-footer-copy {
    font-size: 14px;
    color: #94a3b8;
}

.wws-footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.wws-footer-links a {
    font-size: 14px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.wws-footer-links a:hover {
    color: #e2e8f0;
}

/* DEMO HERO */
.wws-hero-demo {
    padding: 72px 0;
}

.wws-hero-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.wws-hero-card h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
}

.wws-hero-card p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

@media (max-width: 1080px) {
    .wws-main-nav {
        display: none;
    }

    .wws-header-actions .wws-btn:not(.wws-btn-primary) {
        display: none;
    }

    .wws-mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .wws-mobile-panel.wws-show {
        display: block;
    }

    .wws-header-main-inner {
        min-height: 52px;
    }
}

@media (max-width: 720px) {
    .wws-header-top {
        display: none;
    }

    .wws-brand-subtitle {
        display: none;
    }

    .wws-header-actions {
        min-width: auto;
        gap: 8px;
    }

    .wws-header-actions .wws-btn-primary {
        display: none;
    }

    .wws-hero-card {
        padding: 24px;
    }
}
