/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --secondary-color: #10b981;
    --tech-blue: #2563eb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 20px;
    position: relative;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand .logo {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    flex-shrink: 0;
}

.nav-brand .logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.nav-brand h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
    margin-right: 1rem;
}

/* 语言切换器 */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1.5rem;
}

.lang-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
    min-width: 50px;
    text-align: center;
    white-space: nowrap;
}

.lang-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    right: 20px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        linear-gradient(135deg, #1e3a8a 0%, #1e40af 25%, #2563eb 50%, #3b82f6 75%, #60a5fa 100%),
        radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(37, 99, 235, 0.4) 0%, transparent 50%);
    color: white;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg width="120" height="120" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.6;
    animation: pulse 4s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 10% 60%, rgba(96, 165, 250, 0.2) 0%, transparent 25%),
        radial-gradient(circle at 90% 20%, rgba(59, 130, 246, 0.25) 0%, transparent 35%);
    animation: rotate 20s linear infinite;
}

/* 额外的背景层 */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-bg-layer-1 {
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
    animation: slide 25s linear infinite;
}

.hero-bg-layer-2 {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        );
    animation: slide 30s linear infinite reverse;
}

@keyframes slide {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(100px) translateY(100px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
}

/* 装饰性几何图形 */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 0;
}

.hero-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    right: 15%;
    animation: float 8s ease-in-out infinite reverse;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
    animation: float 7s ease-in-out infinite;
}

.hero-shape-4 {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 5%;
    animation: float 9s ease-in-out infinite;
}

.hero-shape-5 {
    width: 180px;
    height: 180px;
    top: 20%;
    right: 5%;
    animation: float 7.5s ease-in-out infinite reverse;
}

/* 额外的装饰线条 */
.hero-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    z-index: 0;
}

.hero-line-1 {
    width: 2px;
    height: 200px;
    top: 15%;
    left: 20%;
    animation: lineMove 10s ease-in-out infinite;
}

.hero-line-2 {
    width: 200px;
    height: 2px;
    bottom: 25%;
    right: 10%;
    animation: lineMove 12s ease-in-out infinite reverse;
}

.hero-line-3 {
    width: 150px;
    height: 2px;
    top: 60%;
    left: 15%;
    animation: lineMove 8s ease-in-out infinite;
}

/* 六边形装饰 */
.hero-hexagon {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
    z-index: 0;
    animation: hexRotate 15s linear infinite;
}

.hero-hexagon-1 {
    top: 25%;
    right: 25%;
}

.hero-hexagon-2 {
    bottom: 30%;
    left: 20%;
    animation-duration: 20s;
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes lineMove {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 0.6; transform: translateX(20px); }
}

@keyframes hexRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

/* ===== Section 通用样式 ===== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

#services .section-header {
    margin-bottom: 0.75rem;
}

#services .section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#services .section-subtitle {
    font-size: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* ===== Core Services Highlights Section ===== */
.core-services {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--bg-white), var(--bg-light));
}

.core-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.core-service-card {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.core-service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--tech-blue));
    transform: scaleX(0);
    transition: var(--transition-slow);
}

.core-service-card:hover::after {
    transform: scaleX(1);
}

.core-service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.core-service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: var(--transition);
}

.core-service-card:hover .core-service-icon {
    transform: scale(1.1) rotate(5deg);
}

.core-service-card h3 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.core-service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.core-service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.core-service-link:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .core-services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===== About Section ===== */
.about {
    background-color: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    margin-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.features-list li strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.features-list li p {
    color: var(--text-light);
    margin: 0;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

/* ===== Services Section ===== */
.services {
    padding-bottom: 4rem;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 4rem;
}

/* 商业保险 - 单独占一排 */
.service-card-featured {
    width: 100%;
    max-width: 100%;
}

/* 汽车保险和房屋保险 - 品字形布局容器 */
.services-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 2rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .services-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.service-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    padding-bottom: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: visible;
    margin-bottom: 0;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: var(--transition-slow);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

/* 服务卡片头部：图标和标题在同一行 */
.service-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.service-card > p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.service-features {
    list-style: none;
    display: block;
}

/* 商业保险的特性列表 - 两列布局 */
.service-card-featured .service-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

/* 移动端单列显示 */
@media (max-width: 768px) {
    .service-card-featured .service-features {
        grid-template-columns: 1fr;
    }
}

.service-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-light);
    line-height: 1.8;
}

.contact-form-wrapper {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.form-success {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 6px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.form-success p {
    margin: 0;
}

.form-success p[style*="color: #ef4444"] {
    color: #ef4444 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 提交按钮禁用状态 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-brand .logo {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    .nav-brand h2 {
        font-size: 1.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .language-switcher {
        position: fixed;
        right: 20px;
        top: 80px;
        z-index: 1001;
        margin-left: 0;
    }
    
    .lang-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 45px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 1;
        min-width: 150px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }
}

