﻿/* =========================================================
   Fajarsoft - site.css (FINAL, clean + Mobile Drawer Fixed)
   - Header (wide like Metronic) + nav links
   - Carousel (fs-carousel)
   - Mobile drawer (full screen + X) - FIXED & IMPROVED
   - Auth (login card)
   ========================================================= */

/* ---------- Header (fixed) ---------- */
/* =========================
   HEADER FIX (WAJIB ADA)
   ========================= */

.header-row {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    white-space: nowrap;
}

/* Desktop nav default hidden (mobile) */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 26px;
    flex-wrap: nowrap;
}

    /* Ensure inline form works */
    .nav-desktop form.inline {
        display: inline;
    }

/* Mobile hamburger button */
.menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
}

    .menu-btn:hover {
        background: #f3f4f6;
    }

/* Show desktop nav on lg, hide hamburger */
@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
    }

    .menu-btn {
        display: none;
    }
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* di bawah drawer */
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229,231,235,1);
}

/* tinggi spacer = tinggi header (h-16) */
.site-header-spacer {
    height: 92px;
}

/* anchor section agar tidak ketutup header fixed */
html {
    scroll-padding-top: 80px;
}

/* Nav links (desktop) */
.fs-navlink {
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color .15s ease, color .15s ease;
}

    .fs-navlink:hover {
        color: #111827;
        border-bottom-color: rgba(17,24,39,.25);
    }

.fs-navlink-primary {
    color: #1D4ED8;
}

    .fs-navlink-primary:hover {
        border-bottom-color: rgba(29,78,216,.55);
    }

/* ---------- Carousel ---------- */
.fs-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

.fs-carousel-track {
    display: flex;
    transition: transform 450ms ease;
    will-change: transform;
}

.fs-slide {
    min-width: 100%;
    position: relative;
    height: 520px;
}

    .fs-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* Caption overlay */
.fs-caption {
    position: absolute;
    left: 24px;
    bottom: 24px;
    max-width: 720px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(0,0,0,.55);
    color: #fff;
}

    .fs-caption h1,
    .fs-caption h2,
    .fs-caption h3 {
        color: #fff;
        font-weight: 700;
    }

    .fs-caption p {
        color: rgba(255,255,255,.85);
    }

/* arrows */
.fs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 18px;
    display: grid;
    place-items: center;
}

.fs-prev {
    left: 12px;
}

.fs-next {
    right: 12px;
}

.fs-nav:hover {
    background: rgba(0,0,0,.65);
}

/* dots */
.fs-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    display: flex;
    gap: 8px;
}

.fs-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(255,255,255,.45);
}

    .fs-dot.is-active {
        background: rgba(255,255,255,.95);
    }

@media (max-width: 768px) {
    .fs-slide {
        height: 360px;
    }

    .fs-caption {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }
}

/* Mobile drawer brand text (kalau masih kecil) */
@media (max-width: 1023.98px) {
    .mobile-drawer-head .text-lg {
        font-size: 20px !important;
        font-weight: 700 !important;
    }
}

/* ---------- Mobile Drawer (Full Screen) - FIXED & IMPROVED ---------- */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    opacity: 0;
    transition: opacity .22s ease;
}

    .mobile-drawer.is-open {
        pointer-events: auto;
        opacity: 1;
    }

.mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17,24,39,.65);
    backdrop-filter: blur(4px);
}

/* panel full screen */
.mobile-drawer-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-drawer.is-open .mobile-drawer-panel {
    transform: translateX(0);
}

/* head */
.mobile-drawer-head {
    position: relative;
    background: #fff;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* close button */
.mobile-drawer-close {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

    .mobile-drawer-close:hover {
        background: #f3f4f6;
    }

/* body - scrollable area */
.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    background: #fff;
}

/* regular menu item */
.mobile-drawer-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 20px;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
    transition: background-color 0.15s ease;
    border: none;
    width: 100%;
    text-align: left;
    min-height: 52px;
}

    .mobile-drawer-item:hover {
        background: #f3f4f6;
    }

/* ========================================== */
/* SUBMENU (Services dropdown) - IMPROVED    */
/* ========================================== */

/* Submenu container */
.mobile-drawer-submenu {
    position: relative;
    background: #fff;
}

/* Toggle button untuk submenu (Services) */
.mobile-drawer-toggle {
    width: 100%;
    background: #fff;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #111827;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    transition: background-color 0.15s ease;
    min-height: 52px;
}

    .mobile-drawer-toggle:hover {
        background: #f3f4f6;
    }

    .mobile-drawer-toggle i {
        transition: transform 0.25s ease;
        font-size: 13px;
        color: #6b7280;
        margin-left: auto;
    }

    .mobile-drawer-toggle.active {
        background: #f3f4f6;
    }

        .mobile-drawer-toggle.active i {
            transform: rotate(180deg);
            color: #1D4ED8;
        }

/* Submenu content (collapsible) */
.mobile-drawer-submenu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f9fafb;
}

    .mobile-drawer-submenu-content.active {
        max-height: 500px;
        padding: 6px 0;
    }

/* Submenu item (E-Meterai, Shopee Video Management) */
.mobile-drawer-subitem {
    display: flex;
    align-items: center;
    padding: 16px 20px 16px 48px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    background: #f9fafb;
    min-height: 52px;
}

    .mobile-drawer-subitem:hover {
        background-color: #e5e7eb;
        border-left-color: #1D4ED8;
        color: #111827;
    }

    /* Separator antar submenu items */
    .mobile-drawer-subitem + .mobile-drawer-subitem {
        border-top: 1px solid #e5e7eb;
    }

/* ========================================== */
/* END SUBMENU                                */
/* ========================================== */

/* footer */
.mobile-drawer-footer {
    position: relative;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

    /* Flex container untuk buttons */
    .mobile-drawer-footer .flex {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Button styling */
    .mobile-drawer-footer .btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        padding: 13px 18px;
        border-radius: 10px;
        transition: all 0.2s ease;
        border: none;
        cursor: pointer;
        font-size: 15px;
        text-decoration: none;
        line-height: 1.4;
    }

    .mobile-drawer-footer .btn-primary {
        background-color: #1D4ED8;
        color: #fff;
    }

        .mobile-drawer-footer .btn-primary:hover {
            background-color: #1e40af;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
        }

    .mobile-drawer-footer .btn-light {
        background-color: #f3f4f6;
        color: #ef4444;
        border: 1px solid #e5e7eb;
    }

        .mobile-drawer-footer .btn-light:hover {
            background-color: #fee2e2;
            border-color: #fecaca;
        }

    .mobile-drawer-footer form {
        margin: 0;
        width: 100%;
    }

/* Prevent body scroll when drawer open */
body.drawer-open {
    overflow: hidden !important;
}

    /* hide hamburger when drawer open */
    body.drawer-open [data-mobile-menu-open] {
        visibility: hidden;
    }

/* ---------- Auth (Login) ---------- */
.fs-auth-wrap {
    min-height: calc(100vh - 64px - 56px);
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.fs-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 12px 30px rgba(17,24,39,.06);
}

.fs-auth-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px 0;
}

.fs-auth-sub {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 18px 0;
}
