/* ========================================
   Hero Full-Width Banner Slider - 欧美B2B工业风格
   ======================================== */

:root {
    --site-header-height: 120px;
}

/* 强制重置 Bootstrap Carousel 默认样式 */
.carousel, .carousel-inner, .carousel-item {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

.carousel-inner {
    overflow: hidden !important;
}

/* 强制重置 main 标签 - 关键修复 */
main {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    overflow: visible !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* 强制重置 body */
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* 首页首屏轮播：高度自适应，图片全貌展示 */
.hero-slider {
    position: relative !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    overflow: hidden !important;
    background: transparent !important;
    margin: 0 !important;
    margin-top: -40px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    z-index: 1 !important;
    display: block !important;
    border: none !important;
    outline: none !important;
}

/* 强制覆盖 Bootstrap JS 可能设置的内联样式 - 高度自适应 */
#heroCarousel[style],
#heroCarousel .carousel-inner[style],
#heroCarousel .carousel-item[style] {
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

#heroCarousel {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* 强制 Bootstrap Carousel 结构继承高度 - 高度自适应 */
#heroCarousel .carousel-inner {
    height: auto !important;
    min-height: auto !important;
    position: relative !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

#heroCarousel .carousel-item {
    height: auto !important;
    min-height: auto !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* 确保非活动的 carousel-item 也有正确的高度 - 高度自适应 */
#heroCarousel .carousel-item:not(.active) {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    z-index: 0 !important;
}

#heroCarousel .carousel-item.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
    position: relative !important;
    z-index: 1 !important;
}

/* Hero Slide - 图片全貌展示 */
.hero-slide {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    aspect-ratio: 1920 / 820;
    background-size: 100% auto !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 0 !important;
}

/* 强制覆盖 Bootstrap JS 可能设置的内联样式 */
#heroCarousel .carousel-item[style*="height"],
#heroCarousel .carousel-inner[style*="height"] {
    height: auto !important;
    min-height: auto !important;
}

/* 桌面端双导航总高度修正 */
@media (max-width: 1199.98px) {
    :root {
        --site-header-height: 120px;
    }
}

@media (max-width: 991.98px) {
    :root {
        --site-header-height: 68px;
    }
}

/* 确保 container 不影响高度 */
.hero-slide .container {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* 暗黑渐变遮罩层 */
.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.65) 40%,
        rgba(0, 0, 0, 0.35) 70%,
        rgba(0, 0, 0, 0.15) 100%
    ) !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
}

/* Hero Title */
.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.hero-title span {
    color: #cc0000;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #990000 0%, #cc0000 100%);
    box-shadow: 0 0 20px rgba(153, 0, 0, 0.6);
}

/* Hero Subtitle */
.hero-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    color: #e5e5e5;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* Hero Text */
.hero-text {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 600px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Primary Button */
.btn-hero-primary {
    display: inline-block;
    padding: 20px 50px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    background: linear-gradient(135deg, #990000 0%, #cc0000 100%);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(153, 0, 0, 0.5);
}

.btn-hero-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(153, 0, 0, 0.7);
}

/* Secondary Button */
.btn-hero-secondary {
    display: inline-block;
    padding: 18px 45px;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    background: transparent;
    border: 3px solid #990000;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-hero-secondary:hover {
    background: #990000;
    box-shadow: 0 8px 30px rgba(153, 0, 0, 0.5);
}

/* Carousel Controls - hidden per 2026-05-14 request; rollback via hero-banner.css.bak-hide-carousel-controls-20260514 */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    display: none !important;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 80px;
    height: 80px;
    background: rgba(153, 0, 0, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    z-index: 20;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: #cc0000;
    box-shadow: 0 0 40px rgba(153, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 40px;
}

.carousel-control-next {
    right: 40px;
}

/* Carousel Indicators - hidden per 2026-05-14 request; rollback via hero-banner.css.bak-hide-carousel-indicators-20260514 */
#heroCarousel .carousel-indicators {
    display: none !important;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 50px;
    z-index: 20;
}

.carousel-indicators button {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    margin: 0 12px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background: #cc0000;
    width: 50px;
    border-radius: 8px;
    border-color: #cc0000;
    box-shadow: 0 0 25px rgba(153, 0, 0, 0.8);
}

/* ========================================
   响应式设计 - 专业适配
   ======================================== */

/* 平板端 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    /* Banner高度 - 动态调整 */
    .hero-slide {
        min-height: 100vh;
        height: auto;
    }

    /* 标题 - 响应式字体 */
    .hero-title {
        font-size: calc(3.5rem + (4 - 3.5) * ((100vw - 768px) / (1199 - 768)));
        margin-bottom: 1.2rem;
    }

    /* 副标题 */
    .hero-subtitle {
        font-size: calc(1.6rem + (1.8 - 1.6) * ((100vw - 768px) / (1199 - 768)));
        margin-bottom: 1.2rem;
    }

    /* 描述文字 */
    .hero-text {
        font-size: calc(1rem + (1.1 - 1) * ((100vw - 768px) / (1199 - 768)));
        max-width: 550px;
        margin-bottom: 2rem;
    }

    /* 按钮 */
    .btn-hero-primary {
        padding: 18px 45px;
        font-size: 1.05rem;
    }

    .btn-hero-secondary {
        padding: 16px 40px;
        font-size: 1rem;
    }

    /* 箭头按钮 */
    .carousel-control-prev,
    .carousel-control-next {
        width: 70px;
        height: 70px;
    }

    .carousel-control-prev {
        left: 30px;
    }

    .carousel-control-next {
        right: 30px;
    }

    /* 圆点指示器 */
    .carousel-indicators button {
        width: 14px;
        height: 14px;
        margin: 0 10px;
    }

    .carousel-indicators button.active {
        width: 45px;
    }
}

/* 手机端 (< 768px) - 全貌自适应修复 */
@media (max-width: 767px) {
    /* Banner 容器 - 高度自适应 */
    .hero-slider {
        min-height: auto !important;
        height: auto !important;
        margin-top: -40px !important;
        padding-top: 0 !important;
    }

    /* 轮播项 - 竖屏宽度完整显示 + 高度自适应 */
    .hero-slide {
        min-height: 200px !important;
        height: auto !important;
        background-size: 100% auto !important;
        background-position: center center !important;
        aspect-ratio: unset !important;
    }}

    /* 标题 - 2rem */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 0.8rem;
        letter-spacing: 1px;
    }

    /* 副标题 - 1.2rem */
    .hero-subtitle {
        font-size: 1.2rem !important;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }

    /* 描述文字 - 0.9rem */
    .hero-text {
        font-size: 0.9rem !important;
        line-height: 1.5;
        max-width: 90%;
        margin-bottom: 1.5rem;
    }

    /* 按钮布局 */
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        text-align: center;
        padding: 12px 20px !important;
        font-size: 0.85rem !important;
        letter-spacing: 1px;
    }

    /* 箭头按钮 - 竖屏隐藏 */
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
        width: 35px !important;
        height: 35px !important;
        opacity: 0.6;
    }

    .carousel-control-prev {
        left: 8px;
    }

    .carousel-control-next {
        right: 8px;
    }

    /* 圆点指示器 */
    .carousel-indicators {
        bottom: 30px;
    }

    .carousel-indicators button {
        width: 12px;
        height: 12px;
        margin: 0 8px;
    }

    .carousel-indicators button.active {
        width: 40px;
    }

    /* 内容区域padding */
    .hero-content {
        padding: 0 20px;
    }
}

/* 超小屏幕 (< 375px) - iPhone SE等 */
@media (max-width: 375px) {
    /* Banner高度 */
    .hero-slide {
        min-height: 100vh;
        height: auto;
    }

    /* 标题 */
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }

    /* 副标题 */
    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    /* 描述文字 */
    .hero-text {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    /* 按钮 */
    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 14px 25px;
        font-size: 0.9rem;
    }

    /* 箭头按钮 */
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
        opacity: 0.6;
    }

    .carousel-control-prev {
        left: 15px;
    }

    .carousel-control-next {
        right: 15px;
    }

    /* 圆点指示器 */
    .carousel-indicators {
        bottom: 25px;
    }

    .carousel-indicators button {
        width: 10px;
        height: 10px;
        margin: 0 6px;
    }

    .carousel-indicators button.active {
        width: 35px;
    }

    /* 内容区域padding */
    .hero-content {
        padding: 0 15px;
    }
}

/* 大屏幕 (> 1200px) - 优化 */
@media (min-width: 1200px) {
    .hero-slide {
        min-height: 100vh;
        height: auto;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1.2rem;
        max-width: 700px;
    }

    .btn-hero-primary {
        padding: 20px 50px;
        font-size: 1.1rem;
    }

    .btn-hero-secondary {
        padding: 18px 45px;
        font-size: 1rem;
    }
}