/**
 * Mobile Sliding Menu Styles
 * Optimized for touch devices with large tap targets
 */

/* Container Styles */
.mobile-menu-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
}

/* Menu Wrapper - holds all layers */
.mobile-menu-wrapper {
    position: relative;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Individual Menu Layers */
.mobile-menu-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: #ffffff;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.mobile-menu-layer.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Back Button */
.mobile-menu-back {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    transition: background-color 0.2s ease;
    min-height: 60px;
}

.mobile-menu-back:hover,
.mobile-menu-back:active {
    background: #e9ecef;
}

.mobile-menu-back::before {
    content: "←";
    font-size: 24px;
    margin-right: 12px;
    font-weight: 600;
}

/* Menu List */
.mobile-menu-layer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-layer > ul {
    padding: 8px 0;
}

/* Menu Items */
.mobile-menu-layer li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-layer li:last-child {
    border-bottom: none;
}

/* Menu Links */
.mobile-menu-layer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    font-size: 17px;
    line-height: 1.4;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 60px;
    font-weight: 400;
}

.mobile-menu-layer a:hover,
.mobile-menu-layer a:active {
    background: #f8f9fa;
    color: #000;
}

/* Parent Item Indicator (has children) */
.mobile-menu-layer .menu-item-has-children > a::after {
    content: "→";
    font-size: 20px;
    font-weight: 600;
    color: #666;
    margin-left: 12px;
    transition: transform 0.2s ease;
}

.mobile-menu-layer .menu-item-has-children > a:hover::after {
    transform: translateX(4px);
}

/* Current/Active Menu Item */
.mobile-menu-layer .current-menu-item > a,
.mobile-menu-layer .current-menu-ancestor > a {
    color: #e30613;
    font-weight: 500;
}

/* Layer Header (shows current section title) */
.mobile-menu-layer-header {
    padding: 20px 20px 16px;
    background: #ffffff;
    border-bottom: 2px solid #e30613;
    margin-bottom: 8px;
}

.mobile-menu-layer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Accessibility - Focus States */
.mobile-menu-layer a:focus,
.mobile-menu-back:focus {
    outline: 2px solid #e30613;
    outline-offset: -2px;
    background: #fff9f9;
}

/* Loading State */
.mobile-menu-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Height Transitions */
.mobile-menu-container {
    transition: height 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Desktop - Hide Mobile Menu */
@media (min-width: 1025px) {
    .mobile-menu-container {
        display: none;
    }
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .mobile-menu-layer a {
        font-size: 18px;
        padding: 20px 24px;
        min-height: 64px;
    }
    
    .mobile-menu-back {
        padding: 20px 24px;
        font-size: 17px;
        min-height: 64px;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 374px) {
    .mobile-menu-layer a {
        font-size: 16px;
        padding: 16px 18px;
        min-height: 56px;
    }
    
    .mobile-menu-back {
        padding: 16px 18px;
        font-size: 15px;
        min-height: 56px;
    }
}

/* Animation for sliding in from right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation for sliding out to left */
@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-30%);
        opacity: 0;
    }
}

/* Optional: Add subtle shadow for depth */
.mobile-menu-layer.active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Empty State */
.mobile-menu-empty {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

@media (max-width: 767px) {
    .nav-mail {
        margin-left: 0 !important;
    }
    .nav-mail, .nav-phone {
        margin: 20px 48px !important;
        width: 60px !important;
        display: inline-block !important;
    }
    
}