.header {
    width: 100%;
    min-width: var(--min-container-width);
}

.header-container {
    position: relative;
    width: 100%;
    background-color: #003366;
    /* z-index: 200; */
    margin-top: 55px;
}

.fixed-header.smooth-hide {
    transform: translateY(-100%);
}

.fixed-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #003366;
    border-bottom: 5px solid #ff0000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 200;
    transition: transform 0.2s ease-in-out;
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: var(--max-container-width);
    height: 50px;
    margin: 0 auto;
    padding: 0 24px;
}

.top-header .logo {
    height: 50px;
    display: flex;
    align-items: center;
}

.top-header .logo img {
    width: 100px;
    height: auto;
    /* padding: 5px;
    border: 1px solid #fff; */
}

.top-header .menu-toggle {
    display: none;
    height: 40px;
    padding: 5px;
    font-size: 15px;
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    border-radius: 4px;
    transition: background-color 0.1s ease;
}

.top-header .menu-toggle:hover {
    background-color: #0056b3;
}

.top-header .menu-toggle img {
    pointer-events: none;
    width: 30px;
    height: 30px;
    filter: invert(1);
}

.top-header .topic-nav,
.top-header .category-nav {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.top-header .topic-nav a,
.top-header .category-nav a {
    /* height: 40px; */
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 10px;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.1s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.topic-nav a:hover,
.category-nav a:hover {
    background-color: #0056b3;
}

.topic-nav #moreBtn,
.category-nav #moreBtn {
    text-transform: lowercase;
    font-size: 16px;
    font-weight: 700;
}

.topic-nav #moreBtn:after,
.category-nav #moreBtn:after {
    content: '⋮';
    color: #edf6ff;
    position: relative;
    right: -6px;
}

.top-header .open-search {
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.1s ease;
}

.top-header .open-search:hover {
    background-color: #0056b3;
}

.open-search .icon {
    display: block;
    width: 30px;
    height: 30px;
    filter: invert(1);
}

.overlay-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.overlay-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.menu-header {
    width: 100%;
    max-width: 1000px;
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 20px;
    background-color: #003366;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 101;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.menu-header.open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.menu-header::-webkit-scrollbar {
    display: none;
}

.menu-header .search-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.menu-header .search-box input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-size: 18px;
    border: none;
    /* outline: none; */
    background: #f6f6f6;
    border-radius: 4px;
    border: 1px solid #ddd;
    color: #666;
}

.menu-header .search-icon {
    padding: 6px 10px;
    border: none;
    outline: none;
    cursor: pointer;
    background-color: #ff0000;
    border-radius: 4px;
    transition: background-color 0.1s ease;
}

.menu-header .search-icon:hover {
    background-color: #c20017;
}

.menu-header .search-icon img.icon {
    display: block;
    width: 28px;
    height: 28px;
    filter: invert(1);
}

.menu-header .all-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.menu-header .all-categories a {
    position: relative;
    width: 100%;
    height: 40px;
    color: #fff;
    font-size: 18px;
    font-weight: 1000;
    text-transform: uppercase;
    padding: 5px 10px;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.1s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.menu-header a:hover {
    background-color: #0056b3;
}

.menu-header .tag-item {
    display: inline-block;
    font-size: 15px;
    font-weight: 1000;
    text-transform: uppercase;
    padding: 6px 15px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
    border-radius: 20px;
    background: #fff;
    transition:
        background 0.1s ease,
        color 0.1s ease;
}

.menu-header .tag-item:nth-child(odd) {
    color: #0052bd;
}

.menu-header .tag-item:nth-child(odd):hover {
    color: #fff;
    background: #0052bd;
}

.menu-header .tag-item:nth-child(even) {
    color: #ff0000;
}

.menu-header .tag-item:nth-child(even):hover {
    color: #fff;
    background: #ff0000;
}

.absolute-header {
    width: 100%;
    padding: 2px 0;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.bot-header {
    position: relative;
    max-width: var(--max-container-width);
    height: 50px;
    margin: 0 auto;
    padding: 0px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.keyword-nav {
    flex: 1;
    overflow-x: auto;
    display: flex;
    gap: 40px;
}

.keyword-nav::-webkit-scrollbar {
    display: none;
}

.keyword-nav .tag-item {
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 4px 0px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition:
        background 0.1s ease,
        color 0.1s ease;
    white-space: nowrap;
}

.keyword-nav .tag-item::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    height: calc(100% - 0px);
    width: 1px;
    background-color: #ccc;
}

.icon-trending {
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 1000;
    white-space: nowrap;
    color: #c20017;
    padding-right: 10px;
    margin-right: 20px;
}

.icon-trending::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 12px;
    background-color: #c20017;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.keyword-nav .tag-item:last-child:after {
    display: none;
}

.keyword-nav a:nth-of-type(odd) {
    color: #0052bd;
}

.keyword-nav a:nth-of-type(odd):hover {
    text-decoration: underline;
}

.keyword-nav a:nth-of-type(even) {
    color: #ff0000;
}

.keyword-nav a:nth-of-type(even):hover {
    text-decoration: underline;
}

.bot-header .open-all {
    flex-shrink: 0;
    padding: 1px;
    border-radius: 4px;
    transition: background 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-header .open-all:hover {
    background: #0052bd;
}

.bot-header img.icon {
    display: block;
    width: 28px;
    height: 28px;
    transition: filter 0.1s ease;
}

.bot-header .open-all:hover img.icon {
    filter: invert(1);
}

@media (max-width: 1024px) {
    .top-header {
        padding: 0 15px;
    }

    .top-header .topic-nav,
    .top-header .category-nav {
        display: none;
    }

    .menu-header {
        padding: 20px 10px;
    }

    .top-header .menu-toggle {
        display: block;
    }

    .top-header .open-search {
        display: none;
    }

    .bot-header {
        padding-left: 0;
        padding: 5px 15px;
    }

    .keyword-nav {
        gap: 10px;
    }

    .keyword-nav .tag-item {
        padding: 6px 12px;
        font-weight: 1000;
        border-radius: 20px;
        background: #fff;
        border: 1px solid #ddd;
    }

    .keyword-nav .tag-item::after {
        display: none;
    }

    .keyword-nav a:nth-of-type(odd) {
        color: #0052bd;
    }

    .keyword-nav a:nth-of-type(odd):hover {
        color: #fff;
        background: #0052bd;
    }

    .keyword-nav a:nth-of-type(even) {
        color: #ff0000;
    }

    .keyword-nav a:nth-of-type(even):hover {
        color: #fff;
        background: #ff0000;
    }

    .icon-trending {
        margin-right: 10px;
    }

    .icon-trending::after {
        right: -8px;
    }
}
