/* Modern Mobile Menu Styles */

/* Mobile Menu Button - Clean Design */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Hamburger Icon */
.mobile-menu-btn .hamburger {
    position: relative;
    width: 24px;
    height: 20px;
    margin: 0 auto;
}

.mobile-menu-btn .hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn .hamburger span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn .hamburger span:nth-child(2) {
    top: 9px;
}

.mobile-menu-btn .hamburger span:nth-child(3) {
    bottom: 0;
}

/* Active state - X icon */
.mobile-menu-btn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}

/* Mobile Menu Container - Full Width on Phone */
.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-menu-container.active {
    right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #0857bb 0%, #064a9e 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-menu-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Close Button */
.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Search Bar in Mobile Menu */
.mobile-menu-search {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.mobile-search-input:focus {
    border-color: #0857bb;
    box-shadow: 0 0 0 3px rgba(8,87,187,0.1);
}

/* Mobile Menu Content */
.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

/* Mobile Navigation List */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    padding-left: 25px;
}

.mobile-nav-link.active {
    color: #0857bb;
    background: #f0f7ff;
}

/* Dropdown Arrow */
.mobile-nav-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-nav-item.expanded .mobile-nav-arrow {
    transform: rotate(180deg);
}

/* Submenu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    transition: max-height 0.4s ease;
}

.mobile-nav-item.expanded .mobile-submenu {
    max-height: 1000px;
}

.mobile-submenu-item {
    border-bottom: 1px solid #e8e8e8;
}

.mobile-submenu-item:last-child {
    border-bottom: none;
}

.mobile-submenu-link {
    display: block;
    padding: 15px 20px 15px 40px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.mobile-submenu-link:hover {
    background: #fff;
    color: #0857bb;
    padding-left: 45px;
}

/* Third Level Menu */
.mobile-submenu-level3 {
    background: #fff;
}

.mobile-submenu-level3 .mobile-submenu-link {
    padding-left: 60px;
    font-size: 14px;
    color: #666;
}

.mobile-submenu-level3 .mobile-submenu-link:hover {
    padding-left: 65px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Quick Links in Footer */
.mobile-quick-links {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.mobile-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555;
    font-size: 12px;
    transition: all 0.3s ease;
}

.mobile-quick-link i {
    font-size: 20px;
    margin-bottom: 5px;
    color: #0857bb;
}

.mobile-quick-link:hover {
    color: #0857bb;
    transform: translateY(-2px);
}

/* Contact Info in Footer */
.mobile-contact-info {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.mobile-contact-info a {
    color: #0857bb;
    text-decoration: none;
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .mobile-menu-container {
        width: 400px;
        right: -400px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    }
    
    .mobile-menu-btn {
        top: 20px;
        right: 20px;
    }
}

/* Phone Only Styles */
@media (max-width: 767px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure full width on phones */
    .mobile-menu-container {
        width: 100% !important;
        right: -100% !important;
    }
    
    .mobile-menu-container.active {
        right: 0 !important;
    }
    
    /* Larger touch targets on phones */
    .mobile-nav-link {
        padding: 20px;
        font-size: 17px;
    }
    
    .mobile-submenu-link {
        padding: 18px 20px 18px 45px;
        font-size: 16px;
    }
}

/* Desktop - Hide Mobile Menu */
@media (min-width: 992px) {
    .mobile-menu-btn,
    .mobile-menu-container,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Menu Item Animations */
.mobile-menu-container.active .mobile-nav-item {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.mobile-menu-container.active .mobile-nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu-container.active .mobile-nav-item:nth-child(2) {
    animation-delay: 0.15s;
}

.mobile-menu-container.active .mobile-nav-item:nth-child(3) {
    animation-delay: 0.2s;
}

.mobile-menu-container.active .mobile-nav-item:nth-child(4) {
    animation-delay: 0.25s;
}

.mobile-menu-container.active .mobile-nav-item:nth-child(5) {
    animation-delay: 0.3s;
}

/* Smooth Scrolling */
.mobile-menu-content {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f8f9fa;
}

.mobile-menu-content::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.mobile-menu-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}