/* 小桔物联 - 美化升级版样式 */
/* 现代视觉效果和交互体验 */

/* ===== 动画关键帧 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes device-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ===== 增强版变量 ===== */
:root {
    /* 扩展颜色系统 */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #22c55e 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* 玻璃拟态效果 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    /* 增强阴影 */
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);
    --shadow-float: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* 动画时长 */
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
}

/* ===== 导航栏增强 ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.logo {
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: var(--gradient-primary);
    border-radius: 12px;
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.logo:hover::after {
    opacity: 0.3;
}

.nav-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

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

/* ===== Hero区域增强 ===== */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 50%, #0ea5e9 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-stats {
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* 按钮增强效果 */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
}

/* IoT展示动画 */
.iot-showcase {
    animation: float 6s ease-in-out infinite;
}

.center-hub {
    animation: pulse 3s ease-in-out infinite;
}

.device-item {
    animation: device-pulse 2s ease-in-out infinite;
    animation-delay: calc(var(--angle) / 90 * 0.5s);
}

.connection-lines .line {
    animation: shimmer 2s linear infinite;
}

/* ===== 产品卡片增强 ===== */
.product-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-float);
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover .product-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.product-card:hover .product-icon i {
    color: white;
}

.product-card h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.product-card p {
    color: var(--text-medium);
    margin-bottom: 16px;
    line-height: 1.6;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--text-medium);
    transition: all 0.3s ease;
}

.feature-list li i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.feature-list li:hover {
    padding-left: 5px;
    color: var(--primary-color);
}

/* ===== 解决方案标签增强 ===== */
.tab-btn {
    position: relative;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active::after,
.tab-btn:hover::after {
    transform: scaleX(1);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-panel {
    animation: fadeIn 0.5s ease;
}

/* ===== 客户案例增强 ===== */
.case-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.5s ease;
}

.case-card:hover::before {
    left: 100%;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.case-industry {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.case-result {
    background: var(--gradient-success);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.case-card h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.case-card p {
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

.case-metrics {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.metric {
    text-align: center;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* ===== 关于我们增强 ===== */
.advantage-item {
    position: relative;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.advantage-item:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(10px);
}

.advantage-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

/* ===== 联系区域增强 ===== */
.contact-qr-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
}

.wechat-badge {
    background: linear-gradient(135deg, #07c160 0%, #05a350 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.4);
}

.benefit-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.benefit-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===== Section标题增强 ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 页脚增强 ===== */
.footer-column a {
    position: relative;
    transition: color 0.3s ease;
}

.footer-column a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.footer-column a:hover::after {
    width: 100%;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
    }
    
    .iot-showcase {
        animation: none;
    }
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===== 选中文字样式 ===== */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary-dark);
}
