/**
 * 首页样式 (Homepage Styles)
 * @version 2.0.0
 * @description 首页各模块样式 - 轮播、产品、案例、关于、新闻
 * @updated 2026-01-05
 */

/* ============================================
   轮播图 (Hero Slider)
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-bg-light);
}

.hero__slider {
    position: relative;
    width: 100%;
    cursor: grab;
    user-select: none;
}

.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

.hero__slide:first-child {
    position: relative;
}

.hero__slide.active {
    opacity: 1;
    z-index: 1;
}

.hero__slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* 轮播导航 */
.hero__nav {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.hero__prev,
.hero__next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero__prev:hover,
.hero__next:hover {
    background: var(--color-primary);
}

.hero__prev:hover svg,
.hero__next:hover svg {
    stroke: white;
}

.hero__prev svg,
.hero__next svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

/* 轮播指示点 */
.hero__dots {
    display: flex;
    gap: 8px;
}

.hero__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero__dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero__dot.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* ============================================
   通用模块样式 (Section)
   ============================================ */
.section {
    padding: 80px 0;
}

.section--products {
    background: var(--color-bg-white, #fff);
}

.section--cases {
    background: var(--color-bg-light, #f8f9fa);
}

.section--about {
    background: var(--color-bg-white, #fff);
}

.section--news {
    background: var(--color-bg-light, #f8f9fa);
}

.section__container {
    max-width: var(--container-lg);
    margin-inline: auto;
    padding: 0 var(--spacing-md);
}

/* 模块标题 */
.section__header {
    text-align: center;
    margin-bottom: 48px;
}

.section__subtitle {
    display: block;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.section__action {
    text-align: center;
    margin-top: 40px;
}

/* ============================================
   产品导航 (Products Navigation)
   ============================================ */
.products-nav {
    margin-bottom: 40px;
}

.products-nav__list {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

/* 全部产品链接 */
.products-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border: 2px solid var(--color-primary);
    border-radius: 30px;
    background: var(--color-primary);
    color: white;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.products-nav__link:hover,
.products-nav__link.active {
    background: var(--color-primary-dark, #d17e0a);
    border-color: var(--color-primary-dark, #d17e0a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 149, 19, 0.3);
}

/* 分类项容器 */
.products-nav__item {
    position: relative;
}

/* 分类展开按钮 */
.products-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--color-border);
    border-radius: 30px;
    background: white;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.products-nav__toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.products-nav__toggle[aria-expanded="true"] {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(232, 149, 19, 0.08);
}

.products-nav__toggle.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

/* 箭头图标 */
.products-nav__arrow {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease;
}

.products-nav__toggle[aria-expanded="true"] .products-nav__arrow {
    transform: rotate(180deg);
}

/* 子菜单 */
.products-nav__sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    padding: 12px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

/* 桌面端展开状态 - 仅1025px以上生效 */
@media (min-width: 1025px) {
    .products-nav__item.is-open .products-nav__sub {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.products-nav__sub-link {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.products-nav__sub-link:first-child {
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 4px;
    padding-bottom: 12px;
}

.products-nav__sub-link:hover {
    background: rgba(232, 149, 19, 0.08);
    color: var(--color-primary);
    padding-left: 24px;
}

/* ============================================
   产品网格 (Products Grid)
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

/* 产品卡片 */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.product-card__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.08);
}

.product-card__body {
    padding: 16px;
    text-align: center;
}

.product-card__title {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.product-card:hover .product-card__title {
    color: var(--color-primary);
}

/* ============================================
   案例网格 (Cases Grid)
   ============================================ */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.case-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.case-card:hover img {
    transform: scale(1.05);
}

.case-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.case-card__title {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* ============================================
   关于我们模块 (About Section)
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px;
}

.about-text__desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin: 0 0 24px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
}

.about-stat {
    text-align: center;
}

.about-stat__number {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.about-stat__label {
    font-size: 14px;
    color: var(--color-text-light);
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   新闻网格 (News Grid)
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-card__image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card__image img {
    transform: scale(1.05);
}

.news-card__body {
    padding: 20px;
}

.news-card__date {
    font-size: 13px;
    color: var(--color-primary);
    display: block;
    margin-bottom: 8px;
}

.news-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-card:hover .news-card__title {
    color: var(--color-primary);
}

/* ============================================
   通用按钮样式
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn--primary:hover {
    background: var(--color-primary-dark, #d17e0a);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(232, 149, 19, 0.3);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* ============================================
   关于我们网格 (About Grid)
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.about-grid__image {
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
}

.about-grid__image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-grid__image:hover img {
    transform: scale(1.03);
}

.about-grid__content {
    padding: 20px 0;
}

.about-grid__name {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px;
}

.about-grid__divider {
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin-bottom: 24px;
}

.about-grid__desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin: 0 0 32px;
}

/* ============================================
   统计数字网格 (Stats Grid)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
    padding: 48px 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #f59e0b 100%);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 10px 40px rgba(232, 149, 19, 0.2);
}

.stat-item {
    color: white;
}

.stat-num {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 14px;
    opacity: 0.95;
}

/* ============================================
   新闻列表 (News List)
   ============================================ */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   通用卡片样式 (Card Base)
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card__image {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-light);
}

.card__image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card__image img {
    transform: scale(1.05);
}

.card__body {
    padding: 20px;
}

.card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.card:hover .card__title {
    color: var(--color-primary);
}

.card__desc {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   产品卡片变体 (Card - Product)
   ============================================ */
.card--product {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card--product .card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card--product:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card--product .card__image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    aspect-ratio: 1/1;
}

.card--product .card__image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card--product:hover .card__image img {
    transform: scale(1.05);
}

.card--product .card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: white;
}

.card--product .card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    padding-bottom: 12px;
}

.card--product .card__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), #f59e0b);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.card--product:hover .card__title::after {
    width: 60%;
}

/* ============================================
   案例卡片变体 (Card - Case)
   ============================================ */
.card--case {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.card--case .card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card--case .card__body {
    flex: 1;
}

/* ============================================
   新闻卡片变体 (Card - News)
   ============================================ */
.card--news {
    display: flex;
    align-items: stretch;
    padding: 0;
    border-radius: var(--radius-md, 8px);
}

.card--news .card__link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 24px;
    gap: 24px;
}

.card--news .card__date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    padding-right: 24px;
    border-right: 2px solid var(--color-primary);
}

.card--news .card__date-day {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.card--news .card__date-month {
    display: block;
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 4px;
}

.card--news .card__body {
    flex: 1;
    padding: 0;
}

.card--news .card__title {
    font-size: 17px;
    margin-bottom: 8px;
}

.card--news .card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
