* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft Yahei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    background-color: #c12e2a; /* 苗族红色 */
    color: white;
    padding: 1rem 0;
}

.top-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.top-nav li {
    margin: 0 1rem;
}

.top-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.top-nav a:hover {
    color: #ffd700; /* 金色，增加交互感 */
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: #c12e2a;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* 卡片网格样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: #333;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    padding: 1rem;
    font-size: 1.5rem;
    color: #c12e2a;
}

.card p {
    padding: 0 1rem 1rem;
}

/* 旅游攻略页面样式 */
.guide-section {
    margin-bottom: 2rem;
}

.guide-section h3 {
    color: #c12e2a;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 0.8rem;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

ul, ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

/* 联系我们表单样式 */
form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    height: 150px;
    resize: vertical;
}

button {
    background-color: #c12e2a;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a02522;
}

/* 响应式媒体查询 */
@media (max-width: 768px) {
    .top-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .top-nav li {
        margin: 0.5rem 0;
    }

    .carousel {
        height: 300px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: #333;
    color: white;
}

footer a {
    color: #ffd700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}