/* 
 * 主样式表 - 湘中明珠·魅力邵阳旅游网站
 * 作者：[刘稳]
 * 日期：[2025-06-10]
 * 描述：全局样式
 */

/* 全局变量定义 - 定义全站通用的颜色、边距、圆角等变量 */
:root {
    --primary-color: #e74c3c;    /* 主色调：红色系 */
    --secondary-color: #3498db;  /* 次要色调：蓝色系 */
    --accent-color: #2ecc71;     /* 强调色：绿色系 */
    --dark-color: #2c3e50;       /* 深色：用于页脚、标题等 */
    --light-color: #ecf0f1;      /* 浅色：用于背景 */
    --text-color: #333;          /* 正文文本颜色 */
    --text-light: #7f8c8d;       /* 次要文本颜色 */
    --border-radius: 5px;        /* 全局圆角半径 */
    --box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 全局阴影样式 */
    --transition: all 0.3s ease; /* 全局过渡效果 */
}

/* 重置样式 - 确保所有元素有一致的基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础元素样式 */
body {
    font-family: "Microsoft YaHei", "微软雅黑", "Hiragino Sans GB", "STHeiti", "WenQuanYi Micro Hei", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth; /* 平滑滚动效果 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 按钮样式 - 定义网站通用按钮 */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    background-color: var(--accent-color);
    color: #fff;
}

.btn-small:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 章节标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 头部导航样式 */
header {
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
}

.logo .current-time {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 500;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    margin-left: 10px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after, nav ul li a.active::after {
    width: 100%;
}

/* 主横幅样式 - 首页大图横幅 */
.banner {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/banner_1.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    margin-bottom: 60px;
}

.banner-content {
    max-width: 800px;
    padding: 0 20px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.5s both;
}

.banner-content .btn {
    animation: fadeIn 1s ease 1s both;
}

/* 城市简介样式 */
.city-intro {
    padding: 80px 50px;
    background-color: var(--light-color);
}

.intro-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.intro-text, .intro-img {
    flex: 1;
}

.intro-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.intro-img img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.intro-img img:hover {
    transform: scale(1.03);
}

/* 景点推荐样式 */
.attractions {
    padding: 80px 50px;
    background-color: white;
}

.attraction-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    flex: 1;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.card-content p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* 文化特色样式 */
.culture-highlight {
    padding: 80px 50px;
    background-color: var(--light-color);
}

.culture-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.culture-text, .culture-img {
    flex: 1;
}

.culture-text h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.culture-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.culture-img img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 美食展示样式 */
.cuisine {
    padding: 80px 50px;
    background-color: white;
}

.cuisine-gallery {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.cuisine-item {
    flex: 1;
    text-align: center;
    transition: var(--transition);
}

.cuisine-item:hover {
    transform: translateY(-5px);
}

.cuisine-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

.cuisine-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.cuisine-item p {
    font-size: 14px;
    color: var(--text-light);
}

.cuisine-more {
    text-align: center;
    margin-top: 30px;
}

/* 旅游资讯样式 */
.travel-info {
    padding: 80px 50px;
    background-color: var(--light-color);
}

.info-content {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    flex: 1;
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.info-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.info-card .link {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.info-card .link:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* 订阅部分样式 */
.subscribe {
    padding: 80px 50px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/subscribe-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
}

.subscribe-content {
    max-width: 600px;
    margin: 0 auto;
}

.subscribe-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.subscribe-content p {
    font-size: 16px;
    margin-bottom: 30px;
}

#subscribe-form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#subscribe-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
}

/* 底部样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 50px 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-logo p {
    font-size: 14px;
    color: #95a5a6;
}

.footer-links {
    display: flex;
    gap: 50px;
}

.link-group h3 {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
}

.link-group h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group ul li a {
    font-size: 14px;
    color: #bdc3c7;
    transition: var(--transition);
}

.link-group ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-social h3 {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
}

.footer-social h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon img {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #95a5a6;
}

.footer-copyright {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
}

.footer-copyright a {
    color: #95a5a6;
    text-decoration: underline;
}

.footer-copyright a:hover {
    color: #bdc3c7;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 响应式设计 - 移动设备和平板电脑适配 */
@media (max-width: 1024px) {
    .attraction-cards,
    .cuisine-gallery,
    .info-content {
        flex-wrap: wrap;
    }
    
    .card,
    .cuisine-item,
    .info-card {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin-left: 15px;
    }
    
    .intro-content,
    .culture-content {
        flex-direction: column;
    }
    
    .intro-img,
    .culture-img {
        order: -1;
    }
    
    .attraction-cards,
    .cuisine-gallery,
    .info-content {
        flex-direction: column;
    }
    
    .card,
    .cuisine-item,
    .info-card {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
} 