.main-header {
    width: 100%;
    color: #737373;
    padding-top: 10px;
}

.main-header .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.right-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-header .social-icon {
    display: inline-flex;
    gap: 10px;
}

.main-header .social-icon img {
    width: 15px;
    height: 15px;
}

.unicode-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e11b22;
    text-decoration: none;
    padding: 5px 15px;

    background-color: #ffcdcf;
}

.main-header button {
    background: #d72638;
    border: none;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 2px;
}

.header-middle {
    width: 100%;
    background: white;
    padding: 5px 0 18px 0;
}

.header-middle .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-middle .logo {
    height: 60px;
}

.header-middle .banner {
    height: 60px;
    object-fit: contain;
}

.navbar {
    width: 100%;
    background: var(--primary-color);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.navbar .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-links li a:hover {
    opacity: 0.6;
}

.home-icon {
    width: 22px;
    margin-right: 10px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-right img {
    width: 24px;
    cursor: pointer;
}

.dropdown {
    position: relative;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    color: #333 !important;
    padding: 10px 20px;
    display: block;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--primary-color) !important;
    border-left: 3px solid var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transition: 0.3s;
}

.hamburger span:nth-child(1) {
    top: 0;
}
.hamburger span:nth-child(2) {
    top: 8px;
}
.hamburger span:nth-child(3) {
    top: 16px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    cursor: pointer;
    transition: transform 0.2s;
}

.search-box {
    position: absolute;
    right: 0;
    display: none;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    width: 250px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.inner-search-icon {
    width: 16px !important;
    height: 16px;
    margin-right: 8px;
    opacity: 0.5;
    pointer-events: none;
}

.search-box.active {
    display: flex;
    animation: fadeInRight 0.3s ease;
}

#search-input {
    border: none;
    padding: 8px 5px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    color: #333;
    background: transparent;
}

.close-search {
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    padding-left: 8px;
    line-height: 1;
}

.close-search:hover {
    color: var(--primary-color);
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 992px) {
    .search-box {
        width: 180px;
    }
}

@media (max-width: 992px) {
    .header-middle .logo {
        width: 250px;
    }
    .main-header {
        display: none;
    }

    .header-middle {
        position: sticky;
        top: 0;
        z-index: 10000;
        background: white;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .header-middle .inner {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .header-middle .banner {
        display: none;
    }

    .hamburger {
        display: block;
        position: relative;
        right: 0;
        top: 0;
    }

    .nav-right {
        display: none;
    }

    .navbar {
        position: static;
        background: white;
        padding: 0;
    }

    .nav-links {
        flex-direction: column;
        position: fixed;
        top: 80px;
        right: 0;
        background: var(--primary-color);
        width: 100%;
        height: 0;
        opacity: 0;
        overflow: hidden;
        gap: 0;
        padding-top: 0;
        transition:
            height 0.4s ease,
            opacity 0.3s ease;
        z-index: 9999;
        align-items: center;
        justify-content: flex-start;
    }

    .nav-links.show {
        height: 80%;
        opacity: 1;
        padding-top: 20px;
        padding-bottom: 100px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    .dropdown.active .dropdown-menu {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .search-box {
        width: 180px;
    }

    .nav-links li {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .nav-links li a {
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 15px 20px;
        width: 100%;
        max-width: 100%;
        flex-shrink: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .home-icon {
        margin-right: 10px;
    }

    .dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        flex-shrink: 0;
    }

    .dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: center;
        padding: 15px 20px;
        width: 100%;
        max-width: 100%;
        flex-shrink: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu {
        position: static;
        background: rgba(0, 0, 0, 0.15);
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
    }

    .dropdown-menu li {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-shrink: 0;
    }

    .dropdown-menu a {
        color: white !important;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        max-width: 100%;
        flex-shrink: 0;
        font-size: 1rem;
        background: rgba(0, 0, 0, 0.05);
    }
}
