/**
 * Interactive Services Showcase Styles
 * 
 * @package Nzasa_Plugins
 * @version 1.0.0
 */

/* ========================================
   1. 容器布局
   ======================================== */

.nzasa-services-section {
    position: relative;
    padding: 80px 20px;
    min-height: 600px;
    overflow: hidden;
}

.nzasa-services-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 60px;
    align-items: center;
}

/* 反向布局 */
.nzasa-layout-reverse .nzasa-services-container {
    grid-template-columns: 60% 40%;
}

.nzasa-layout-reverse .nzasa-services-nav {
    order: 2;
}

.nzasa-layout-reverse .nzasa-services-content {
    order: 1;
}

/* ========================================
   2. 左侧导航样式
   ======================================== */

.nzasa-services-nav {
    color: #ffffff;
    position: relative;
}

/* 右侧分割线 */
.nzasa-services-nav::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.nzasa-services-badge {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.nzasa-service-item {
    position: relative;
    padding: 28px 0 28px 30px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.nzasa-service-item:hover,
.nzasa-service-item.active {
    opacity: 1;
    transform: translateX(10px);
}

.nzasa-service-item.active h3 {
    font-weight: 700;
}

/* 左侧指示条 */
.nzasa-service-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #ffffff;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1.5px;
}

.nzasa-service-item:hover::before,
.nzasa-service-item.active::before {
    height: 50%;
}

/* 图标样式 */
.nzasa-service-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.nzasa-service-item h3 {
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 8px 0;
    line-height: 1.3;
    transition: font-weight 0.3s ease;
    background: linear-gradient(90deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nzasa-service-item.active h3 {
    font-weight: 700;
    background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nzasa-service-item:hover h3 {
    background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nzasa-service-item p {
    font-size: 14px;
    margin: 0;
    opacity: 0.7;
    line-height: 1.5;
    background: linear-gradient(90deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nzasa-service-item.active p {
    opacity: 0.85;
    background: linear-gradient(90deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nzasa-service-item:hover p {
    background: linear-gradient(90deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nzasa-service-item:hover p {
    background: linear-gradient(90deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   3. 右侧内容样式
   ======================================== */

.nzasa-services-content {
    position: relative;
    min-height: 400px;
    color: #ffffff;
}

.nzasa-content-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
}

.nzasa-content-item.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1;
}

.nzasa-content-item h2 {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 24px 0;
    line-height: 1.2;
    color: inherit;
}

.nzasa-content-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 32px;
    opacity: 0.95;
}

.nzasa-content-text p {
    margin: 0 0 16px 0;
}

.nzasa-content-text p:last-child {
    margin-bottom: 0;
}

/* ========================================
   4. 按钮样式
   ======================================== */

.nzasa-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #ffffff;
    color: #0047AB;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.nzasa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.nzasa-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   5. 动画效果
   ======================================== */

/* 淡入动画 */
@keyframes nzasaFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 淡出动画 */
@keyframes nzasaFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 滑动动画 */
.nzasa-animation-slide .nzasa-content-item {
    transform: translateX(30px);
}

.nzasa-animation-slide .nzasa-content-item.active {
    transform: translateX(0);
}

/* 缩放动画 */
.nzasa-animation-scale .nzasa-content-item {
    transform: scale(0.95);
}

.nzasa-animation-scale .nzasa-content-item.active {
    transform: scale(1);
}

/* ========================================
   6. 响应式设计
   ======================================== */

/* 平板设备 */
@media (max-width: 1024px) {
    .nzasa-services-container {
        gap: 40px;
    }
    
    .nzasa-service-item h3 {
        font-size: 24px;
    }
    
    .nzasa-content-item h2 {
        font-size: 36px;
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    .nzasa-services-section {
        padding: 60px 20px !important;
        min-height: auto !important;
    }
    
    .nzasa-services-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        display: grid !important;
    }
    
    .nzasa-layout-reverse .nzasa-services-container {
        grid-template-columns: 1fr !important;
    }
    
    .nzasa-layout-reverse .nzasa-services-nav,
    .nzasa-layout-reverse .nzasa-services-content {
        order: initial !important;
    }
    
    /* 移除右侧分割线 */
    .nzasa-services-nav::after {
        display: none !important;
    }
    
    /* 添加底部分隔线（导航区和内容区之间） */
    .nzasa-services-nav {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        padding-bottom: 20px !important;
        margin-bottom: 30px !important;
    }
    
    .nzasa-services-badge {
        margin-bottom: 30px !important;
    }
    
    /* 服务项样式 - 移除边框 */
    .nzasa-service-item {
        padding: 20px 0 20px 20px !important;
        border-bottom: none !important;
        min-height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
    
    /* 移除左侧指示条 */
    .nzasa-service-item::before {
        display: none !important;
    }
    
    /* 移除悬停平移效果 */
    .nzasa-service-item:hover,
    .nzasa-service-item.active {
        transform: none !important;
    }
    
    .nzasa-service-item h3 {
        font-size: 22px !important;
    }
    
    .nzasa-service-item p {
        font-size: 13px !important;
    }
    
    .nzasa-services-content {
        min-height: 300px !important;
    }
    
    .nzasa-content-item h2 {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }
    
    .nzasa-content-text {
        font-size: 15px !important;
        line-height: 1.8 !important;
        margin-bottom: 24px !important;
    }
    
    .nzasa-btn {
        padding: 12px 28px !important;
        font-size: 15px !important;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .nzasa-services-section {
        padding: 40px 15px;
    }
    
    .nzasa-service-item h3 {
        font-size: 20px;
    }
    
    .nzasa-content-item h2 {
        font-size: 24px;
    }
    
    .nzasa-content-text {
        font-size: 14px;
    }
}

/* ========================================
   7. 手风琴模式（移动端）
   ======================================== */

@media (max-width: 768px) {
    .nzasa-mobile-accordion .nzasa-services-container {
        display: block;
    }
    
    .nzasa-mobile-accordion .nzasa-service-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .nzasa-mobile-accordion .nzasa-content-item {
        position: static;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0 0 0 30px;
    }
    
    .nzasa-mobile-accordion .nzasa-content-item.active {
        max-height: 1000px;
        padding: 20px 0 30px 30px;
    }
}

/* ========================================
   8. 加载状态
   ======================================== */

.nzasa-services-section.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   9. 无障碍访问
   ======================================== */

.nzasa-service-item:focus,
.nzasa-service-item:focus-visible {
    outline: none;
}

.nzasa-btn:focus,
.nzasa-btn:focus-visible {
    outline: none;
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    .nzasa-service-item,
    .nzasa-content-item,
    .nzasa-btn {
        transition: none;
    }
}

/* ========================================
   10. 打印样式
   ======================================== */

@media print {
    .nzasa-services-section {
        background: none !important;
        color: #000 !important;
    }
    
    .nzasa-content-item {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        page-break-inside: avoid;
    }
    
    .nzasa-btn {
        display: none;
    }
}

/* ========================================
   11. Elementor 编辑器兼容
   ======================================== */

.elementor-editor-active .nzasa-content-item {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

.elementor-editor-active .nzasa-services-content {
    min-height: auto;
}
