/* ========================================
   荣科铭峰 - 精密工业网站建设
   首页专用样式
   ======================================== */

/* 优势板块 */
.advantages {
    background: #fff;
    padding: 80px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.advantage-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    transition: all 0.4s ease;
    border: 1px solid rgba(10, 25, 47, 0.05);
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(10, 25, 47, 0.1);
    background: linear-gradient(135deg, #0a192f 0%, #1a3a5c 100%);
}

.advantage-card:hover .advantage-icon {
    background: rgba(255, 255, 255, 0.1);
}

.advantage-card:hover .advantage-title,
.advantage-card:hover .advantage-text {
    color: #fff;
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(10, 25, 47, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.advantage-icon img {
    width: 40px;
    height: 40px;
}

.advantage-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 16px;
    transition: color 0.4s ease;
}

.advantage-text {
    color: var(--text-gray);
    line-height: 1.7;
    transition: color 0.4s ease;
}

/* 服务板块 */
.services {
    background: linear-gradient(135deg, #f8fafc 0%, #e8ecf1 100%);
}

.service-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.service-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-image {
    transform: scale(1.1);
}

.service-image-wrapper {
    overflow: hidden;
}

.service-content {
    padding: 28px;
}

.service-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.service-text {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-link {
    color: var(--accent-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.service-link:hover::after {
    transform: translateX(5px);
}

/* 产品板块 */
.products {
    background: #fff;
}

.product-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.product-tab {
    padding: 12px 28px;
    background: #f5f7fa;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-tab.active,
.product-tab:hover {
    background: var(--primary-dark);
    color: #fff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #e8ecf1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.product-info {
    padding: 24px;
}

.product-category {
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.product-specs {
    list-style: none;
    margin-bottom: 20px;
}

.product-specs li {
    font-size: 14px;
    color: var(--text-gray);
    padding: 6px 0;
    border-bottom: 1px dashed #e8ecf1;
    display: flex;
    justify-content: space-between;
}

.product-specs li:last-child {
    border-bottom: none;
}

/* 案例板块 */
.cases {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: #fff;
}

.cases .section-title {
    color: #fff;
}

.cases .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.case-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 320px;
    cursor: pointer;
}

.case-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-card:hover .case-image {
    transform: scale(1.1);
}

.case-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95), transparent);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.case-card:hover .case-overlay {
    transform: translateY(0);
}

.case-category {
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.case-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.case-location {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 新闻板块 */
.news {
    background: #f8fafc;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 24px;
}

.news-date {
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-date::before {
    content: '📅';
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.news-link:hover::after {
    transform: translateX(5px);
}

/* CTA 板块 */
.cta {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-light) 100%);
    padding: 100px 0;
    text-align: center;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-white {
    background: #fff;
    color: var(--accent-blue);
}

.btn-white:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* 响应式 */
@media (max-width: 992px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .advantages-grid,
    .product-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 32px;
    }

    .cta-text {
        font-size: 16px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
