/* =========================
   PROGRESS BAR
========================= */
#progressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color1), var(--accent-color2));
    z-index: 9999;
    border-radius: 0 0 10px 10px;
    transition: width 0.2s ease-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* =========================
   TOP NAVIGATION
========================= */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    font-size: 20px;
    background-color: rgba(245, 245, 245, 0.95);
    /* slightly transparent for overlay effect */
    backdrop-filter: blur(8px);
    /* soft blur for modern look */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    z-index: 999;
    transition: transform 0.4s ease, background-color 0.3s ease;
}

.top-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-nav a:hover {
    color: var(--accent-color);
}

.top-nav i {
    font-size: 18px;
    color: var(--accent-color1);
    transition: color 0.3s ease;
}

.top-nav img {
    height: 40px;
    transition: transform 0.3s ease;
}

.top-nav img:hover {
    transform: scale(1.05);
}

/* NAV LINKS */
.top-nav .nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.top-nav .nav-links a.active-nav {
    color: var(--accent-color);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 2px;
}

/* =========================
   RESPONSIVE
========================= */
@media screen and (max-width: 1024px) {
    .top-nav {
        padding: 8px 20px;
        font-size: 18px;
    }

    .top-nav .nav-links {
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .top-nav {
        padding: 5px 15px;
        font-size: 16px;
    }

    .top-nav img {
        height: 38px;
    }

    .top-nav .nav-links {
        gap: 15px;
    }
}

/* OPTIONAL: smooth hide/show effect when scrolling */
.top-nav.hide {
    transform: translateY(-120%);
}

.top-nav.show {
    transform: translateY(0);
}


/* MOBILE */
.burger {
    display: none;
    /* hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.burger span {
    display: block;
    height: 3px;
    background-color: var(--accent-color1);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Animate burger into X when open */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* MOBILE */
@media screen and (max-width: 768px) {
    /* Fixed nav links menu sliding from the right */
    .top-nav {
        width: calc(100vw - 20px);
    }

    .top-nav .nav-links {
        position: fixed;
        top: 0;
        right: -120%;
        /* start hidden off-screen to the right */
        width: 100%;
        /* slightly smaller than full width for drawer feel */
          height: 100vh;
        padding: 60px 20px;
        /* space from top nav */
        background-color: var(--light-color);
        flex-direction: column;
        align-items: center;
        gap: 25px;
        /* compact spacing */
        transition: right 0.3s ease;
        overflow-y: auto;
        /* scroll if links exceed screen */
        z-index: 999;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.05);
        /* subtle right shadow */
    }

    /* Show menu when open */
    .top-nav .nav-links.open {
        right: 0;
        /* slide fully into view */
    }

    /* Burger icon visible on mobile */
    .burger {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    /* Make links bigger for touch */
    .top-nav .nav-links a {
        font-size: 20px;
        padding: 12px 15px;
        width: 80%;
        text-align: center;
    }
}