/* 百家横幅轮播小部件样式 */

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

/* 轮播容器 */
.geniatech-banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 单个轮播项 */
.geniatech-banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center; /* 居中对齐 */
}

.geniatech-banner-slide-inner {
    width: 100%;
    max-width: 1600px; /* 最大宽度限制 */
    margin: 0 auto; /* 居中显示 */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.geniatech-banner-slide.active {
    opacity: 1;
}

/* 内容区域 */
.geniatech-banner-content {
    width: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    z-index: 2;
    position: relative;
}

/* 标题样式 */
.geniatech-banner-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* 描述样式 */
.geniatech-banner-description {
    font-size: 1.1em;
    color: #ffffff;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.geniatech-banner-description p {
    margin: 0 0 15px 0;
}

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

/* 标签区域 */
.geniatech-banner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px 0;
}

.geniatech-banner-tag {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.geniatech-banner-tag:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 按钮样式 */
.geniatech-banner-button-wrapper {
    margin-top: 30px;
}

.geniatech-banner-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.geniatech-banner-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

/* 指示器和计数器控制容器 */
.geniatech-banner-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1600px;
    box-sizing: border-box;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

/* 指示器容器 */
.geniatech-banner-indicators {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    justify-content: flex-start;
    width: 100%;
    overflow-x: visible;
}

/* 单个指示器 */
.geniatech-banner-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.geniatech-banner-indicator:hover {
    opacity: 1;
}

.geniatech-banner-indicator.active {
    opacity: 1;
}

/* 指示器线条 */
.geniatech-banner-indicator-line {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.geniatech-banner-indicator-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ff0000;
    transform: translateX(-100%);
    transition: transform 3s ease;
}

.geniatech-banner-indicator.active .geniatech-banner-indicator-line::before,
.geniatech-banner-indicator:hover .geniatech-banner-indicator-line::before {
    transform: translateX(0);
}

.geniatech-banner-indicator.active .geniatech-banner-indicator-line {
    background-color: rgba(255, 255, 255, 0.8);
    height: 4px;
}

/* 指示器内容 */
.geniatech-banner-indicator-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

/* 指示器图片 */
.geniatech-banner-indicator-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.geniatech-banner-indicator.active .geniatech-banner-indicator-image {
    transform: scale(1.05);
}

.geniatech-banner-indicator-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 指示器名称 */
.geniatech-banner-indicator-name {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.geniatech-banner-indicator.active .geniatech-banner-indicator-name {
    color: #ffffff;
    font-weight: 600;
}

/* 计数器样式 */
.geniatech-banner-counter {
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
    align-self: flex-end;
    gap: 5px; /* 默认间距，可通过Elementor控制覆盖 */
}

/* 计数器各部分的基础样式（可被Elementor控制覆盖） */
.geniatech-banner-counter .current-slide {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'MontserratRoman', sans-serif;
}

.geniatech-banner-counter .total-slides {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'MontserratRoman', sans-serif;
}

.geniatech-banner-counter .counter-separator {
    font-size: 17px;
    font-weight: 400;
    color: #ffffff;
    opacity: 0.7;
}

/* 按钮图标样式 */
.geniatech-banner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.geniatech-banner-button .button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.geniatech-banner-button .button-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

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

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

.geniatech-banner-slide.active .geniatech-banner-title {
    animation: slideInFromLeft 0.8s ease-out 0.2s both;
}

.geniatech-banner-slide.active .geniatech-banner-description {
    animation: slideInFromLeft 0.8s ease-out 0.4s both;
}

.geniatech-banner-slide.active .geniatech-banner-tags {
    animation: slideInFromLeft 0.8s ease-out 0.6s both;
}

.geniatech-banner-slide.active .geniatech-banner-button-wrapper {
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.geniatech-banner-slide.active .geniatech-banner-indicator {
    animation: slideInFromBottom 0.6s ease-out 1s both;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .geniatech-banner-content {
        width: 60%;
        padding: 50px 40px;
    }
    
    .geniatech-banner-title {
        font-size: 2.2em;
    }
    
    .geniatech-banner-description {
        font-size: 1em;
    }
    
    .geniatech-banner-controls {
        bottom: 25px;
        gap: 12px;
        padding: 0 30px;
    }
    
    .geniatech-banner-indicators {
        gap: 12px;
    }
    
    .geniatech-banner-indicator {
        width: 100%;
        min-width: auto;
    }
    
    .geniatech-banner-indicator-image {
        width: 35px;
        height: 35px;
    }
    
    .geniatech-banner-indicator-name {
        font-size: 0.85em;
    }
}

@media (max-width: 768px) {
    .geniatech-banner-carousel {
        height: 400px;
    }
    
    .geniatech-banner-content {
        width: 80%;
        padding: 40px 30px;
    }
    
    .geniatech-banner-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    .geniatech-banner-description {
        font-size: 0.95em;
        margin-bottom: 15px;
    }
    
    .geniatech-banner-tags {
        margin-bottom: 25px;
        gap: 8px;
    }
    
    .geniatech-banner-tag {
        padding: 4px 12px;
        font-size: 0.8em;
    }
    
    .geniatech-banner-button {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    
    .geniatech-banner-controls {
        bottom: 20px;
        gap: 10px;
        padding: 0 25px;
    }
    
    .geniatech-banner-indicators {
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        white-space: nowrap;
    }
    .geniatech-banner-indicators::-webkit-scrollbar { display: none; }
    
    .geniatech-banner-indicator {
        width: 80px;
        min-width: 80px;
    }
    
    .geniatech-banner-indicator-image {
        width: 30px;
        height: 30px;
    }
    
    .geniatech-banner-indicator-name {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .geniatech-banner-carousel {
        height: 350px;
    }
    
    .geniatech-banner-content {
        width: 90%;
        padding: 30px 20px;
    }
    
    .geniatech-banner-title {
        font-size: 1.5em;
        margin-bottom: 12px;
    }
    
    .geniatech-banner-description {
        font-size: 0.9em;
        margin-bottom: 12px;
    }
    
    .geniatech-banner-tags {
        margin-bottom: 20px;
        gap: 6px;
    }
    
    .geniatech-banner-tag {
        padding: 3px 10px;
        font-size: 0.75em;
    }
    
    .geniatech-banner-button {
        padding: 8px 20px;
        font-size: 0.85em;
    }
    
    .geniatech-banner-controls {
        bottom: 15px;
        gap: 8px;
        padding: 0 20px;
    }
    
    .geniatech-banner-indicators {
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
    }
    .geniatech-banner-indicators::-webkit-scrollbar { display: none; }
    
    .geniatech-banner-indicator {
        width: 100%;
        min-width: auto;
    }
    
    .geniatech-banner-indicator-image {
        width: 25px;
        height: 25px;
        margin-bottom: 5px;
    }
    
    .geniatech-banner-indicator-name {
        font-size: 0.75em;
    }
    
    .geniatech-banner-indicator-line {
        height: 2px;
    }
    
    .geniatech-banner-indicator.active .geniatech-banner-indicator-line {
        height: 3px;
    }
}

/* 加载状态 */
.geniatech-banner-carousel.loading {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }
    100% {
        background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
    }
}

/* 无障碍支持 */
.geniatech-banner-carousel:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.geniatech-banner-indicator:focus {
    outline: none;
}

.geniatech-banner-indicator:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.geniatech-banner-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .geniatech-banner-content {
        background-color: rgba(0, 0, 0, 0.6);
    }
    
    .geniatech-banner-tag {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    .geniatech-banner-tag:hover {
        background-color: rgba(255, 255, 255, 0.25);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .geniatech-banner-content {
        background-color: rgba(0, 0, 0, 0.8);
        border: 2px solid #ffffff;
    }
    
    .geniatech-banner-title,
    .geniatech-banner-description {
        color: #ffffff;
        text-shadow: 1px 1px 2px #000000;
    }
    
    .geniatech-banner-button {
        border: 2px solid #ffffff;
    }
    
    .geniatech-banner-indicator-line {
        border: 1px solid #ffffff;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .geniatech-banner-slide,
    .geniatech-banner-indicator,
    .geniatech-banner-tag,
    .geniatech-banner-button,
    .geniatech-banner-indicator-line,
    .geniatech-banner-indicator-image {
        transition: none;
    }
    
    .geniatech-banner-slide.active .geniatech-banner-title,
    .geniatech-banner-slide.active .geniatech-banner-description,
    .geniatech-banner-slide.active .geniatech-banner-tags,
    .geniatech-banner-slide.active .geniatech-banner-button-wrapper,
    .geniatech-banner-slide.active .geniatech-banner-indicator {
        animation: none;
    }
    
    .geniatech-banner-carousel.loading {
        animation: none;
        background: #f0f0f0;
    }
}
