/**
 * 页脚社交媒体样式
 * Footer Social Media Styles
 */

/* 社交媒体容器 */
.footer-social-media {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(25, 118, 210, 0.1);
}

.footer-social-media .social-title {
    font-size: 14px;
    font-weight: 600;
    color: #263238;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 社交图标容器 */
.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 单个图标包装器 */
.social-icon-wrapper {
    position: relative;
}

/* 社交图标样式 */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7f9 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    color: #546e7a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(25, 118, 210, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.social-icon:hover::before {
    width: 100%;
    height: 100%;
}

.social-icon svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.social-icon:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* 各平台特定颜色 */
.social-icon.youtube:hover {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    border-color: #FF0000;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.social-icon.facebook:hover {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
    border-color: #1877F2;
    color: white;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.social-icon.whatsapp:hover {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-color: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.social-icon.wechat:hover {
    background: linear-gradient(135deg, #09B83E 0%, #078C2E 100%);
    border-color: #09B83E;
    color: white;
    box-shadow: 0 4px 15px rgba(9, 184, 62, 0.3);
}

/* 弹出卡片样式 */
.social-popup {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
}

.social-icon-wrapper:hover .social-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.popup-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    text-align: center;
    position: relative;
}

/* 弹出卡片箭头 */
.popup-content::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.1));
}

/* 二维码样式 */
.qr-code {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    background: #f5f7f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 当图片不存在时显示占位符 */
.qr-code img[style*="display: none"] + ::after {
    content: '二维码';
    color: #999;
    font-size: 14px;
}

/* 社交平台名称 */
.social-name {
    font-size: 16px;
    font-weight: 600;
    color: #263238;
    margin: 0 0 8px 0;
}

.social-desc {
    font-size: 13px;
    color: #546e7a;
    margin: 0 0 12px 0;
}

/* 链接按钮 */
.social-link-btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 8px;
}

.social-link-btn:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .social-icons {
        justify-content: center;
    }
    
    .social-popup {
        left: auto;
        right: 0;
        transform: translateX(0) translateY(10px);
    }
    
    .social-icon-wrapper:hover .social-popup {
        transform: translateX(0) translateY(0);
    }
    
    .popup-content::after {
        left: auto;
        right: 20px;
        transform: translateX(0);
    }
}

/* 移动端触摸优化 */
@media (hover: none) {
    .social-icon-wrapper {
        -webkit-tap-highlight-color: transparent;
    }
    
    .social-popup {
        position: fixed;
        bottom: 50%;
        left: 50%;
        transform: translate(-50%, 50%) scale(0.9);
        opacity: 0;
    }
    
    .social-icon-wrapper.active .social-popup {
        opacity: 1;
        transform: translate(-50%, 50%) scale(1);
    }
}

/* 动画效果 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.social-icon-wrapper:hover .social-popup {
    animation: popupFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
