/**
 * FORDIPS TECH - Modern World-Class Header
 * Responsive, clean, professional design inspired by top e-commerce sites
 */

/* ============================================
   CONTAINER UTILITIES
   ============================================ */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TOP ANNOUNCEMENT BAR
   ============================================ */
.top-bar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.announcement {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-link {
    background: none;
    border: none;
    color: white;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-weight: 500;
}

.top-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-select-minimal {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    letter-spacing: 0.3px;
}

.lang-select-minimal:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: none;
}

.lang-select-minimal:focus {
    outline: none;
    box-shadow: none;
}

/* Make flags visible on white backgrounds in dropdown */
.lang-select-minimal option {
    background: #1e293b;
    color: white;
    font-size: 14px;
    padding: 8px 12px;
    font-weight: 600;
}

/* ============================================
   MAIN HEADER
   ============================================ */
.modern-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.modern-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.modern-header.scrolled .main-header {
    padding: 12px 0;
}

.main-header {
    padding: 16px 0;
    background: white;
    transition: padding 0.3s ease;
}

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: center;
}

/* ============================================
   LOGO SECTION
   ============================================ */
.header-logo {
    display: flex;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand-logo:hover {
    opacity: 0.85;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    animation: clockRotate 8s linear infinite;
    transform-origin: center center;
    border-radius: 50%;
    border: 3px solid #2ca9a1;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 8px;
    box-shadow: 0 4px 12px rgba(44, 169, 161, 0.3), 0 0 0 1px rgba(44, 169, 161, 0.1);
}

/* Smooth 360° rotation like a clock */
@keyframes clockRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Pause rotation on hover */
.brand-logo:hover .logo-img {
    animation-play-state: paused;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ============================================
   SEARCH BAR SECTION
   ============================================ */
.header-search {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 4px 4px 4px 16px;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: #2ca9a1;
    background: white;
    box-shadow: 0 0 0 4px rgba(44, 169, 161, 0.1);
}

.search-icon {
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.search-container:focus-within .search-icon {
    color: #2ca9a1;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 15px;
    color: #0f172a;
    outline: none;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    background: linear-gradient(135deg, #2ca9a1 0%, #239890 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 169, 161, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

/* ============================================
   ACTION BUTTONS SECTION
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-evenly;
}

.header-icon-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    color: #1e293b;
    min-width: 70px;
}

.header-icon-btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #2ca9a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 169, 161, 0.15);
}

.header-icon-btn svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon-btn:hover svg {
    transform: scale(1.15) rotate(5deg);
}

.icon-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-badge {
    position: absolute;
    top: 4px;
    right: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    border: 2px solid white;
    animation: badgePulse 2s ease-in-out infinite;
}

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

.mobile-menu-btn-new {
    display: none !important;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.desktop-nav {
    background: white;
    border-top: 1px solid #f1f5f9;
    padding: 0;
}

.nav-links-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link-item {
    display: block;
    padding: 14px 20px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #2ca9a1 0%, #239890 100%);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link-item:hover {
    color: #2ca9a1;
}

.nav-link-item:hover::after {
    width: 80%;
}

/* ============================================
   MOBILE NAVIGATION DRAWER
   ============================================ */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-nav-drawer.active {
    right: 0;
}

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

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

.mobile-nav-link:hover {
    background: #f8fafc;
    color: #2ca9a1;
    padding-left: 32px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .header-grid {
        gap: 20px;
    }

    .search-container {
        max-width: 100%;
    }

    .brand-name {
        font-size: 18px;
    }
}

/* Mobile */
/* Hide Track Order on mobile (it's in hamburger menu on mobile) */
@media (max-width: 768px) {
    .desktop-only-track-order {
        display: none !important;
    }
    .top-bar {
        font-size: 12px;
        padding: 6px 0;
    }

    .announcement {
        font-size: 11px;
    }

    .top-bar-links {
        gap: 12px;
    }

    .top-link {
        font-size: 11px;
        padding: 3px 8px;
    }

    .header-grid {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .logo-img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 2px solid #2ca9a1;
        padding: 6px;
    }

    .brand-name {
        font-size: 16px;
    }

    .header-actions {
        gap: 4px;
    }

    .header-icon-btn {
        padding: 8px;
    }

    .icon-label {
        display: none;
    }

    .header-icon-btn svg {
        width: 22px;
        height: 22px;
    }

    .mobile-menu-btn-new {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 10px;
        background: transparent;
        border: none;
        cursor: pointer;
        color: #1e293b;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn-new:hover {
        background: #f1f5f9;
    }

    .desktop-nav {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container-fluid {
        padding: 0 12px;
    }

    .announcement {
        font-size: 10px;
    }

    .top-bar-links {
        gap: 8px;
    }

    .lang-select-minimal {
        font-size: 12px;
        padding: 5px 10px;
        font-weight: 600;
    }

    .lang-select-minimal option {
        font-size: 12px;
        padding: 6px 10px;
    }

    .header-grid {
        gap: 8px;
    }

    .logo-img {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        border: 2px solid #2ca9a1;
        padding: 5px;
    }

    .brand-name {
        display: none;
    }

    .header-actions {
        gap: 2px;
    }

    .header-icon-btn {
        padding: 6px;
    }

    .header-badge {
        font-size: 10px;
        padding: 1px 5px;
        min-width: 16px;
        height: 16px;
    }
}

/* Desktop Only */
@media (min-width: 769px) {
    .mobile-drawer-overlay {
        display: none !important;
    }

    .mobile-nav-drawer {
        display: none !important;
    }
}

/* ============================================
   STICKY HEADER ANIMATIONS
   ============================================ */
.modern-header.sticky {
    animation: slideDown 0.3s ease;
}

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

/* ============================================
   ACCESSIBILITY
   ============================================ */
.header-icon-btn:focus,
.search-btn:focus,
.nav-link-item:focus,
.top-link:focus {
    outline: 2px solid #2ca9a1;
    outline-offset: 2px;
}

.search-input:focus {
    outline: none;
}
