/* 多语言切换器样式 - 现代化自定义下拉菜单 */
.lang-switcher {
    position: relative;
    display: inline-block;
    align-self: center;
    margin-left: 0.5rem;
    width: 50px;
}

/* 自定义下拉菜单容器 */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

/* 当前选中的语言显示*/
.lang-current {
    padding: 0px 15px 0px 0px;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary1);
    cursor: pointer;
    width: 50px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-current:hover {
}

.lang-current:focus,
.lang-dropdown.active .lang-current {
}

/* 下拉选项容器 */
.lang-options {
    position: absolute;
    top: calc(100% - 1px);
    /* left: 0; */
    right: 0;
    background: #fff;
    border: 1px solid #E8EBF0;
    width: 90px;
    padding: 4px;;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(2, 11, 24, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1005;
    backdrop-filter: blur(15px);
    overflow: hidden;
    margin-top: 0;
}

.lang-dropdown.active .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-dropdown.active .lang-current {
}

/* 单个选项样式 */
.lang-option {
    padding: 0px;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    padding: 0.5rem 1rem;
    /* color: var(--text-secondary1); */
    color: #141737;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
    border-radius: 12px;
    margin: 1px;
}

/* 选项之间的分割线 */
/* .lang-option:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;  
} */


.lang-option:active {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
    transform: translateX(2px);
}

/* 选中选项样式  */
.lang-option.selected {
    background: #F2F5FA;
    color: #222222;
}

.lang-option.selected::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #222222;
    font-weight: bold;
    font-size: 1rem;
}

.lang-option:hover {
    background: #F2F5FA;
    color: #222222;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 10px 40px 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 90px;
    text-align: left;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.lang-select:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.lang-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* 自定义下拉箭头*/
.lang-current::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--primary-color-60);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.lang-current:hover::after {
    border-top-color: var(--primary-color-80);
}

.lang-dropdown.active .lang-current::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: var(--primary-color);
}

/* 向上滑入动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-dropdown.active .lang-options {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 下拉选项样式 - 现代化设计 */
.lang-select option {
    background: #ffffff;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    transition: all 0.2s ease;
}

.lang-select option:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--primary-color);
}

.lang-select option:checked {
    background: linear-gradient(135deg, var(--primary-color) 0%, #333333 100%);
    color: #ffffff;
    font-weight: 600;
}

/* 语言标识样式 - 全局隐藏国旗图标 */
.lang-flag {
    display: none;
}

.lang-flag.en {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><clipPath id="a"><path d="M30 15h30v15zv15H0zH0V0z"/></clipPath><clipPath id="b"><path d="M30 15h30v15zv15H0zH0V0z"/></clipPath><g clip-path="url(%23a)"><path d="M0 0v30h60V0z" fill="%23012169"/><path d="M0 0L60 30m0-30L0 30" stroke="%23fff" stroke-width="6"/><path d="M0 0L60 30m0-30L0 30" clip-path="url(%23b)" stroke="%23C8102E" stroke-width="4"/><path d="M30 0v30M0 15h60" stroke="%23fff" stroke-width="10"/><path d="M30 0v30M0 15h60" stroke="%23C8102E" stroke-width="6"/></g></svg>');
}

.lang-flag.fr {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2"><rect width="3" height="2" fill="%23ED2939"/><rect width="2" height="2" fill="%23fff"/><rect width="1" height="2" fill="%23002395"/></svg>');
}

.lang-flag.es {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 500"><rect width="750" height="500" fill="%23c60b1e"/><rect width="750" height="250" fill="%23ffc400" y="125"/></svg>');
}

.lang-flag.it {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5 3"><rect width="5" height="3" fill="%23009246"/><rect width="3.33" height="3" fill="%23fff"/><rect width="1.67" height="3" fill="%23CE2B37"/></svg>');
}

/* 语言特定的字体调整 */
[lang="fr"] {
    letter-spacing: 0.01em;
}

[lang="es"] {
    line-height: 1.65;
}

[lang="it"] {
    letter-spacing: -0.01em;
}

/* RTL语言支持（未来扩展） */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .container {
    direction: rtl;
}

/* 响应式语言切换器 - 现代化设计（平板端无国旗） */
@media screen and (max-width: 768px) and (min-width: 577px) {
    .lang-switcher {
        margin-left: 1rem;
        margin-right: 0;
    }
    
    .lang-dropdown {
        width: auto;
        min-width: 65px;
    }
    
    .lang-current::after {
        right: 10px;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 4px solid rgba(0, 0, 0, 0.6);
    }
    
    .lang-dropdown.active .lang-current {
        border-radius: 10px 10px 0 0;
    }
}

/* 加载状态 - 现代化设计 */
.multilang-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
    filter: blur(0.5px);
}

.multilang-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: 12px;
    backdrop-filter: blur(2px);
    z-index: 1;
}

.multilang-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: multilang-spin 0.8s linear infinite;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes multilang-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 语言切换器在导航栏中的位置调整 */
.navbar-nav .lang-switcher {
    margin-left: auto;
    margin-right: 0;
}

/* 桌面端语言切换器样式 */
.desktop-lang-switcher {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.desktop-lang-switcher .lang-switcher {
    margin-left: 0;
    margin-right: 0;
}

/* 移动端隐藏桌面端语言切换器 */
@media screen and (max-width: 768px) {
    .desktop-lang-switcher {
        display: none;
    }
}

/* 移动端语言切换器样式 - 现代化设计（最小尺寸） */
@media screen and (max-width: 576px) {
    .navbar-nav .lang-switcher {
        margin-left: 0;
        justify-content: center;
    }
    
    .lang-dropdown {
        width: auto;
        min-width: 55px;
    }
    /* .lang-current { font-size: 0.7rem;} */ 
}

/* 语言切换动画 - 现代化效果 */
.lang-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.lang-select:active {
    transform: scale(0.96) translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* 选择框弹出效果 */
.lang-select:focus {
    animation: lang-select-focus 0.3s ease-out;
}

@keyframes lang-select-focus {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.15);
    }
}

/* 箭头旋转动画优化 */
.lang-switcher::after {
    transform-origin: center;
}

.lang-select:focus ~ .lang-switcher::after {
    transform: translateY(-50%) rotate(180deg) scale(1.1);
}

/* 语言切换器容器样式 */
.language-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 语言指示器 */
.language-indicator {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* 语言切换器下拉菜单样式（可选） */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.lang-dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.lang-dropdown-content a:hover {
    background-color: #f1f1f1;
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}

/* 语言特定的内容调整 */
[lang="fr"] .hero-subtitle {
    font-size: 1.1em;
}

[lang="es"] .hero-subtitle {
    font-size: 1.05em;
}

[lang="it"] .hero-subtitle {
    font-size: 1.08em;
}

/* 多语言内容加载时的过渡效果 */
[data-translate] {
    transition: opacity 0.3s ease;
}

[data-translate].loading {
    opacity: 0.6;
}

/* 语言切换时的页面过渡 */
.page-transition {
    transition: opacity 0.2s ease;
}

.page-transition.loading {
    opacity: 0.8;
}

/* 语言切换器在深色主题下的样式 - 现代化纯文字设计 */
.dark-theme .lang-current {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
}

.dark-theme .lang-current:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.12) 100%);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.dark-theme .lang-current:focus,
.dark-theme .lang-dropdown.active .lang-current {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark-theme .lang-options {
    background: linear-gradient(135deg, rgba(40, 44, 52, 0.95) 0%, rgba(33, 37, 43, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
}

.dark-theme .lang-option {
    color: rgba(255, 255, 255, 0.9);
}

.dark-theme .lang-option:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: rgba(255, 255, 255, 1);
}

.dark-theme .lang-option.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a5568 100%);
    color: #ffffff;
}

.dark-theme .lang-current::after {
    border-top-color: rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* 无障碍支持 */
.lang-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media screen and (prefers-contrast: high) {
    .lang-select {
        border: 1px solid currentColor;
        /* background: #000; */
        color: #fff;
    }
}

/* 减少动画模式支持 */
@media screen and (prefers-reduced-motion: reduce) {
    .lang-select {
        transition: none;
    }
    
    .multilang-loading::after {
        animation: none;
    }
} 


/* fr style */

html[lang="fr"] .page-about-container .collaboration-tracks-part .inner .tracks-content .track-box .track-inner .track-text {
    min-height: 335px;
}

html[lang="fr"] .flow-step h4 {
    height: 52px;
    margin-bottom: 4px ;
}
html[lang="fr"] .manifesto-grid {
    gap: 1.5rem;
}
html[lang="fr"] .manifesto-grid-item p {
    margin: 0 0 0;
    line-height: 1.3;
}


@media screen and (min-width: 1024px) {
    html[lang="fr"] .navbar-nav .nav-item:not(.nav-right) {
        margin-right: 0;
    }

    html[lang="fr"] .navbar-nav .nav-item.nav-right:last-child {
        margin-left: 4px;
    }

}

@media screen and (max-width: 1024px) {
    html[lang="fr"] .navbar-nav {
        margin-left: 25px;
    }
    .brand-logo {
        width: 200px;
    }
    .navbar-nav {
        gap: 0.5rem;
    }
    .nav-link {
        font-size: 1rem;
    }


    body .navbar .nav-link.nav-apply, body .navbar .nav-link.nav-apply:hover
    , body .navbar .nav-link.nav-contact, body .navbar .nav-link.nav-contact:hover {
        padding: 0.5rem 0.75rem!important;
    }
    html[lang="fr"] .navbar-nav .nav-item.nav-right {
        margin-left: 10px;
    }


    

}