/* --- 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', cursive;           /* 标题专用 */
    --font-subtitle: 'Fredoka', sans-serif;      /* 副标题/按钮专用 */
    --font-body: 'Kantumruy Pro', 'Cera Pro', sans-serif; /* 正文专用 */
}

/* --- 2. 基础重置 & 全局字体设定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: #fff;
    font-family: var(--font-body); /* 默认使用 Body 字体 */
    color: var(--brand-brown);
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: var(--font-title); /* 强制所有标题使用 Title 字体 */
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 3. HEADER 导航区域 --- */
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; font-family: var(--font-body); }
.search-bar button { background: var(--brand-yellow); border: none; color: white; border-radius: 10px; padding: 2px 8px; cursor: pointer; font-family: var(--font-subtitle); }
.search-icon img { width: 22px; cursor: pointer; }

/* 导航图标 */
.nav-scroll {
    display: flex;
    justify-content: space-between; 
    width: 85%; 
    max-width: 1200px;
    margin: 0 auto;
}

.nav-scroll a {
    position: relative;
    padding-bottom: 5px;
    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;
    left: 50%;
    transform: translateX(-50%);
    width: 6px; 
    height: 6px;
    background-color: var(--brand-yellow);
    border-radius: 50%;
    animation: dotFade 0.3s ease forwards;
}

@keyframes dotFade {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* --- 4. CONTACT HERO 核心区域 --- */
.contact-hero {
    padding: 80px 5%;
    display: flex;
    justify-content: center;
    flex: 1; /* 撑开中间内容 */
}

.hero-container {
    display: flex;
    flex-direction: row; /* 网页端：横向排布 */
    align-items: center;
    max-width: 1100px;
    width: 100%;
    gap: 60px;
}

/* 文本内容样式 */
.text-content {
    flex: 1;
}

.text-content h1 {
    font-size: 3rem;
    color: var(--brand-brown);
    margin-bottom: 10px;
}

.subtitle {
    font-family: var(--font-subtitle); /* 强制副标题字体 */
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* 地图按钮化 (修改点 2) */
.map-btn {
    display: inline-block;
    background-color: var(--brand-blue);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-subtitle);
    font-weight: 600;
    text-decoration: none;
    margin: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(51, 175, 181, 0.3);
}

.map-btn:hover {
    background-color: var(--brand-orange);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(247, 120, 17, 0.4);
    color: white;
}

.details p { 
    margin: 8px 0; 
    font-size: 1rem; 
    line-height: 1.6;
}

/* 形状图标 */
.shapes-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.shape-img {
    width: 28px; 
    height: auto;
}

/* 社交列表 */
.social-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-item {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-family: var(--font-body);
    transition: color 0.3s;
}

.social-item:hover {
    color: var(--brand-yellow);
}

.social-item img {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

/* 插画角色 */
.character-box {
    flex: 1;
    text-align: center;
}

.character-box img {
    width: 100%;
    max-width: 400px;
    height: auto;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- 5. FOOTER 区域 --- */
.footer-main {
    background-color: var(--off-white);
    padding: 40px 5% 20px; 
    border-top-left-radius: 60px;
    border-top-right-radius: 60px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-photo-box img { width: 100px; height: auto; }

.footer-nav {
    display: flex;
    gap: 60px;
    flex-grow: 1;
    padding-left: 40px;
}

.nav-col { display: flex; flex-direction: column; gap: 15px; }
.nav-col a {
    font-family: var(--font-subtitle);
    font-weight: 700;
    transition: color 0.3s;
}
.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 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.footer-contact p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    max-width: 280px;
}

.social-row-icons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-row-icons img { width: 28px; transition: transform 0.2s; }
.social-row-icons img:hover { transform: scale(1.1); }

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(106, 21, 0, 0.1);
    font-size: 0.75rem;
    font-family: var(--font-body);
}

/* --- 6. 移动端自适应 (修改点 3) --- */
@media (max-width: 768px) {
    /* 核心修改：角色放在文案下面 */
    .hero-container { 
        flex-direction: column-reverse; /* 反转：角色在下，文字在上 */
        text-align: center; 
        gap: 40px; 
    }

    .text-content h1 { font-size: 2.2rem; }

    .shapes-icons { justify-content: center; }

    .social-list { 
        grid-template-columns: 1fr; 
        justify-items: center; 
    }

    /* Header & Footer 适配 */
    .header-row-1 { flex-direction: column; gap: 15px; }
    .footer-grid { flex-direction: column; text-align: center; gap: 30px; }
    .footer-nav { padding-left: 0; justify-content: center; }
    .footer-contact { align-items: center; text-align: center; }
    .social-row-icons { justify-content: center; }

    .search-bar {
        right: 50%;
        transform: translateX(50%);
        top: 60px;
    }
}