/* ============================================
   GLOBAL STYLES - Used across all pages
   ============================================ */

/* Reset and Base Styles */
html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    color: #ecf0f1;
    background-color: #1a1a1a;
    box-sizing: border-box;

    /* Padding for fixed navbar - adjust per page if needed */
    padding-top: 60px;
}

/* Dark overlay background (used on some pages) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.top-nav {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    height: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
}

/* Navigation sections */
.nav-section {
    display: flex;
    align-items: center;
}

/* Separator line between nav sections */
.nav-separator {
    width: 1px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 10px;
}

.top-nav a {
    color: white;
    text-decoration: none;
    padding: 20px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.top-nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #4a9eff;
}

/* Underline effect on hover */
.top-nav a::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #4a9eff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.top-nav a:hover::after {
    transform: scaleX(1);
}

/* Hamburger menu icon (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 15px;
    margin-left: 10px;
    z-index: 1002;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Hamburger animation when active */
.hamburger.active .line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

@media screen and (max-width: 768px) {
    /* Reduce padding on mobile */
    body {
        padding-top: 50px;
    }
    
    .top-nav {
        height: 50px;
        padding: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: -100%;
        top: 50px;
        width: 70%;
        max-width: 300px;
        background-color: rgba(0, 0, 0, 0.98);
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        height: calc(100vh - 50px);
        overflow-y: auto;
        padding-top: 20px;
    }

    .nav-links.nav-active {
        left: 0;
    }

    /* Stack nav sections vertically on mobile */
    .nav-section {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* Horizontal separator line on mobile */
    .nav-separator {
        width: 80%;
        height: 1px;
        background-color: rgba(255, 255, 255, 0.3);
        margin: 15px auto;
        align-self: center;
    }

    .top-nav a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 18px 25px;
        margin-left: 32px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1.1rem;
        transition: background-color 0.2s ease, padding-left 0.2s ease;
    }

    .top-nav a::after {
        display: none;
    }

    .top-nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 35px;
    }

    /* Remove border from last item in each section */
    .nav-section a:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: flex;
    }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}