/**
 * Hero Slider — Frontend Swiper Styles
 *
 * Integrates with Crown Engine theme design system.
 * Uses CSS variables from the theme for colors and spacing.
 */

/* ========================================
   Slider Container
   ======================================== */

.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1920px; /* banner 基准尺寸 1920×800：超过 1920 的屏幕不拉伸 */
    height: 800px;
    margin: 0 auto;    /* 居中 */
    overflow: hidden;
    z-index: 1;
}

.hero-slider .swiper-wrapper {
    height: 100%;
}

/* Individual Slide — 图层(背景)与文字层分离
   Fixed 800px height; each slide fills the container so fade mode (absolute
   positioning + opacity toggle) and slide mode both render correctly.
   background-size 100% 100%: 整张图完整显示，不裁切边缘（cover 会切掉图上
   内容导致"显示不全"）。图按 1920×800 制作时桌面端 1:1 无损；其他比例的
   图整图可见、轻微拉伸，但不会被切掉。 */
.hero-slide {
    position: relative;
    width: 100%;
    height: 800px;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #06152B;
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    /* No full-screen dark overlay — the background image is now fully visible.
       A soft localised gradient is applied on .hero-slide__content instead, so
       white text stays readable without dimming the whole banner. */
    background: none;
    display: flex;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.hero-slide__overlay .container,
.hero-slide__overlay .hero-slide__content,
.hero-slide__overlay .hero-slide__buttons,
.hero-slide__overlay a {
    pointer-events: auto;
}

.hero-slide__content {
    position: relative;
    z-index: 3;
    max-width: 680px;
    color: #ffffff;
    user-select: text;
    -webkit-user-select: text;
    /* 无黑色阴影背景 — banner 图完整可见。文字可读性靠 title/subtitle
       自带的 text-shadow。 */
    padding: 2.5rem 2.5rem 2.5rem 0;
}

.hero-slide__title {
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.hero-slide__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero-slide__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-slide__buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-slide__buttons .btn--primary {
    background: #0B3D91;
    color: #ffffff;
    border: none;
}

.hero-slide__buttons .btn--primary:hover {
    background: #005BFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(11, 61, 145, 0.3);
}

.hero-slide__buttons .btn--primary svg {
    transition: transform 0.2s ease;
}

.hero-slide__buttons .btn--primary:hover svg {
    transform: translateX(3px);
}

/* ========================================
   Navigation — Arrows
   ======================================== */

.hero-slider__prev,
.hero-slider__next {
    color: #ffffff;
    background: rgba(11, 61, 145, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.hero-slider__prev::after,
.hero-slider__next::after {
    font-size: 18px;
    font-weight: 700;
}

.hero-slider__prev:hover,
.hero-slider__next:hover {
    background: #0B3D91;
    border-color: #0B3D91;
    color: #ffffff;
}

/* ========================================
   Navigation — Dots
   ======================================== */

.hero-slider__pagination {
    bottom: 24px !important;
}

.hero-slider__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.2s ease;
}

.hero-slider__pagination .swiper-pagination-bullet-active {
    background: #0B3D91;
    width: 28px;
    border-radius: 5px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .hero-slider,
    .hero-slide {
        height: 600px;
    }

    .hero-slide__title {
        font-size: 2.25rem;
    }

    .hero-slide__subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider,
    .hero-slide {
        height: 480px;
    }

    /* Narrow screens: text wraps taller; keep the block free of any dark
       backdrop so the banner image stays fully visible. */
    .hero-slide__content {
        padding: 1.5rem 1.5rem 1.5rem 1.25rem;
    }

    .hero-slide__title {
        font-size: 1.75rem;
    }

    .hero-slide__subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .hero-slide__buttons .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .hero-slider__prev,
    .hero-slider__next {
        width: 40px;
        height: 40px;
    }

    .hero-slider__prev::after,
    .hero-slider__next::after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-slider,
    .hero-slide {
        height: 360px;
    }

    .hero-slide__title {
        font-size: 1.5rem;
    }

    .hero-slide__buttons {
        flex-direction: column;
    }

    .hero-slide__buttons .btn {
        width: 100%;
        justify-content: center;
    }
}
