@charset "utf-8";
/* CSS Document */

*{margin: 0;padding: 0;box-sizing: border-box;}

.carousel {
    width: 100%;
    max-width: 1280px;
    padding: 0 40px;
    margin: 0 auto 40px;
    overflow: hidden;
    position: relative;
}
@media (max-width: 768px) {
    .carousel {
        padding: 0 12px;
    }
}

.carousel__viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel__track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.carousel__item {
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-width: calc(100% / 5);
    /* max-width: 200px; */
}
@media (max-width: 1440px) {.carousel__item {min-width: calc(100% / 4);}}
@media (max-width: 1024px) {.carousel__item {min-width: calc(100% / 3);}}
@media (max-width: 680px) {.carousel__item {min-width: calc(100% / 2);}}
@media (max-width: 520px) {.carousel__item {min-width: calc(100% / 1.5);}}
@media (max-width: 425px) {.carousel__item {min-width: calc(100% / 1.15);}}

.carousel__card {
    background: #f5f5f5;
    border: 2px solid #183b7c;
    border-radius: 4px;
    padding: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.carousel__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.carousel__image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: #e9ecef;
    position: relative;
}

.carousel__image.loaded {
    opacity: 1;
}

.carousel__title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.carousel__card:hover .carousel__title {
    color: #183b7c;
}

.carousel__description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
}

.carousel__button {
    background: #213252;
    color: #f9d888;
    border: none;
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    transform: scale(1);
}

.carousel__button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.carousel__controls {
    text-align: center;
    margin-top: 20px;
}

.carousel__nav-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel__nav-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.carousel__nav-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.carousel__auto-toggle {
    background: #28a745;
    margin-left: 10px;
}

.carousel__auto-toggle:hover {
    background: #1e7e34;
}

.carousel__auto-toggle.paused {
    background: #dc3545;
}

.carousel__auto-toggle.paused:hover {
    background: #c82333;
}

/* 指示器 */
.carousel__indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
    gap: 8px;
}

.carousel__indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel__indicator.active {
    background: #f9d888;
    transform: scale(1.2);
}

.carousel__indicator:hover {
    background: #6c757d;
    transform: scale(1.1);
}

/* Modal样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal--active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal__content {
    background: white;
    max-width: 600px;
    max-height: 80vh;
    margin: 20px;
    border-radius: 4px;
    position: relative;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal--active .modal__content {
    transform: scale(1);
}

.modal__header {
    padding: 20px;
    /* border-bottom: 1px solid #eee; */
    position: relative;
}

.modal__close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    color: #000;
    background: #f8f9fa;
    transform: rotate(90deg);
}

.modal__body {
    padding: 20px 20px 40px 20px;
}

.modal__image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 16px;
}
@media (max-width: 576px) {
    .modal__image {
        height: 160px;
    }
}

.modal__title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #183b7c;
    margin-bottom: 16px;
}

.modal__body > hr{
    margin: 16px auto;
}
.modal__body > h3{
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    color: #183b7c;
}

.modal__description {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* 加载动画 */
.carousel__image:not(.loaded)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 触摸反馈 */
.carousel__track.dragging {
    transition: none;
}

.carousel__track.dragging .carousel__card {
    pointer-events: none;
}

.carousel__card > h3{
    text-align: center;
    color: #183b7c;
}

.carousel__controls{
    display: none !important;
}

.carousel__cta-btn{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    gap: 16px;
    margin: 16px auto 0 auto;
}
.carousel__cta-btn > a{
    display: inline-block;
    flex: 1 1 0;
    text-align: center;
}
.carousel__cta-btn img{
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}
.carousel__cta-btn a:hover img{
    box-shadow: 0 6px 24px rgba(0,0,0,0.16);
}
@media (max-width: 768px) {
    .carousel__cta-btn{
        padding: 0 12px;
        gap: 8px;
    }
}
@media (max-width: 480px) {
    .carousel__cta-btn{
        flex-direction: column;
        gap: 12px;
        padding: 0 4px;
    }
}

.u-hidden-desktop { display:block; }
@media (min-width:769px){ .u-hidden-desktop { display:none; } }