/* ========================================
   Modern Professional Navbar Styles
   Matching Screenshot Design
   ======================================== */

.header {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
}

.header .container {
    padding: 0 15px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 15px;
}

/* Logo Styles */
.navbar .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    color: #333;
    font-size: 18px;
    flex-shrink: 0;
    min-width: 60px;
}

.navbar .logo img {
    height: auto;
    max-height: 45px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

.navbar .logo .site-title {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 700;
}

/* Navigation Links Container */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-links > li {
    position: relative;
    flex-shrink: 0;
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 11px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-links > li > a:hover {
    color: #5865F2;
    background-color: #f5f6ff;
}

.nav-links > li > a.active {
    color: #5865F2;
    border-bottom: 2px solid #5865F2;
}

/* Chevron Icon */
.fa-chevron-down {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.nav-links > li:hover > a .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.nav-links li ul {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-links li:hover > ul {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links li ul li {
    padding: 0;
}

.nav-links li ul li a {
    display: block;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-links li ul li a:hover {
    background-color: #f5f6ff;
    color: #5865F2;
    border-left-color: #5865F2;
    padding-left: 20px;
}

.nav-links li ul li:first-child a {
    border-radius: 6px 6px 0 0;
}

.nav-links li ul li:last-child a {
    border-radius: 0 0 6px 6px;
}

/* Right Navigation Elements */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.search-btn:hover {
    color: #5865F2;
    background-color: #f5f6ff;
}

.login {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.login:hover {
    color: #5865F2;
}

.btn-primary {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4752C4 0%, #3d4599 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(88, 101, 242, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.menu-toggle:hover {
    color: #5865F2;
    background-color: #f5f6ff;
}

/* ===================================
   Tablet Responsive (768px - 991px)
   =================================== */
@media (max-width: 991px) {
    .navbar {
        padding: 12px 0;
    }

    .nav-links {
        gap: 3px;
    }

    .nav-links > li > a {
        padding: 10px 12px;
        font-size: 14px;
    }

    .nav-right {
        gap: 10px;
    }

    .login {
        font-size: 14px;
        padding: 8px 12px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* ===================================
   Mobile Responsive (768px and below)
   =================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
        position: relative;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 3;
        font-size: 20px;
    }

    .nav-links {
        order: 4;
        width: 100%;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #ffffff;
        border-top: 1px solid #f0f0f0;
        margin-top: 8px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .nav-links.active {
        max-height: 600px;
        padding: 8px 0;
    }

    .nav-links > li {
        width: 100%;
    }

    .nav-links > li > a {
        padding: 14px 16px;
        border-bottom: 1px solid #f5f5f5;
        border-radius: 0;
    }

    .nav-links > li:last-child > a {
        border-bottom: none;
    }

    .nav-links > li > a:hover {
        border-bottom-color: #f5f5f5;
        background-color: #f9f9f9;
    }

    .nav-links li ul {
        position: static;
        display: none;
        box-shadow: none;
        background: #f9f9f9;
        max-width: none;
        border-radius: 0;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin: 0;
        border-top: 1px solid #f0f0f0;
    }

    .nav-links li.active > ul {
        display: block;
    }

    .nav-links li ul li a {
        padding: 12px 16px 12px 32px;
        border-left: none;
        font-size: 13px;
    }

    .nav-links li ul li a:hover {
        border-left: none;
        padding-left: 32px;
    }

    .nav-right {
        order: 2;
        gap: 8px;
        margin-left: auto;
    }

    .login {
        font-size: 13px;
        padding: 6px 10px;
        display: none;
    }

    .btn-primary {
        font-size: 13px;
        padding: 8px 14px;
        gap: 5px;
    }

    .btn-primary i {
        font-size: 12px;
    }

    .navbar .logo {
        order: 1;
        min-width: 90px;
    }

    .navbar .logo img {
        max-height: 40px;
        max-width: 100px;
    }

    .search-btn {
        font-size: 16px;
        padding: 6px 8px;
    }
}

/* ===================================
   Small Mobile (480px and below)
   =================================== */
@media (max-width: 480px) {
    .navbar {
        padding: 8px 0;
    }

    .nav-right {
        gap: 5px;
    }

    .search-btn {
        font-size: 16px;
        padding: 5px 6px;
    }

    .btn-primary {
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
    }

    .btn-primary i {
        display: none;
    }

    .navbar .logo {
        min-width: 80px;
    }

    .navbar .logo img {
        max-height: 35px;
        max-width: 85px;
    }

    .nav-links > li > a {
        padding: 12px 12px;
        font-size: 13px;
    }

    .nav-links li ul li a {
        padding: 10px 12px 10px 28px;
    }
}

/* ===================================
   Active/Current Menu States
   =================================== */
.nav-links > li > a.active,
.nav-links > li > a.current-menu-item,
.nav-links > li.current-menu-item > a {
    color: #5865F2;
    font-weight: 600;
}

/* ===================================
   Smooth Transitions & Animations
   =================================== */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* ===================================
   Navbar Search Form Toggle
   =================================== */
.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    background: #f1f5f9;
    border-radius: 30px;
    padding: 2px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-wrapper.active {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.search-form-navbar {
    width: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.search-wrapper.active .search-form-navbar {
    width: 180px;
}

.search-field-navbar {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 6px 12px;
    color: #1e293b;
}

.search-field-navbar::placeholder {
    color: #94a3b8;
}

.search-wrapper .search-btn {
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    background: transparent;
    color: #64748b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.search-wrapper.active .search-btn {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08) !important;
}
