/**
 * RS Carousel Styles
 * 完全遵循 HTML 模版設計
 *
 * @package RS_Carousel
 * @version 1.0.5
 */

/* CSS 變數定義 */
.rs-carousel-section {
    --rs-card-bg-normal: #F7F7F7;
    --rs-card-bg-hover: #FFFFFF;
    --rs-card-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    --rs-card-border-radius: 20px;
    --rs-card-hover-outline: #B9EED2;
    --rs-header-text-color: rgba(136, 136, 140, 0.50);
    --rs-body-text-normal: #222222;
    --rs-body-text-hover: #33C3D8;
    --rs-divider-color: #CCCCCC;
    --rs-progress-bg: #E7E7E7;
    --rs-progress-fill: #33C3D8;
    --rs-controls-icon-normal: #000000;
    --rs-controls-icon-hover: #FFFFFF;
    --rs-controls-bg-hover: #33C3D8;
    --rs-transition-duration: 0.3s;

    font-family: 'Roboto', 'Noto Sans CJK TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.rs-carousel-section *,
.rs-carousel-section *::before,
.rs-carousel-section *::after {
    box-sizing: border-box;
}

/* Swiper 容器 */
.rs-carousel-section .swiper {
    width: 100%;
    overflow: visible;
}

.rs-carousel-section .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
}

/* 卡片樣式 */
.rs-activity-card {
    width: 100%;
    height: 260px;
    background-color: var(--rs-card-bg-normal);
    border-radius: var(--rs-card-border-radius);
    border: 2px solid transparent;
    box-shadow: var(--rs-card-shadow);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: background-color var(--rs-transition-duration) ease,
                border-color var(--rs-transition-duration) ease,
                box-shadow var(--rs-transition-duration) ease;
    text-decoration: none !important;
    color: inherit;
}

.rs-activity-card * {
    text-decoration: none !important;
}

.rs-activity-card:hover {
    background-color: var(--rs-card-bg-hover);
    border-color: var(--rs-card-hover-outline);
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

/* 卡片標題區 */
.rs-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 16px;
}

.rs-company-activity {
    font-family: Roboto;
    font-size: 16px;
    font-weight: 600;
    line-height: 130%;
    color: var(--rs-header-text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    margin-bottom: 8px;
}

.rs-date {
    font-family: Roboto;
    font-size: 16px;
    font-weight: 400;
    line-height: 130%;
    color: var(--rs-header-text-color);
	padding-bottom:16px;
}

/* 分隔線 */
.rs-divider {
    height: 1px;
    width: 100%;
    background-color: var(--rs-divider-color);
    border: none;
    margin: 16px 0;
}

/* 卡片內容區 */
.rs-card-body {
    flex-grow: 1;
    overflow: hidden;
}

.rs-article-title {
    font-family: "Noto Sans CJK TC";
    font-size: 18px;
    font-weight: 700;
    line-height: 130%;
    color: var(--rs-body-text-normal);
    transition: color var(--rs-transition-duration) ease;
	padding-top:16px;
	border-top-style:solid;
	border-top-width:1px;
	border-top-color:#ccc;

    /* 3 行截斷 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rs-activity-card:hover .rs-article-title {
    color: var(--rs-body-text-hover);
}

/* 控制軸 */
.rs-carousel-section .rs-carousel-axis {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 58px !important;
    gap: 8px !important;
}

/* 進度條 */
.rs-carousel-section .rs-carousel-progress {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 4px !important;
    min-height: 4px !important;
    background-color: var(--rs-progress-bg, #E7E7E7) !important;
    border-radius: 2px !important;
    overflow: hidden !important;
    position: relative !important;
}

.rs-carousel-section .rs-progress-bar {
    width: 0;
    height: 100% !important;
    background-color: var(--rs-progress-fill, #33C3D8) !important;
    border-radius: 2px !important;
    transition: width 0.3s ease !important;
    display: block !important;
}

/* 控制鍵容器 */
.rs-carousel-section .rs-carousel-controls {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    min-width: 104px !important;
}

/* 導航按鈕 */
.rs-carousel-section .rs-carousel-axis .swiper-button-next,
.rs-carousel-section .rs-carousel-axis .swiper-button-prev {
    position: static !important;
    margin: 0 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 30px;
background: #F2F2F2;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color var(--rs-transition-duration, 0.3s) ease !important;
    flex-shrink: 0 !important;
}

.rs-carousel-section .rs-carousel-axis .swiper-button-next::after,
.rs-carousel-section .rs-carousel-axis .swiper-button-prev::after {
    display: none !important;
    content: none !important;
}

.rs-carousel-section .rs-carousel-axis .swiper-button-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.rs-carousel-section .rs-carousel-axis .swiper-button-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.rs-carousel-section .rs-carousel-axis .swiper-button-prev:hover {
    background-color: var(--rs-controls-bg-hover, #33C3D8) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.rs-carousel-section .rs-carousel-axis .swiper-button-next:hover {
    background-color: var(--rs-controls-bg-hover, #33C3D8) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* 平板 (768px - 1279px) */
@media (max-width: 1279px) {
    .rs-carousel-section .rs-carousel-axis .swiper-button-next,
    .rs-carousel-section .rs-carousel-axis .swiper-button-prev {
        width: clamp(36px, 4vw, 44px) !important;
        height: clamp(36px, 4vw, 44px) !important;
    }
    .rs-carousel-section .rs-carousel-controls {
        min-width: 0 !important;
    }
}

/* 手機 (<= 767px) */
@media (max-width: 767px) {
    .rs-carousel-section .rs-carousel-axis {
        flex-direction: column !important;
        align-items: stretch !important;
        margin-top: 48px !important;
        gap: 16px !important;
    }
    .rs-carousel-section .rs-carousel-progress {
        order: 1 !important;
        flex-basis: auto !important;
    }
    .rs-carousel-section .rs-carousel-controls {
        order: 2 !important;
        justify-content: center !important;
        min-width: auto !important;
        flex-basis: auto !important;
    }
    .rs-carousel-section .rs-carousel-axis .swiper-button-next,
    .rs-carousel-section .rs-carousel-axis .swiper-button-prev {
        width: 48px !important;
        height: 48px !important;
    }
}
