/**
 * Footer 样式
 * 根据设计稿重新设计
 *
 * @package Laifen_Russia
 * @since 1.0.0
 */

/* ========== Footer 容器 ========== */
.site-footer {
    background: #000000;
    color: #ffffff;
    padding: 60px 0 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Footer 主要布局 ========== */
.footer-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    margin-bottom: 40px;
    align-items: start;
}

/* ========== 左侧品牌信息区 ========== */
.footer-brand-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Logo */
.footer-logo {
    margin-bottom: 8px;
}

.footer-logo img {
    height: 32px;
    width: auto;
}

.footer-logo-text {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 公司名称 */
.footer-company-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    padding-top: 0;
}

/* 信息项 */
.footer-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.footer-info-label {
    color: #ffffff;
}

.footer-info-value {
    color: #ffffff;
}

.footer-info-link {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-info-link:hover,
.footer-info-link:active,
.footer-info-link:focus {
    opacity: 1;
    color: #4a9eff;
    outline: none;
}

/* 社交媒体图标 */
.footer-social-links {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #1877F2;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.social-link-vk {
    background: #0077FF;
}

.social-link-instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

.social-link-telegram {
    background: #0088CC;
}

.social-link-youtube {
    background: #FF0000;
}

.social-link:hover,
.social-link:active,
.social-link:focus {
    transform: none;
    opacity: 1;
    outline: none;
}

.social-link:hover svg,
.social-link:active svg,
.social-link:focus svg {
    color: #4a9eff;
}

.social-link svg {
    width: 18px;
    height: 18px;
}

/* 语言选择器 */
.footer-language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #ffffff;
    margin-top: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.footer-language-selector:hover,
.footer-language-selector:active,
.footer-language-selector:focus {
    opacity: 1;
    outline: none;
}

.footer-language-selector svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* ========== 国家/地区选择弹窗 ========== */
.country-selector-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.country-selector-modal.is-open {
    display: block;
}

.country-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.country-selector-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.country-selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #ebe9e9;
    flex-shrink: 0;
}

.country-selector-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #000000;
}

.country-selector-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    color: #666666;
    padding: 0;
    flex-shrink: 0;
}

.country-selector-close:hover,
.country-selector-close:active,
.country-selector-close:focus {
    background: transparent;
    outline: none;
}

.country-selector-close svg {
    width: 24px;
    height: 24px;
    display: block;
}

.country-selector-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* 国家列表 */
.country-pop-box {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.region-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.region-item h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    padding-bottom: 8px;
    border-bottom: 1px solid #ebe9e9;
}

.region-item-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.country-item {
    border-radius: 8px;
    transition: all 0.2s;
    min-height: 64px;
}

.country-item:hover,
.country-item:active,
.country-item:focus {
    background: transparent;
    outline: none;
}

.country-item:hover .country-name,
.country-item:active .country-name,
.country-item:focus .country-name {
    color: #4a9eff;
}

.country-item.current-country {
    background: #f0f0f0;
    border: 2px solid #ebe9e9;
}

.country-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
}

.country-item-media {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

/* 确保图片加载失败时有提示 */
.country-item-media img[alt]::before {
    content: attr(alt);
    font-size: 10px;
    color: #999;
}

.country-item-media img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* 图片加载失败时的样式 */
.country-item-media img[src*="data:image"] {
    object-fit: cover;
    border-radius: 2px;
}

.country-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.country-item-info .f14 {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
}

.country-item-info .f12 {
    font-size: 12px;
    color: #666666;
}

.poppins {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== 响应式 - 平板 ========== */
@media (max-width: 768px) {
    .country-selector-content {
        width: 95%;
        max-height: 92vh;
    }

    .country-selector-header {
        padding: 20px 24px;
    }

    .country-selector-header h3 {
        font-size: 20px;
    }

    .country-selector-body {
        padding: 24px;
    }

    .region-item-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .country-pop-box {
        gap: 24px;
    }
    
    .country-item a {
        padding: 10px;
    }
}

/* ========== 响应式 - 移动端 ========== */
@media (max-width: 480px) {
    .country-selector-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    .country-selector-header {
        padding: 16px 20px;
    }

    .country-selector-header h3 {
        font-size: 18px;
    }

    .country-selector-close {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .country-selector-body {
        padding: 20px 16px;
        padding-bottom: 40px;
    }

    .region-item h5 {
        font-size: 16px;
        padding-bottom: 6px;
    }
    
    .region-item-content {
        gap: 8px;
    }
    
    .country-pop-box {
        gap: 20px;
    }

    .country-item a {
        padding: 8px;
    }

    .country-item-media {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .country-item-media img {
        width: 26px;
        height: 26px;
    }
    
    .country-item-info .f14 {
        font-size: 13px;
    }
    
    .country-item-info .f12 {
        font-size: 11px;
    }
}

/* 版权信息 */
.footer-copyright {
    font-size: 13px;
    color: #ffffff;
    margin-top: 24px;
}

.footer-copyright-mobile {
    display: none;
}

/* ========== 右侧菜单区 ========== */
.footer-menus-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 48px; /* Logo (32px) + margin-bottom (8px) + 公司名称高度约 (8px) = 48px */
}

.footer-menu-column {
    display: flex;
    flex-direction: column;
}

.footer-menu-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.footer-menu-toggle {
    display: none;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: opacity 0.2s;
    display: block;
}

.footer-menu a:hover,
.footer-menu a:active,
.footer-menu a:focus {
    opacity: 1;
    color: #4a9eff;
    outline: none;
}

/* ========== 响应式设计 - 平板 ========== */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-menus-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
        padding-top: 0; /* 平板端取消 padding-top */
    }
}

/* ========== 响应式设计 - 移动端 ========== */
@media (max-width: 767px) {
    .site-footer {
        padding: 40px 0 24px;
    }

    .footer-container {
        padding: 0 16px;
    }

    .footer-main {
        gap: 32px;
        margin-bottom: 24px;
    }

    .footer-brand-section {
        gap: 12px;
    }

    .footer-logo-text {
        font-size: 24px;
    }

    .footer-company-name {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .footer-info-item {
        font-size: 12px;
    }

    .footer-social-links {
        gap: 10px;
        margin-top: 4px;
    }

    .social-link {
        width: 28px;
        height: 28px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }

    .footer-language-selector {
        font-size: 12px;
        margin-top: 4px;
    }

    .footer-language-selector svg {
        width: 16px;
        height: 16px;
    }

    .footer-copyright-desktop {
        display: none;
    }

    .footer-copyright-mobile {
        display: block;
        text-align: center;
        font-size: 12px;
        padding-top: 24px;
    }

    /* 移动端菜单折叠 */
    .footer-menus-section {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 0; /* 移动端取消 padding-top */
    }

    .footer-menu-column {
        border-bottom: 1px solid #ebe9e9;
    }

    .footer-menu-column:last-child {
        border-bottom: none;
    }

    .footer-menu-title {
        font-size: 14px;
        padding: 16px 0;
        margin: 0;
        cursor: pointer;
        user-select: none;
    }

    .footer-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s;
    }

    .footer-menu-column.is-open .footer-menu-toggle {
        transform: rotate(180deg);
    }

    .footer-menu-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .footer-menu-column.is-open .footer-menu-content {
        max-height: 500px;
        padding-bottom: 16px;
    }

    .footer-menu {
        gap: 10px;
    }

    .footer-menu a {
        font-size: 12px;
    }
}

/* ========== 小屏手机优化 ========== */
@media (max-width: 375px) {
    .footer-container {
        padding: 0 12px;
    }

    .footer-company-name {
        font-size: 11px;
    }

    .footer-info-item {
        font-size: 11px;
    }

    .footer-social-links {
        gap: 8px;
    }

    .social-link {
        width: 26px;
        height: 26px;
    }

    .social-link svg {
        width: 14px;
        height: 14px;
    }
}
