/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 链接样式 */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 导航栏 */
:root {
    --primary-color: #179256;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #fff;
    --transition: all 0.3s ease;
}

.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

/* 桌面导航 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 10px 0;
    transition: var(--transition);
}

.nav-top, .nav-bottom {
    display: inline;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-color);
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.customer-service {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* 侧边菜单 */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: var(--transition);
    padding: 20px;
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.side-menu-logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.close-menu {
    font-size: 24px;
    cursor: pointer;
}

.side-nav-menu {
    list-style: none;
}

.side-nav-menu li {
    margin-bottom: 20px;
}

.side-nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    display: block;
    padding: 10px 0;
    transition: var(--transition);
}

.side-nav-menu li a:hover {
    color: var(--primary-color);
}

.side-customer-service {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: var(--primary-color);
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: none;
}

.overlay.active {
    display: block;
}

/* 轮播图 */
.swiper-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.fixed-search-form {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 80%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-overlay {
    position: absolute;
    top: 30%;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.swiper-overlay h2 {
    font-size: 48px;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 轮播图导航按钮 */
.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    z-index: 101 !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 50px !important;
    height: 50px !important;
    background: transparent !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
}

.swiper-button-next {
    right: 20px !important;
}

.swiper-button-prev {
    left: 20px !important;
}

.search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.search-form select,
.search-form input,
.search-form button {
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.search-form select,
.search-form input {
    min-width: 200px;
    background: white;
}

.search-form button {
    background: #179256;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-form button:hover {
    background: #137a48;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: 5px;
}

.search-suggestions.show {
    display: block;
}

.search-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: #f5f5f5;
}

.search-suggestion-item span {
    color: #179256;
    font-weight: 500;
}

/* 内容区域 */
.content-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 热门共享菜园 */
.garden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.garden-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.garden-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.garden-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.garden-content {
    padding: 20px;
}

.garden-content h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.garden-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.garden-price .original-price {
    color: #797E78;
}

.garden-price .member-price {
    background-color: #FF7701;
    color: white;
    padding: 2px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.garden-content p {
    color: #666;
    font-size: 14px;
}

.view-more {
    display: block;
    text-align: center;
    padding: 12px 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 200px;
    margin: 0 auto;
}

.view-more:hover {
    background-color: #179256;
    color: white;
    border-color: #179256;
}

/* 农旅目的地 */
.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0;
    margin-bottom: 30px;
}

.destination-card {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.destination-grid > a:first-child .destination-card {
    border-top-left-radius: 120px;
}

.destination-grid > a:last-child .destination-card {
    border-bottom-right-radius: 120px;
}

.destination-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.destination-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    transition: all 0.3s ease;
}

.destination-card:hover::before {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.destination-grid > a:nth-child(1) .destination-card {
    background-image: url('../img/b1.jpg');
}

.destination-grid > a:nth-child(2) .destination-card {
    background-image: url('../img/b2.jpg');
}

.destination-grid > a:nth-child(3) .destination-card {
    background-image: url('../img/b3.jpg');
}

.destination-grid > a:nth-child(4) .destination-card {
    background-image: url('../img/b4.png');
}

.destination-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.destination-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.destination-card:hover .destination-content h3 {
    transform: translateY(-5px);
}

.destination-content p {
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.destination-card:hover .destination-content p {
    transform: translateY(-5px);
    opacity: 0.9;
}

/* 热门名宿 */
.homestay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.homestay-card {
    position: relative;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.homestay-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.homestay-card .price-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #179256;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
}

.homestay-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.homestay-content {
    padding: 20px;
}

.homestay-content h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.homestay-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #797E78;
}

/* 农旅团购 */
.group-buying-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.group-buying-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.group-buying-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.group-buying-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.countdown {
    background-color: #54BC65;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.group-buying-content {
    padding: 20px;
}

.group-buying-content h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

/* 农旅管家 */
.butler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.butler-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.butler-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.butler-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.butler-card h3 {
    font-size: 20px;
    color: #333;
    margin: 15px 0;
}

.butler-info {
    padding: 0 20px 20px;
    text-align: left;
}

.butler-info p {
    margin-bottom: 10px;
    color: #666;
}

/* 热门攻略 */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.guide-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.guide-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.guide-content {
    padding: 20px;
}

.guide-content h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.guide-content p {
    color: #666;
    font-size: 14px;
}

/* 私人定制 */
.custom-section {
    background: linear-gradient(135deg, #179256 0%, #28a745 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.custom-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.custom-content p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.custom-btn {
    display: inline-block;
    background-color: #ff6b35;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.custom-btn:hover {
    background-color: #e55a2b;
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-actions {
        margin-top: 20px;
    }

    .swiper-container {
        height: 500px;
    }

    .fixed-search-form {
        top: 60%;
    }

    .swiper {
        height: 100%;
    }

    .swiper-overlay h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .search-form {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 15px;
    }

    .search-form select,
    .search-form input,
    .search-form button {
        width: 70%;
        padding: 10px;
        font-size: 14px;
    }

    .search-form select,
    .search-form input {
        min-width: auto;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .garden-grid,
    .homestay-grid,
    .group-buying-grid,
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .destination-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .destination-card {
        height: 300px;
    }

    .destination-grid > a:first-child .destination-card {
        border-top-left-radius: 80px;
    }

    .destination-grid > a:last-child .destination-card {
        border-bottom-right-radius: 80px;
    }

    .destination-content {
        padding: 30px;
    }

    .butler-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-content h2 {
        font-size: 28px;
    }

    .custom-content p {
        font-size: 16px;
    }

    /* 隐藏小屏幕上的幻灯片导航箭头 */
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }

    /* 响应式导航 */
    .nav-container {
        flex-direction: row;
        padding: 10px 20px;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    
    .logo {
        margin-bottom: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .logo img {
        height: 40px;
    }
    
    /* 隐藏桌面导航和客服信息 */
    .nav-menu {
        display: none;
    }
    
    .customer-service {
        display: none;
    }
    
    /* 显示移动端菜单按钮 */
    .menu-toggle {
        display: flex;
        order: -1;
    }
    
    .nav-top, .nav-bottom {
        display: block;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .destination-grid {
        grid-template-columns: 1fr;
    }

    .destination-card {
        height: 250px;
        border-radius: 0 !important;
    }

    .destination-grid > a:first-child .destination-card {
        border-top-left-radius: 50px !important;
    }

    .destination-grid > a:last-child .destination-card {
        border-bottom-right-radius: 50px !important;
    }

    .destination-content {
        padding: 20px;
    }

    .butler-grid {
        grid-template-columns: 1fr;
    }

    .swiper-container {
        height: 500px;
    }

    .fixed-search-form {
        top: 60%;
    }

    .swiper {
        height: 100%;
    }

    .swiper-overlay h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .search-form {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 12px;
    }

    .search-form select,
    .search-form input,
    .search-form button {
        width: 70%;
        padding: 8px;
        font-size: 12px;
    }

    .search-form select,
    .search-form input {
        min-width: auto;
    }

    .section-title h2 {
        font-size: 24px;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #179256;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.back-to-top:hover {
    background-color: #137a48;
    transform: translateY(-5px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top.hide {
    opacity: 0;
    visibility: hidden;
}