/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    background-color: transparent; /* Start transparent */
    transition: top 0.4s ease-in-out, background-color 0.4s ease-out, box-shadow 0.4s ease-out;
}

header.sticky {
    background-color: #2e2e2e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header.header-hidden {
    top: -150px; 
}

nav {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    position: relative;
    z-index: 2;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

nav .logo img {
    height: 50px; 
    width: 50px;
    border-radius: 50%;
}

nav .logo h1 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* ===================================
   MOBILE & DESKTOP SPECIFIC STYLES
   =================================== */

/* --- STYLES FOR MOBILE (screens up to 900px) --- */
@media (max-width: 900px) {
    .menu-btn {
        display: flex;
        align-items: center;
        cursor: pointer;
        width: 28px;
        height: 22px;
        position: relative;
        z-index: 1001;
    }

    .menu-btn__burger, .menu-btn__burger::before, .menu-btn__burger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 5px;
        transition: all 0.5s ease-in-out;
    }
    .menu-btn__burger::before { transform: translateY(-10px); }
    .menu-btn__burger::after { transform: translateY(10px); }

    .menu-btn.open .menu-btn__burger { background: transparent; transform: translateX(-50px); }
    .menu-btn.open .menu-btn__burger::before { transform: rotate(45deg) translate(35px, -35px); background-color: #fff; }
    .menu-btn.open .menu-btn__burger::after { transform: rotate(-45deg) translate(35px, 35px); background-color: #fff; }
    
    /* --- NEW PROFESSIONAL SIDEBAR STYLES --- */
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background: #2e2e2e;
        box-shadow: -5px 0px 30px rgba(0,0,0,0.2);
        flex-direction: column;
        justify-content: space-between; /* Pushes footer to the bottom */
        padding: 2rem 1.5rem;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
        z-index: 999;
        box-sizing: border-box;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }
    
    .sidebar-header {
        border-bottom: 1px solid #444;
        padding-bottom: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-header .logo {
        gap: 12px;
    }

    .sidebar-header .logo h1 {
        font-size: 1.2rem;
    }
    
    .nav-links ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
        margin-bottom: 1rem;
        opacity: 0;
    }

    .nav-links li a {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* Align text to the left */
        padding: 14px 20px;
        border-radius: 8px; /* Slightly less rounded */
        background-color: #3f3f3f;
        color: #fff;
        border: none;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        transition: transform 0.2s ease, background-color 0.2s;
    }
    
    .nav-links li a:hover {
        background-color: #f39c12;
        color: #fff;
        transform: scale(1.02);
    }
    
    .nav-links li a i {
        color: #f39c12;
        transition: color 0.2s ease;
        font-size: 1rem;
        width: 20px;
        text-align: center;
    }

    .nav-links li a:hover i {
        color: #fff;
    }

    .sidebar-footer {
        text-align: center;
        padding-top: 1.5rem;
        border-top: 1px solid #444;
    }

    .sidebar-footer .social-icons a {
        color: #a9b3c6;
        margin: 0 10px;
        font-size: 1.1rem;
        transition: color 0.3s, transform 0.3s;
    }
    
    .sidebar-footer .social-icons a:hover {
        color: #f39c12;
        transform: translateY(-3px);
    }

    .sidebar-footer p {
        font-size: 0.75rem;
        color: #a9b3c6;
        margin-top: 1.5rem;
        margin-bottom: 0;
    }
}


/* --- STYLES FOR DESKTOP (screens 901px and wider) --- */
@media (min-width: 901px) {
    .menu-btn {
        display: none;
    }

    .nav-links, .nav-links ul {
        display: flex;
        flex-direction: row;
        list-style: none;
        padding: 0;
        margin: 0;
        align-items: center;
    }
    
    .nav-links li {
        padding: 0 15px;
    }

    .nav-links li a {
        color: #fff;
        text-decoration: none;
        position: relative;
        font-weight: 600;
        transition: color 0.3s ease;
        display: flex;
        align-items: center;
    }

    .nav-links i {
        margin-right: 8px;
    }

    .nav-links li a::after {
        content: '';
        position: absolute;
        width: 0%;
        height: 2px;
        bottom: -5px;
        left: 0;
        background-color: #f39c12;
        transition: width 0.3s ease-in-out;
    }

    .nav-links li a:hover::after {
        width: 100%;
    }
    
    .sidebar-header, .sidebar-footer {
        display: none; /* Hide sidebar elements on desktop */
    }
}