/* ================= NAVBAR BASE ================= */

.custom-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;

    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.05);

    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.custom-navbar.scrolled {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

body.menu-open .custom-navbar {
    background: #ffffff !important;
    backdrop-filter: none !important;
}

/* ================= CONTAINER ================= */

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 8px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ================= LOGO ================= */

.nav-logo img {
    height: 38px;
    width: auto;
    display: block;
}

/* ================= MENU DESKTOP ================= */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;

    transition: right 0.3s ease;
}

/* ================= LINK ================= */

.nav-link {
    position: relative;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

/* hover normal */
.nav-menu > .nav-link:hover {
    color: #2563eb;
}

/* active menu */
.nav-link.active {
    color: #2563eb;
}

/* ================= DROPDOWN ================= */

.has-dropdown {
    position: relative;
}

/* link dropdown */
.has-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* icon */
.dropdown-icon {
    font-size: 10px;
    transition: 0.3s;
}

/* rotate saat mobile aktif */
.has-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

/* dropdown box */
.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;

    min-width: 240px;
    max-width: 90vw;

    padding: 10px;

    background: #ffffff;
    border-radius: 12px;

    box-shadow: 0 20px 40px rgba(0,0,0,0.08);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition: opacity 0.2s ease, transform 0.2s ease;

    z-index: 1100;
}

/* item */
.dropdown-menu a {
    display: block;
    padding: 10px 12px;

    font-size: 13px;
    color: #0f172a;
    text-decoration: none;

    border-radius: 8px;
    transition: all 0.2s ease;
}

/* hover item */
.dropdown-menu a:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

/* divider */
.dropdown-menu a + a {
    border-top: 1px solid rgba(0,0,0,0.04);
}

/* ================= DESKTOP HOVER ================= */

@media (min-width: 769px) {
    .has-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ================= CTA ================= */

.nav-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;
    border-radius: 10px;

    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;

    background: linear-gradient(135deg, #0ea5e9, #2563eb);

    box-shadow: 
        0 6px 20px rgba(37, 99, 235, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.2);

    transition: all 0.25s ease;
    overflow: hidden;
}

.nav-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255,255,255,0.4),
        transparent 70%
    );
    opacity: 0;
    transition: 0.4s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(37, 99, 235, 0.45),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.nav-cta:hover::before {
    opacity: 1;
    animation: shine 0.8s linear;
}

@keyframes shine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.nav-cta:active {
    transform: scale(0.96);
}

/* ================= RIGHT ================= */

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================= TOGGLE ================= */

.menu-toggle {
    width: 36px;
    height: 36px;
    border-radius: 12px;

    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1100;

    background: rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(10px);

    transition: all 0.25s ease;
}

.menu-toggle:hover {
    background: rgba(15, 23, 42, 0.08);
}

.menu-toggle span {
    position: absolute;
    width: 16px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    transform: translate(-50%, -50%) translateY(-4px);
}

.menu-toggle span:nth-child(2) {
    transform: translate(-50%, -50%) translateY(4px);
}

.menu-toggle.active span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.menu-toggle:active {
    transform: scale(0.9);
}

/* ================= MOBILE ================= */

@media(max-width:768px){

    .menu-toggle {
        display: block;
    }
    
    .nav-logo img {
        height: 30px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;

        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 25px;
        gap: 20px;

        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 16px;
        width: 100%;
    }

    .nav-cta {
        padding: 8px 10px;
        font-size: 10px;
    }

    /* dropdown mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 5px 0;

        opacity: 1;
        visibility: visible;
        transform: none;

        display: none;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 12px 0;
    }

    /* overlay */
    body.menu-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 900;
    }
}