/* Shengwang Header Component Styles */
@font-face {
    font-family: 'Dancing Script';
    src: url('./fonts/DancingScript-Regular-2.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
/* CSS Variables - Title sizes only */
:root {
    --shengwang-title: 46px; /* Homepage title size */
    --shengwang-inner-title: 46px; /* Inner page title size */
}

/* Responsive title size scaling */
@media (max-width: 1600px) {
    :root {
        --shengwang-title: 42px;
        --shengwang-inner-title: 42px;
    }
}

@media (max-width: 1400px) {
    :root {
        --shengwang-title: 38px;
        --shengwang-inner-title: 38px;
    }
}

@media (max-width: 1200px) {
    :root {
        --shengwang-title: 34px;
        --shengwang-inner-title: 34px;
    }
}

@media (max-width: 992px) {
    :root {
        --shengwang-title: 30px;
        --shengwang-inner-title: 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --shengwang-title: 26px;
        --shengwang-inner-title: 26px;
    }
}
.shengwang-btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    border: 1px solid var(--color-primary);
    transition: all 0.3s ease;
}
.shengwang-btn-primary:hover{
    background: transparent !important;
    border: 1px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}
.shengwang-btn-secondary {
    background: #ffffff;
    color: #000;
    border: 1px solid #E0E0E0;
    transition: all 0.3s ease;
}
.shengwang-btn-secondary:hover{
    background: transparent !important;
    border: 1px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}
/* Main Header Container */
.shengwang-head {
    position: fixed;
    top: 0 !important;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: #ffffff;
    /* box-shadow: 0 4px 25px 0 rgba(0, 67, 111, 0.14); */
    z-index: 1000;
    padding: 40px 48px;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.shengwang-head .left-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.shengwang-head-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    height: 100%;
    min-height: 35px;
}

/* Menu Toggle Button (Left Hamburger Menu) */
.shengwang-head-menu-toggle {
    aspect-ratio: 1/1;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #000000;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.shengwang-head-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

.shengwang-head-menu-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
    justify-content: center;
}

.shengwang-head-menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Quick Navigation Links */
.shengwang-head-quick-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.shengwang-head-quick-link {
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #000000;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.shengwang-head-quick-link.active {
    position: relative;
}
.shengwang-head-quick-link.active::before {
    position: absolute;
    content: '';
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    width: 6px;
    height: 6px;
    aspect-ratio: 1/1;
    border-radius: 50%;
}
.shengwang-head-quick-link:hover {
    font-weight: 600;
    color: #000000;
}

/* Logo */
.shengwang-head-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 120/71;
    max-width: 120px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.shengwang-head-logo a {
    display: block;
    height: 100%;
}

.shengwang-head-logo img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    aspect-ratio: auto;
}

/* Right Actions */
.shengwang-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
    flex-shrink: 0;
}

/* Language Button */
.shengwang-head-lang-btn,
.shengwang-head-about-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shengwang-head-lang-btn img,
.shengwang-head-about-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.shengwang-head-lang-btn:hover,
.shengwang-head-about-link:hover {
    opacity: 0.7;
}

/* Search Button */
.shengwang-head-search {
    flex-shrink: 0;
}

.shengwang-head-search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 40px;
    padding: 4px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shengwang-head-search-trigger:hover {
    opacity: 1;
    border-color: #000000;
}

.shengwang-head-search-trigger img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.shengwang-head-search-trigger span {
    font-family: var(--font-family);
    font-size: 17.71875px;
    font-weight: 400;
    line-height: 1.219;
    color: #000000;
}

/* Search Modal */
.shengwang-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.shengwang-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.shengwang-search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.shengwang-search-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    padding: 32px;
    z-index: 1;
}

.shengwang-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.shengwang-search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 24px;
    padding: 16px 64px 16px 0;
    outline: none;
    transition: all 0.3s ease;
}

.shengwang-search-input:focus {
    border-bottom-color: var(--color-primary);
}

.shengwang-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.shengwang-search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.shengwang-search-submit:hover {
    color: var(--color-primary);
}

.shengwang-search-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.shengwang-search-close:hover {
    opacity: 0.7;
}

.shengwang-search-close img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Language Selection Modal */
.shengwang-lang-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.shengwang-lang-modal.active {
    display: flex;
}

.shengwang-lang-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.shengwang-lang-modal-content {
    position: relative;
    background: #ffffff;
    border: 1px solid #c7cad0;
    border-radius: 8px;
    width: 700px;
    height: 800px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.shengwang-lang-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Modal Header */
.shengwang-lang-modal-header {
    padding: 24px;
    border-bottom: 1px solid #c7cad0;
}

.shengwang-lang-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.shengwang-lang-modal-close:hover {
    opacity: 0.7;
}

.shengwang-lang-modal-close img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.shengwang-lang-modal-title {
    display: flex;
    align-items: center;
    gap: 7px;
}

.shengwang-lang-modal-title img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.shengwang-lang-modal-title h3 {
    font-family: var(--font-family);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.219;
    color: #000000;
    margin: 0;
}

/* Modal Body */
.shengwang-lang-modal-body {
    display: flex;
    overflow: hidden;
    flex: 1;
    height: 100%;
}

.shengwang-lang-modal-regions {
    width: 322px;
    border-right: 1px solid #c7cad0;
    overflow-y: auto;
    flex-shrink: 0;
    height: 100%;
}

/* Region Toggle */
.shengwang-lang-region {
    border-bottom: 1px solid #c7cad0;
}

.shengwang-lang-region.active {
    background: #f6f6f6;
    position: relative;
}
.shengwang-lang-region.active::before {
    position: absolute;
    content: '';
    height: 100%;
    width: 4px;
    left: 0;
    top: 0;
    background: var(--color-primary);
}
.shengwang-lang-region-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shengwang-lang-region-toggle:hover {
    background: #f6f6f6;
}

.shengwang-lang-region-name {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.219;
    text-transform: uppercase;
    color: #000000;
    text-align: left;
}

.shengwang-lang-region-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.shengwang-lang-region.active .shengwang-lang-region-arrow {
    /* transform: rotate(180deg); */
}

.shengwang-lang-region-arrow img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Languages List */
.shengwang-lang-modal-languages {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    position: relative;
}

.shengwang-lang-list {
    display: none;
    flex-direction: column;
    gap: 25px;
}

.shengwang-lang-list.active {
    display: flex;
}

.shengwang-lang-item {
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.219;
    color: #000000;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.shengwang-lang-item:hover {
    color: var(--color-primary);
}

/* Navigation Sidebar */
.shengwang-nav-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: all 0.3s ease;
    /* opacity: 0; */
}

.shengwang-nav-sidebar.active {
    z-index: 9998;
}

.shengwang-nav-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    display: none;
}
.shengwang-nav-sidebar.active .shengwang-nav-sidebar-overlay {
    display: block;
}
.shengwang-nav-sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 332px;
    height: 100%;
    background: #ffffff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    /* overflow: hidden; */
    transform: translateX(-150%);
    transition: transform 0.3s ease;
}

.shengwang-nav-sidebar.active .shengwang-nav-sidebar-content {
    transform: translateX(0);
}

/* Close Button - Right Side Centered */
.shengwang-nav-sidebar-close {
    position: absolute;
    top: 50%;
    right: -24px;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    background: #ededed;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
}

.shengwang-nav-sidebar-close img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

/* Navigation Panels */
.shengwang-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    padding: 50px 60px 36px;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.shengwang-nav-panel.active {
    transform: translateX(0);
}

/* Main Navigation List */
.shengwang-nav-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.shengwang-nav-item {
    border-bottom: 1px solid transparent;
}

.shengwang-nav-link {
    color: var(--color-primary);
}

.shengwang-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    font-family: var(--font-family);
    font-size: 34px;
    font-weight: 400;
    line-height: 1.219;
    color: #000000;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}
.shengwang-nav-link .iconfont {
    font-size: 20px;
    color: #000;
}
.shengwang-nav-link:hover,
.shengwang-nav-item.active .shengwang-nav-link,
.shengwang-nav-item.active .shengwang-nav-link .iconfont,
.shengwang-nav-link:hover .iconfont {
    color: var(--color-primary);
}

/* Bottom Actions in Sidebar */
.shengwang-nav-bottom {
    flex-shrink: 0;
}

.shengwang-nav-divider {
    width: 100%;
    height: 1px;
    background: #cccccc;
    margin-bottom: 24px;
}

.shengwang-nav-actions {
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.shengwang-nav-action-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.219;
    color: #666666;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shengwang-nav-action-link:hover {
    color: #000000;
}

.shengwang-nav-action-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Submenu Panel */
.shengwang-nav-submenu-header {
    flex-shrink: 0;
}

.shengwang-nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 14px 0;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.219;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shengwang-nav-back:hover {
    color: var(--color-primary);
}

.shengwang-nav-back .iconfont {
    font-size: 16px;
    color: #222222;
}

.shengwang-nav-submenu-title {
    padding: 12px 0;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.219;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.shengwang-nav-submenu-title > span{
    font-size:16px;
    font-weight:600;
}
.shengwang-nav-submenu-title > a{
    font-size:14px;
    font-weight:300;
}
.shengwang-nav-submenu .shengwang-nav-divider {
    margin: 0 0 16px;
}

/* Submenu List */
.shengwang-nav-submenu-list {
    flex: 1;
    margin: 0 -24px;
    overflow-y: auto;
}

.shengwang-nav-submenu-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    padding: 0 24px;
    overflow: visible;
}
.shengwang-nav-submenu-item:hover {
    background: #e6f1ff;
}

/* Submenu item link */
.shengwang-nav-submenu-link {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

/* Arrow button for nested submenu */
.shengwang-nav-submenu-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.shengwang-nav-submenu-arrow:hover {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-radius: 4px;
}

.shengwang-nav-submenu-arrow .iconfont {
    font-size: 16px;
    color: #222;
    transition: all 0.3s ease;
}

.shengwang-nav-submenu-arrow:hover .iconfont {
    color: var(--color-primary);
}

/* Item without children - no arrow */
.shengwang-nav-submenu-item:not(.has-children) .shengwang-nav-submenu-link {
    padding-right: 0;
}

.shengwang-nav-submenu-icon {
    width: 64px;
    aspect-ratio: 1/1;
    flex-shrink: 0;
}

.shengwang-nav-submenu-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.shengwang-nav-submenu-name {
    flex: 1;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.219;
    text-transform: capitalize;
    color: #000000;
    margin-left: 10px;
}

.shengwang-nav-submenu-item:hover .shengwang-nav-submenu-name {
    color: var(--color-primary);
}

.shengwang-nav-submenu-link:hover .shengwang-nav-submenu-name {
    color: var(--color-primary);
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 1600px) {
    .shengwang-nav-list {
        gap: 28px;
    }
    .shengwang-nav-panel {
        padding: 40px 50px 30px;
    }
    .shengwang-nav-link {
        font-size: 28px;
    }
}
@media (max-width: 1400px) {
    .shengwang-nav-list {
        gap: 24px;
    }
    .shengwang-nav-panel {
        padding: 30px 40px 20px;
    }
    .shengwang-head-logo {
        width: 100px;
    }

    .shengwang-head-menu-toggle {
        width: 40px;
    }

    .shengwang-head {
        width: 100%;
        padding: 20px 15px;
    }
    .shengwang-nav-link {
        font-size: 24px;
    }
    .shengwang-head-quick-nav{
        gap:10px;
    }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 991px) {
    .shengwang-nav-list {
        gap: 20px;
    }
    .shengwang-head-menu-toggle {
        width: 30px;
    }
    .shengwang-nav-panel {
        /* padding:20px 30px 10px; */
    }
    .shengwang-nav-link {
        font-size: 22px;
    }
    .shengwang-head-container {
        gap: 20px;
    }

    .shengwang-head-quick-nav {
        gap: 16px;
    }

    .shengwang-head-quick-link {
        font-size: 16px;
    }

    .shengwang-head-actions {
        gap: 24px;
    }

    .shengwang-head-search-container {
        width: 120px;
    }
    .shengwang-head-quick-nav{
        display:none;
    }
}

/* Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .shengwang-nav-panel {
        /* padding:15px 20px 10px; */
    }
    .shengwang-head-container {
        gap: 16px;
    }
    .shengwang-nav-link {
        font-size: 20px;
    }
    .shengwang-head-quick-nav {
        gap: 12px;
    }

    .shengwang-head-quick-link {
        font-size: 14px;
    }

    .shengwang-head-actions {
        gap: 16px;
    }

    .shengwang-head-search-trigger span {
        display: none;
    }

    .shengwang-head-search-trigger {
        padding: 8px 12px;
    }

    .shengwang-lang-modal-regions {
        width: 200px;
    }

    .shengwang-lang-modal-languages {
        padding: 20px;
    }

    .shengwang-nav-sidebar-content {
        width: 280px;
    }

    .shengwang-nav-link {
    }

    .shengwang-search-input {
        font-size: 20px;
    }
    .shengwang-nav-list {
        gap: 16px;
    }
}

@media (max-width: 568px) {
    .shengwang-head-container {
        gap: 12px;
    }

    .shengwang-head-quick-nav {
        display: none;
    }

    .shengwang-head-quick-link {
        font-size: 12px;
    }

    .shengwang-head-actions {
        gap: 12px;
    }

    .shengwang-head-search {
        flex: 1;
    }

    .shengwang-lang-modal-body {
        flex-direction: column;
    }

    .shengwang-lang-modal-regions {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #c7cad0;
        max-height: 40%;
    }

    .shengwang-lang-modal-languages {
        padding: 16px;
    }

    .shengwang-nav-sidebar-content {
        width: 100%;
        max-width: 280px;
    }

    .shengwang-nav-link {
    }

    .shengwang-search-input {
        font-size: 18px;
        padding: 14px 56px 14px 0;
    }

    .shengwang-search-modal-content {
        padding: 24px;
    }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .shengwang-head {
        padding: 6px 10px;
    }

    .shengwang-head-container {
        gap: 8px;
    }

    .shengwang-head-actions {
        gap: 8px;
    }

    .shengwang-head-lang-btn img,
    .shengwang-head-about-link img {
        width: 16px;
        height: 16px;
    }

    .shengwang-head-search-trigger img {
        width: 16px;
        height: 16px;
    }

    .shengwang-lang-modal-title h3 {
        font-size: 20px;
    }

    .shengwang-lang-item {
        font-size: 16px;
    }

    .shengwang-nav-link {
    }

    .shengwang-search-input {
        font-size: 16px;
        padding: 12px 48px 12px 0;
    }
}

/* Ensure body doesn't scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Accessibility - Focus States */
.shengwang-head-search-input:focus-visible,
.shengwang-head-lang-btn:focus-visible,
.shengwang-head-about-link:focus-visible,
.shengwang-head-quick-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
