/* ========================================
   魔点门禁二级页面专属样式
   与主页风格保持一致
   ======================================== */

/* 二级页面导航栏：仅"魔点门禁"（active）默认显示下划线，其他导航链接 hover 时也显示下划线 */
.navbar .nav-link:not(.active):not(:hover)::before {
    transform: scaleX(0);
}

/* 非active的"钉钉智连/魔点门禁"下拉hover时不变色 */
.nav-dropdown:hover > .nav-link:not(.active) {
    color: var(--text-secondary, #64748b) !important;
    transform: none !important;
}

/* ========================================
   Hero 区域 - 蓝色渐变（与主页一致）
   ======================================== */
.md-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 0 60px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.md-hero .container {
    display: block;
}

.md-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(52, 211, 153, 0.25) 0%, transparent 45%);
    animation: md-gradientShift 15s ease infinite;
}

@keyframes md-gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.md-hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: md-float 20s ease-in-out infinite;
}

@keyframes md-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.md-hero-bg {
    display: none;
}

.md-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.md-hero-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    transition: all var(--transition-base);
}

.md-hero-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.md-hero-title {
    font-family: 'Nunito', 'Noto Sans SC', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.md-hero-desc {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* ========================================
   面包屑导航
   ======================================== */
.md-breadcrumb {
    background: var(--bg-light);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.md-breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.md-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.md-breadcrumb a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.md-breadcrumb-sep {
    color: var(--text-muted);
    margin: 0 0.25rem;
}

.md-breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   通用 Section 样式
   ======================================== */
section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 680px;
    margin: 1.5rem auto 0;
    line-height: 1.7;
}

/* ========================================
   产品卡片网格
   ======================================== */
.md-products {
    background: var(--bg-white);
    padding: 5rem 0 6rem;
}

.md-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ========================================
   产品卡片样式
   ======================================== */
.md-product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.md-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px -12px rgba(59, 130, 246, 0.2),
                0 12px 24px -8px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

/* 卡片顶部装饰线 */
.md-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.md-product-card:hover::before {
    transform: scaleX(1);
}

/* 卡片图片区域 */
.md-card-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.md-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.md-product-card:hover .md-card-img-placeholder {
    transform: scale(1.05);
}

/* 各产品图片背景色 */
.md-img-my3 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    color: #3b82f6;
}

.md-img-d3 {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
    color: #4f46e5;
}

.md-img-d2 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    color: #2563eb;
}

.md-img-x2 {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
    color: #db2777;
}

.md-img-g2 {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    color: #0284c7;
}

.md-img-y3s {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 50%, #fef08a 100%);
    color: #ca8a04;
}

.md-img-y2 {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    color: #475569;
}

/* 考勤产品图片背景色 */
.md-img-m3max {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    color: #16a34a;
}

.md-img-m3 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    color: #2563eb;
}

.md-img-m3mini {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
    color: #dc2626;
}

.md-img-w1xpro {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #ddd6fe 100%);
    color: #7c3aed;
}

.md-img-d1 {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);
    color: #0891b2;
}

.md-img-m1f {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    color: #ea580c;
}

.md-img-m1pro {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
    color: #db2777;
}

.md-img-m2 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    color: #1d4ed8;
}

.md-img-m1cpro {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 50%, #fef08a 100%);
    color: #a16207;
}

.md-img-m1xpro {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    color: #15803d;
}

/* 卡片内容区 */
.md-card-body {
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.md-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.md-card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    flex: 1;
}

/* 标签 */
.md-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.md-card-tags span {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all var(--transition-fast);
}

.md-card-tags span:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: translateY(-1px);
}

/* 详情按钮 */
.md-card-btn {
    display: inline-block;
    text-align: center;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.25);
    transition: all 0.3s ease;
    margin-top: auto;
    width: 100%;
}

.md-card-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ========================================
   CTA 区域 - 蓝色渐变（与主页一致）
   ======================================== */
.md-cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.md-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

.md-cta .container {
    position: relative;
    z-index: 2;
}

.md-cta h2 {
    font-family: 'Nunito', 'Noto Sans SC', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.md-cta p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    font-weight: 300;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.md-cta .btn-primary {
    font-size: 1.1rem;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.95);
    color: #3b82f6;
    border: none;
    box-shadow: var(--shadow-lg);
}

.md-cta .btn-primary:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl), 0 0 30px rgba(255, 255, 255, 0.3);
}

/* ========================================
   滚动入场动画
   ======================================== */
.md-product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: md-fadeInUp 0.6s ease forwards;
}

.md-product-card:nth-child(1) { animation-delay: 0.05s; }
.md-product-card:nth-child(2) { animation-delay: 0.1s; }
.md-product-card:nth-child(3) { animation-delay: 0.15s; }
.md-product-card:nth-child(4) { animation-delay: 0.2s; }
.md-product-card:nth-child(5) { animation-delay: 0.25s; }
.md-product-card:nth-child(6) { animation-delay: 0.3s; }
.md-product-card:nth-child(7) { animation-delay: 0.35s; }
.md-product-card:nth-child(8) { animation-delay: 0.4s; }
.md-product-card:nth-child(9) { animation-delay: 0.45s; }
.md-product-card:nth-child(10) { animation-delay: 0.5s; }

@keyframes md-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1200px) {
    .md-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .md-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .md-hero {
        min-height: 360px;
        padding: 120px 0 50px;
    }
    
    .md-hero-title {
        font-size: 2rem;
    }
    
    .md-hero-desc {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        word-break: break-word;
    }
    
    .md-products-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
    
    section {
        padding: 3.5rem 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .md-cta h2 {
        font-size: 1.8rem;
    }
    
    .md-cta {
        padding: 60px 0;
    }
    
    /* 卡片内容防止溢出 */
    .md-product-card p,
    .md-product-card ul li {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}
