/* 全局变量定义 */
:root {
    --primary-color: #009688;
    --secondary-color: #ffc107;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #fff;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    max-height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.03);
    padding: 5px;
    border-radius: 30px;
}

.nav-links a {
    padding: 8px 20px;
    font-weight: 500;
    color: var(--text-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: rgba(0, 150, 136, 0.1);
    color: var(--primary-color);
}

.nav-links a.active {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 150, 136, 0.3);
}

.auth-buttons .btn {
    margin-left: 15px;
    padding: 8px 25px;
    font-weight: 500;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primahero ry-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #00796b;
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 占位图样式 */
.placeholder-img {
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777;
    font-size: 14px;
}

/* 轮播图 Hero Section */
.hero-carousel {
    position: relative;
    height: 400px; /* 降低高度 */
    overflow: hidden;
    background-color: #ccc;
    max-width: 1200px; /* 限制最大宽度与 container 一致 */
    margin: 20px auto; /* 居中显示，并增加顶部间距 */
    border-radius: 8px; /* 添加圆角 */
    padding: 0 20px; /* 保持与 container 相同的左右内边距逻辑 */
}

/* 由于 .hero-carousel 本身已经限制了宽度和居中，内部的 .carousel-slide 需要调整以适应 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
    border-radius: 8px; /* 图片也需要圆角 */
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.3s;
}

.carousel-slide.active h1 {
    transform: translateY(0);
    opacity: 1;
}

.carousel-slide p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.5s;
}

.carousel-slide.active p {
    transform: translateY(0);
    opacity: 1;
}

.carousel-slide .btn {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.7s;
}

.carousel-slide.active .btn {
    transform: translateY(0);
    opacity: 1;
}

/* 轮播图控制按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.3);
    color: white;
    border: none;
    width: 40px; /* 稍微调小按钮 */
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prev-btn {
    left: 30px; /* 考虑到 padding */
}

.next-btn {
    right: 30px; /* 考虑到 padding */
}

/* 轮播图指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active, .indicator:hover {
    background-color: white;
    transform: scale(1.2);
}

/* 首页特定样式 */
.section-title {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 32px;
    color: var(--primary-color);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* 详情页样式 */
.detail-container {
    padding: 40px 0;
}

.detail-header {
    margin-bottom: 30px;
}

.detail-img {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.detail-content {
    font-size: 16px;
    line-height: 1.8;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* 登录/注册表单 */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
}

/* 页脚 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
}

/* 路线页 */
.route-item {
    background: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
}

.route-img {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
}

.route-info h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.route-steps {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 页面主体最小高度，确保Footer沉底 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}
