/* Сучасне мобільне меню - слайд-аут збоку */

/* Перевизначення базового меню */
.modern-mobile-menu {
    position: fixed !important;
    z-index: 99998 !important;
    background: transparent !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

.modern-mobile-menu:before,
.modern-mobile-menu:after {
    display: none !important;
    content: none !important;
}

/* Приховуємо базовий фон меню */
.modern-mobile-menu.collapse:not(.show) {
    display: none !important;
}

/* Оверлей */
.modern-mobile-menu .modern-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
}

.menu.collapse.show.modern-mobile-menu .modern-menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Контент меню */
.modern-mobile-menu .modern-menu-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: linear-gradient(135deg, #01a0c6 0%, #00ceff 50%, #01a0c6 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    z-index: 99999 !important;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    overflow-x: hidden;
}

.menu.collapse.show.modern-mobile-menu .modern-menu-content {
    right: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Хедер меню */
.modern-menu-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.modern-menu-logo img {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Кнопка закриття */
.modern-menu-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modern-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.6);
}

.modern-menu-close span {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.modern-menu-close span:first-child {
    transform: rotate(45deg);
}

.modern-menu-close span:last-child {
    transform: rotate(-45deg);
}

/* Тіло меню */
.modern-menu-body {
    flex: 1;
    padding: 5px 0;
    overflow-y: auto;
}

.modern-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modern-menu-nav li {
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: translateX(30px);
    animation: slideInMenu 0.5s ease forwards;
    margin-bottom: 0;
}

.modern-menu-nav li:nth-child(1) { animation-delay: 0.1s; }
.modern-menu-nav li:nth-child(2) { animation-delay: 0.15s; }
.modern-menu-nav li:nth-child(3) { animation-delay: 0.2s; }
.modern-menu-nav li:nth-child(4) { animation-delay: 0.25s; }
.modern-menu-nav li:nth-child(5) { animation-delay: 0.3s; }
.modern-menu-nav li:nth-child(6) { animation-delay: 0.35s; }

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

.modern-menu-nav a {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 20px;
    margin-left: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-family: Lato-Bold;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 4px;
    min-height: 48px;
}

.modern-menu-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.15);
    transition: width 0.3s ease;
}

.modern-menu-nav a:hover::before,
.modern-menu-nav a:focus::before {
    width: 100%;
}

.modern-menu-nav a:hover,
.modern-menu-nav a:focus {
    color: #fff;
    border-left-color: #fff;
    padding-left: 24px;
    margin-left: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    width: 25px;
    height: 25px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-menu-nav a:hover .menu-icon {
    transform: scale(1.3);
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.9));
}

.menu-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* Футер меню */
.modern-menu-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.modern-menu-contacts {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-menu-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-family: Lato-Bold;
    text-decoration: none;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.phone-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.modern-menu-phone:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.modern-menu-calc-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #01a0c6;
    font-size: 14px;
    font-family: Lato-Bold;
    text-align: center;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
}

.modern-menu-calc-btn:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #01a0c6;
}

/* Адаптивність */
@media (max-width: 575px) {
    .modern-menu-content {
        width: 90%;
    }
    
    .modern-menu-logo img {
        max-width: 100px;
    }
    
    .modern-menu-header {
        padding: 12px 15px;
    }
    
    .modern-menu-nav a {
        font-size: 15px;
        padding: 10px 15px;
    }
    
    .menu-icon {
        width: 22px;
        height: 22px;
        margin-right: 10px;
    }
    
    .modern-menu-nav a:hover .menu-icon {
        transform: scale(1.25);
    }
    
    .modern-menu-phone {
        font-size: 13px;
        padding: 7px 10px;
    }
    
    .modern-menu-calc-btn {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .modern-menu-footer {
        padding: 15px;
    }
}

/* Прокрутка */
.modern-menu-content::-webkit-scrollbar {
    width: 4px;
}

.modern-menu-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.modern-menu-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.modern-menu-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
