/* Common Component Styles */

/* Responsive visibility classes */
.desktop-header,
.desktop-footer {
    display: block !important;
}

.mobile-header,
.mobile-footer {
    display: none !important;
}

@media (max-width: 900px) {
    .desktop-header,
    .desktop-footer {
        display: none !important;
    }

    .mobile-header,
    .mobile-footer {
        display: block !important;
    }
}

/* Reset styles */
a {
    color: inherit;
    text-decoration: none;
}

html,
body {
    margin: 0;
}

/* Utility classes */
[x-cloak] {
    display: none !important;
}

.cursor {
    cursor: pointer;
}

.font-cn {
    font-family: "PingFang SC", "Microsoft YaHei", "思源黑体", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

/* Header Styles */
.hover-effect {
    transition: background-color 0.3s;
}

.hover-effect:hover {
    background-color: transparent;
    border-bottom: 2px solid #AD0024;
    color: #AD0024;
}

.menu-items-right {
    margin-right: 20px;
}

.menu-items-right:last-child {
    margin-right: 0px;
}

.header-scrolled,
.header-scrolled2 {
    background: #ffffff;
    color: #000;
}

.menu-items:hover {
    color: #AD0024;
}

.submenu-item {
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.submenu-item:hover {
    color: #AD0024;
    border-bottom-color: #AD0024;
}

.header-layout {
    display: grid;
    grid-template-columns: 2fr 3fr;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100px;
    z-index: 9999;
}

/* Submenu styles */
.submenu-wrapper {
    display: none;
}

.menu-items-right:hover .submenu-wrapper {
    display: block;
}

.submenu-enter .submenu-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.submenu-enter .submenu-leave-end {
    opacity: 0;
    transform: translateY(-6px);
}

.icon-fade-enter {
    transition: opacity .2s ease;
}

.icon-fade-enter-start {
    opacity: 0;
}

.icon-fade-enter-end {
    opacity: 1;
}

.icon-fade-leave {
    transition: opacity .2s ease;
}

.icon-fade-leave-start {
    opacity: 1;
}

.icon-fade-leave-end {
    opacity: 0;
}

/* Mobile Header Styles */
.mobile-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 60px;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid #f5f5f5;
    box-sizing: border-box;
}

.mobile-menu-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    bottom: 0;
    background-color: #ffffff;
    z-index: 9998;
    overflow-y: auto;
    display: none;
}

.header-icon-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    font-size: 24px !important;
    color: #333333;
    cursor: pointer;
    font-style: normal;
}

.header-icon-close {
    font-size: 24px !important;
}

.menu-item {
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}

.menu-link-text {
    font-size: 16px;
    color: #333;
}

.submenu {
    background-color: #F3F5F9;
    border-radius: 4px;
    margin-top: 8px;
    display: none;
}

.submenu-item {
    padding: 12px;
    padding-left: 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.menu-item,
.submenu-item {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.mobile-header-bar *,
.mobile-menu-overlay * {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

.menu-item,
.submenu-item,
.header-icon,
.menu-link-text,
#btn-language-switch,
#btn-back-to-menu,
.mobile-header-bar img {
    -webkit-user-select: none;
    user-select: none;
}

/* Footer Styles */
.footer-wrapper {
    position: relative;
}

.footer-wrapper.overflow-hidden {
    overflow: hidden;
}

.footer-image {
    position: relative;
    background: url('static/footer_image1.png') no-repeat;
}

[x-cloak] {
    display: none !important;
}

.footer-item:hover {
    color: #AD0024;
}

/* Mobile Footer Styles */
.mobile-footer-wrapper {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    background-color: #333;
    height: 140px;
    z-index: 999;
}

.mobile-footer-bg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mobile-footer-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.mobile-footer-text {
    font-size: 12px;
    color: white;
    text-align: center;
    line-height: 1.5;
}

.mobile-footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.mobile-footer-link {
    color: white;
    text-decoration: none;
}

.mobile-footer-link:hover {
    text-decoration: underline;
}

.mt-6px {
    margin-top: 6px;
}

.mt-12px {
    margin-top: 12px;
}

.pl-12px {
    padding-left: 12px;
}
