/* ============================================================
   common.css — 全站公共样式
   包含：字体、统一头部（含移动端菜单）、统一底部、全局响应式
   注意：本文件在每页样式之后加载，保证头部底部全站一致
   ============================================================ */

/* ===== 字体 ===== */
@font-face {
    font-family: 'OPPOSans';
    src: url('../assets/fonts/OPPOSans-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'OPPOSans';
    src: url('../assets/fonts/OPPOSans-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'OPPOSans';
    src: url('../assets/fonts/OPPOSans-Medium.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ===== 统一头部 ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header .header-inner { display: flex; align-items: center; justify-content: space-between; height: 5.5rem; }
.header .logo { display: flex; align-items: center; flex-shrink: 0; }
.header .logo img { height: 3rem; width: auto; display: block; }
.header nav .nav-list { display: flex; align-items: center; gap: 3rem; font-size: 1.2rem; font-weight: 400; color: #333; }
.header .nav-list a { transition: color 0.2s; position: relative; padding: 0.25rem 0; font-weight: 400; }
.header .nav-list a:hover, .header .nav-list a.active { color: #0d3b24; }
.header .nav-list a.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #0d3b24; border-radius: 2px; }
.header .lang-switch { display: flex; gap: 0.6rem; font-size: 0.95rem; }
.header .lang-switch a { padding: 0.4rem 0.9rem; border-radius: 4px; transition: all 0.2s; color: #888; font-weight: 400; }
.header .lang-switch a.active { background: #0d3b24; color: #fff; font-weight: 700; }
.header .lang-switch a:hover { background: #0d3b24; color: #fff; }
.header .lang-switch a.inactive { color: #aaa; }
.header-right { display: flex; align-items: center; gap: 1rem; }

/* 汉堡按钮（桌面隐藏） */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 2.5rem; height: 2.5rem; padding: 0.5rem; background: none; border: none; cursor: pointer; z-index: 120; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: #0d3b24; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端下拉导航 */
.mobile-nav { display: none; flex-direction: column; padding: 0.5rem 1.5rem 1.25rem; border-top: 1px solid rgba(0,0,0,0.06); background: #fff; }
.mobile-nav a { display: block; padding: 0.85rem 0.25rem; font-size: 1.05rem; color: #333; border-bottom: 1px solid rgba(0,0,0,0.05); }
.mobile-nav a.active, .mobile-nav a:hover { color: #0d3b24; font-weight: 500; }

/* ===== 统一底部 ===== */
.footer {
    position: relative; overflow: hidden;
    color: rgba(255,255,255,0.7);
    padding: 5rem 0 2.5rem;
    background: linear-gradient(135deg, #062012, #0d3b24, #062012);
    background-size: 400% 400%;
    animation: footerGradient 14s ease infinite;
}
@keyframes footerGradient { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.footer::before { content: ''; position: absolute; top: -20%; right: -8%; width: 25rem; height: 25rem; background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 70%); border-radius: 50%; animation: footerFloat 10s ease-in-out infinite; pointer-events: none; }
@keyframes footerFloat { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-30px,-30px) scale(1.08)} }
.footer .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 3.75rem; margin-bottom: 3rem; position: relative; z-index: 2; }
.footer .logo img { height: 3.25rem; width: auto; filter: brightness(1.15); }
.footer h4 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; margin-bottom: 1.5rem; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 0.75rem; }
.footer ul li a { font-size: 1rem; color: rgba(255,255,255,0.85); transition: color 0.2s; font-weight: 400; }
.footer ul li a:hover { color: #95b88a; }
.footer-contact li { font-size: 1rem; color: rgba(255,255,255,0.85); margin-bottom: 0.875rem; line-height: 1.6; font-weight: 400; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.75rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 1rem; color: rgba(255,255,255,0.6); position: relative; z-index: 2; font-weight: 400; }

/* ===== 全局响应式 ===== */
@media (max-width: 1280px) {
    .header .nav-list { gap: 2rem; font-size: 1.1rem; }
}
@media (max-width: 1024px) {
    .header .header-inner { height: 4.75rem; }
    .header .logo img { height: 2.5rem; }
}
@media (max-width: 768px) {
    .header nav .nav-list { display: none; }
    .header .lang-switch { display: none; }
    .nav-toggle { display: flex; }
    .header .header-inner { height: 4rem; }
    .header .logo img { height: 2.25rem; }
    .mobile-nav.open { display: flex; }
    .footer { padding: 3.5rem 0 2rem; }
    .footer .footer-grid { grid-template-columns: 1fr !important; gap: 2.25rem; margin-bottom: 2rem; }
    .footer .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
@media (max-width: 480px) {
    .container { padding: 0 1.25rem; }
    .footer .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===== 全局移动端优化（参考 evac.com / roediger-vacuum.com 的手机版布局逻辑：
   单列堆叠、收紧留白、标题降级、图片铺满、触控友好） ===== */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    section { padding: 4.5rem 0 !important; }
    h1 { font-size: 2rem !important; line-height: 1.2 !important; }
    h2, .section-title { font-size: 1.7rem !important; line-height: 1.25 !important; }
    .container { padding: 0 1.25rem !important; }
    img { max-width: 100%; height: auto; }
}
@media (max-width: 480px) {
    section { padding: 3.75rem 0 !important; }
    h1 { font-size: 1.75rem !important; }
    h2, .section-title { font-size: 1.5rem !important; }
    .stat-number { font-size: 2.4rem; }
}
