/* styles/prototype.css */
/* ===== 颜色变量定义 ===== */
:root {
  /* 主色调 - 体现科技感与专业性 */
  --primary-blue: #1e40af;    /* 科技蓝 */
  --primary-blue-dark: #1e3a8a; /* 深蓝色 */
  --accent-teal: #0d9488;     /* 物联网绿 */
  --accent-teal-dark: #0f766e; /* 深绿色 */
  --neutral-gray: #4b5563;    /* 专业灰 */
  --neutral-gray-light: #9ca3af; /* 浅灰色 */
  
  /* 辅助色 */
  --success-green: #10b981;   /* 成功绿 */
  --warning-orange: #f59e0b;  /* 警告橙 */
  
  /* 中性色 */
  --white: #ffffff;
  --black: #000000;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 语义化颜色 */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-muted: var(--gray-100);
  --border-color: var(--gray-200);


  /* 新增深色主题专用色彩 */
  --primary-blue-light: #3b82f6;    /* 更亮的蓝色，用于深色背景 */
  --primary-blue-lighter: #60a5fa;   /* 更亮的蓝色，用于悬停状态 */
  --accent-teal-light: #14b8a6;      /* 更亮的绿色，用于深色背景 */
  --accent-teal-lighter: #2dd4bf;    /* 更亮的绿色，用于悬停状态 */
  
  /* 深色主题文字颜色 */
  --text-on-dark: #f8fafc;           /* 深色背景上的主要文字 */
  --text-secondary-on-dark: #cbd5e1; /* 深色背景上的次要文字 */
  --text-muted-on-dark: #94a3b8;     /* 深色背景上的弱化文字 */
}

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(30, 64, 175, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 64, 175, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--bg-primary); /* 与header背景色一致 */
    z-index: 1001;
    pointer-events: none;
}

.container {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

/* ===== 头部导航 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%, 
        rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0.75rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

.company-name {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-blue);
    white-space: nowrap;
}

.header.scrolled .logo img {
    height: 35px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    /*color: var(--text-primary);*/
    color: var(--text-on-dark);
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 1.2rem 0.5rem 0.5rem;
}

.nav a:hover {
    color: var(--primary-blue-lighter);
    transform: translateY(-1px);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -8px; /* 调整到菜单项底部 */
    left: 0.5rem;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav a:hover::after {
    width: calc(100% - 1rem); /* 减去左右padding */
}

.nav .dropdown {
    position: relative;
}

.nav .dropdown > a::after {
    bottom: -8px;
    left: 0.5rem;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    transition: width 0.3s ease;
    border-radius: 2px;
    border: none; /* 移除之前的箭头样式 */
}

.nav .dropdown:hover > a::after {
    width: calc(100% - 1.7rem); /* 为箭头留出空间 */
    transform: none; /* 取消旋转变换 */
}

.nav .dropdown > a .dropdown-arrow {
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.3s ease;
}

.nav .dropdown:hover > a .dropdown-arrow {
    transform: translateY(-30%) rotate(180deg);
}

.nav .dropdown-menu {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    /*background: var(--white);*/
    background: rgba(15, 23, 42, 0.98);
    min-width: auto;
    width: max-content;
    max-width: 90vw;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /*border: 1px solid var(--border-color);*/
    border: 1px solid rgba(100, 116, 139, 0.3);
    z-index: 1001;
    display: block;
   /* flex-wrap: wrap;
    gap: 0.5rem 1.5rem;*/
}

.nav .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav .dropdown-menu li {
    width: auto;
    border-bottom: none;
    white-space: nowrap;
}

.nav .dropdown-menu a {
    padding: 0.5rem 0;
    /*color: var(--text-secondary);*/
    color: var(--text-secondary-on-dark);
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    transition: all 0.2s ease;
    border: none;
    position: relative;
}

.nav .dropdown-menu a:hover {
    background: transparent;
    /*color: var(--primary-blue);*/
    color: var(--primary-blue-lighter);
    transform: none;
}

/* 二级菜单项的下划线效果 */
.nav .dropdown-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
    display: block;
}

.nav .dropdown-menu a:hover::after {
    width: 100%;
}

.cta-button {
    /*background: var(--primary-blue);
    color: var(--white) !important;*/
    background: var(--primary-blue-light);
    color: var(--text-on-dark) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    /*background: var(--primary-blue-dark);*/
    background: var(--primary-blue-lighter);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.cta-button::after {
    display: none;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
    position: relative;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: none !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mobile-menu-toggle:focus,
.mobile-menu-toggle:active,
.mobile-menu-toggle:hover {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    /*background: var(--text-primary);*/
    background: var(--text-on-dark);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
    position: absolute;
    left: 5px;
    /*filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));*/
}

/* 初始状态 - 三条横线 */
.mobile-menu-toggle span:nth-child(1) {
    top: 9px;
    transform: none;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 14px;
    opacity: 1;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 19px;
    transform: none;
}

/* 激活状态 - 对称的叉叉 */
.mobile-menu-toggle.active span:nth-child(1) {
    top: 14px;
    transform: rotate(45deg);
    /*background: var(--primary-blue-light);*/
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    top: 14px;
    transform: rotate(-45deg);
    /*background: var(--primary-blue-light);*/
}

/* ===== Hero 区域 ===== */
.hero {
    margin-top: 0;
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.header + .hero {
    margin-top: 0;
    padding-top: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: linear-gradient(135deg, 
        rgba(30, 64, 175, 0.85) 0%, 
        rgba(30, 64, 175, 0.7) 50%, 
        rgba(13, 148, 136, 0.6) 100%);*/
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.9) 0%, 
        rgba(30, 41, 59, 0.8) 50%, 
        rgba(96, 165, 250, 0.6) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: 
        radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.2) 0%, transparent 50%);*/
    background: 
        radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 211, 153, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    padding: 0 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.hero-actions {
    opacity: 0;
    animation: fadeInUp 1s ease 1.1s forwards;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: var(--white);
    box-shadow: 
        0 4px 12px rgba(30, 64, 175, 0.3),
        0 2px 4px rgba(30, 64, 175, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(30, 64, 175, 0.4),
        0 4px 8px rgba(30, 64, 175, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue-light);
    border: 2px solid var(--primary-blue-light);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background: var(--primary-blue-light);
    color: var(--text-on-dark);
    transform: translateY(-2px);
}

/* 通知样式 - 深色主题 + 区域阴影 */
.preview {
    padding: 2rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 211, 153, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.preview .section-title {
    color: var(--text-on-dark);
    position: relative;
    text-align: center; 
}

.preview .section-title::after {
    background: linear-gradient(90deg, var(--primary-blue-light), var(--accent-teal-light));
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.grid.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(100, 116, 139, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(52, 211, 153, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
  border-color: rgba(96, 165, 250, 0.5);
}

.card:hover::before {
    opacity: 1;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(96, 165, 250, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

.card:hover::after {
    left: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 15px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(96, 165, 250, 0.5);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1rem 1rem 0 1rem;
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 6px 12px rgba(96, 165, 250, 0.4));
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(96, 165, 250, 0.4));
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    /*color: white;*/
    color: var(--text-on-dark);
    position: relative;
    display: inline-block;
}

.card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    /*background: linear-gradient(90deg, #60a5fa, #34d399);*/
    background: linear-gradient(90deg, var(--primary-blue-light), var(--accent-teal-light));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.card:hover h3::after {
    width: 60px;
}

.card p {
    color: var(--text-secondary-on-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 1.05rem;
}

.card-features {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.card-features li {
    padding: 0.75rem 0;
    /*color: #cbd5e1;*/
    color: var(--text-secondary-on-dark);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
    position: relative;
    padding-left: 2rem;
    transition: all 0.3s ease;
}

.card-features li:hover {
    /*color: #60a5fa;*/
    color: var(--primary-blue-lighter);
    transform: translateX(5px);
}

.card-features li:last-child {
    border-bottom: none;
}

.card-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    /*background: linear-gradient(135deg, #60a5fa, #34d399);*/
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-teal-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.card-link {
    color: var(--primary-blue-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
    cursor: pointer; /* 添加手型光标 */
    position: relative; /* 确保链接在层级上方 */
    z-index: 10; /* 提高层级 */
}

.card-link:hover {
    color: var(--primary-blue-lighter);
    gap: 0.75rem;
}

.card-actions {
    text-align: center;
    position: relative;
    z-index: 2;
}

.card-badge {
    position: absolute;
    top: 3rem;
    left: 3rem;
    background: linear-gradient(135deg, var(--accent-teal-light), var(--accent-teal-dark));
    color: var(--text-on-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(13, 148, 136, 0.3);
}

.card-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat .number {
    display: block;
    font-size: 1.75rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-teal-light), var(--primary-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(30, 64, 175, 0.2));
}

.stat .label {
    font-size: 0.875rem;
    color: var(--text-secondary-on-dark);
    margin-top: 0.25rem;
}

/* 技术指标 - 深色主题 */
.tech-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /*gap: 2rem;*/
    gap: 1.5rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    /*padding: 3rem 2rem;*/
    padding: 2rem 1.5rem 1rem 1.5rem;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.tech-stat {
    text-align: center;
    /*padding: 1.5rem;*/
    padding: 1rem;
    position: relative;
}

.tech-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    /*background: linear-gradient(90deg, #60a5fa, #34d399);*/
    background: linear-gradient(90deg, var(--primary-blue-light), var(--accent-teal-light));
    border-radius: 2px;
}

.tech-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    /*background: linear-gradient(135deg, #60a5fa, #34d399);*/
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Arial', sans-serif;
    letter-spacing: -1px;
}

.tech-label {
    font-size: 0.9rem;
    /*color: #cbd5e1;*/
    color: var(--text-secondary-on-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--gray-800);
    color: var(--white);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--gray-200);
    font-size: 1.25rem;
}

.footer-section p {
    color: var(--gray-300);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section .wechat-hover {
    position: relative;
}

.footer-section .wechat-trigger {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}

.footer-section .wechat-trigger:hover {
    color: #fff;
}

.footer-section .qr-popup {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 140px;
    text-align: center;
}

.footer-section .qr-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 8px solid transparent;
    border-top-color: white;
}

.footer-section .wechat-hover:hover .qr-popup {
    display: block;
}

.footer-section .qr-popup img {
    display: block;
    margin: 0 auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.footer-section .qr-popup p {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #666;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-400);
    font-size: 0.875rem;
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-caption {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1rem;
    padding: 0.5rem;
}

/* 外部链接区域样式 */
.external-links-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.external-links-section h4 {
    text-align: center;
    margin-bottom: 5px;
    color: var(--text-on-dark);
    font-size: 18px;
    font-weight: 600;
}

/* 真正的1行4列布局 */
.external-links-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 2px;
    width: 100%;
}

.external-category {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

.external-category h5 {
    font-size: 13px;
    margin-bottom: 5px;
    color: #e2e8f0;
    font-weight: 600;
    text-align: center;
}

.external-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.external-category li {
    margin-bottom: 2px;
}

.external-category a {
    font-size: 12px;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.external-category a:hover {
    color: #60a5fa;
}

/* ===== 响应式设计 - 移动优先 ===== */

/* 小手机 (sm: 640px+) */
@media (min-width: 640px) {
    .company-name {
        display: none; /* 超小屏幕隐藏公司名称 */
    }

    .container {
        max-width: 640px;
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }    
}

/* 平板/大手机 (md: 768px+) */
@media (min-width: 768px) {
    .external-links-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .external-category {
        width: 100%;
    }

    .container {
        max-width: 768px;
    }
    
    .hero {
        height: 80vh;
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .grid.two-column {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .card-image {
        height: 180px;
    }
    
    .tech-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        padding: 1.5rem 1.5rem 0 1.5rem;
    }
    
    .card {
        padding: 1.5rem 2rem;
    }
    
    .card-content {
        padding: 1rem 1rem 0 1rem;
    }
    
    .card-image {
        height: 250px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal-close {
        top: -50px;
        right: 10px;
    }
    
    .modal-caption {
        bottom: -60px;
    }
}

/* 移动端导航菜单样式 */
@media (max-width: 1023px) {
    .company-name {
        font-size: 1rem;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 180px; /* 固定宽度，不占满屏幕 */
        /*width: 100%;
        max-width: 320px;*/
        /*background: var(--bg-primary);*/
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        display: none;
        z-index: 1000;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding: 80px 0 0 0;
        overflow-y: auto;
    }
    
    .nav.active {
        display: flex;
        transform: translateX(0);
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0;
        text-align: left;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .nav li {
        width: 100%;
        border-bottom: 1px solid var(--gray-500);
    }
    
    .nav a {
        font-size: 0.9rem;
        padding: 1rem 1rem;
        display: block;
        width: 100%;
        /*color: var(--text-primary);*/
        /*color: rgba(255, 255, 255, 0.9);*/
        color: var(--text-on-dark);
        transition: all 0.2s ease;
    }

    .nav a:hover {
        color: #60a5fa;
    }    
    
    /* 移除移动端导航的下划线动画 */
    .nav a::after {
        display: none;
    }

    .nav .dropdown > a .dropdown-arrow {
        display: none;
    }

    .nav .dropdown > a {
        position: relative;
        padding-right: 3rem;
        display: flex;
    }
    
    .nav .dropdown > a::after {
        content: '+';
        position: absolute;        
        right: 1rem;
        top: 50% !important;
        transform: translateY(-50%) !important;
        /*font-size: 1.2rem;
        font-weight: 300;*/
        /*color: var(--primary-blue);*/
        /*transition: transform 0.3s ease;*/
        /*background: rgba(30, 64, 175, 0.1);*/
        color: var(--primary-blue-light);
        background: rgba(96, 165, 250, 0.15);
        width: 24px !important;
        height: 24px !important;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;      
        left: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;  
    }
    
    .nav .dropdown.active > a::after {
        content: '-';
        position: absolute;        
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        /*background: var(--primary-blue);
        color: var(--white);*/
        background: var(--primary-blue-light);
        color: var(--text-on-dark);
        width: 24px;
        height: 24px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;      
        left: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;  
    }
    
    .nav .dropdown-menu {
        display: block;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        background: rgba(30, 41, 59, 0.95);
        border-left: 3px solid var(--primary-blue-light);
        margin-left: 0;
        margin-top: 0;
        margin-bottom: 0;
        border-radius: 0;
        padding: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                   opacity 0.3s ease,
                   margin 0.3s ease;
        box-shadow: none;
        transform: none;
        position: relative;
        width: 100%;
        border: 1px solid rgba(100, 116, 139, 0.3);
        backdrop-filter: blur(10px);
    }

    .nav .dropdown.active .dropdown-menu {
        max-height: 400px;
        opacity: 1;
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }

    .nav .dropdown-menu a {
        padding: 0.875rem 1rem 0.875rem 1.5rem;
        font-size: 0.95rem;
        color: var(--text-secondary-on-dark);
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
        background: transparent;
        border-bottom: 1px solid rgba(100, 116, 139, 0.2);
        position: relative;
        display: block;
    }

    .nav .dropdown-menu a:last-child {
        border-bottom: none;
    }

    .nav .dropdown-menu a:hover {
        color: var(--primary-blue-lighter);
        background: rgba(96, 165, 250, 0.1);
        border-left-color: var(--primary-blue-light);
    }

    .nav .dropdown-menu a:active {
        background: rgba(96, 165, 250, 0.2);
    }
        
    /* 移动端联系我们按钮特殊样式 */
    .nav .cta-button {
        margin: 1rem;
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
        /*background: var(--primary-blue);*/
        background: var(--primary-blue-light);
        color: var(--white);
        border-radius: 8px;
        transition: all 0.3s ease;
        text-align: center;
        width: calc(100% - 3rem);
        display: block;
    }
    
    .nav .cta-button:active {
        /*background: var(--primary-blue-dark);*/
        background: var(--primary-blue-lighter);
        transform: scale(0.98);
    }

    .nav .dropdown-menu .cta-button {
        margin: 0.5rem 1.5rem;
        width: calc(100% - 3rem);
        text-align: center;
        /*background: var(--primary-blue);*/
        background: var(--primary-blue-light);
        color: var(--white);
        border-radius: 6px;
        padding: 0.75rem 1.5rem;
    }

    .nav .dropdown-menu .cta-button:hover {
        /*background: var(--primary-blue-dark);*/
        background: var(--primary-blue-lighter);
        transform: translateY(-1px);
    }
}

/* 小桌面/平板横屏 (lg: 1024px+) */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding: 0 2rem;
    }

    .company-name {
        display: block;
        font-size: 1.2rem;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav {
        display: block !important;
    }
    
    .hero {
        height: 85vh;
        min-height: 700px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-content {
        max-width: 900px;
    }

    .preview {
        padding: 2rem 0;
    }
    
    .card {
        padding: 1.5rem;
    }

    .card-image {
        height: 220px;
    }
    
    .tech-number {
        font-size: 1.5rem;
    }
    
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .grid.two-column {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .card-content {
        padding: 1rem 1rem 0 1rem;
    }
    
    .cases-preview,
    .solutions-preview,
    .products-preview {
        padding: 2rem 0;
    }
}

/* 桌面 (xl: 1280px+) */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .case-image {
        height: 280px;
    }
}

/* 大桌面 (2xl: 1536px+) */
@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
    
    .hero {
        height: 90vh;
        min-height: 800px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
}

/* ===== 特殊设备适配 ===== */

/* 超小手机 */
@media (max-width: 374px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* 平板竖屏优化 */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
    .hero {
        height: 75vh;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
}

/* 平板横屏优化 */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    .hero {
        height: 80vh;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 减少动画（尊重用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 黑暗模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-muted: #374151;
        --border-color: #4b5563;
    }
    
    .header {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: var(--border-color);
    }
    
    .nav a {
        color: var(--text-primary);
    }
    
    .mobile-menu-toggle span {
        background: var(--text-primary);
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(30, 64, 175, 0.7) 0%, rgba(13, 148, 136, 0.5) 100%);
    }
}