/* Mobile Menu Fixes & Modern Updates */
/* ================================== */

/* Modern Background Gradient */
body {
    background: linear-gradient(135deg, 
        #0f0f23 0%, 
        #1a1a2e 25%, 
        #16213e 50%, 
        #0f3460 75%, 
        #533483 100%) !important;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Alternative modern backgrounds - uncomment to try different styles */
/*
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}
*/

/*
body {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%) !important;
}
*/

/*
body {
    background: radial-gradient(circle at 20% 80%, #120136 0%, #035aa6 50%, #40e0d0 100%) !important;
}
*/

/* Remove duplicate search icon styling */
.block-search .form-control {
    background-image: url('../images/ico-search.svg') !important;
    background-repeat: no-repeat !important;
    background-size: 20px !important;
    background-position: 97% center !important;
    padding-right: 50px !important;
}

/* Remove the duplicate search icon from CSS */
.block-search::after {
    display: none !important;
}

/* Fix navbar underline - make it modern and perfectly centered */
.nav > li > a {
    position: relative;
    display: inline-block;
    padding: 10px 0;
}

.nav > li > a::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.nav > li > a:hover::before,
.nav > li.active > a::before {
    width: calc(100% - 10px);
}

/* Enhanced Mobile Menu Functionality */
.trigger-mobile-menu {
    display: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1000;
}

.trigger-mobile-menu:hover {
    background: var(--primary-gradient);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.trigger-mobile-menu img {
    filter: brightness(0) invert(1);
    width: 24px;
    height: 24px;
}

/* Mobile Menu Styles */
@media (max-width: 767px) {
    .trigger-mobile-menu {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .block-search {
        display: none;
    }
    
    /* Mobile menu overlay */
    .top-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        padding: 60px 30px 30px;
        overflow-y: auto;
    }
    
    .top-nav.active {
        transform: translateX(0);
    }
    
    .top-nav .container {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0;
        padding-top: 20px;
    }
    
    .top-nav .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        width: 100%;
        margin-top: 20px !important;
    }
    
    /* Ensure mobile search is visible in mobile menu */
    .top-nav .mobile-search-container {
        display: block !important;
        order: -1; /* Show search at the top */
        width: 100%;
        margin-bottom: 20px;
    }
    
    .nav > li {
        width: 100%;
        margin-right: 0;
    }
    
    .nav > li > a {
        font-size: 20px !important;
        font-weight: 600;
        color: white;
        padding: 12px 0;
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .nav > li > a:hover,
    .nav > li.active > a {
        color: #667eea;
        background: var(--glass-bg);
        padding-left: 20px;
        border-radius: 12px;
        border-bottom-color: #667eea;
        text-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    }
    
    /* Fix underline for mobile */
    .nav > li > a::before {
        display: none;
    }
    
    /* Close button */
    .nav-close-trigger {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 2px solid var(--glass-border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        transition: var(--transition-smooth);
    }
    
    .nav-close-trigger:hover {
        background: #ff4757;
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
    }
    
    .nav-close-trigger img {
        filter: brightness(0) invert(1);
        width: 20px;
        height: 20px;
    }
    
    /* Add mobile search in menu */
    .mobile-menu-search {
        width: 100%;
        margin-bottom: 30px;
        position: relative;
    }
    
    .mobile-menu-search input {
        width: 100%;
        padding: 15px 50px 15px 20px;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 2px solid var(--glass-border);
        border-radius: 25px;
        color: white;
        font-size: 16px;
        transition: var(--transition-smooth);
    }
    
    .mobile-menu-search input:focus {
        border-color: #667eea;
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
        outline: none;
    }
    
    .mobile-menu-search input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .mobile-menu-search::after {
        content: '';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        background-image: url('../images/ico-search.svg');
        background-size: contain;
        background-repeat: no-repeat;
        opacity: 0.7;
        filter: brightness(0) invert(1);
    }
    
    /* Header adjustments for mobile */
    .block-header {
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .block-logo {
        flex: 1;
    }
    
    .block-mobile-menu {
        flex: 0 0 auto;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .block-search .form-control {
        width: 400px;
    }
}

/* Desktop enhancements */
@media (min-width: 1025px) {
    .block-mobile-menu {
        display: none;
    }
    
    .top-nav {
        position: relative;
        transform: none;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--glass-border);
        padding: 0;
        height: auto;
    }
    
    .nav {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 40px;
        padding: 15px 0;
        margin: 0;
        list-style: none;
    }
    
    .nav > li {
        margin: 0;
        position: relative;
    }
    
    .nav > li > a {
        font-size: 16px;
        font-weight: 600;
        padding: 12px 16px;
        position: relative;
        display: inline-block;
        color: white;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
    }
    
    /* Ensure underline is perfectly centered on desktop */
    .nav > li > a::before {
        bottom: -5px;
        height: 3px;
    }
    
    .nav > li > a:hover::before,
    .nav > li.active > a::before {
        width: calc(100% - 20px);
    }
}

/* Enhanced focus states for accessibility */
.trigger-mobile-menu:focus,
.nav-close-trigger:focus,
.mobile-menu-search input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Loading animation for menu items */
@media (max-width: 767px) {
    .nav > li {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInLeft 0.4s ease-out forwards;
    }
    
    .nav > li:nth-child(1) { animation-delay: 0.1s; }
    .nav > li:nth-child(2) { animation-delay: 0.2s; }
    .nav > li:nth-child(3) { animation-delay: 0.3s; }
    .nav > li:nth-child(4) { animation-delay: 0.4s; }
    .nav > li:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Prevent background scroll on iOS */
.top-nav.active {
    -webkit-overflow-scrolling: touch;
}

/* Modern glassmorphism for better visual hierarchy */
.top-header {
    position: relative;
    z-index: 100;
}

/* Remove language select related styles */
.mobile-language,
.block-language {
    display: none !important;
}

/* Enhanced logo for the new brand */
.logo-part-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-part-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
