@charset "utf-8";

/*
 * ========================================
 * Hero 轮播样式（site_pages 私有资源）
 * ========================================
 * 文件路径：includes/site_pages/partial_css/hero-home-featured.css
 *
 * 由原 includes/components/hero/hero.css 迁移；规则未改，与 hero-home-featured.php DOM 一致。
 * 依赖：frontend-colors.css、main.css（.site-main）、Swiper 基础样式。
 * ========================================
 */

/* ====================================================================
 * Hero Section - 轮播图容器
 * ==================================================================== */

/* 首页观感用的尺寸变量。
 * zh-cn/index.php 曾在 assets/zh-cn/css/index.css 里对 .page-hero 覆写；
 * partial 单独引用时若没有 index.css，会退回 hero.css 默认（max-height 520px），显得偏矮。
 * 此处与 index.css 「Home Hero Override」保持一致，避免出现「同款 DOM/CSS 却因少引一个首页 CSS 而更矮」。 */
.site-main .page-hero {
    --hero-aspect-ratio: 16 / 9;
    --hero-max-height: 680px;
    --hero-min-height: 320px;
    --hero-fallback-height: 580px;
    --hero-object-fit: cover;
    --hero-object-position: center;

    position: relative;
    width: 100%;
    aspect-ratio: var(--hero-aspect-ratio, 16 / 9);
    max-height: var(--hero-max-height, 680px);
    min-height: var(--hero-min-height, 240px);
    overflow: hidden;
}

@supports not (aspect-ratio: 16 / 9) {
    .site-main .page-hero {
        height: var(--hero-fallback-height, 580px);
    }
}

.site-main .heroSwiper {
    width: 100%;
    height: 100%;
}

.site-main .hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-main .hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: var(--hero-object-fit, cover);
    object-position: var(--hero-object-position, center);
}

/* <picture> 包装层须有确定尺寸，img 的 height:100% 才能解析、object-fit: cover 才会生效；
   否则 <1920px 视口（如 125% 缩放的笔记本）下图片按原始比例渲染，容器上下留白。
   对齐 assets/zh-cn/css/about-us.css 的 .about-hero-picture 处理。 */
.site-main .hero-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.site-main .hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.35) 50%,
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 1;
}

.site-main .hero-slide .container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    max-width: 100% !important;
    margin-left: 0;
    margin-right: 0;
    padding-left: 2rem;
    padding-right: 2rem;
}

.site-main .hero-slide-content {
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 2rem;
}

.site-main .hero-slide-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out;
}

.site-main .hero-slide-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--primary-color, #FFB366);
    border-radius: 2px;
}

.site-main .hero-slide-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.site-main .hero-slide-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.site-main .btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-main .btn-hero-primary::after {
    content: '→';
    font-size: 1.05em;
    transition: transform 0.3s ease;
}

.site-main .btn-hero-primary:hover {
    background: #fff;
    color: var(--primary-color, #FFB366);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.site-main .btn-hero-primary:hover::after {
    transform: translateX(3px);
}

.site-main .btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 500;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-main .btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.site-main .hero-pagination {
    bottom: 30px !important;
}

.site-main .hero-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.site-main .hero-pagination .swiper-pagination-bullet-active {
    width: 30px;
    background: #fff;
    border-radius: 6px;
}

.site-main .hero-button-prev,
.site-main .hero-button-next {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
}

.site-main .hero-button-prev {
    left: 30px;
}

.site-main .hero-button-next {
    right: 30px;
}

.site-main .hero-button-prev::after,
.site-main .hero-button-next::after {
    font-size: 20px;
    font-weight: 700;
}

.site-main .hero-button-prev:hover,
.site-main .hero-button-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .site-main .hero-slide-title {
        font-size: 2.5rem;
    }

    .site-main .hero-slide-subtitle {
        font-size: 1.25rem;
    }

    .site-main .hero-button-prev,
    .site-main .hero-button-next {
        width: 40px;
        height: 40px;
    }

    .site-main .hero-button-prev {
        left: 15px;
    }

    .site-main .hero-button-next {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .site-main .hero-slide-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .site-main .hero-slide-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .site-main .hero-slide-cta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .site-main .btn-hero-primary,
    .site-main .btn-hero-outline {
        width: auto;
        min-width: 180px;
        padding: 0.75rem 1.75rem;
        font-size: 1rem;
    }

    .site-main .hero-button-prev,
    .site-main .hero-button-next {
        width: 36px;
        height: 36px;
        display: none;
    }

    .site-main .hero-pagination {
        bottom: 20px !important;
    }

    .site-main .hero-pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }

    .site-main .hero-pagination .swiper-pagination-bullet-active {
        width: 24px;
    }

    .site-main .hero-slide .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .site-main .hero-slide-title {
        font-size: 1.75rem;
    }

    .site-main .hero-slide-subtitle {
        font-size: 0.9rem;
    }

    .site-main .hero-slide-content {
        padding: 1rem;
    }

    .site-main .hero-slide .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
