/* 首页专用样式 - 川西风格 */

/* 1. 英雄区域 */
.home-hero {
    position: relative;
    height: 100vh;
    min-height: 650px;
}

.cw-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cw-carousel__item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cw-carousel__item.active {
    opacity: 1;
}

.cw-carousel__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(8, 158, 248, 0.65) 0%, rgba(61, 180, 250, 0.45) 50%, rgba(255, 167, 38, 0.35) 100%);
    backdrop-filter: blur(2px);
}

.cw-carousel__content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    z-index: 1;
}

/* 修复form标签影响 */
.cw-carousel__content form {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    width: 100%;
    display: flex;
    justify-content: center;
}

.home-hero__title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-hero__subtitle {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 45px;
    max-width: 800px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    line-height: 1.6;
    animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
    animation-fill-mode: both;
    opacity: 0.95;
}

.home-hero__search {
    display: flex;
    max-width: 620px;
    width: 100%;
    margin-bottom: 35px;
    animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    animation-fill-mode: both;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cw-search__input {
    flex: 1;
    padding: 18px 24px;
    font-size: 16px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border: none;
    background: rgba(255, 255, 255, 0.98);
}

.cw-search__input:focus {
    outline: none;
    background: white;
}

.cw-search__btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 18px 36px;
    font-weight: 700;
}

.home-hero__actions {
    display: flex;
    gap: 24px;
    animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.45s;
    animation-fill-mode: both;
}

.cw-carousel__prev,
.cw-carousel__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cw-carousel__prev:hover,
.cw-carousel__next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cw-carousel__prev {
    left: 30px;
}

.cw-carousel__next {
    right: 30px;
}

.cw-carousel__indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2;
    padding: 12px 20px;
    background: rgba(8, 158, 248, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 30px;
}

.cw-carousel__indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.cw-carousel__indicator.active {
    background: white;
    width: 32px;
    border-radius: 10px;
    border-color: rgba(255, 255, 255, 0.3);
}

.cw-carousel__indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

/* 2. 热门目的地 */
.home-destinations__tags {
    display: flex;
    flex-wrap: wrap;
}

/* 3. 精选攻略 */
.home-guides__filter {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.home-guides__filter-btn {
    padding: 12px 28px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.home-guides__filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.home-guides__filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.home-guides__filter-btn.active {
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.home-guides__filter-btn.active::before {
    opacity: 1;
}

.home-guides__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.home-guides__date {
    color: var(--text-light);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.home-guides__link {
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition-fast);
}

.home-guides__link:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

/* 4. 特色主题 */
.home-themes__item {
    text-align: center;
    padding: 48px 28px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.home-themes__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient-secondary);
    transform: scaleX(0);
    transition: var(--transition);
}

.home-themes__item:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
    border-color: var(--secondary-color);
}

.home-themes__item:hover::before {
    transform: scaleX(1);
}

.home-themes__icon {
    font-size: 64px;
    margin-bottom: 24px;
    color: var(--primary-color);
    transition: var(--transition);
}

.home-themes__item:hover .home-themes__icon {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.home-themes__title {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.home-themes__desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.home-themes__link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.home-themes__link:hover {
    color: var(--secondary-color);
    transform: translateX(6px);
}

/* 6. 行前工具 */
.home-tools__item {
    display: block;
    text-align: center;
    padding: 42px 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.home-tools__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.home-tools__item:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.home-tools__item:hover::before {
    opacity: 1;
}

.home-tools__icon {
    font-size: 52px;
    margin-bottom: 18px;
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.home-tools__item:hover .home-tools__icon {
    color: white;
    transform: scale(1.1);
}

.home-tools__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.home-tools__item:hover .home-tools__title,
.home-tools__item:hover .home-tools__desc {
    color: white;
}

.home-tools__desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

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

/* 响应式 */
@media (max-width: 768px) {
    .home-hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .home-hero__title {
        font-size: 32px;
    }
    
    .home-hero__subtitle {
        font-size: 16px;
    }
    
    .home-hero__actions {
        flex-direction: row;
        width: 100%;
        max-width: 95%;
        gap: 12px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .home-hero__actions .cw-btn {
        flex: 1;
        font-size: 14px;
        padding: 12px 16px;
        white-space: nowrap;
    }
    
    .home-hero__search {
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .cw-search__input {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .cw-search__btn {
        padding: 14px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .cw-carousel__prev,
    .cw-carousel__next {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .home-guides__filter {
        gap: 10px;
    }
    
    .home-guides__filter-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .home-hero {
        height: 65vh;
        min-height: 450px;
    }
    
    .home-hero__search {
        max-width: 98%;
    }
    
    .cw-search__input {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .cw-search__btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .home-hero__actions {
        max-width: 98%;
        gap: 10px;
    }
    
    .home-hero__actions .cw-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .home-hero__title {
        font-size: 26px;
    }
    
    .home-hero__subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
}

