/* ===============================
   Floating Navbar Base Styles
   =============================== */
.navbar-floating {
    position: fixed; /* Keep navbar floating */
    top: 20px; /* Space from top before scroll fix */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Maintain centering */
    width: 95%; /* Slight margin on sides */
    max-width: 1400px; /* Prevent excessive width on large screens */
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background */
    border-radius: 14px; /* Rounded corners */
    padding: 0.7rem 1rem; /* Inner spacing */
    box-shadow: 0 10px 30px rgba(5, 10, 25, 0.15); /* Soft shadow below */
    backdrop-filter: blur(6px); /* Subtle blur for glass effect */
    transition: top 300ms cubic-bezier(0.2, 0.9, 0.2, 1),
        width 300ms ease,
        padding 250ms ease,
        border-radius 250ms ease,
        box-shadow 300ms ease,
        background 250ms ease; /* Smooth animation transitions */
    z-index: 2200; /* Ensure it stays above other elements */
}

/* ===============================
   Navbar when Scrolled (Fixed)
   =============================== */
.navbar-floating.navbar-fixed {
    position: fixed;
    top: 0; /* Stick to top */
    left: 50%;
    transform: translateX(-50%); /* Keep perfectly centered */
    width: 100%; /* Full width for fixed state */
    max-width: 100%;
    border-radius: 0; /* Remove rounded corners */
    padding: 0.45rem 1rem; /* Compact padding */
    background: rgba(255, 255, 255, 0.98); /* Slightly more opaque */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Smaller shadow */
    transition: top 220ms cubic-bezier(0.2, 0.9, 0.2, 1),
        width 220ms ease,
        padding 200ms ease,
        border-radius 200ms ease,
        box-shadow 220ms ease,
        background 200ms ease; /* Faster transition for fixed state */
}

/* ===============================
   Navbar Links / Buttons
   =============================== */
.nav-link {
    color: #333 !important;
    font-weight: 500;
    margin: 0 8px;
    transition: color 0.25s ease; /* Smooth hover color transition */
}

.nav-link:hover {
    color: #8c3fff !important; /* Purple hover effect */
}

/* Gradient Button */
.nav-btn-gradient {
    background: linear-gradient(90deg, #ff4ec7 0%, #8c3fff 100%); /* Pink → Purple gradient */
    color: #ffffff;
    border: none;
    border-radius: 25px; /* Rounded pill button */
    padding: 6px 18px;
    font-weight: 600;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.navbar .nav-btn-gradient {
    color: #fff !important;
}

.nav-btn-gradient:hover {
    opacity: 0.92;
    transform: scale(1.03); /* Slight zoom on hover */
}

/* ===============================
   Mega Dropdown Menu
   =============================== */
.mega-dropdown {
    position: absolute;
    top: 100%; /* Directly below navbar */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Center horizontally + slight offset down */
    width: calc(100% - 40px);
    max-width: 1300px;
    background: #fff;
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12); /* Stronger dropdown shadow */
    opacity: 0;
    visibility: hidden; /* Hidden by default */
    transition: opacity 200ms ease, transform 220ms ease,
        visibility 0s linear 200ms; /* Hide transition delay */
    z-index: 2300; /* Above navbar */
}

/* Dropdown Visible */
.mega-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px); /* Slight drop effect */
    transition: opacity 220ms ease, transform 220ms ease,
        visibility 0s linear 0s; /* No delay on show */
}

/* Dropdown Headings */
.mega-dropdown h6 {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Dropdown List Styling */
.mega-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Dropdown List Items */
.mega-dropdown ul li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 8px;
}

/* Small Colored Dot before each list item */
.mega-dropdown ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    background: #ff4ec7;
    border-radius: 50%;
}

/* ===============================
   Link Styling (Navbar, Sidebar, Dropdown)
   =============================== */
.navbar a,
.sidebar a,
.mega-dropdown a {
    text-decoration: none !important;
    color: #333 !important;
    transition: color 0.25s ease;
    font-weight: 500;
}

/* Hover Effect for All Links */
.navbar a:hover,
.sidebar a:hover,
.mega-dropdown a:hover {
    color: #8c3fff !important;
    text-decoration: none !important;
}

/* Dropdown Links Readability */
.mega-dropdown ul li a {
    display: inline-block;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* ===============================
   Dropdown Arrow Animation
   =============================== */
.transition-icon {
    transition: transform 0.25s ease;
}

.transition-icon.rotate {
    transform: rotate(180deg); /* Rotates arrow icon */
}

/* ===============================
   Sidebar Styles
   =============================== */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default (offscreen) */
    width: 80%;
    max-width: 380px;
    height: 100vh;
    background: #fff;
    padding: 20px;
    box-shadow: -6px 0 30px rgba(5, 10, 25, 0.15);
    transition: right 0.35s ease; /* Slide animation */
    z-index: 3000;
    overflow-y: auto; /* Scroll if content exceeds height */
}

/* Sidebar Active (Visible) */
.sidebar.active {
    right: 0; /* Slide into view */
}

/* Background Overlay behind Sidebar */
#overlay {
    position: fixed;
    inset: 0; /* Top, right, bottom, left = 0 */
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 2800;
    display: none; /* Hidden by default */
}

/* Show Overlay */
#overlay.active {
    display: block;
}

/* Sidebar Toggle Button */
.dropdown-toggle-btn {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

/* Sidebar Links */
.sidebar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.sidebar ul li a:hover {
    color: #8c3fff;
}

/* Remove Bootstrap’s Default Dropdown Arrow */
.navbar .dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

/* ===============================
   Responsive Adjustments
   =============================== */
@media (max-width: 991px) {
    .navbar-floating {
        width: 96%; /* Adjust width for smaller screens */
    }

    .mega-dropdown {
        display: none !important; /* Hide large dropdown on mobile */
    }
}


/* Mobile Sidebar Accordion Button */
.sidebar-accordion-btn {
    background: transparent !important;
    box-shadow: none !important;
    font-weight: 500 !important; /* Not bold now */
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: #333 !important;
    display: flex;
    justify-content: space-between;
}

/* Chevron Right Icon → Replace default Bootstrap arrow */
.sidebar-accordion-btn::after {
    font-family: "bootstrap-icons" !important;
    content: "\f282"; /* bi-chevron-down */
    background-image: none !important;
    transform: rotate(0deg);
    transition: transform .25s ease;
}

/* Rotate Icon on Open */
.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
}

/* Remove unwanted borders */
.accordion-flush .accordion-item {
    border: none !important;
}

/* Accordion body cleanup */
.accordion-body {
    padding: 0.5rem 0 0.5rem 0;
}
