
/* =====================================================
BASE
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, sans-serif;
    background: #f8fafc;
    color: #111827;
    line-height: 1.6;
}

/* =====================================================
LAYOUT
===================================================== */

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* =====================================================
APP SHELL
===================================================== */

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-main {
    flex: 1;
}

/* =====================================================
HEADER
===================================================== */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 80px;
    position: relative;
}

/* =====================================================
BRANDING
===================================================== */

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.brand-tagline {
    font-size: 13px;
    color: #6b7280;
}

/* =====================================================
NAVIGATION (DESKTOP CLEAN + STABLE)
===================================================== */

.site-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    position: relative;
    transition: 0.2s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

/* ACTIVE MENU */
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-parent > a,
.nav-menu .current-menu-ancestor > a {
    color: #2563eb;
}

/* UNDERLINE */
.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #2563eb;
    transition: 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after {
    width: 100%;
}

/* =====================================================
DESKTOP SUBMENU (FIXED + NO HANG)
===================================================== */

@media (min-width: 769px) {

    .nav-menu .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;

        min-width: 200px;

        background: #111827;
        border-radius: 8px;

        padding: 10px 0;

        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);

        transition: 0.2s ease;

        pointer-events: none;

        z-index: 999;
    }

    .nav-menu li:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .sub-menu li a {
        display: block;
        padding: 10px 15px;
        color: #ffffff;
        font-size: 14px;
    }

    .sub-menu li a:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* =====================================================
MOBILE TOGGLE
===================================================== */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;

    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #111827;
    border-radius: 10px;
}

/* =====================================================
MOBILE NAVIGATION (CLEAN + SAFE)
===================================================== */

@media (max-width: 768px) {

    .header-container {
        flex-wrap: wrap;
        min-height: 70px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;

        width: 100%;

        flex-direction: column;

        background: #ffffff;

        position: absolute;
        top: 100%;
        left: 0;

        padding: 15px;

        border-top: 1px solid #e5e7eb;

        z-index: 999;
    }

    .site-nav.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 0;
    }

    /* MOBILE SUBMENU ONLY (JS CONTROLLED) */
    .nav-menu .sub-menu {
        position: relative;
        display: none;
        background: #111827;
        margin-top: 5px;
        border-radius: 6px;
    }

    .menu-item-has-children.open > .sub-menu {
        display: block;
    }
}

/* =====================================================
FOOTER
===================================================== */

.site-footer {
    background: #0f172a;
    color: #ffffff;
    padding: 80px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title,
.footer-heading {
    margin-bottom: 14px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================
SMALL DEVICES
===================================================== */

@media (max-width: 480px) {

    .brand-title {
        font-size: 16px;
    }

    .brand-tagline {
        font-size: 12px;
    }

    .site-logo {
        width: 40px;
        height: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}