/* Custom 2-Row Navbar Styling */

/* Main Header Wrapper */
.custom-navbar {
    height: 120px;
    /* Slight bump from 100px so it comfortably fits both rows on desktop without squeezing */
    background-color: #292929;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Row 1: Logo, Search, Icons */
.navbar-logo {
    height: 50px;
    /* Controlled logo size */
    object-fit: contain;
}

/* Search Box Container */
.search-box {
    width: 100%;
    /* Fixed maximum width as requested */
}

/* Fixed height for search fields matching layout */
.search-box .form-control,
.search-box .input-group-text {
    height: 42px;
}

.search-box .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Icon Links Styling */
.nav-icon-link {
    transition: color 0.2s ease-in-out, transform 0.2s ease;
}

.nav-icon-link:hover {
    color: var(--bs-primary) !important;
    transform: translateY(-2px);
}

/* Row 2: Menu Items */
.navbar-menu {
    display: flex;
    justify-content: space-between;
    /* FULL WIDTH DISTRIBUTION */
    align-items: center;
    width: 100%;
    gap: 0;
    position: relative;
}

.menu-item-wrapper {
    flex: 1;
    display: block;
    position: static;
}

.navbar-menu .menu-item {
    display: block;
    text-align: center;
    font-size: 1.05rem;
    /* slightly increased */
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    letter-spacing: 0.4px;
    transition: color 0.2s ease;
}

.menu-arrow {
    font-size: 0.75rem;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.menu-item-wrapper:hover .menu-arrow,
.menu-item:hover .menu-arrow {
    transform: rotate(180deg);
}

.navbar-menu .menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transform: translateX(-50%);
    transition: width 0.35s ease;
}

.menu-item-wrapper:hover .menu-item::after,
.navbar-menu .menu-item:hover::after {
    width: 100%;
}

/* Menu Hover Effect */
.menu-item-wrapper:hover .menu-item,
.navbar-menu .menu-item:hover {
    color: #fff;
}

/* Mega Menu Styles */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 40px 0;
    min-height: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 5;
}

.menu-item-wrapper:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-column {
    min-height: 220px;
    border-right: 1px solid #eee;
}

.mega-column:last-child {
    border-right: none;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .custom-navbar {
        height: auto;
        padding: 15px 0;
    }

    .navbar-top {
        margin-bottom: 0 !important;
    }
}