/* includes/navigation.css */

/* Top Navigation Bar Styles */
.top-nav {
    width: 100%;
    background-color: var(--primary-color);
    padding: 15px 30px; /* Increased padding for better spacing */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1002; /* Above other elements */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 60px; /* Explicit height */
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the logo */
    max-width: 1200px; /* Adjust as needed */
    margin: 0 auto;
    position: relative;
    height: 100%; /* Ensure it fills the top-nav */
    flex-direction: row; /* Default direction */
    gap: 20px; /* Space between elements */
}

/* Logo Styles */
.logo {
    width: 150px; /* Adjust as needed */
    height: auto;
    object-fit: contain;
    flex-shrink: 0; /* Prevent shrinking */
    margin: 0 auto; /* Center the logo */
}

/* Navigation Menu Styles */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative; /* For dropdown positioning */
}

.nav-item {
    position: relative;
    font-family: var(--font-family-secondary);
    font-weight: 500;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-size: 1em;
    padding: 10px;
    display: block;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: var(--primary-color);
    min-width: 220px; /* Increased width */
    box-shadow: 0px 8px 24px rgba(0,0,0,0.3); /* Enhanced shadow */
    z-index: 1003;
    border-radius: 6px; /* Increased border radius */
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px); /* Initial position */
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 20px; /* Increased padding for better spacing */
    text-decoration: none;
    display: block;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hamburger Menu Styles for Mobile */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px; /* Increased width for better visibility */
    height: 24px; /* Increased height */
    cursor: pointer;
    transition: transform 0.3s ease; /* Smooth rotation when active */
    position: absolute; /* Position the hamburger */
    right: 30px; /* Align to the right */
}

.hamburger div {
    width: 100%;
    height: 4px; /* Increased thickness */
    background-color: var(--text-color);
    border-radius: 2px; /* Rounded edges for smoother look */
    transition: all 0.3s ease; /* Smooth transition for animations */
}

/* Rotate the hamburger into an 'X' when active */
.hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active div:nth-child(2) {
    opacity: 0; /* Hide the middle line */
}

.hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Styles */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex; /* Ensure hamburger is visible on mobile */
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        background-color: var(--primary-color);
        position: fixed;
        top: 60px; /* Position below the top-nav */
        left: 0;
        width: 100%;
        z-index: 1001;
        padding: 10px 20px; /* Reduced padding */
        padding-bottom: 50px; /* Added padding-bottom */
        overflow-y: auto;
        max-height: calc(100vh - 60px);
        transition: all 0.3s ease; /* Smooth transition */
    }

    .nav-menu.active {
        display: flex;
    }

    /* Reduce line spacing */
    .nav-menu .nav-link {
        padding: 0px 5px; /* Reduced vertical padding */
    }

    /* Hide dropdown content on mobile */
    .nav-menu .dropdown-content {
        display: none;
    }

    /* Individual Links for Mobile */
    .nav-menu .nav-item {
        display: block;
    }

    /* Remove hover effect for dropdown on mobile */
    .dropdown:hover .dropdown-content {
        display: none;
    }

    /* Visibility Classes for Responsive Design */
    .nav-menu .desktop-only {
        display: none; /* Increased specificity */
    }

    .nav-menu .mobile-only {
        display: block; /* Increased specificity */
    }

    /* Nav Heading Styles for Mobile */
    .nav-menu .nav-heading {
        font-size: 1.2em;
        font-weight: bold;
        padding: 10px 15px;
        color: var(--text-color);
        margin-top: 10px;
        display: block; /* Ensure it takes full width */
    }
}

/* Visibility Classes for Desktop */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Nav Heading Styles for Mobile */
.nav-heading {
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px 15px;
    color: var(--text-color);
    margin-top: 10px;
}
