/* --- 1. 变量定义 --- */
:root {
    --off-white: #fef7eb;
    --brand-yellow: #faa812;
    --brand-purple: #7f257b;
    --brand-blue: #33afb5;
    --brand-orange: #f77811;
    --brand-brown: #6a1500;
    --brand-pink: #ef1787;
    --brand-green: #166b25;
    
   --font-title-fredoka: 'Fredoka', sans-serif;
    --font-title-dangrek: 'Dangrek', sans-serif;
    --font-body: 'Cera Pro', 'Kantumruy Pro', sans-serif;
}


header {
    background-color: var(--off-white);
    border-bottom-left-radius: 25px; 
    border-bottom-right-radius: 25px;
    padding: 10px 0 12px 0; 
    box-shadow: 0 4px 12px rgba(106, 21, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 25px;
}

.header-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.logo img {
    height: 65px; 
    width: auto;
}

/* 搜索栏交互样式 */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar {
    position: absolute;
    right: 40px;
    display: flex;
    background: white;
    border: 2px solid var(--brand-yellow);
    border-radius: 20px;
    padding: 5px 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-bar.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.search-bar input {
    border: none; outline: none; width: 120px;
}

.search-bar button {
    background: var(--brand-yellow);
    border: none; color: white; border-radius: 10px;
    padding: 2px 8px; cursor: pointer; font-weight: bold;
}

.search-icon img {
    width: 22px; cursor: pointer;
}

/* --- 4. 导航图标 --- */
.nav-scroll {
    display: flex;
    /* 核心：恢复之前的等距分布 */
    justify-content: space-between; 
    width: 85%; /* 或者用你之前的 75%，根据你想要的疏密程度调整 */
    max-width: 1200px; /* 限制最大宽度，防止大屏幕图标分得太开 */
    margin: 0 auto;
}
.nav-scroll a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}
.nav-scroll img {
    height: 24px; /* 恢复你的图标大小 */
    width: auto;
}

.nav-scroll a:hover { transform: scale(1.2); }

/* --- 统一导航指示原点样式 --- */
.nav-scroll a.active::after {
    content: '';
    position: absolute;
    /* 核心修改：统一距离图标底部的距离 */
    bottom: -12px; /* 增加负值可以让点往下移，建议根据视觉效果在 -10px 到 -15px 之间微调 */
    left: 50%;
    transform: translateX(-50%);
    
    /* 保持原点形状 */
    width: 6px; 
    height: 6px;
    background-color: var(--brand-yellow);
    border-radius: 50%;
    
    /* 动画保持不变 */
    animation: dotFade 0.3s ease forwards;
}

/* 确保 a 标签有足够的点击区域，并防止点被切掉 */
.nav-scroll a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 5px; /* 给下方点留出固定呼吸空间 */
    transition: transform 0.2s ease;
}

@keyframes dotFade {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}


/* 给中间内容一个最小高度，把 Footer 顶下去 */
.content-wrapper {
    min-height: 60vh; /* 占据屏幕 60% 的高度 */
    padding: 50px 10%;
    background-color: #fcfcfc; /* 主体背景色 */
}






/* --- 1. 强制页面布局 --- */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh; /* 保证页面至少占满屏幕 */
    display: flex;
    flex-direction: column;
   
}

/* --- 2. 给中间留出空位（关键！） --- */
/* 如果你 HTML 里没有 main 标签，请加一个，或者用这个选择器占位 */
header + * {
    flex: 1; /* 自动撑开中间，把 footer 压到最下面 */
}

/* --- 3. Footer 样式：精简高度 --- */
.footer-main {
    background-color:  var(--off-white)!important;
    /* 核心修改：大大减小上下内边距 (40px 是现在的，15px 是底部的) */
    padding: 30px 5% 15px !important; 
    border-top-left-radius: 60px !important;
    border-top-right-radius: 60px !important;
    width: 100% !important;
    margin-top: 0 !important;
    box-sizing: border-box;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center; /* 改为居中对齐，让内容看起来更整齐 */
}

/* 缩放 Logo 图标，防止撑高 */
.footer-photo-box img {
    width: 100px !important; 
    height: auto;
}


.footer-nav {
            display: flex;
            gap: 60px;
            flex-grow: 1;
            padding-left: 40px;
            font:var(--font-title-fredoka);
        }

        .nav-col {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }


/* 修改后的 Footer 导航样式 */
.nav-col a {
    font-family: var(--font-body); /* 加上这一行，调用 Cera Pro */
    text-decoration: none;
    color: #6a1500;
    font-weight: 700;
    font-size: 1rem;
    transition: color 0.3s ease;
}

/* 增加一个悬停效果，让它更专业 */
.nav-col a:hover {
    color: var(--brand-yellow);
}


/* 右侧联系方式 */
.footer-contact {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-contact h2 {
    /* 显式调用变量，并加上 !important 确保加载 */
    font-family: var(--font-title-fredoka) !important; 
    font-size: 1.8rem !important; 
    margin-bottom: 5px !important;
    /* 确保字体权重也是对的 */
    font-weight: 600; 
}

/* Contact Us 小标题 (如果有 h3) */
.footer-contact h3 {
    font-family: var(--font-title-fredoka) !important;
    font-size: 1.2rem !important;
    color: #6a1500;
}

/* Body Text - 强制使用 Cera Pro */
.footer-contact p {
    font-family: var(--font-body) !important; /* 这里会调用 Cera Pro */
    font-size: 0.85rem !important;
    max-width: 280px;
    line-height: 1.5;
    color: #6a1500;
}

/* 社交图标锁定 */
.social-row-icons {
    display: flex !important;
    gap: 12px !important;
    margin-top: 10px !important;
}

.social-row-icons img {
    width: 28px !important;
    height: 28px !important;
}

/* 4. 版权行：极致紧凑 */
.copyright {
    text-align: center !important;
    margin-top: 20px !important; /* 缩减与上方的距离 */
    padding-top: 10px !important;
    border-top: 1px solid rgba(106, 21, 0, 0.1) !important;
    font-size: 0.75rem !important;
    color: #6a1500 !important;
}

.footer-contact h2, 
.footer-contact h3, 
.footer-contact p,
.footer-brand-contact h2,
.footer-brand-contact h3,
.footer-brand-contact p {
    color: #6a1500; 
}

/* --- 响应式手机端修改 --- */
@media (max-width: 768px) {
    
    /* 1. Header 居中 */
    .header-row-1 {
        flex-direction: column; /* 纵向排列 */
        gap: 15px;
        position: relative;
    }

    .logo {
        margin: 0 auto; /* Logo 居中 */
    }

    .search-container {
        justify-content: center; /* 搜索图标居中 */
        width: 100%;
    }

    /* 搜索栏弹出后在中间 */
    .search-bar {
        position: absolute;
        top: 60px; /* 根据你的 header 高度调整 */
        right: 50%;
        transform: translateX(50%); /* 完美的水平居中 */
        width: 80%; /* 手机端宽度占 80% */
        z-index: 10;
    }
    
    .search-bar.show {
        transform: translateX(50%); /* 保持居中显示 */
    }

    /* 2. 导航栏调整 */
    .nav-scroll {
        max-width: 95%; /* 增加手机端导航宽度 */
    }

    /* 3. Footer 居中 */
    .footer-grid {
        flex-direction: column; /* 竖向排列 */
        gap: 30px;
        text-align: center; /* 全体文字居中 */
    }

    .footer-nav {
        padding-left: 0;
        justify-content: center;
        gap: 40px;
    }

    .footer-contact {
        align-items: center; /* 内部 flex 元素居中 */
        text-align: center;
    }

    .footer-contact p {
        margin: 0 auto 15px; /* 段落居中 */
    }

    .social-row-icons {
        justify-content: center; /* 社交图标居中 */
        margin-top: 15px;
    }

    .footer-photo-box {
        margin-bottom: 10px;
    }
}
/* 让 Row 2 成为定位参考 */
@media (max-width: 768px) {
    /* 确保 Row 2 在手机端依然是定位参考 */
    .header-row-2 {
        position: relative;
        padding: 10px 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* 针对手机端重新定义 Search Bar 的位置 */
    .search-bar {
        position: absolute;
        /* 强制水平居中 */
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        
        /* 关键：在手机端宽度要够大 */
        width: 92% !important; 
        max-width: none !important; /* 取消电脑端的最大宽度限制 */
        
        padding: 8px 15px !important;
        z-index: 999; /* 确保它盖在图标最上方 */
    }

    /* 确保搜索栏里的输入框和按钮在小屏幕不挤压 */
    .search-bar input {
        font-size: 14px; /* 减小字体防止撑开高度 */
        width: 100%;
    }

    .search-bar button {
        padding: 4px 12px;
        font-size: 12px;
    }

    /* 保持图标行在底下的间距，防止搜索框关掉后布局跳动 */
    .nav-scroll {
        width: 95%; /* 手机端图标可以分布得更满一点 */
        justify-content: space-around; /* 图标均匀分布，防止挤在一起 */
    }
}

/* --- 5. 欢迎页面专项样式 (Welcome Section) --- */

/* --- 5. 欢迎页面专项样式 (Welcome Section) --- */

/* 核心容器：去掉条纹背景，使用品牌白 */
.content-wrapper.welcome-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px); /* 自动撑开高度 */
    padding: 60px 20px;
    background-color: var(--off-white); /* 换成品牌白色 */
    text-align: center;
}

/* 顶部星星图片 */
.welcome-star {
    width: 35px;
    height: auto;
    margin-bottom: 12px;
}

/* 主标题：使用你的 Fredoka 变量 */
.welcome-title {
    font-family: var(--font-title-fredoka);
    color: var(--brand-yellow);
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 900;
    line-height: 1;
    margin: 0;
}

/* 副标题：使用你的 Body 字体和棕色变量 */
.welcome-subtext {
    font-family: var(--font-body);
    color: var(--brand-brown);
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 700;
    margin: 15px 0 40px;
    max-width: 500px;
}

/* 角色图片样式 */
.welcome-character {
    width: clamp(140px, 20vw, 200px);
    height: auto;
    animation: welcomeFloat 3.5s ease-in-out infinite;
}

/* 浮动动画保持不变 */
@keyframes welcomeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 手机端微调 */
@media (max-width: 768px) {
    .content-wrapper.welcome-page {
        padding: 40px 15px;
    }
}



/* --- 6. 展览介绍专项样式 (Exhibition Section) --- */

.exhibition-section {
    display: flex;
    flex-direction: row; /* 电脑端左右排列 */
    justify-content: space-between;
    align-items: center;
    background-color: var(--off-white);
    padding: 80px 10%;
    gap: 40px;
}

/* 左侧文字排版 */
.exhibition-text {
    flex: 1;
    text-align: left;
}

.exhibition-title {
    font-family: var(--font-title-fredoka);
    color: var(--brand-blue); /* 使用蓝绿色变量 */
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
}

/* 标题里的那个圆点图片 */
.title-dot {
    width: 25px; /* 根据需要调整大小 */
    height: auto;
    vertical-align: middle;
    margin-left: 5px;
}

.exhibition-description {
    font-family: var(--font-body);
    color: var(--brand-brown);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    line-height: 1.4;
    max-width: 450px;
}

/* 右侧角色 */
.exhibition-character-box {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.exhibition-character {
    width: clamp(180px, 25vw, 280px);
    height: auto;
    /* 给蓝色小人换一个不同的动画，比如左右轻微晃动 */
    animation: sideSway 4s ease-in-out infinite;
}

@keyframes sideSway {
    0%, 100% { transform: rotate(-3deg) translateX(0); }
    50% { transform: rotate(3deg) translateX(10px); }
}

/* --- 响应式手机端修改 --- */
@media (max-width: 768px) {
    .exhibition-section {
        flex-direction: column; /* 手机端变成上下排列 */
        text-align: center;
        padding: 50px 25px;
    }

    .exhibition-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .exhibition-description {
        margin: 0 auto;
    }

    .exhibition-character {
        width: 200px;
        margin-top: 30px;
    }
}

/* --- 7. Matter Section 专项样式 --- */

.matter-section {
    position: relative; /* 为底部形状定位 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--off-white);
    padding: 100px 10% 120px; /* 增加底部留白给形状照片 */
}

.matter-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 1000px;
}

/* 角色动画：微微放大缩小（呼吸感） */
.matter-character {
    width: clamp(180px, 25vw, 260px);
    height: auto;
    animation: pulseScale 4s ease-in-out infinite;
}

@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.matter-content {
    text-align: right; /* 图片中文字是右对齐的 */
}

.matter-title {
    font-family: var(--font-title-fredoka);
    color: var(--brand-pink);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 15px;
}

/* 标题前面的小三角形照片 */
.title-triangle {
    width: 30px;
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
}

.highlight-matter {
    font-size: 1.3em; /* MATTER 单词更大 */
}

.matter-description {
    font-family: var(--font-body);
    color: var(--brand-brown);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto; /* 在右对齐布局中靠右 */
}

/* Explore 按钮 */
.explore-btn {
    display: inline-block;
    background-color: var(--brand-yellow);
    color: #6a1500; /* 使用你的品牌棕色 */
    font-family: var(--font-body);
    font-weight: 800;
    text-decoration: none;
    padding: 12px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 0px rgba(0,0,0,0.1); /* 扁平化阴影 */
    transition: all 0.2s ease;
}

.explore-btn:hover {
    transform: translateY(-3px);
    background-color: #f7b545; /* 稍微深一点的黄色 */
}

/* 底部形状导航 */
.shape-pagination {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.page-shape {
    width: 20px;
    height: auto;
    opacity: 0.6;
    transition: 0.3s;
    cursor: pointer;
}

.page-shape:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* --- 响应式手机端 --- */
@media (max-width: 768px) {
    .matter-container {
        flex-direction: column;
        text-align: center;
    }
    
    .matter-content {
        text-align: center;
    }
    
    .matter-description {
        margin: 0 auto 30px;
    }

    .matter-title {
        font-size: 2.5rem;
    }
}

/* ============================================================ */
/* --- 8. Matter Section (为什么这个展览很重要) 专项样式 --- */
/* ============================================================ */

/* 核心容器：使用 off-white 背景，并为底部形状指示器提供定位参考 */
.matter-section {
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--off-white);
    /* 增加底部留白 (160px) 给底部形状指示器照片留出空间 */
    padding: 100px 10% 160px; 
}

/* 内容包裹器：电脑端左右排列 */
.matter-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 70px; /* 文字和角色之间的间距 */
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- 左侧：角色照片 --- */
.matter-character-box {
    flex: 1; /* 占据一半空间 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 角色动画：微微放大缩小（呼吸感），符合您之前的风格 */
.matter-character {
    width: clamp(200px, 30vw, 320px); /* 响应式大小 */
    height: auto;
    animation: pulseScale 4s ease-in-out infinite;
}

/* 您之前的 pulseScale 动画定义 (如果前面有了，这里可以删除，保持一个即可) */
@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- 右侧：文字和按钮 --- */
.matter-content {
    flex: 1.2; /* 稍微宽一点 */
    text-align: right; /* 核心：文字整体右对齐，还原图片效果 */
    position: relative;
}

/* 右上角的粉色三角形照片 */
.title-triangle {
    position: absolute;
    top: -30px; /* 移到标题上方 */
    right: 15px; /* 靠右对齐 */
    width: 25px; /* 您可以根据需要调整大小 */
    height: auto;
}

/* 主标题：使用您的 Fredoka 变量和品牌粉色 */
.matter-title {
    font-family: var(--font-title-fredoka);
    color: var(--brand-pink);
    font-size: clamp(2.8rem, 6vw, 4.5rem); /* 响应式字号 */
    font-weight: 900;
    line-height: 1;
    margin: 0 0 15px 0;
}

/* “WHY THIS”, “EXHIBITION” 单词字号 (比 MATTER 小) */
.title-line-1, .title-line-2 {
    font-size: 0.55em; /* 相对于父级 clamp 字号的 0.55 倍 */
    display: block; /* 换行 */
}

/* “MATTER” 单词 (更大、更粗) */
.title-line-3.highlight-matter {
    font-size: 1.1em; /* 比 clamp 还要大一点 */
    font-weight: 1000; /* 极致粗体 */
    display: block; /* 换行 */
}

/* 描述文字：使用 Body 字体和棕色变量 */
.matter-description {
    font-family: var(--font-body);
    color: var(--brand-brown);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 45px auto; /* 靠右对齐，底部留白给按钮 */
    max-width: 460px;
}

/* --- “Explore” 按钮 --- */
.explore-btn {
    display: inline-block;
    background-color: var(--brand-yellow); /* 品牌黄 */
    color: #fff; /* 这里我改成了白色，让文字更清晰，您可以改回 var(--brand-brown) */
    font-family: var(--font-body);
    font-weight: 800;
    text-decoration: none;
    padding: 12px 45px;
    border-radius: 12px;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* 扁平化阴影 */
    transition: all 0.2s ease;
}

.explore-btn:hover {
    transform: translateY(-3px);
    background-color: #f7b545; /* 稍微深一点的黄色 */
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); /* 阴影加深 */
}

/* --- 底部：形状照片导航指示器 --- */
/* 容器：确保形状之间间距相等并垂直居中 */
.shape-pagination {
    display: flex;
    align-items: center; /* 垂直居中对齐核心 */
    justify-content: center;
    gap: 20px; 
}

/* 包裹层：给形状一个稳定的“座舱” */
.shape-item {
    width: 25px;   /* 容器宽度 */
    height: 25px;  /* 容器高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 形状基础样式 */
.page-shape {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    object-fit: contain; /* 保持比例 */
}

/* --- 视觉大小补偿 --- */

/* 三角形：通常视觉上显得最高，尺寸稍微收一点 */
.shape-pink-tri {
    width: 18px; 
}

/* 圆形：视觉上最小，需要稍微放大 */
.shape-blue-dot {
    width: 14px; 
}

/* 十角星：由于刺多，视觉中心虚，需要最大 */
.shape-yellow-star {
    width: 22px; 
}

/* 交互效果 */
.shape-item:hover .page-shape {
    opacity: 1;
    transform: scale(1.2);
}

/* ============================================================ */
/* --- 响应式手机端修改 (Matter Section) --- */
/* ============================================================ */
@media (max-width: 768px) {
    .matter-section {
        padding: 80px 25px 140px; /* 增加手机端内边距，减少底部留白 */
    }

    .matter-container {
        flex-direction: column; /* 手机端变成上下排列 */
        gap: 50px; /* 角色和文字之间的间距 */
        text-align: center; /* 全体居中对齐 */
    }

    /* 手机端角色大小微调 */
    .matter-character {
        width: 200px;
    }

    /* 手机端文字居中 */
    .matter-content {
        text-align: center; /* 还原您之前的风格 */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* 手机端标题微调 */
    .matter-title {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
    }

    /* 手机端三角形照片位置微调 (使之居中对齐) */
    .title-triangle {
        position: relative; /* 变成相对定位 */
        top: 0;
        right: 0;
        margin-bottom: 10px; /* 移到标题上方并居中 */
    }

    /* 手机端描述文字居中且宽度自适应 */
    .matter-description {
        margin: 0 auto 35px; /* 上下留白，左右居中 */
        max-width: 90%;
        text-align: center;
    }
}