/**
 * VoxFor Mega Menu Styles
 * Version: 2.2.0
 * Author: VoxFor Team
 */

:root {
    --voxfor-primary-color: #2563eb;
    --voxfor-primary-dark: #1d4ed8;
    --voxfor-secondary-color: #f59e0b;
    --voxfor-text-color: #374151;
    --voxfor-background-color: #ffffff;
    --voxfor-border-color: #e5e7eb;
    --voxfor-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --voxfor-border-radius: 12px;
    --voxfor-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset and Base Styles */
.voxfor-mega-menu-wrapper * {
    box-sizing: border-box;
}

.voxfor-mega-menu-container {
    position: relative;
}

/* Main Menu Styles */
.voxfor-mega-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 8px;
}

.voxfor-mega-menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

.voxfor-mega-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    color: var(--voxfor-text-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--voxfor-transition);
    position: relative;
}

.voxfor-mega-menu a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #71c0ff);    
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.voxfor-mega-menu a:hover {
    color: var(--voxfor-primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.voxfor-mega-menu a:hover::after {
    width: 95%;
}

/* Menu Icons */
.voxfor-mega-menu .menu-icon {
    font-size: 16px;
    margin-right: 8px;
}

.voxfor-mega-menu .dropdown-arrow {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.voxfor-mega-menu .has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Styles */
.voxfor-mega-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--voxfor-background-color);
    border-radius: var(--voxfor-border-radius);
    box-shadow: var(--voxfor-shadow);
    padding: 20px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: var(--voxfor-transition);
    border: 1px solid var(--voxfor-border-color);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.voxfor-mega-menu .has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.voxfor-mega-menu .dropdown-menu a {
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Removed ::before pseudo-elements that were adding unwanted content */

.voxfor-mega-menu .dropdown-menu a:hover {
    background: rgba(37, 99, 235, 0.05);
    color: var(--voxfor-primary-color);
}

/* Mega Menu Styles */
.voxfor-mega-menu .mega-menu {
    min-width: 900px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    left: -300px;
}

.voxfor-mega-menu .mega-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.voxfor-mega-menu .mega-column h4 {
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--voxfor-primary-color);
    position: relative;
}

.voxfor-mega-menu .mega-column h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--voxfor-secondary-color);
}

.voxfor-mega-menu .mega-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.voxfor-mega-menu .mega-column li {
    margin-bottom: 4px;
}

/* Featured Column */
.voxfor-mega-menu .featured-column {
    background: linear-gradient(135deg, var(--voxfor-primary-color), var(--voxfor-primary-dark));
    border-radius: var(--voxfor-border-radius);
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.3);
}

.voxfor-mega-menu .featured-column::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: voxfor-pulse 4s ease-in-out infinite;
}

@keyframes voxfor-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.voxfor-mega-menu .featured-service {
    position: relative;
    z-index: 2;
}

.voxfor-mega-menu .featured-service h5 {
    color: var(--voxfor-secondary-color);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    background: rgba(245, 158, 11, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

.voxfor-mega-menu .featured-service h4 {
    font-size: 22px;
    margin-bottom: 16px;
    font-weight: 800;
    border: none;
    padding: 0;
}

.voxfor-mega-menu .featured-service h4::after {
    display: none;
}

.voxfor-mega-menu .featured-service p {
    font-size: 15px;
    margin-bottom: 20px;
    opacity: 0.95;
    line-height: 1.6;
}

.voxfor-mega-menu .featured-service .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.voxfor-mega-menu .featured-service .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .voxfor-mega-menu {
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        max-width: 90vw;
        height: 100vh;
        background: var(--voxfor-background-color);
        box-shadow: var(--voxfor-shadow);
        transition: left 0.3s ease;
        padding: 20px;
        overflow-y: auto;
        z-index: 9999;
    }
    
    .voxfor-mega-menu.active {
        left: 0;
    }
    
    .voxfor-mega-menu li {
        width: 100%;
        border-bottom: 1px solid var(--voxfor-border-color);
        margin: 0;
    }
    
    .voxfor-mega-menu a {
        padding: 16px 0;
        justify-content: flex-start;
        width: 100%;
        font-size: 16px;
        display: flex;
        align-items: center;
    }
    
    /* Mobile Dropdown Styles */
    .voxfor-mega-menu .dropdown-menu,
    .voxfor-mega-menu .voxfor-mega-menu-dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 10px 0 10px 20px !important;
        background: #f8fafc !important;
        margin: 10px 0 !important;
        border-radius: 8px !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
    }
    
    .voxfor-mega-menu .dropdown-menu a,
    .voxfor-mega-menu .voxfor-mega-menu-dropdown a {
        padding: 12px 0 !important;
        font-size: 14px !important;
        color: #666 !important;
    }
    
    /* Mobile Mega Menu Styles */
    .voxfor-mega-menu .voxfor-mega-menu-mega-dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 15px 0 !important;
        background: #f8fafc !important;
        margin: 10px 0 !important;
        border-radius: 8px !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
        min-width: auto !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-columns {
        display: block !important;
        grid-template-columns: none !important;
        gap: 15px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column {
        width: 100% !important;
        margin-bottom: 20px !important;
        padding: 0 15px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column h4 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
        color: var(--voxfor-primary-color) !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 8px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column h5.row-title {
        font-size: 14px !important;
        margin: 15px 0 8px 0 !important;
        color: #374151 !important;
        font-weight: 600 !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column ul {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column li {
        border-bottom: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column a {
        padding: 8px 0 !important;
        font-size: 14px !important;
        color: #666 !important;
        border-bottom: none !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column a:hover {
        color: var(--voxfor-primary-color) !important;
        background: none !important;
    }
    
    /* Mobile Icon Styles */
    .voxfor-mega-menu a i {
        font-size: 16px !important;
        width: 16px !important;
        height: 16px !important;
        margin-right: 8px !important;
    }
    
    /* Hide dropdown arrows on mobile for better UX */
    .voxfor-mega-menu .dropdown-arrow {
        display: none !important;
    }
    
    /* Mobile featured column */
    .voxfor-mega-menu .featured-column {
        padding: 20px 15px !important;
        margin-bottom: 15px !important;
    }
    
    .voxfor-mega-menu .featured-service h4 {
        font-size: 18px !important;
    }
    
    .voxfor-mega-menu .featured-service p {
        font-size: 14px !important;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .voxfor-mega-menu .voxfor-mega-menu-mega-dropdown {
        min-width: 600px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-columns.columns-3,
    .voxfor-mega-menu .voxfor-mega-menu-columns.columns-4,
    .voxfor-mega-menu .voxfor-mega-menu-columns.columns-5,
    .voxfor-mega-menu .voxfor-mega-menu-columns.columns-6 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .voxfor-mega-menu {
        width: 280px !important;
        padding: 15px !important;
    }
    
    .voxfor-mega-menu a {
        font-size: 15px !important;
        padding: 14px 0 !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column {
        padding: 0 10px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column h4 {
        font-size: 15px !important;
    }
    
    .voxfor-mega-menu .voxfor-mega-menu-column a {
        font-size: 13px !important;
    }
}

/* Mobile Toggle Button */
.voxfor-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.voxfor-mobile-toggle span {
    width: 24px;
    height: 3px;
    background: var(--voxfor-text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.voxfor-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.voxfor-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.voxfor-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .voxfor-mobile-toggle {
        display: flex;
    }
}

/* Mobile Overlay */
.voxfor-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voxfor-mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Accessibility - DISABLED: Remove all focus outlines */
.voxfor-mega-menu a:focus {
    outline: none !important;
    outline-offset: 0 !important;
}

.voxfor-mega-menu .dropdown-menu a:focus {
    background: transparent !important;
}

/* Animation Classes */
.voxfor-fade-in {
    animation: voxfor-fadeIn 0.3s ease-in-out;
}

.voxfor-slide-up {
    animation: voxfor-slideUp 0.3s ease-in-out;
}

.voxfor-scale-in {
    animation: voxfor-scaleIn 0.3s ease-in-out;
}

@keyframes voxfor-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes voxfor-slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes voxfor-scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* RTL Support */
.rtl .voxfor-mega-menu .dropdown-menu {
    left: auto;
    right: 0;
}

.rtl .voxfor-mega-menu .mega-menu {
    left: auto;
    right: -300px;
}

.rtl .voxfor-mega-menu .dropdown-arrow {
    margin-left: 0;
    margin-right: 8px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .voxfor-mega-menu a {
        border: 1px solid currentColor;
    }
    
    .voxfor-mega-menu .dropdown-menu {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .voxfor-mega-menu *,
    .voxfor-mega-menu *::before,
    .voxfor-mega-menu *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Body scroll prevention when mobile menu is open */
body.voxfor-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Remove all focus outlines and clicking borders */
.voxfor-mega-menu a:focus,
.voxfor-mega-menu a:active,
.voxfor-mega-menu li:focus,
.voxfor-mega-menu li:active,
.voxfor-mega-menu *:focus,
.voxfor-mega-menu *:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove focus from dropdown items */
.voxfor-mega-menu .dropdown-menu a:focus,
.voxfor-mega-menu .dropdown-menu a:active,
.voxfor-mega-menu .mega-menu a:focus,
.voxfor-mega-menu .mega-menu a:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Ensure no browser default focus styles */
.voxfor-mega-menu-wrapper *:focus,
.voxfor-mega-menu-container *:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Mobile menu container wrapper */
.voxfor-mega-menu-container {
    position: relative;
}

/* Ensure mobile toggle is visible on mobile */
@media (max-width: 768px) {
    .voxfor-mobile-toggle {
        display: flex !important;
        position: relative;
        z-index: 10000;
    }
    
    /* Make sure the main menu is properly positioned */
    .voxfor-mega-menu-container .voxfor-mega-menu {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 320px !important;
        max-width: 90vw !important;
        height: 100vh !important;
        z-index: 9999 !important;
        background: white !important;
        overflow-y: auto !important;
        transition: left 0.3s ease !important;
    }
    
    .voxfor-mega-menu-container .voxfor-mega-menu.active {
        left: 0 !important;
    }
    
    /* Ensure all dropdowns are shown as static on mobile */
    .voxfor-mega-menu.active .voxfor-mega-menu-mega-dropdown,
    .voxfor-mega-menu.active .voxfor-mega-menu-dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        background: #f8fafc !important;
        margin: 10px 0 !important;
        border-radius: 8px !important;
        padding: 0px !important;
    }
    
    /* Mobile-specific hover states */
    .voxfor-mega-menu.active .voxfor-mega-menu-item:hover .voxfor-mega-menu-mega-dropdown,
    .voxfor-mega-menu.active .voxfor-mega-menu-item:hover .voxfor-mega-menu-dropdown {
        display: block !important;
    }
    
    /* Ensure mega menu columns stack properly on mobile */
    .voxfor-mega-menu.active .voxfor-mega-menu-columns {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    /* Mobile click/tap behavior */
    .voxfor-mega-menu.active .has-dropdown > a {
        pointer-events: auto !important;
    }
    
    /* Better spacing for mobile menu items */
    .voxfor-mega-menu.active .voxfor-mega-menu-item {
        border-bottom: 1px solid #e5e7eb !important;
        margin: 0 !important;
    }
    
    .voxfor-mega-menu.active .voxfor-mega-menu-item:last-child {
        border-bottom: none !important;
    }
}

/* Ensure proper stacking context */
.voxfor-mobile-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}

.voxfor-mobile-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Print Styles */
@media print {
    .voxfor-mega-menu .dropdown-menu,
    .voxfor-mobile-toggle,
    .voxfor-mobile-overlay {
        display: none !important;
    }
}