/*============================
Mobile Navigation Styles
============================*/

/* Mobile Header Bar */
.mobile_header_bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    z-index: 1600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
}

.mobile_profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile_profile_img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile_name {
    font-size: 18px;
    font-weight: 600;
    color: #222222;
}

/* Hamburger Menu Button */
.mobile_menu_toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger_line {
    width: 25px;
    height: 3px;
    background: #222222;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animated hamburger to X */
.mobile_menu_toggle.active .hamburger_line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile_menu_toggle.active .hamburger_line:nth-child(2) {
    opacity: 0;
}

.mobile_menu_toggle.active .hamburger_line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile_menu_overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

.mobile_menu_overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile_menu_content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    height: 100vh;
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 20px 40px;
    overflow: visible;
}

/* Mobile Navigation List */
.mobile_nav_list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    width: 100%;
    max-width: 400px;
}

.mobile_nav_item {
    margin-bottom: 20px;
    width: 100%;
}

.mobile_nav_link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 30px;
    color: #222222;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    min-height: 70px;
}

.mobile_nav_link:hover,
.mobile_nav_link:focus {
    background: rgba(255, 81, 126, 0.9);
    color: white;
    border-color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 81, 126, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.mobile_nav_link i,
.mobile_nav_link svg {
    color: #ff517e;
    font-size: 28px;
    min-width: 28px;
}

.mobile_nav_link:hover i,
.mobile_nav_link:hover svg,
.mobile_nav_link:focus i,
.mobile_nav_link:focus svg {
    color: white;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* QR Code specific styling */
.mobile_nav_link.qr_link {
    background: linear-gradient(135deg, rgba(255, 81, 126, 0.9), rgba(255, 196, 84, 0.9));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white;
    margin-bottom: 30px;
    border-color: rgba(255, 255, 255, 0.6);
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 4px 25px rgba(255, 81, 126, 0.3);
}

.mobile_nav_link.qr_link:hover {
    background: linear-gradient(135deg, rgba(224, 69, 103, 0.95), rgba(230, 176, 73, 0.95));
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 81, 126, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile_qr_icon {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

/* Desktop only elements */
.desktop_only {
    display: block;
}

.desktop_sidebar {
    display: block;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
    /* Show mobile header */
    .mobile_header_bar {
        display: flex;
    }
    
    /* Show mobile menu overlay */
    .mobile_menu_overlay {
        display: block;
    }
    
    /* Hide desktop elements */
    .desktop_only {
        display: none;
    }
    
    .desktop_sidebar {
        display: none;
    }
    
    /* Adjust main content for mobile header */
    .port_sec_warapper {
        padding-top: 70px;
        margin-left: 0;
    }
    
    /* Ensure content doesn't go under fixed header */
    .port_bannerbg_wrapper,
    .port_about_setions,
    .port_education_setions,
    .port_experience_setions,
    .port_projects_setions {
        margin-top: 0;
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .mobile_header_bar {
        padding: 0 15px;
        height: 65px;
    }
    
    .mobile_profile_img {
        width: 35px;
        height: 35px;
    }
    
    .mobile_name {
        font-size: 16px;
    }
    
    .mobile_menu_content {
        padding: 50px 15px 30px;
    }
    
    .mobile_nav_list {
        max-width: 350px;
    }
    
    .mobile_nav_link {
        padding: 18px 25px;
        font-size: 22px;
        min-height: 65px;
        gap: 18px;
    }
    
    .mobile_nav_link.qr_link {
        font-size: 24px;
    }
    
    .mobile_nav_link i,
    .mobile_nav_link svg {
        font-size: 26px;
        min-width: 26px;
    }
    
    .mobile_qr_icon {
        width: 28px;
        height: 28px;
    }
    
    .port_sec_warapper {
        padding-top: 65px;
    }
}

/* Ensure mobile menu works with existing scroll behavior */
@media (max-width: 768px) {
    .mobile_nav_link.scroll-to-section {
        position: relative;
    }
    
    /* Close mobile menu when clicking nav links */
    .mobile_nav_link.scroll-to-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        cursor: pointer;
    }
}

/* Accessibility improvements */
.mobile_menu_toggle:focus {
    outline: 2px solid #ff517e;
    outline-offset: 2px;
}

.mobile_nav_link:focus {
    outline: 2px solid #ff517e;
    outline-offset: -2px;
}

/* Animation for menu items */
@media (max-width: 768px) {
    .mobile_nav_item {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInNav 0.3s ease forwards;
    }
    
    .mobile_nav_item:nth-child(1) { animation-delay: 0.1s; }
    .mobile_nav_item:nth-child(2) { animation-delay: 0.2s; }
    .mobile_nav_item:nth-child(3) { animation-delay: 0.3s; }
    .mobile_nav_item:nth-child(4) { animation-delay: 0.4s; }
    .mobile_nav_item:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes slideInNav {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}