/* 自定义动画和样式 */

/* 全局样式 */
* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 导航栏动画 */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #2D5016;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #FFD700;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}


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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* 动画类 */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 1s ease-out 0.3s both;
}

.animate-bounce-in {
    animation: bounceIn 1s ease-out 0.6s both;
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 滚动动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 服务项目悬停效果 */
.service-item {
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(45, 80, 22, 0.2);
}

.service-item:hover .service-icon {
    transform: scale(1.1);
    background-color: #2D5016;
}

.service-item:hover .service-icon span {
    transform: scale(1.2);
}

.service-icon {
    transition: all 0.3s ease;
}

/* 套餐卡片效果 */
.package-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.package-card figure {
    overflow: hidden;
}

.package-card:hover figure > div {
    transform: scale(1.05);
}

.package-card figure > div {
    transition: transform 0.5s ease;
}

/* 酒店品牌悬停效果 */
.hotel-brand {
    transition: all 0.3s ease;
}

.hotel-brand:hover {
    transform: translateY(-5px);
    background-color: #F8FFF8;
}

.hotel-brand:hover > div {
    background-color: #2D5016;
    color: white;
}

/* 筛选按钮效果 */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #2D5016 !important;
    color: white !important;
    transform: scale(1.05);
}

.filter-btn:hover {
    transform: translateY(-2px);
}

/* 动态播报样式 */
.live-feed {
    overflow: hidden;
    white-space: nowrap;
}

.live-feed-content {
    display: inline-block;
    padding-left: 100%;  /* 重要：确保内容从右侧开始 */
    animation: scroll 60s linear infinite;
}

.live-feed-content:hover {
    animation-play-state: paused;
}

/* 返回顶部按钮 */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop.show {
    opacity: 1;
    transform: translateY(0);
}

#backToTop:hover {
    transform: translateY(-3px);
}

/* 悬浮客服按钮 */
.fixed .btn-circle {
    transition: all 0.3s ease;
}

.fixed .btn-circle:hover {
    transform: scale(1.1);
}

/* 视差滚动效果 */
.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* 加载动画 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-slide h1 {
        font-size: 2rem !important;
    }
    
    .service-item {
        padding: 1rem;
    }
    
    .service-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .animate-scroll {
        animation-duration: 20s;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 350px;
    }
    
    .hero-slide h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-slide p {
        font-size: 0.9rem !important;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #8FBC8F;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4A7C59;
}

/* 焦点样式 */
.btn:focus,
.input:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* 过渡效果增强 */
.card,
.btn,
.input,
.service-item,
.package-card,
.hotel-brand {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 阴影效果 */
.shadow-golf {
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.1);
}

.shadow-golf-lg {
    box-shadow: 0 10px 40px rgba(45, 80, 22, 0.15);
}

/* 渐变背景 */
.bg-gradient-golf {
    background: linear-gradient(135deg, #2D5016 0%, #4A7C59 50%, #8FBC8F 100%);
}

/* 文字渐变 */
.text-gradient-golf {
    background: linear-gradient(135deg, #2D5016, #4A7C59);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 特殊效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.neon-glow {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #FFD700;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #FFD700;
    }
}

.input-group{
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group input{
    margin-right: 4px;
}