/* ========================================
   RESPONSIVE BOTTOM HEADER SYSTEM
   Mobile-First Design with 5 Breakpoints
   ======================================== */

/* ========================================
   BASE STYLES (Mobile First - xs: <576px)
   ======================================== */

.bottom-header {
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    bottom: 0;
    z-index: 999;
    padding: 8px 0;
}

.bottom-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Navigation Arrows - Hidden on mobile */
.nav-arrow {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 102, 0, 0.1);
    border: 1px solid #ff6600;
    color: #ff6600;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.nav-arrow:hover {
    background-color: #ff6600;
    color: white;
    transform: scale(1.05);
}

/* Navigation Links Container */
.nav-links-container {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-links-container::-webkit-scrollbar {
    display: none;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    min-width: max-content;
    justify-content: flex-start;
}

.nav-item {
    flex-shrink: 0;
    position: relative;
    margin: 0 4px;
    overflow: visible;
}

.nav-item.trending {
    margin: 0 12px;
    padding-top: 8px;
    padding-right: 8px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #6c757d;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.nav-link i {
    display: none;
}

.nav-link span {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.nav-item.active .nav-link,
.nav-link:hover {
    color: #ff6600;
    background-color: rgba(255, 102, 0, 0.1);
    transform: translateY(-2px);
}

/* Icon hover effects removed since icons are hidden */

/* Trending Tags */
.trending-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(45deg, #ff6600, #ff8533);
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(255, 102, 0, 0.3);
    animation: pulse 2s infinite;
    z-index: 10;
    white-space: nowrap;
    min-width: fit-content;
    line-height: 1.1;
    max-width: none;
    overflow: visible;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Navigation Right Section */
.nav-right {
    width: 100%;
    margin-top: 8px;
}

.nav-toggle-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.nav-switch-wrapper {
    display: flex;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 3px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-switch-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    border-radius: 17px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.nav-switch-btn.active {
    background: #ff6600;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
    transform: translateY(-1px);
}

.nav-switch-btn:hover:not(.active) {
    background: rgba(255, 102, 0, 0.1);
    color: #ff6600;
}

/* ========================================
   SMALL DEVICES (sm: 576px - 768px)
   ======================================== */

@media (min-width: 576px) {
    .bottom-header {
        padding: 10px 0;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Key Requirement: nav-switch-wrapper below nav-link-container */
    .nav-links-container {
        order: 1;
        margin-bottom: 8px;
    }
    
    .nav-right {
        order: 2;
        margin-top: 0;
    }
    
    .nav-links {
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .nav-link i {
        display: none;
    }
    
    .nav-link span {
        font-size: 11px;
    }
    
    .nav-switch-wrapper {
        padding: 4px;
    }
    
    .nav-switch-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .trending-tag {
        font-size: 9px;
        padding: 2px 6px;
        top: 0;
        right: 0;
    }
}

/* ========================================
   MEDIUM DEVICES (md: 768px - 992px)
   ======================================== */

@media (min-width: 768px) {
    .bottom-header {
        padding: 12px 0;
        position: static;
        border-top: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    
    .nav-arrow {
        display: flex;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .nav-links-container {
        flex: 1;
        order: 0;
        margin-bottom: 0;
        overflow-x: hidden;
    }
    
    .nav-links {
        justify-content: center;
        gap: 15px;
        flex-wrap: nowrap;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .nav-link i {
        display: none;
    }
    
    .nav-link span {
        font-size: 12px;
    }
    
    .nav-right {
        order: 0;
        width: auto;
        margin-top: 0;
    }
    
    .nav-toggle-container {
        width: auto;
    }
    
    .nav-switch-wrapper {
        padding: 5px;
    }
    
    .nav-switch-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 90px;
    }
    
    .trending-tag {
        font-size: 10px;
        padding: 3px 7px;
        top: 0;
        right: 0;
    }
}

/* ========================================
   LARGE DEVICES (lg: 992px - 1200px)
   ======================================== */

@media (min-width: 992px) {
    .bottom-header {
        padding: 15px 0;
    }
    
    .main-nav {
        gap: 25px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-link {
        padding: 14px 18px;
        font-size: 14px;
        min-width: 90px;
    }
    
    .nav-link i {
        display: none;
    }
    
    .nav-link span {
        font-size: 13px;
    }
    
    .nav-switch-wrapper {
        padding: 6px;
    }
    
    .nav-switch-btn {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 100px;
    }
    
    .trending-tag {
        font-size: 11px;
        padding: 4px 8px;
        top: 0;
        right: 0;
    }
}

/* ========================================
   EXTRA LARGE DEVICES (xl: ≥1200px)
   ======================================== */

@media (min-width: 1200px) {
    .bottom-header {
        padding: 18px 0;
    }
    
    .main-nav {
        gap: 30px;
    }
    
    .nav-arrow {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .nav-links {
        gap: 25px;
    }
    
    .nav-link {
        padding: 16px 20px;
        font-size: 15px;
        min-width: 100px;
    }
    
    .nav-link i {
        display: none;
    }
    
    .nav-link span {
        font-size: 14px;
    }
    
    .nav-switch-wrapper {
        padding: 7px;
    }
    
    .nav-switch-btn {
        padding: 16px 32px;
        font-size: 16px;
        min-width: 110px;
    }
    
    .trending-tag {
        font-size: 12px;
        padding: 5px 9px;
        top: 0;
        right: 0;
    }
}

/* ========================================
   ACCESSIBILITY & INTERACTION STATES
   ======================================== */

.nav-link:focus,
.nav-switch-btn:focus,
.nav-arrow:focus {
    outline: 2px solid #ff6600;
    outline-offset: 2px;
}

.nav-link:focus:not(:focus-visible),
.nav-switch-btn:focus:not(:focus-visible),
.nav-arrow:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-switch-btn,
    .nav-arrow,
    .trending-tag {
        transition: none;
    }
    
    .trending-tag {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bottom-header {
        border-top: 2px solid;
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-item.active .nav-link,
    .nav-link:hover {
        border-color: currentColor;
    }
}

/* Print styles */
@media print {
    .bottom-header {
        display: none;
    }
}