/* 首页专属增强样式 */

/* ========================================
   Hero 轮播区优化
   ======================================== */
#heroCarousel .carousel-item {
    transition: transform 0.8s ease-in-out;
}

#heroCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 154, 86, 0.4);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

#heroCarousel .carousel-indicators button.active {
    background-color: #ff9a56;
    border-color: #ff9a56;
    transform: scale(1.2);
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 154, 86, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 1);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(255, 154, 86, 0.3);
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(330deg);
}

/* Hero 内容动画 */
#heroCarousel .carousel-item.active h1 {
    animation: slideInLeft 0.8s ease-out;
}

#heroCarousel .carousel-item.active p {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

#heroCarousel .carousel-item.active .btn {
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   服务优势卡片
   ======================================== */
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .bi {
    transition: all 0.4s ease;
}

.feature-card:hover .bi {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(255, 154, 86, 0.3));
}

/* ========================================
   统计数据动画
   ======================================== */
.stats-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.stats-number:hover {
    transform: scale(1.05);
}

/* ========================================
   服务卡片特殊效果
   ======================================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 154, 86, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.service-card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ========================================
   咨询师卡片效果
   ======================================== */
.consultant-card {
    perspective: 1000px;
}

.consultant-card .card {
    transition: all 0.5s ease;
    transform-style: preserve-3d;
}

.consultant-card:hover .card {
    transform: rotateY(2deg) rotateX(2deg);
}

.consultant-card .card-img-top {
    position: relative;
    overflow: hidden;
}

.consultant-card .card-img-top::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(61, 40, 23, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.consultant-card:hover .card-img-top::after {
    opacity: 1;
}

/* ========================================
   CTA 区域优化
   ======================================== */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="%23ff9a56" opacity="0.1"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   移动端固定 CTA 按钮
   ======================================== */
.fixed-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #ff9a56 0%, #ffb380 100%);
    box-shadow: 0 -4px 12px rgba(61, 40, 23, 0.15);
    padding: 0.75rem 1rem;
    animation: slideInUp 0.4s ease-out;
}

.fixed-bottom-cta .btn {
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: #ff9a56;
    border: none;
    padding: 0.75rem;
}

.fixed-bottom-cta .btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: none;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ========================================
   返回顶部按钮增强
   ======================================== */
#btn-back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#btn-back-to-top:active {
    transform: translateY(-3px) scale(0.95);
}

/* ========================================
   页面加载动画
   ======================================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   微交互细节
   ======================================== */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
}

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* 图标脉冲效果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-on-hover:hover {
    animation: pulse 1s ease-in-out infinite;
}

/* ========================================
   响应式优化
   ======================================== */
@media (max-width: 768px) {
    #heroCarousel .carousel-item {
        min-height: 70vh !important;
    }

    #heroCarousel h1 {
        font-size: 2rem !important;
    }

    #heroCarousel p {
        font-size: 1rem !important;
    }

    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .service-card,
    .consultant-card {
        margin-bottom: 1.5rem;
    }
}

/* ========================================
   可访问性增强
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .card,
    .service-card {
        border: 2px solid #3d2817;
    }

    .btn-primary {
        border: 2px solid #3d2817;
    }
}
