/* 共享样式 - 顶部、底部和英雄区域 */
@charset "UTF-8";

/* 基础样式变量 */
:root {
    --bs-blue: #5D4037;
    --bs-indigo: #8D6E63;
    --bs-purple: #6D4C41;
    --bs-pink: #e91e63;
    --bs-red: #f44336;
    --bs-orange: #ff9800;
    --bs-yellow: #ffeb3b;
    --bs-green: #4caf50;
    --bs-teal: #009688;
    --bs-cyan: #00bcd4;
    --bs-black: #1a1919;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-primary: #4E342E;
    --bs-secondary: #6c757d;
    --bs-success: #4caf50;
    --bs-info: #00bcd4;
    --bs-warning: #ffeb3b;
    --bs-danger: #f44336;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
}

/* 基础重置 */
*, ::after, ::before {
    box-sizing: border-box;
}

body {
    background: #4E342E;
    color: white;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        margin: auto;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 网格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.col-12 {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 992px) {
    .col-lg-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* 按钮重新设计：默认胶囊形（Pill），轻量交互，无繁重特效 */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 999px; /* 默认胶囊形 */
    border: none;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* 形状可选：保留默认胶囊，同时提供圆角/方角变体 */
.btn--pill { border-radius: 999px; }
.btn--rounded { border-radius: 12px; }
.btn--square { border-radius: 6px; }

/* 图标容器（可选） */
.btn-icon { display: inline-block; line-height: 0; }

/* Focus 可见环 */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.35), 0 6px 20px rgba(0,0,0,0.2);
}

/* 按下态：轻微按压 */
.btn:active { transform: translateY(1px) scale(0.99); }

/* 禁用态 */
.btn:disabled, .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* 主按钮：黄色（保持现有配色），加入细微阴影 */
.btn-primary {
    background-color: #ffeb3b;
    color: #1a1a1a;
    box-shadow: 0 6px 16px rgba(253, 216, 53, 0.35);
}

.btn-primary:hover {
    background-color: #fdd835;
    color: #1a1a1a;
    box-shadow: 0 10px 22px rgba(253, 216, 53, 0.45);
}

/* 成功按钮：绿色（保持现有配色），加入细微阴影 */
.btn-success {
    background-color: #4caf50;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.35);
}

.btn-success:hover {
    background-color: #45a049;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(76, 175, 80, 0.45);
}

/* 尺寸变体：与现有 .btn-lg 兼容并新增小号 */
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

/* 工具类 */
.rounded-2 {
    border-radius: 2px;
}

.rounded-5 {
    border-radius: 2rem;
}

.text-center {
    text-align: center;
}

.text-white {
    color: white;
}

.text-decoration-none {
    text-decoration: none;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.me-2 {
    margin-right: 0.5rem;
}

.me-3 {
    margin-right: 1rem;
}

.ms-3 {
    margin-left: 1rem;
}

.my-2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-5 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.bg-primary {
    background: #4E342E;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* 标题样式 */
h1, h2, h3, h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
}

h1 {
    font-size: calc(1.375rem + 1.5vw);
}

@media (min-width: 1200px) {
    h1 {
        font-size: 2.5rem;
    }
}

h2 {
    font-size: calc(1.325rem + 0.9vw);
}

@media (min-width: 1200px) {
    h2 {
        font-size: 2rem;
    }
}

h3 {
    font-size: calc(1.3rem + 0.6vw);
}

@media (min-width: 1200px) {
    h3 {
        font-size: 1.75rem;
    }
}

h4 {
    font-size: calc(1.275rem + 0.3vw);
}

@media (min-width: 1200px) {
    h4 {
        font-size: 1.5rem;
    }
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: rgba(13, 110, 253, 1);
    text-decoration: underline;
}

img {
    vertical-align: middle;
}

/* 顶部导航样式 */
header {
    padding: 0.25rem 0; /* slight whitespace */
    background-color: transparent;
}

header .container {
    position: relative;
}

header .d-flex {
    align-items: center;
    justify-content: space-between;
}

header img {
    width: 100px;
    height: 100px;
}

/* 英雄区域样式 */
.hero-section {
    padding: 1.5rem 0;
    background-color: transparent;
    margin: 0.5rem 0;
}

.hero-section h1 {
    color: white;
    margin-bottom: 0.75rem;
}

.hero-section p {
    color: white;
    margin-bottom: 1rem;
}

.hero-section .btn {
    margin-top: 0.75rem;
}

/* 底部样式 */
footer {
    padding: 1.5rem 0 0.75rem;
    background: rgba(78, 52, 46, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: #ccc;
    text-decoration: underline;
}

/* 导航菜单样式 - 带下拉子菜单 */
.nav-menu {
    background: #4E342E;
    padding: 0; /* keep compact */
    margin: 0.25rem 0; /* slight whitespace */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(78, 52, 46, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu .container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 0.5rem;
}

.nav-menu .nav-item {
    position: relative;
    display: inline-block;
    margin: 0 0.05rem;
}

.nav-menu .nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.25rem; /* slightly wider for pill look */
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border-radius: 999px; /* pill shape */
    margin: 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.nav-menu .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.6s ease;
}

.nav-menu .nav-link:hover::before {
    left: 100%;
}

.nav-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(141, 110, 99, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

/* 下拉菜单样式 */
.nav-menu .dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #4E342E;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(78, 52, 46, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0;
}

.nav-menu .nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-menu .dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #4E342E;
}

.nav-menu .dropdown-item {
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.25rem;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0.25px;
    font-weight: 500;
    position: relative;
    margin: 0.05rem 0.25rem;
    border-radius: 6px;
    border-bottom: none;
}

.nav-menu .dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-menu .dropdown-item:last-child {
    margin-bottom: 0;
}

.nav-menu .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #8D6E63;
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(141, 110, 99, 0.2);
}

.nav-menu .dropdown-item:hover::before {
    transform: scaleY(1);
}

/* 下拉箭头 - 桌面端 */
@media (min-width: 769px) {
    .nav-menu .nav-link.has-dropdown::after {
        content: '▼';
        margin-left: 0.5rem;
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }

    .nav-menu .nav-item:hover .nav-link.has-dropdown::after {
        transform: rotate(180deg);
    }
}

/* 汉堡包菜单样式 - 现代化设计（紧凑版）*/
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0.3rem;
    background: rgba(255, 167, 38, 0.1);
    border-radius: 4px;
    border: 1.5px solid rgba(255, 167, 38, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
    width: 30px;
    height: 30px;
}

.hamburger:hover {
    background: rgba(255, 167, 38, 0.2);
    border-color: rgba(255, 167, 38, 0.5);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.3);
}

.hamburger span {
    width: 16px;
    height: 2px;
    background: #FFA726;
    margin: 1.2px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hamburger.active {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 5px);
    background: #ff6b6b;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0) rotate(180deg);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -5px);
    background: #ff6b6b;
}

/* 移动端菜单容器 */
.mobile-nav-toggle {
    display: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.4rem 0.5rem;
}

.mobile-nav-toggle span {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* 桌面端显示导航内容 */
@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none !important;
    }
    
    .mobile-nav-content {
        display: flex !important;
    }
}

/* 遮罩层样式 - 侧边菜单背景 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* 移动端防溢出优化 */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container {
        overflow-x: hidden;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
}

/* 移动端菜单 - 简单顶部下拉式 */
@media (max-width: 768px) {
    .nav-menu {
        border-radius: 0;
    }
    
    .mobile-nav-toggle {
        display: flex;
        padding: 0.4rem 0.5rem;
        background: rgba(141, 110, 99, 0.3);
    }
    
    .hamburger {
        display: flex;
    }
    
    /* 顶部下拉菜单 - 默认隐藏 */
    .mobile-nav-content {
        display: none;
        width: 100%;
        background: linear-gradient(180deg, #8D6E63 0%, #6D4C41 100%);
        padding: 0;
    }
    
    /* 显示菜单 */
    .mobile-nav-content.show {
        display: block;
    }
    
    /* 菜单项 */
    .mobile-nav-content .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-nav-content .nav-link {
        display: block;
        padding: 1.2rem 1.5rem;
        color: #FFEB3B;
        background: transparent;
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 600;
        border: none;
        border-radius: 0;
    }
    
    .mobile-nav-content .nav-link:hover {
        background: rgba(255, 167, 38, 0.3);
    }
    
    /* 带下拉的菜单项 */
    .mobile-nav-content .nav-link.has-dropdown {
        position: relative;
        padding-right: 3rem;
    }
    
    .mobile-nav-content .nav-link.has-dropdown::after {
        content: '▼';
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        color: #FFEB3B;
        font-size: 0.8rem;
        transition: transform 0.3s;
    }
    
    .mobile-nav-content .nav-item.active .nav-link.has-dropdown::after {
        transform: translateY(-50%) rotate(180deg);
    }
    
    /* 下拉子菜单 - 优化样式 */
    .mobile-nav-content .dropdown {
        display: none;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 100%);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        border-top: 2px solid rgba(255, 235, 59, 0.2);
        border-bottom: 2px solid rgba(255, 235, 59, 0.1);
        padding: 0.5rem 0;
    }
    
    .mobile-nav-content .nav-item.active .dropdown {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 500px;
        }
    }
    
    .mobile-nav-content .dropdown-item {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem 1rem 2.5rem;
        color: #FFF9C4;
        text-decoration: none;
        font-size: 1.05rem;
        font-weight: 500;
        border: none;
        border-radius: 0;
        border-left: 3px solid transparent;
        transition: all 0.25s ease;
        position: relative;
        margin: 0.2rem 0;
    }
    
    /* 子菜单项前的装饰图标 */
    .mobile-nav-content .dropdown-item::before {
        content: '▸';
        position: absolute;
        left: 1rem;
        color: #FFEB3B;
        font-size: 0.9rem;
        transition: all 0.25s ease;
    }
    
    /* 子菜单项之间的分隔线 */
    .mobile-nav-content .dropdown-item:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 2.5rem;
        right: 1rem;
        height: 1px;
        background: linear-gradient(90deg, rgba(255, 235, 59, 0.2), rgba(255, 235, 59, 0.05), transparent);
    }
    
    .mobile-nav-content .dropdown-item:hover {
        background: rgba(255, 167, 38, 0.35);
        border-left-color: #FFEB3B;
        color: #FFEB3B;
        padding-left: 2.8rem;
    }
    
    .mobile-nav-content .dropdown-item:hover::before {
        left: 1.3rem;
        color: #FFA726;
    }
    
    .mobile-nav-content .dropdown-item:active {
        background: rgba(255, 167, 38, 0.5);
        transform: scale(0.98);
    }
    
    header .d-flex {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
        align-items: center;
    }
    
    .hero-section {
        text-align: center;
    }
}

/* 英雄区域按钮统一黄色，并与图片留出间距 */
.hero-section .btn {
    background: linear-gradient(135deg, #ffeb3b 0%, #fdd835 100%);
    color: #1a1a1a;
    border: none;
}
.hero-section .btn:hover {
    background: #fdd835;
    color: #1a1a1a;
}

/* 桌面端：按钮与图片左右留白 */
@media (min-width: 992px) {
    .hero-section .btn { margin-right: 1rem; }
    .hero-section .img-fluid { margin-left: 1rem; }
}

/* 移动端：图片与按钮上下留白 */
@media (max-width: 768px) {
    .hero-section .img-fluid { margin-top: 1rem; }
}