/* style.css */
/* 基础变量 */
:root {
    --tech-blue: #003366;
    --accent-blue: #0066cc;
    --light-blue: #f0f8ff;
    --text-dark: #333333;
    --text-light: #ffffff;
    --success-green: #28a745;
    --error-red: #dc3545;
    --border-color: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部导航 */
header {
    background: var(--tech-blue);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
}

/* 主内容区 */
.hero {
    margin-top: 80px;
    background: var(--light-blue);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--tech-blue);
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* 服务卡片 */
.services {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #ffffff;
    border: 1px solid #e3f2fd;
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 102, 204, 0.1);
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.12);
}

.service-card h3 {
    color: var(--tech-blue);
    margin: 1rem 0 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.service-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-blue);
}

.service-card p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* 咨询表单 */
.contact {
    background: var(--light-blue);
    padding: 4rem 2rem;
    margin-top: 3rem;
    flex: 1;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-title {
    text-align: center;
    color: var(--tech-blue);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 102, 204, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
    outline: none;
}

.form-textarea {
    height: 150px;
    resize: vertical;
}

/* 错误状态 */
.form-input.error,
.form-textarea.error {
    border-color: var(--error-red);
    background: #fff5f5;
    animation: shake 0.4s ease;
}

/* 按钮样式 */
.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--tech-blue) 0%, var(--accent-blue) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.form-submit:disabled {
    background: linear-gradient(135deg, #6b8ca8 0%, #4d8fc4 100%);
    opacity: 0.7;
    cursor: not-allowed;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s ease;
}

.form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 102, 204, 0.25);
}

.form-submit:hover::before {
    left: 100%;
}

/* 加载状态 */
.loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    color: var(--tech-blue);
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid var(--light-blue);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 结果提示 */
.result-alert {
    display: none;
    text-align: center;
    padding: 1.2rem;
    margin: 1rem auto;
    border-radius: 8px;
    font-weight: 500;
    max-width: 600px;
    transition: var(--transition);
}

.result-alert.success {
    color: var(--success-green);
    background: rgba(40, 167, 69, 0.1);
}

.result-alert.error {
    color: var(--error-red);
    background: rgba(220, 53, 69, 0.1);
}

/* 页脚样式 */
footer {
    background-color: var(--tech-blue);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.icp-info {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.9em;
    flex-wrap: wrap;
    justify-content: center;
}

.divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
}

.icp-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.icp-info a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* 公安备案图标样式 */
.ga-beian {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.ga-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    transition: var(--transition);
}

.ga-beian:hover .ga-icon {
    filter: none;
    transform: rotate(360deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .services {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .contact {
        padding: 2rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .icp-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    .divider {
        display: none;
    }
    .ga-beian {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    
    .ga-icon {
        width: 24px;
        height: 24px;
    }
}

@media (min-width: 1200px) {
    .hero {
        padding: 6rem 2rem;
    }
}

/* 动画系统 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(6px);
    }
    75% {
        transform: translateX(-6px);
    }
}

.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.4s; }
.service-card:nth-child(3) { animation-delay: 0.6s; }
.service-card:nth-child(4) { animation-delay: 0.8s; }