/* ============================= */
/*        GLOBAL VARIABLES       */
/* ============================= */
:root {
    --navbar-height: 80px;
    --navbar-height-mobile: 60px;
    --navbar-bg: rgba(255, 255, 255, 0.98);
    --navbar-bg-scroll: rgba(255, 255, 255, 1);
    --navbar-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --primary: #007bff;
    --primary-dark: #0056b3;
    --white: #ffffff;
    --dark: #343a40;
    --transition: all 0.3s ease-in-out;
}

/* ============================= */
/*       GENERAL NAVBAR STYLES   */
/* ============================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--navbar-bg);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--navbar-shadow);
}

.navbar.scrolled {
    background: var(--navbar-bg-scroll);
    height: calc(var(--navbar-height) - 10px);
}

/* Container for Navbar */
.navbar .container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================= */
/*        LOGO STYLES            */
/* ============================= */

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.8rem;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.brand-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.navbar.scrolled .navbar-brand img {
    height: 45px;
}

/* ============================= */
/*        NAVIGATION MENU        */
/* ============================= */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================= */
/*        CALL-TO-ACTION (CTA)   */
/* ============================= */

.navbar-cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    margin-left: 0.75rem;
    display: inline-block;
}

/* Hover State */
.navbar-cta:hover {
    background: var(--primary-dark);
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* Active (Click) State */
.navbar-cta:active {
    background: var(--primary-dark);
    color: var(--white) !important;
}

/* Focus (When clicked/tabbed) */
.navbar-cta:focus {
    background: var(--primary-dark);
    color: var(--white) !important;
    outline: none;
}

/* Visited (After click) */
.navbar-cta:visited {
    color: var(--white) !important;
}

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

.hamburger {
    display: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0.25rem;
    position: relative;
    right: 0;
    z-index: 1001;
}

.hamburger-box {
    width: 24px;
    height: 20px;
    position: relative;
    display: inline-block;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--dark);
    position: absolute;
    transition: var(--transition);
    border-radius: 4px;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: '';
    top: -6px;
}

.hamburger-inner::after {
    content: '';
    bottom: -6px;
}

/* Mobile Menu Active States */
.hamburger.active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.hamburger.active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
}

/* ============================= */
/*        RESPONSIVE DESIGN      */
/* ============================= */

/* Large screens adjustment */
@media (min-width: 1200px) {
    .nav-menu {
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    .navbar-cta {
        padding: 0.75rem 1.5rem;
        margin-left: 1rem;
    }
}

/* Medium screens adjustment - new breakpoint */
@media (max-width: 1100px) and (min-width: 901px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .navbar-cta {
        padding: 0.5rem 1rem;
        margin-left: 0.5rem;
    }
    
    .brand-text {
        font-size: 1rem;
    }
}

/* Mobile navigation */
@media (max-width: 900px) {
    .navbar {
        height: var(--navbar-height-mobile);
        padding: 0 1rem;
    }

    .navbar .container {
        padding: 0 1rem;
    }

    .navbar-brand {
        flex: 1;
        gap: 0.5rem;
    }

    .hamburger {
        display: block;
        margin-left: auto;
    }

    .navbar-brand img {
        height: 35px;
    }

    .brand-text {
        font-size: 0.95rem;
    }

    .nav-menu {
        position: fixed;
        top: var(--navbar-height-mobile);
        left: 0;
        right: 0;
        background: var(--navbar-bg-scroll);
        padding: 1rem 0;
        flex-direction: column;
        gap: 0.75rem;
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s ease, opacity 0.3s ease, visibility 0s 0.3s;
        height: calc(100vh - var(--navbar-height-mobile));
        overflow-y: auto;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        transition: transform 0.4s ease, opacity 0.3s ease, visibility 0s 0s;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        position: relative;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 0.75rem;
        display: block;
        color: var(--dark);
    }
    
    /* Replace the underline with a different active indicator for mobile */
    .nav-link::after {
        display: none;
    }
    
    /* New mobile active state indicator */
    .nav-link.active {
        color: var(--primary);
        background-color: rgba(0, 123, 255, 0.08);
        font-weight: 600;
    }
    
    /* Add a left border indicator instead of underline */
    .nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 0;
        background-color: var(--primary);
        transition: width 0.3s ease;
    }
    
    .nav-item:has(.nav-link.active)::before {
        width: 4px;
    }

    .navbar-cta {
        width: 90%;
        margin: 10px auto;
        text-align: center;
        padding: 0.625rem 1.25rem;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .navbar-brand img {
        height: 30px;
    }
    
    .brand-text {
        font-size: 0.85rem;
    }
    
    .nav-menu {
        padding: 0.5rem 0;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.6rem;
    }
}

/* Add dropdown styles at the end of your navbar CSS file */

/* Dropdown styling */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.dropdown-toggle .fas {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-item.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item.dropdown.show .dropdown-toggle .fas {
    transform: rotate(180deg);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(0, 123, 255, 0.08);
    color: var(--primary);
    padding-left: 1.25rem;
}

/* Dropdown headers and dividers */
.dropdown-header {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    border-top: 1px solid var(--gray-200);
}

/* Mobile dropdown styling */
@media (max-width: 900px) {
    /* Remove any border highlight on dropdown menu item */
    .nav-item.dropdown::before {
        display: none;
    }
    
    /* Match the dropdown toggle to other nav items */
    .nav-item.dropdown {
        width: 100%;
        text-align: center;
    }
    
    .dropdown-toggle {
        font-size: 1.1rem;
        padding: 0.75rem;
        color: var(--dark);
        justify-content: center;
    }
    
    /* Style the actual dropdown menu */
    .dropdown-menu {
        position: static;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.03);
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
        margin: 0 auto;
        text-align: center;
    }
    
    .nav-item.dropdown.show .dropdown-menu {
        max-height: 300px;
    }
    
    .dropdown-item {
        padding: 0.75rem 2rem;
        font-size: 1rem;
        text-align: center;
    }
    
    .dropdown-item:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    /* Active state - match other nav item active states */
    .nav-item.dropdown.active .dropdown-toggle {
        color: var(--primary);
        background-color: rgba(0, 123, 255, 0.08);
        font-weight: 600;
    }
}

/* ============================= */
/*       MAIN CONTENT SPACING    */
/* ============================= */

/* Add padding to main content to account for fixed navbar */
#main-content {
    padding-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

/* Mobile adjustment */
@media (max-width: 768px) {
    #main-content {
        padding-top: var(--navbar-height-mobile);
        min-height: calc(100vh - var(--navbar-height-mobile));
    }
}
