/* Designed and developed by Aditya Panigrahi */

.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 15px 15px;
    margin: 0;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
}

.navbar-brand .logo {
    width: 181px;
    height: 47px;
    object-fit: cover;
}

.navbar-nav .nav-link {
    font-family: "Manrope", sans-serif;
    font-weight: 500;
    color: #1e1e1ecc !important;
    font-size: 16px;
    padding: 8px 16px !important;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
}

/* Dropdown menu items */
.navbar-nav .dropdown-item {
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
}

/* Hover dropdown functionality */
.navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-nav .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    margin-top: 8px;
    padding: 12px;
    min-width: 200px;
    overflow: hidden;
    position: relative;
}

.navbar-nav .dropdown-item {
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    color: #2c3e50;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    margin: 0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
}

.navbar-nav .dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-blue), #4a90e2);
    color: white;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

/* Active navigation states */
.navbar-nav .nav-link.active {
    color: var(--primary-blue) !important;
    font-weight: 600;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-blue);
    border-radius: 1px;
}

.navbar-nav .dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-blue), #4a90e2);
    color: white;
    font-weight: 600;
}

.navbar-nav .dropdown-item.active::before {
    content: '●';
    margin-right: 8px;
    font-size: 12px;
}

.navbar-toggler {
    border: none;
    padding: 8px 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
    z-index: 1031;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler:focus {
    box-shadow:
        0 0 0 3px rgba(74, 144, 226, 0.2),
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: scale(1.05);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.navbar-toggler-icon {
    transition: transform 0.3s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

/* Sidebar Styles */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px 0 0 20px;
    box-shadow:
        -10px 0 30px rgba(0, 0, 0, 0.1),
        -5px 0 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset -1px 0 0 rgba(255, 255, 255, 0.2);
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.sidebar-logo {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 20px;
    color: rgba(102, 102, 102, 0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: rgba(51, 51, 51, 1);
    transform: scale(1.05);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    padding: 20px 0;
}

.sidebar-item {
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(51, 51, 51, 0.9);
    text-decoration: none;
    font-family: "Manrope", sans-serif;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin: 2px 10px;
    border-radius: 8px;
}

.sidebar-link:hover {
    background: rgba(74, 144, 226, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(74, 144, 226, 1);
    border-left-color: rgba(74, 144, 226, 0.6);
    transform: translateX(5px);
    box-shadow:
        0 4px 15px rgba(74, 144, 226, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-link:hover i {
    color: white;
}

.sidebar-link i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 18px;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

/* Active state for sidebar links */
.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-blue), #4a90e2);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
    box-shadow:
        0 4px 15px rgba(74, 144, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-link.active i {
    color: white;
}

.sidebar-link.active::before {
    content: '●';
    margin-right: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 0 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

/* Sidebar Quote Section */
.sidebar-quote-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-quote-btn {
    width: 100%;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(74, 144, 226, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow:
        0 4px 15px rgba(74, 144, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-quote-btn:hover {
    transform: translateY(-2px);
    background: rgba(74, 144, 226, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow:
        0 8px 25px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Hide sidebar on desktop */
@media (min-width: 992px) {
    .sidebar-toggle {
        display: none !important;
    }

    .sidebar {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* Mobile and tablet specific styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
    }

    .sidebar-toggle {
        display: block !important;
    }

    /* Ensure header stays fixed on mobile */
    .navbar {
        position: fixed !important;
        z-index: 1030;
    }

    /* Ensure hamburger menu is always clickable */
    .navbar-toggler {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
    }

    /* Add visual feedback for touch devices */
    .navbar-toggler:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Ensure header is always visible and properly positioned */
@media (max-width: 576px) {
    body {
        padding-top: 70px;
        /* Slightly less padding on mobile */
    }
}

/* Enhanced glassmorphism for scrolled state */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-top: none !important;
}

/* Ensure navbar never becomes completely transparent */
.navbar {
    min-height: 70px;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: -1;
    border-radius: 0 0 15px 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: none;
}