/* =============================================================================
   全局重置与变量定义
   ============================================================================= */

:root {
    --primary-brown: #D2691E;
    --dark-brown: #5D4037;
    --light-brown: #EFB888;
    --accent-red: #A52A2A;
    --accent-yellow: #DAA520;
    --text-font: 'Georgia', 'Times New Roman', serif;
    --gradient-end: #A57547;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--text-font);
    background: linear-gradient(180deg, #FFFFFF 0%, #A57547 100%);
    min-height: 100vh;
    color: var(--dark-brown);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =============================================================================
   1. 固定导航栏样式
   ============================================================================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    border-bottom: 1px solid rgba(93, 64, 55, 0.2);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.15);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-brown);
    margin-left: 10px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.site-title-little {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--dark-brown);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    margin-left: -10px;
    margin-top: 10px;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.home-link-btn {
    padding: 8px 20px;
    border: 2px solid var(--dark-brown);
    background: rgba(255, 255, 255, 0.6);
    color: var(--dark-brown);
    font-family: var(--text-font);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 4px;
    margin-left: -15px; /* 添加左侧间距以与logo区域分开 */
}

.home-link-btn:hover {
    background-color: var(--primary-brown);
    color: white;
    border-color: var(--primary-brown);
}

.btn {
    padding: 8px 20px;
    border: 2px solid var(--dark-brown);
    background: rgba(255, 255, 255, 0.6);
    color: var(--dark-brown);
    font-family: var(--text-font);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 4px;
}

.btn:hover, .btn-primary {
    background-color: var(--primary-brown);
    color: white;
    border-color: var(--primary-brown);
}

/* =============================================================================
   2. 主体内容区 (轮播图) 样式
   ============================================================================= */

main {
    margin-top: 57px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 60vh;
    position: relative;
    z-index: 1;
}

.carousel-container {
    width: 100%;
    text-align: center;
    position: relative;
}

.carousel-image-box {
    width: 100%;
    height: auto;
    background-color: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.carousel-image-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
    filter: sepia(20%);
}

.carousel-text-box {
    min-height: 80px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(93, 64, 55, 0.1);
}

.carousel-text-box h2 {
    font-size: 2rem;
    color: var(--primary-brown);
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.carousel-text-box p {
    font-size: 1.1rem;
    color: var(--dark-brown);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 500;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 10px;
    position: relative;
    padding: 20px 0;
    background: transparent;
}

.control-dot {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--light-brown);
    border: 3px solid var(--dark-brown);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--dark-brown);
    font-weight: bold;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.control-dot:hover, .control-dot.active {
    background-color: var(--primary-brown);
    color: white;
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 0 20px rgba(210, 105, 30, 0.7);
    border-color: white;
}

/* =============================================================================
   4. 圆圈下方长段文本区样式
   ============================================================================= */

.carousel-detail-text {
    width: 100%;
    max-width: 55%; /* 修改为100%以利用整个宽度 */
    margin: 40px auto 0;
    padding: 20px; /* 减少内边距 */
    background: rgba(255, 253, 240, 0.95);
    border-radius: 12px;
    border: 2px solid var(--dark-brown);
    box-shadow: 0 8px 25px rgba(93, 64, 55, 0.2);
    backdrop-filter: blur(5px);
}

.detail-content h3 {
    font-size: 1.6rem;
    color: var(--primary-brown);
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-brown);
}

.detail-content p {
    font-size: 1.05rem;
    color: var(--dark-brown);
    line-height: 2;
    margin-bottom: 20px;
    text-align: justify;
    text-indent: 2em; /* 添加首行缩进 */
}

.detail-content p:first-of-type {
    text-indent: 2em; /* 确保第一条也有首行缩进 */
}

.detail-content ul {
    list-style-type: disc;
    margin-left: 2em; /* 增加左侧缩进 */
}

.detail-content ul li {
    text-indent: -2em; /* 移除默认的缩进 */
    padding-left: 2em; /* 添加自定义的缩进 */
}

/* =============================================================================
   3. 底部波浪线文本区样式
   ============================================================================= */

.footer-wave-section {
    position: relative;
    width: 100%;
    background-color: var(--dark-brown);
    color: #FDF6E3;
    padding-top: 80px;
    padding-bottom: 40px;
    text-align: center;
    overflow: hidden;
    z-index: 2;
}

.wave-svg {
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1;
}

.wave-path {
    fill: #FDF6E3;
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--light-brown);
}

.footer-content p {
    font-size: 1rem;
    opacity: 0.95;
    line-height: 1.8;
    color: #eee;
}

/* =============================================================================
   响应式设计 - 移动端适配
   ============================================================================= */

@media (max-width: 768px) {
    .carousel-image-box {
        height: 250px;
    }

    .carousel-controls {
        gap: 15px;
    }

    .control-dot {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }

    header {
        padding: 0 2%;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .carousel-detail-text {
        padding: 25px;
        margin: 30px auto 0;
    }

    .detail-content h3 {
        font-size: 1.3rem;
    }

    .detail-content p {
        font-size: 0.95rem;
        text-align: left;
        text-indent: 0;
        line-height: 1.8;
    }
}

/* 新增的部分 */
.scroll-reveal-section {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.scroll-reveal-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 5%;
}

.scroll-reveal-image img {
    max-width: 680px;
    max-height: 720px;
    transition: transform 0.5s ease-in-out;
    transform: translateX(-100%);
}

.scroll-reveal-text {
    font-size: 20px;
    flex: 1;
    margin-left: 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: translateX(100%);
}

.scroll-reveal-active .scroll-reveal-image img,
.scroll-reveal-active .scroll-reveal-text {
    transform: translateX(0);
    opacity: 1;
}