/* ===== TOP CAROUSEL 容器 ===== */
.top-carousel-container{
    position: relative;
    width: 100%;
}
.row-full {
    position: relative;
}
/* ===== TOP CAROUSEL 容器 ===== */
#top-carousel {
    height: auto; /* 视口高度的 75% */
    position: relative;
    overflow: hidden;
}
#top-carousel .slick-list {
    height: auto !important;
}
#top-carousel .slick-track {
    height: auto !important;
    display: flex;
    /* fade 模式下 slick 用 left 负偏移把各 slide 叠到同一位置；
       flex 默认 align-items:stretch 会把矮图 slide 拉伸到最高张的高度，
       导致图下方的文字 overlay 飘到空白区——改为顶部对齐，每张图各自撑高 */
    align-items: flex-start;
}
/* 防止加载时闪烁 */
.main-slider:not(.slick-initialized) .slider-item:not(:first-child) {
    display: none;
}

/* --- 核心修改：项目容器 --- */
#top-carousel .slider-item {
    position: relative;
    height: auto;
    width: 100%;
}
.slider-item {
    cursor: default; /* 默认光标 */
}

.slider-item:has(.full-clickable-link) {
    cursor: pointer; /* 有链接时显示手型 */
}
.full-clickable-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
    text-decoration: none;
}

/* 轮播图：img 自带 width/height（服务端按图片实际尺寸运行时刷新），
   加载前即按正确比例预留空间；width:100% 撑满容器（手机端即屏幕宽度，
   左右边界与手机屏幕一致），height:auto 高度随宽度变化，原图比例完整呈现、
   绝不裁切——任何比例的图（横图/方图/竖图）都完整显示 */
#top-carousel picture,
#top-carousel img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- 文字覆盖样式优化 --- */
.top-carousel {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    padding: 0 30px;
    text-align: left;
    pointer-events: none;
    z-index: 10;
}

.top-carousel .ttl {
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    margin: 0;
}

.top-carousel .subttl {
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
    font-size: 1.1rem;
    margin-top: 5px;
}

/* --- Dots 定位优化 --- */
.dots-wrapper {
    position: absolute;
    bottom: 40px;
    width: 100vw;
    margin: 0 calc(-50vw + 50%);
    right: 0;
    z-index: 999;
}

.dots-wrapper ul {
    display: flex;
    justify-content: end;
    list-style: none;
    margin: 0;
    padding: 0 30px;
}

.dots-wrapper li {
    width: 10px;
    height: 10px;
    cursor: pointer;
}

.dots-wrapper li button {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgba(90, 90, 90, 0.2);
    border: solid 0px transparent;
    border-radius: 50%;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.dots-wrapper li.slick-active button {
    background: #5A5A5A;
    transform: scale(1.2);
}
.dots-wrapper.dots-white li button {
    background: rgba(255, 255, 255, 0.2);
}

.dots-wrapper.dots-white li.slick-active button {
    background: #ffffff;
}
/* 隐藏箭头 */
.slick-arrow {
    display: none !important;
}

@media (max-width: 768px) {

    /* 手机端轮播：自然比例、完整呈现、满屏宽度。
       width:100% → 图片左右边界与手机屏幕边界一致（撑满屏幕边缘）；
       height:auto → 高度随宽度按原图比例变化；
       不设比例盒、不用 object-fit:cover → 任何比例的图都完整显示，绝不裁掉左右两边。
       （历史事故：曾强制 4:5 比例盒 + cover，用户替换的横图在手机上被裁成
        "只剩中间一段、左右全看不到"；且旧版 iOS Safari 不支持 aspect-ratio。）
       加载前的空间预留由服务端刷新的 width/height 属性按实际比例保证，不跳变。 */
    #top-carousel picture,
    #top-carousel img {
        display: block;
        width: 100%;
        height: auto;
    }

    .dots-wrapper,
    .slick-dots {
        display: none !important;
    }

    .top-carousel {
        bottom: 10px;
        padding: 0 20px;

    }

    .top-carousel .ttl {
        font-size: .9rem;
    }

    .top-carousel .subttl {
        display: none;
    }
}