/* ============================================
   青岛华捷汽轮机有限公司 - 网站主样式表
   ============================================ */

/* CSS变量 */
:root {
    /* 色彩系统 */
    --color-primary: #1a3a5c;
    --color-primary-dark: #0f2540;
    --color-primary-light: #2d5a8a;
    --color-accent: #00a8e8;
    --color-accent-dark: #0086b6;
    --color-orange: #e85d04;
    --color-bg: #f5f7fa;
    --color-bg-dark: #0f1729;
    --color-bg-card: #ffffff;
    --color-bg-white: #ffffff;
    --color-card: #ffffff;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-text-secondary: #718096;
    --color-text-white: #ffffff;
    --color-border: #e2e8f0;
    
    /* 字体 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* 间距 */
    --container-max: 1200px;
    --section-padding: 100px;
    --grid-gap: 30px;
    
    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.6;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* 容器 */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   按钮样式
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-text-white);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text-white);
    border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--color-text-white);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--color-text-white);
    border-color: rgba(255,255,255,0.4);
}

.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: var(--color-text-white);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
    border-radius: 8px;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background-color: transparent;
    color: var(--color-accent);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-text:hover {
    color: var(--color-accent-dark);
    gap: 10px;
}

/* ============================================
   导航栏
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.logo-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.logo-brand {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.logo-sub {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

/* 导航菜单 */
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: relative;
    white-space: nowrap;
}

.nav-item > a {
    display: block;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.nav-item:hover > a,
.nav-item.active > a {
    color: var(--color-accent);
    background-color: rgba(0,168,232,0.08);
}

/* 下拉菜单 */
.nav-item.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.dropdown li a:hover {
    background-color: var(--color-bg);
    color: var(--color-accent);
}

/* 头部操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* 语言切换器 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.lang-switcher a {
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--color-text-light);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.lang-switcher a:hover {
    color: var(--color-accent);
    background-color: rgba(0,168,232,0.08);
}

.lang-switcher a.active {
    color: var(--color-accent);
    background-color: rgba(0,168,232,0.12);
    font-weight: 600;
}

.lang-switcher .lang-divider {
    color: var(--color-border);
    font-size: 12px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: all var(--transition-normal);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

body.menu-open {
    overflow: hidden;
}

/* ============================================
   通用区块样式
   ============================================ */
.section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header.light {
    color: var(--color-text-white);
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-accent);
    background-color: rgba(0,168,232,0.1);
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.section-header.light .section-tag {
    background-color: rgba(255,255,255,0.15);
    color: var(--color-text-white);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-header.light .section-title {
    color: var(--color-text-white);
}

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

.section-header.light .section-desc {
    color: rgba(255,255,255,0.8);
}

.section-footer {
    text-align: center;
    margin-top: 48px;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background-color: var(--color-bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 32px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-white);
    margin-bottom: 16px;
}

.footer-links ul li,
.footer-contact ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--color-accent);
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.contact-icon {
    font-size: 16px;
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.footer-bottom p {
    margin-bottom: 4px;
}

/* ============================================
   响应式设计
   ============================================ */
/* 中窄屏 (860-1024px)：导航紧凑排列，等比缩放 */
@media (max-width: 1024px) {
    .header-inner {
        height: 72px;
        gap: 8px;
    }

    .logo {
        gap: 10px;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
    }

    .logo-brand {
        font-size: 18px;
    }

    .logo-sub {
        font-size: 12px;
    }
    
    .nav-list {
        gap: 0;
    }

    .nav-item > a {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    .lang-switcher {
        font-size: 11px;
    }

    .lang-switcher a {
        padding: 2px 6px;
    }
    
    .menu-toggle span {
        width: 20px;
        height: 2px;
    }

    .menu-toggle {
        gap: 4px;
        padding: 6px;
    }
}

/* 窄屏 (<860px)：右侧抽屉菜单 */
@media (max-width: 860px) {
    .header {
        backdrop-filter: none;
    }

    .header-inner {
        overflow: visible;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        background-color: #ffffff;
        box-shadow: -4px 0 24px rgba(0,0,0,0.15);
        padding: 88px 24px 24px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 9999;
    }
    
    .nav.active {
        transform: translateX(0);
    }

    /* 遮罩层 */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    
    .nav-item > a {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 16px;
        background-color: transparent;
    }
    
    .dropdown li a {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 10000;
        width: 36px;
        height: 36px;
    }

    .logo-brand {
        font-size: 16px;
    }

    .logo-sub {
        font-size: 10px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .lang-switcher {
        font-size: 11px;
    }

    .lang-switcher a {
        padding: 2px 6px;
    }

    .nav {
        top: 0;
        padding-top: 72px;
    }

    .footer-links h4,
    .footer-contact h4 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .footer-links ul li a {
        font-size: 12px;
    }

    .footer-contact ul li {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .footer-bottom {
        padding: 16px 0;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ====== 悬浮联系按钮 ====== */
.floating-contact {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 120, 180, 0.35);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.floating-contact:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 120, 180, 0.45);
}

@media (max-width: 768px) {
    .floating-contact {
        right: 16px;
        bottom: 16px;
        padding: 12px 18px;
        font-size: 14px;
    }
}

/* ====== 在线咨询弹窗 ====== */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(11, 26, 44, 0.7);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-bg-white);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s ease;
}

.contact-modal.active .contact-modal-box {
    transform: translateY(0) scale(1);
}

.contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
}

.contact-modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.contact-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-modal-close:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.contact-modal-body {
    padding: 20px 28px 28px;
}

.contact-modal-body .contact-form-card {
    padding: 0;
    box-shadow: none;
    border: none;
    background: transparent;
}

.contact-modal-body .contact-form-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.contact-modal-body .contact-form-input,
.contact-modal-body .contact-form-select,
.contact-modal-body .contact-form-textarea {
    background: var(--color-bg);
}

.contact-modal-body .contact-form-hint {
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .contact-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .contact-modal-box {
        max-height: 92vh;
        border-radius: 16px;
    }

    .contact-modal-header {
        padding: 20px 20px 0;
    }

    .contact-modal-header h3 {
        font-size: 20px;
    }

    .contact-modal-body {
        padding: 16px 20px 20px;
    }

    .contact-modal-body .contact-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
