/* Mega Menu Styles */
.mega-menu-container {
    position: relative;
    z-index: 1000;
}

.mega-menu {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin: 0 20px;
}

.mega-menu-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.mega-menu-item {
    position: relative;
    margin: 0;
}

.mega-menu-item > a {
    display: block;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.mega-menu-item:hover > a,
.mega-menu-item.active > a {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 30px;
    min-width: 800px;
    max-width: 1000px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    border: 1px solid #eee;
}

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

.mega-dropdown-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-column {
    min-width: 180px;
}

.mega-column h3 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.mega-column h3 a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.mega-column h3 a:hover {
    color: #e74c3c;
}

.mega-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-column li {
    margin-bottom: 8px;
}

.mega-column li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
    border-radius: 3px;
}

.mega-column li a:hover {
    color: #e74c3c;
    padding-left: 10px;
    background: rgba(231, 76, 60, 0.05);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .mega-dropdown-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .mega-dropdown {
        min-width: 700px;
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .mega-dropdown-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .mega-dropdown {
        min-width: 500px;
        max-width: 600px;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .mega-dropdown {
        position: static;
        min-width: auto;
        max-width: none;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        border-radius: 0;
        padding: 20px;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    
    .mega-menu-item:hover .mega-dropdown,
    .mega-menu-item.active .mega-dropdown {
        display: block;
    }
    
    .mega-dropdown-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mega-menu-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mega-menu-item {
        width: 100%;
    }
    
    .mega-menu-item > a {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }
}

/* Animation for dropdown arrow */
.mega-menu-item.has-dropdown > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: #999;
}

.mega-menu-item.has-dropdown:hover > a::after,
.mega-menu-item.has-dropdown.active > a::after {
    transform: rotate(180deg);
    color: #e74c3c;
}

/* Loading state */
.mega-dropdown.loading {
    opacity: 0.7;
}

.mega-dropdown.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #e74c3c;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}