/* =============================================
   PROFESSIONAL MEGA MENU STYLES
   ============================================= */

/* Mega Menu Container */
.mega-menu-wrapper {
    position: relative;
}

/* Main Navigation Mega Menu Styles */
.main-nav ul.nav li.has-mega-menu {
    position: static;
}

.main-nav ul.nav li.has-mega-menu > a {
    padding-right: 20px;
    position: relative;
}

.main-nav ul.nav li.has-mega-menu > a:after {
    content: '\f107';
    font-family: 'FontAwesome';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: all 0.3s;
}

.main-nav ul.nav li.has-mega-menu:hover > a:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Mega Menu Dropdown */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 30px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    border-top: 3px solid #be2329;
    max-height: 500px;
    overflow-y: auto;
}

.main-nav ul.nav li.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mega Menu Grid */
.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 0 50px;
    max-width: 1320px;
    margin: 0 auto;
}

/* Mega Menu Column */
.mega-menu-column {
    position: relative;
}

.mega-menu-column h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2f3484;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #be2329;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mega Menu Items */
.mega-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-items li {
    margin-bottom: 0;
}

.mega-menu-items li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.mega-menu-items li a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #be2329;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mega-menu-items li a:hover {
    background: #f8f9fa;
    color: #2f3484;
    padding-left: 20px;
    text-decoration: none;
}

.mega-menu-items li a:hover:before {
    transform: scaleY(1);
}

.mega-menu-items li a i {
    margin-right: 10px;
    font-size: 16px;
    color: #be2329;
    min-width: 20px;
    text-align: center;
}

/* Featured Item in Mega Menu */
.mega-menu-featured {
    background: #2f3484;
    padding: 25px;
    border-radius: 10px;
    color: white;
    text-align: left;
    margin-top: 10px;
    border: 2px solid #be2329;
}

.mega-menu-featured h5 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: left;
}

.mega-menu-featured p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: left;
}

.mega-menu-featured .btn {
    background: white;
    color: #2f3484;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
    display: inline-block;
}

.mega-menu-featured .btn:hover {
    background: #be2329;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Mega Menu with Images */
.mega-menu-item-with-image {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mega-menu-item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.mega-menu-item-content {
    flex: 1;
}

.mega-menu-item-content .title {
    font-weight: 600;
    color: #2f3484;
    display: block;
    margin-bottom: 3px;
}

.mega-menu-item-content .desc {
    font-size: 12px;
    color: #999;
    display: block;
}

/* Regular Dropdown (for non-mega items) */
.main-nav ul.nav li.has-sub .sub-menu {
    min-width: 220px;
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .mega-menu {
        position: relative;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding: 15px 0;
        max-height: none;
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .mega-menu-column h4 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .mega-menu-items li a {
        padding: 10px;
        font-size: 13px;
    }
    
    .mega-menu-featured {
        padding: 20px;
        margin-top: 15px;
    }
}

/* Scrollbar for Mega Menu */
.mega-menu::-webkit-scrollbar {
    width: 6px;
}

.mega-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mega-menu::-webkit-scrollbar-thumb {
    background: #be2329;
    border-radius: 10px;
}

.mega-menu::-webkit-scrollbar-thumb:hover {
    background: #2f3484;
}
