/* =====================================================================
   云台山手机版 m/ — 移动端样式
   作用：覆盖原PC版内联样式，强制单列竖屏、大触摸目标、卡片化、
        底部固定导航、安全区适配。在 <head> 末尾引入，配合 !important。
   设计语言：延续主站绿色(--primary:#2d5a27) + 金色(--accent:#c9a227)
   ===================================================================== */

/* ---------- 基础重置 ---------- */
* {
    box-sizing: border-box !important;
}
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    font-size: 16px !important;
    line-height: 1.7 !important;
    padding-bottom: calc(58px + env(safe-area-inset-bottom)) !important; /* 给底部导航留白 */
    overflow-x: hidden !important;
    -webkit-tap-highlight-color: rgba(45, 90, 39, 0.12);
}
img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}
a { -webkit-tap-highlight-color: transparent; }

/* ---------- 容器与间距 ---------- */
.container,
.nav-container,
.wrapper,
.section,
section,
.hero,
footer,
.footer-grid,
.footer-links {
    max-width: 100% !important;
}
.nav-container { padding: 0 14px !important; }
section,
.section { padding-left: 0 !important; padding-right: 0 !important; }
.section-inner,
.container { padding-left: 16px !important; padding-right: 16px !important; }
/* 多数 section 用 padding: Xpx 5% 写法，统一收窄 */
section[style],
.section[style] { padding-left: 16px !important; padding-right: 16px !important; }

/* ---------- 强制所有网格单列 ---------- */
[class*="grid"],
[class*="Grid"],
[class*="cards"],
[class*="Cards"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
}
.flex-row,
[class*="flex"] {
    flex-wrap: wrap !important;
}

/* ---------- 顶部导航：精简固定 ---------- */
.navbar {
    padding: 0 14px !important;
    background: rgba(255, 255, 255, 0.97) !important;
}
.nav-container {
    height: 54px !important;
}
.logo {
    font-size: 1.05rem !important;
    gap: 6px !important;
}
.logo i { font-size: 1.4rem !important; }
.logo span {
    font-size: 0.78rem !important;
    line-height: 1.1 !important;
}
.menu-toggle span {
    background: var(--primary) !important;
}

/* 汉堡展开：全屏遮罩下拉 */
@media (max-width: 900px) {
    .nav-links.active {
        top: 54px !important;
        position: fixed !important;
        left: 0; right: 0;
        display: flex !important;
        flex-direction: column !important;
        background: #fff !important;
        padding: 8px 20px 22px !important;
        gap: 0 !important;
        max-height: calc(100vh - 54px);
        overflow-y: auto;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
    }
    .nav-links.active li { width: 100% !important; }
    .nav-links.active a {
        display: block !important;
        padding: 15px 4px !important;
        font-size: 1.05rem !important;
        border-bottom: 1px solid #eee !important;
        color: var(--text-dark) !important;
    }
    .nav-links.active a::after { display: none !important; }
    .nav-links.active .nav-cta {
        margin: 12px 0 4px !important;
        text-align: center !important;
        border-bottom: none !important;
        border-radius: 30px !important;
    }
}

/* ---------- 英雄区 ---------- */
.hero h1 { font-size: 2rem !important; line-height: 1.25 !important; }
.hero p, .hero-sub { font-size: 1rem !important; }
.hero-stats { gap: 18px !important; flex-wrap: wrap !important; justify-content: center !important; }
.hero-stats > * { font-size: 0.85rem !important; }

/* ---------- 标题层级 ---------- */
.section-title,
h2.section-title { font-size: 1.5rem !important; line-height: 1.3 !important; margin-bottom: 14px !important; }
.section-subtitle { font-size: 0.9rem !important; }
h1, h2, h3, h4 { line-height: 1.35 !important; }
h3 { font-size: 1.15rem !important; }

/* ---------- 卡片 ---------- */
[class*="card"],
.ticket-card,
.attraction-card,
.food-card,
.guide-card,
.spot-card,
.policy-card,
.info-card {
    margin-bottom: 14px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}
[class*="card"] img,
.card-img,
.spot-image img { width: 100% !important; height: auto !important; object-fit: cover !important; }

/* ---------- 按钮 / 链接触摸友好 ---------- */
.btn,
button,
.nav-cta,
.cta-btn,
a.btn,
[class*="button"] {
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 22px !important;
    font-size: 1rem !important;
    border-radius: 28px !important;
    line-height: 1.2 !important;
}
/* 全宽行动按钮（手机更友好） */
.hero-cta,
.cta-group,
.btn-group { display: flex !important; flex-direction: column !important; gap: 12px !important; }
.hero-cta .btn,
.cta-group .btn { width: 100% !important; }

/* ---------- 表格：横向滚动而非撑破 ---------- */
table {
    width: 100% !important;
    font-size: 0.85rem !important;
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
}
th, td { padding: 8px 10px !important; }

/* ---------- 温馨提示 / 价格声明区块 ---------- */
[class*="tip"],
[class*="notice"],
[class*="disclaimer"],
.price-note,
.warm-tip,
.note-box {
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    padding: 14px 16px !important !important;
}

/* ---------- 面包屑 ---------- */
.breadcrumb,
.crumb {
    font-size: 0.8rem !important;
    padding: 10px 16px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
}

/* ---------- 页脚 ---------- */
.footer-grid { gap: 24px !important; }
.footer-bottom { flex-direction: column !important; gap: 12px !important; text-align: center !important; font-size: 0.78rem !important; }
.footer-links-col ul { gap: 14px !important; }
.footer-links-col a { font-size: 0.85rem !important; }

/* =====================================================================
   底部固定导航栏（手机版标志性体验）
   ===================================================================== */
.m-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e8e6e0;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 2px 6px;
    text-decoration: none;
    color: #8a8a8a;
    font-size: 0.66rem;
    transition: color 0.2s;
}
.m-tabbar a i { font-size: 1.2rem; line-height: 1; }
.m-tabbar a.active { color: var(--primary); font-weight: 700; }
.m-tabbar a:active { background: rgba(45, 90, 39, 0.06); }

/* 顶部返回首页小条（可选，位于导航下） */
.m-topbar {
    display: none;
}

/* ---------- 访问电脑版链接 ---------- */
.m-switch {
    text-align: center;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0,0,0,.06);
    margin-top: 8px;
}
.m-switch a {
    display: inline-block;
    color: #8a8a8a;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #dcdcdc;
    border-radius: 18px;
    padding: 6px 16px;
}
.m-switch a:active { background: #f2f2f2; }

/* ===== 手机版多语言切换器 ===== */
.nav-right { display: flex; align-items: center; gap: 8px; }
.lang-switcher { position: relative; display: inline-flex; align-items: center; }
.lang-current {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(45,90,39,0.06);
    border: 1px solid rgba(201,162,39,0.40);
    color: var(--primary, #2d5a27);
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    padding: 8px 12px; border-radius: 30px; cursor: pointer;
    transition: all .25s ease; white-space: nowrap; line-height: 1;
}
.lang-current:hover { background: rgba(45,90,39,0.12); border-color: var(--accent, #c9a227); }
.lang-current:focus-visible { outline: 2px solid var(--accent, #c9a227); outline-offset: 2px; }
.lang-current i.fa-globe { color: var(--accent, #c9a227); font-size: 1rem; }
.lang-current .fa-chevron-down { font-size: 0.62rem; opacity: .65; transition: transform .25s ease; }
.lang-switcher.open .fa-chevron-down,
.lang-switcher:hover .fa-chevron-down { transform: rotate(180deg); }
.lang-menu {
    position: absolute; top: calc(100% + 10px); right: 0; min-width: 182px;
    margin: 0; padding: 7px; list-style: none;
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px; box-shadow: 0 14px 44px rgba(0,0,0,0.18);
    z-index: 1000; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.lang-switcher.open .lang-menu,
.lang-switcher:hover .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 13px; border-radius: 10px; text-decoration: none;
    color: #2b2b2b; border-left: 3px solid transparent;
    transition: background .2s ease, border-color .2s ease;
}
.lang-menu li a:hover { background: rgba(45,90,39,0.07); border-left-color: var(--accent, #c9a227); }
.lang-text { display: flex; flex-direction: column; gap: 2px; }
.lang-menu .lang-native { font-size: 0.97rem; font-weight: 600; line-height: 1.2; }
.lang-menu .lang-en { font-size: 0.74rem; color: #9a9a9a; }
.lang-menu li a.is-active { background: rgba(45,90,39,0.10); border-left-color: var(--primary, #2d5a27); }
.lang-menu li a.is-active .lang-native { color: var(--primary, #2d5a27); }
.lang-menu li a.is-active::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: var(--primary, #2d5a27); font-size: 0.8rem; margin-left: auto;
}
@media (max-width: 900px) {
    .lang-current { padding: 7px 11px; }
    .lang-current-text { display: none; }
    .lang-switcher { margin-left: 6px; }
    .lang-menu { min-width: 168px; }
}

/* ===== RTL (Arabic) for mobile ===== */
[dir="rtl"] body { direction: rtl; }
[dir="rtl"] .m-tabbar { direction: rtl; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .m-switch { direction: rtl; }
[dir="rtl"] .navbar .nav-links { direction: rtl; }
[dir="rtl"] .footer { text-align: right; }

