/* Navbar styling */
.navbar {
    background-color: #ff69b4;
    border: none;
    display: flex;
    justify-content: space-between;
    width: 100%; /* Full width */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    z-index: 1100;
}

/* Navigation items */
.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar-nav > li {
    position: relative;
    padding: 0;
}

/* Navigation links */
.navbar-nav > li > a {
    color: #fff;
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
}

.navbar-nav > li > a:hover {
    background-color: #ff1493;
}

/* Dropdown menu styling */
.dropdown-menu {
    position: absolute;
    top: 100%; /* Align below the navbar */
    left: 0; /* Default alignment */
    width: 950px; /* Fixed width */
    background-color: #ffc0cb;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show dropdown on hover */
.navbar-nav > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* Center-aligned dropdowns */
.dropdown-menu.megamenu {
    transform: translateX(-50%); /* Center horizontally */
    left: 50%; /* Align to the center of the parent */
}

/* Submenu items */
.dropdown-menu.megamenu .submenu-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.dropdown-menu.megamenu .submenu-items li {
    flex: 1 1 calc(50% - 15px);
}

.dropdown-menu.megamenu .submenu-items li a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    background-color: #ffe4e1;
    padding: 5px;
    border-radius: 5px;
}

.dropdown-menu.megamenu .submenu-items li a:hover {
    background-color: #ffb6c1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 90%; /* Adjust dropdown width for smaller screens */
        left: 5%; /* Center-align for smaller screens */
    }

    .dropdown-menu.megamenu {
        transform: none; /* Remove centering */
        left: 0;
    }
}
