/* Geniatech Carousel Widget Styles */

.geniatech-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.geniatech-carousel .geniatech-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.geniatech-carousel .geniatech-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    /* 不强制水平居中，由Elementor控制 justify-content */
}

.geniatech-carousel .geniatech-carousel-item-inner {
    width: 100%;
    max-width: 1600px; /* 最大宽度限制 */
    /* 允许通过Elementor控制外边距（含水平间距） */
    margin: 0 auto;
    display: flex;
    align-items: center;
    /* 不强制内部水平对齐，交给内容自身或控件设置 */
    position: relative;
}

.geniatech-carousel .geniatech-carousel-item.active {
    opacity: 1;
}

.geniatech-carousel .geniatech-carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.geniatech-carousel .geniatech-carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.geniatech-carousel .geniatech-carousel-background.pc{display:block;}
.geniatech-carousel .geniatech-carousel-background.mb{display:none;}

.geniatech-carousel .geniatech-carousel-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: #ffffff;
    animation: slideInLeft 0.8s ease-out;
}

.geniatech-carousel .geniatech-carousel-item.active .geniatech-carousel-content {
    animation: slideInLeft 0.8s ease-out;
}

.geniatech-carousel .geniatech-carousel-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.geniatech-carousel .geniatech-carousel-content p,
.geniatech-carousel .geniatech-carousel-description {
    font-size: 1.2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.geniatech-carousel .geniatech-carousel-description * {
    color: inherit;
}

.geniatech-carousel .geniatech-carousel-description p {
    margin-bottom: 1rem;
}

.geniatech-carousel .geniatech-carousel-description p:last-child {
    margin-bottom: 0;
}

.geniatech-carousel .geniatech-carousel-description strong {
    font-weight: 700;
}

.geniatech-carousel .geniatech-carousel-description em {
    font-style: italic;
}

.geniatech-carousel .geniatech-carousel-description ul,
.geniatech-carousel .geniatech-carousel-description ol {
    margin: 2rem 0 4rem 0;
    padding-left: 2rem;
}

.geniatech-carousel .geniatech-carousel-description li {
    margin-bottom: 0.9rem;
}

.geniatech-carousel .geniatech-carousel-button-wrapper {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.geniatech-carousel .geniatech-carousel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* 支持通过宽高控制按钮大小 */
    width: auto;
    height: auto;
    box-sizing: border-box;
}

.geniatech-carousel .geniatech-carousel-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    color: #ffffff;
}

.geniatech-carousel .geniatech-carousel-button .button-icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.geniatech-carousel .geniatech-carousel-button .button-icon.icon-before {
    margin-right: 4px;
}

.geniatech-carousel .geniatech-carousel-button .button-icon.icon-after {
    margin-left: 4px;
}

.geniatech-carousel .geniatech-carousel-button:hover .button-icon.icon-after {
    transform: translateX(3px);
}

.geniatech-carousel .geniatech-carousel-button:hover .button-icon.icon-before {
    transform: translateX(-3px);
}

.geniatech-carousel .geniatech-carousel-button .button-text {
    display: inline-block;
}

/* 指示器样式 */
.geniatech-carousel .geniatech-carousel-indicators {
    position: absolute;
    bottom: 30px;
    right: 50%;
    transform: translateX(50%);
    z-index: 3;
    display: flex;
    flex-direction: row; /* 恢复为水平排列 */
    align-items: center;
    max-width: 1600px; /* 受1600px容器宽度限制 */
    width: 100%;
    justify-content: flex-end;
    box-sizing: border-box;
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-right: 20px; /* 水平间距，可通过Elementor控制覆盖 */
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator:last-child {
    margin-right: 0; /* 最后一个指示器不需要右边距 */
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .number {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .line {
    width: 40px; /* 默认未激活长度，可通过Elementor控制覆盖 */
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.3) 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.geniatech-carousel-description .title{font-size: 44px !important;
    color: #fff !important;
    font-family: MontserratRoman-SemiBold !important;}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .line2{width:10px;height:10px;background-color:#fff;opacity:.25;border-radius:50%;margin-right:5px;}
.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator.active .line2{background-color:#E40011;opacity:1;}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #EE0202 !important;
    transition: width 3s ease;
}


.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator:hover .number {
    color: rgba(255, 255, 255, 0.8);
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator:hover .line {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator.active .number {
    color: #ffffff;
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator.active .line {
    width: 80px; /* 默认激活长度，可通过Elementor控制覆盖 */
}

.geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator.active .line::before {
    width: 100%;
}

/* 动画效果 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    /* 保留媒体查询，无额外内容 */
    
    .geniatech-carousel .geniatech-carousel-background{
        background-size:100% 100%;
    }
    
    
}

/* 响应式设计 */
@media (max-width: 1024px) {
    /* 保留媒体查询，无额外内容 */
    
    .geniatech-carousel .geniatech-carousel-content h2 {
        font-size: 2.5rem;
    }
    
    .geniatech-carousel .geniatech-carousel-content p {
        font-size: 1.1rem;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators {
        bottom: 20px;
        right: 20px;
    }
    
    .geniatech-carousel-description .title{font-size: 24px !important;
    color: #fff !important;
    font-family: MontserratRoman-SemiBold !important;}
    
    
}

@media (max-width: 768px) {
    .geniatech-carousel {
        height: 400px;
    }
    
    .geniatech-carousel .geniatech-carousel-content {
        max-width: 100%;
    }
    
    .geniatech-carousel .geniatech-carousel-content h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .geniatech-carousel .geniatech-carousel-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .geniatech-carousel .geniatech-carousel-button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .geniatech-carousel .geniatech-carousel-background.pc{display:none;}
    .geniatech-carousel .geniatech-carousel-background.mb{display:block;}
    
    .geniatech-carousel .geniatech-carousel-indicators {
        bottom: 15px;
        right: 50%;
        transform: translateX(50%);
        padding-right: 15px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .geniatech-carousel .geniatech-carousel-indicators::-webkit-scrollbar { display: none; }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator {
        min-width: 60px;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .number {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .line {
        width: 30px;
        height: 2px;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator.active .line {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .geniatech-carousel {
        height: 350px;
        border-radius: 0;
    }
    
    .geniatech-carousel .geniatech-carousel-content {
        padding: 20px 15px;
    }
    
    .geniatech-carousel .geniatech-carousel-content h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .geniatech-carousel .geniatech-carousel-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .geniatech-carousel .geniatech-carousel-button {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators {
        bottom: 10px;
        right: 50%;
        transform: translateX(50%);
        padding-right: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .geniatech-carousel .geniatech-carousel-indicators::-webkit-scrollbar { display: none; }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator {
        min-width: 50px;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .number {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator .line {
        width: 25px;
        height: 2px;
    }
    
    .geniatech-carousel .geniatech-carousel-indicators .geniatech-carousel-indicator.active .line {
        width: 50px;
    }
}

/* 加载状态 */
.geniatech-carousel.loading {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.geniatech-carousel.loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .carousel-indicators .indicator.active {
        background-color: rgba(0, 124, 186, 0.9);
        color: #ffffff;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .carousel-item::before {
        background-color: rgba(0, 0, 0, 0.7);
    }
    
    .carousel-indicators .indicator {
        border: 2px solid #ffffff;
    }
    
    .carousel-button {
        border: 2px solid #ffffff;
    }
}

/* 减少动画支持 */
@media (prefers-reduced-motion: reduce) {
    .carousel-item,
    .carousel-content,
    .carousel-content h2,
    .carousel-content p,
    .carousel-button-wrapper,
    .carousel-button,
    .carousel-indicators .indicator {
        animation: none;
        transition: none;
    }
    
    .carousel-item {
        transition: opacity 0.1s ease;
    }
}
