/**
 * ACF Slide Carousel
 * 桌面端每行 3 卡片，移动端每行 1 卡片；纯 CSS 箭头与圆点。
 * 不设置标题/正文字体颜色/大小/样式，保持主题默认。
 */

.asc-carousel {
    position: relative;
    margin: 0 0 1.5em;
    background: #5F77B8;
    padding: 20px 0 16px;
}

/* 舞台：包裹视口与箭头，用于让箭头垂直居中于卡片区域 */
.asc-carousel__stage {
    position: relative;
    padding: 0 44px; /* 左右为箭头预留空间 */
}

.asc-carousel__viewport {
    overflow: hidden;
}

.asc-carousel__track {
    display: flex;
    gap: 16px;
    transition: transform 0.45s ease;
    will-change: transform;
}

/* 桌面端：每行 3 个卡片（2 个 16px 间距） */
.asc-carousel__slide {
    flex: 0 0 calc((100% - 32px) / 3);
    box-sizing: border-box;
}

/* 图片容器：统一尺寸 + 8px 圆角 */
.asc-carousel__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.08);
}

.asc-carousel__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 标题与内容：白色字体 + 左对齐 + 统一内边距保证对齐 */
.asc-carousel__title {
    margin: 0.5em 0 0.2em;
    padding: 0 12px;
    color: #fff;
    text-align: left;
}

.asc-carousel__content {
    margin: 0;
    padding: 0 12px;
    color: #fff;
    text-align: left;
}

/* -------------------------------------------------------------------------
 * 箭头（纯 CSS）—— 蓝底背景上用白色
 * ---------------------------------------------------------------------- */
.asc-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.asc-carousel__arrow:hover {
    background: #fff;
}

.asc-carousel__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.asc-carousel__arrow--prev {
    left: 4px;
}

.asc-carousel__arrow--next {
    right: 4px;
}

/* 用边框拼出箭头形状 —— 用蓝色与按钮背景形成对比 */
.asc-carousel__arrow span {
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #5F77B8;
    border-right: 2px solid #5F77B8;
}

.asc-carousel__arrow--prev span {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.asc-carousel__arrow--next span {
    transform: rotate(45deg);
    margin-right: 3px;
}

.asc-carousel__arrow.is-disabled {
    opacity: 0.35;
    cursor: default;
}

/* -------------------------------------------------------------------------
 * 分页小圆点（纯 CSS）—— 蓝底背景上用白色
 * ---------------------------------------------------------------------- */
.asc-carousel__dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 0;
}

.asc-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.asc-carousel__dot.is-active {
    background: #fff;
}

.asc-carousel__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * 移动端：每行 1 个卡片
 * ---------------------------------------------------------------------- */
@media (max-width: 768px) {
    .asc-carousel__stage {
        padding: 0 40px;
    }

    .asc-carousel__track {
        gap: 0;
    }

    .asc-carousel__slide {
        flex: 0 0 100%;
    }
}