/* USMF - Header Stabilization & Text Fix */

/* Fixed Header Structure */
.header-modern {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 70px !important;
    z-index: 99999 !important;
    background: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    display: flex !important;
    align-items: center !important;
}

.header-modern .container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.header-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 70px !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Logo Section - Fixed Width */
.logo-modern {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    min-width: 200px !important;
}

.logo-icon {
    width: 45px !important;
    height: 45px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    border-radius: 10px !important;
}

.logo-icon i {
    color: white !important;
    font-size: 1.3rem !important;
}

.logo-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.logo-info h1 {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.logo-info span {
    font-size: 0.75rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

/* Navigation - Center Aligned */
.nav-modern {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.nav-list {
    display: flex !important;
    list-style: none !important;
    gap: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
}

.nav-link {
    text-decoration: none !important;
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    display: block !important;
}

.nav-link:hover {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.1) !important;
}

/* Header Actions - Fixed Width */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
}

.header-phone {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.header-phone:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3) !important;
}

.header-phone i {
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
}

.header-phone span {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.1 !important;
}

.header-phone small {
    font-size: 0.65rem !important;
    opacity: 0.9 !important;
}

.header-phone strong {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
}

.header-whatsapp {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 14px !important;
    background: #25d366 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.header-whatsapp:hover {
    background: #128c7e !important;
    transform: translateY(-2px) !important;
}

.header-whatsapp i {
    font-size: 1.2rem !important;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none !important;
}

/* Tablet Adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-list {
        gap: 15px !important;
    }
    
    .nav-link {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
    }
    
    .header-phone small {
        display: none !important;
    }
}

/* Mobile Specific */
@media (max-width: 768px) {
    .header-modern {
        height: 60px !important;
    }
    
    .header-content {
        height: 60px !important;
        padding: 0 !important;
    }
    
    /* Simplified Logo for Mobile */
    .logo-modern {
        min-width: auto !important;
        gap: 8px !important;
    }
    
    .logo-icon {
        width: 38px !important;
        height: 38px !important;
    }
    
    .logo-icon i {
        font-size: 1.1rem !important;
    }
    
    .logo-info h1 {
        font-size: 1rem !important;
    }
    
    .logo-info span {
        display: none !important;
    }
    
    /* Hide Desktop Navigation */
    .nav-modern {
        display: none !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: white !important;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
        flex-direction: column !important;
        padding: 0 !important;
        z-index: 99998 !important;
        max-height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
    }
    
    .nav-modern.mobile-active {
        display: block !important;
    }
    
    .nav-list {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }
    
    .nav-list li {
        width: 100% !important;
    }
    
    .nav-link {
        display: block !important;
        width: 100% !important;
        padding: 15px 20px !important;
        border-radius: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        font-size: 0.95rem !important;
    }
    
    .nav-link:hover {
        background: #f8fafc !important;
    }
    
    /* Hide Header Actions on Mobile */
    .header-actions {
        display: none !important;
    }
    
    /* Show Mobile Toggle */
    .mobile-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 3px !important;
        padding: 8px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        margin-left: auto !important;
    }
    
    .mobile-toggle span {
        display: block !important;
        width: 22px !important;
        height: 2.5px !important;
        background: #334155 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px) !important;
    }
}

/* Extra Small Devices */
@media (max-width: 380px) {
    .logo-info h1 {
        font-size: 0.9rem !important;
    }
    
    .logo-icon {
        width: 35px !important;
        height: 35px !important;
    }
    
    .mobile-toggle {
        padding: 6px !important;
    }
    
    .mobile-toggle span {
        width: 20px !important;
    }
}

/* Prevent Text Selection on Navigation */
.nav-link {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Smooth Scrolling Offset */
html {
    scroll-padding-top: 80px !important;
}

/* Fix Body Padding for Fixed Header */
body {
    padding-top: 70px !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px !important;
    }
}

/* Ensure Hero Section Doesn't Overlap */
.hero-modern {
    margin-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Fix Header on Scroll */
.header-modern.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
}