/* Mobile Navigation CSS */

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
    max-width: 100%;
}

/* Mobile Logo */
.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.mobile-logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

/* Mobile Actions Container */
.mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Language Switcher */
.mobile-lang-switcher {
    display: flex;
    gap: 4px;
}

.mobile-lang-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #64748b;
    background: transparent;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-lang-btn.active,
.mobile-lang-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Login Button */
.mobile-login-btn {
    padding: 6px 10px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-login-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.mobile-login-btn i {
    font-size: 10px;
}

/* Hamburger Menu */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-btn span {
    width: 18px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

/* Menu Navigation */
.mobile-menu-nav {
    padding: 20px 0;
}

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

.mobile-menu-nav li {
    margin: 0;
}

.mobile-menu-nav a {
    display: block;
    padding: 15px 20px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
    background: #f8fafc;
    color: #2563eb;
    padding-left: 25px;
}

/* Menu Footer */
.mobile-menu-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    background: white;
}

.mobile-menu-footer h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.mobile-contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-contact-link:hover {
    color: #1d4ed8;
}

.mobile-contact-link i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Responsive Rules */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .navbar {
        display: none !important;
    }
    
    /* Show mobile navigation */
    .mobile-nav {
        display: block;
    }
    
    /* Adjust hero section padding */
    .hero {
        padding-top: 80px;
    }
    
    /* Responsive adjustments */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-countries {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .services-grid,
    .advantages-grid,
    .customs-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 375px) {
    .mobile-nav-container {
        padding: 0 10px;
    }
    
    .mobile-actions {
        gap: 6px;
    }
    
    .mobile-lang-btn {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .mobile-login-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .mobile-logo {
        font-size: 16px;
    }
    
    .mobile-logo-icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
}

/* CRITICAL: Prevent horizontal overflow on all pages */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Universal fix for overflow elements */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Specific elements that cause overflow */
    .customs-card,
    .contact-form,
    .about-image,
    .step-item,
    .step-content,
    .image-decoration,
    .decoration-shape,
    .shape {
        max-width: calc(100vw - 30px) !important;
        overflow: hidden !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Hide decorative elements */
    .image-decoration,
    .decoration-shape,
    .shape {
        display: none !important;
    }
    
    /* Fix form elements */
    .form-group input,
    .form-group textarea {
        width: 100% !important;
        max-width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
    }
    
    .contact-form form {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}

/* Mobile User Menu - same as desktop but adapted */
.mobile-user-menu {
    position: relative;
}

.mobile-user-menu .user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mobile-user-menu .user-menu-toggle:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.mobile-user-menu .user-menu-toggle i:first-child {
    font-size: 12px;
}

.mobile-user-menu .user-menu-toggle i:last-child {
    font-size: 8px;
    transition: transform 0.3s;
}

.mobile-user-menu.active .user-menu-toggle i:last-child {
    transform: rotate(180deg);
}

.mobile-user-menu .user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.mobile-user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-user-menu .user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.mobile-user-menu .user-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.mobile-user-menu .user-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.mobile-user-menu .user-dropdown-item:hover {
    background: #f8fafc;
}

.mobile-user-menu .user-dropdown-item i {
    font-size: 12px;
    width: 16px;
    text-align: center;
    color: #64748b;
}

.mobile-user-menu .dropdown-divider {
    margin: 4px 0;
    border-bottom: 1px solid #e0e0e0;
}

@media (max-width: 375px) {
    .mobile-user-menu .user-menu-toggle {
        padding: 5px 8px;
        font-size: 10px;
        gap: 4px;
    }
    
    .mobile-user-menu .user-menu-toggle i:first-child {
        font-size: 10px;
    }
    
    .mobile-user-menu .user-dropdown {
        min-width: 160px;
    }
    
    .mobile-user-menu .user-dropdown-item {
        padding: 8px 12px;
        font-size: 12px;
    }
}