/* Enhanced Mobile Navigation Styles for সংকেত */

/* Mobile Navigation Container */
#mobile-menu {
    position: fixed;
    top: 64px; /* Height of nav bar */
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 40;
    /* Remove problematic transforms that cause hiding */
    transform: none !important;
    opacity: 1 !important;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Ensure main navigation stays visible */
#main-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease !important;
}

/* Navigation scroll effects - only for styling, not hiding */
.nav-scrolled {
    background-color: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin: 4px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.mobile-nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    transform: translateX(8px);
}

.mobile-nav-link:active {
    transform: scale(0.98) translateX(8px);
}

/* Active Mobile Navigation State */
.mobile-nav-active {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    font-weight: 600;
    border-left: 3px solid #3b82f6;
}

.mobile-nav-active i {
    color: #60a5fa !important;
}

/* Mobile Download Button */
.mobile-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 16px 20px;
    background: #3b82f6;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

.mobile-download-btn:hover {
    background: #2563eb;
    transform: scale(1.02);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.6);
}

.mobile-download-btn:active {
    transform: scale(0.98);
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-btn.emergency {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
}

.quick-action-btn.emergency:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.6);
}

.quick-action-btn.safety {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

.quick-action-btn.safety:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.6);
}

/* Enhanced Mobile Menu Button */
.mobile-menu-btn {
    position: relative;
    padding: 10px;
    border-radius: 12px;
    background-color: #374151;
    color: #d1d5db;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    background-color: #4b5563;
    color: #60a5fa;
}

/* Hamburger Icon Lines */
#hamburger-line-1,
#hamburger-line-2,
#hamburger-line-3 {
    width: 20px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

#hamburger-line-2 {
    margin-top: 4px;
}

#hamburger-line-3 {
    margin-top: 4px;
}

/* Mobile Menu Open State */
.mobile-menu-open #hamburger-line-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-open #hamburger-line-2 {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-open #hamburger-line-3 {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Backdrop */
#mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 30;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 640px) {
    #mobile-menu {
        top: 60px;
    }
    
    .mobile-nav-link {
        padding: 14px 16px;
        margin: 3px 12px;
        font-size: 15px;
    }
    
    .mobile-download-btn {
        margin: 12px;
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .quick-action-btn {
        padding: 12px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #mobile-menu {
        top: 56px;
    }
    
    .mobile-nav-link {
        padding: 12px 14px;
        margin: 2px 8px;
        font-size: 14px;
    }
    
    .mobile-download-btn {
        margin: 8px;
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .quick-actions-grid {
        gap: 8px;
        padding: 0 8px;
    }
    
    .quick-action-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .mobile-nav-link:hover {
        transform: none;
    }
    
    .mobile-download-btn:hover {
        transform: none;
    }
    
    .quick-action-btn:hover {
        transform: none;
    }
    
    /* Active states for touch devices */
    .mobile-nav-link:active {
        background-color: rgba(59, 130, 246, 0.1);
        color: #60a5fa;
        transform: scale(0.98);
    }
    
    .mobile-download-btn:active {
        transform: scale(0.98);
    }
    
    .quick-action-btn:active {
        transform: scale(0.98);
    }
}

/* Landscape Mobile Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    #mobile-menu {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .mobile-nav-link {
        padding: 10px 16px;
        margin: 2px 16px;
    }
    
    .mobile-download-btn {
        margin: 8px 16px;
        padding: 12px 20px;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mobile-nav-link {
        border: 1px solid #000;
    }
    
    .mobile-download-btn {
        border: 2px solid #000;
    }
    
    .quick-action-btn {
        border: 1px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #mobile-menu,
    .mobile-nav-link,
    .mobile-download-btn,
    .quick-action-btn,
    #hamburger-line-1,
    #hamburger-line-2,
    #hamburger-line-3 {
        transition: none;
        animation: none;
    }
    
    .mobile-nav-link:hover {
        transform: none;
    }
    
    .mobile-download-btn:hover {
        transform: none;
    }
    
    .quick-action-btn:hover {
        transform: none;
    }
}

/* Focus States for Accessibility */
.mobile-nav-link:focus,
.mobile-download-btn:focus,
.quick-action-btn:focus,
.mobile-menu-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading States */
.mobile-nav-link.loading,
.mobile-download-btn.loading {
    position: relative;
    color: transparent;
}

.mobile-nav-link.loading::after,
.mobile-download-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #4b5563;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    #mobile-menu,
    .mobile-menu-btn {
        display: none !important;
    }
}
