/* 知识产权服务平台 - 前台样式 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

/* 页面顶部 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav {
    padding: 15px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark-color);
}

/* 轮播图 */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.slide-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 16px;
}

.slide-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

/* 通用区块样式 */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    color: var(--dark-color);
    margin-bottom: 12px;
    font-weight: bold;
}

.section-subtitle {
    font-size: 18px;
    color: #6b7280;
}

/* 服务分类 */
.services-section {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.service-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-desc {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.8;
}

.service-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
}

.service-link:hover {
    text-decoration: underline;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 25px;
}

.product-category {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e7ff;
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

.product-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark-color);
    font-weight: 600;
}

.product-desc {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 14px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price .price {
    font-size: 24px;
    color: var(--danger-color);
    font-weight: bold;
}

.product-price .original-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 8px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-white {
    background: var(--white);
    color: var(--primary-color);
}

.btn-white:hover {
    background: #f3f4f6;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    display: block;
}

.text-center {
    text-align: center;
}

/* 特色功能 */
.why-choose-us {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.why-choose-us .section-title,
.why-choose-us .section-subtitle {
    color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.feature-item p {
    opacity: 0.9;
}

/* 案例展示 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.case-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.case-image {
    height: 200px;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-info {
    padding: 25px;
}

.case-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.case-client {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.case-desc {
    color: #6b7280;
    margin-bottom: 15px;
    font-size: 14px;
}

.case-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* 新闻资讯 */
.news-section {
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
}

.news-info {
    padding: 25px;
}

.news-meta {
    display: flex;
    gap: 20px;
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 12px;
}

.news-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.news-title a {
    color: var(--dark-color);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-summary {
    color: #6b7280;
    font-size: 14px;
}

/* 咨询表单 */
.consultation-section {
    background: var(--bg-light);
}

.consultation-box {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.consultation-info {
    padding: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.consultation-info h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.consultation-info > p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.consultation-features {
    list-style: none;
}

.consultation-features li {
    padding: 12px 0;
    font-size: 16px;
}

.consultation-form {
    padding: 60px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
}

/* 页脚 */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.social-links a {
    margin-right: 15px;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 12px;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
}

.back-to-top:hover {
    background: #1d4ed8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 20px;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .slide-title {
        font-size: 28px;
    }
    
    .slide-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .consultation-box {
        grid-template-columns: 1fr;
    }
    
    .consultation-info,
    .consultation-form {
        padding: 40px 30px;
    }
    
    .product-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

