/* ==========================================================================
   潜派旅行 · 首页样式
   2026-09 首页重做：单一响应式模板（替代原 UA 分流的 index_pc.html / index_mo.html）
   断点：640（大屏手机/竖屏平板）· 960（横屏平板/小笔记本）· 1280（桌面）
   手法：CSS Grid + clamp() 流式字号（连续变化，不是断点跳变）
   ========================================================================== */

:root {
    --brand: #20b2aa;          /* lightseagreen，沿用移动端主色 */
    --brand-dark: #178f89;
    --price: #ff4500;          /* orangered，沿用现有价格色 */
    --ink: #222;
    --ink-2: #555;
    --ink-3: #999;
    --line: #ececec;
    --bg: #f4f4f4;
    --card: #fff;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { border: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.3; }

/* 容器：所有区块共用，保证左右对齐 */
.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 视觉隐藏但保留给爬虫/读屏的文本 */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   顶栏
   ========================================================================== */
.site-head {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-head .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 56px;
}
.site-head .logo img { height: 32px; display: block; }
.site-nav { display: none; gap: 26px; font-size: 15px; color: var(--ink-2); }
.site-nav a:hover { color: var(--brand); }

@media (min-width: 960px) {
    .site-head .wrap { height: 68px; }
    .site-head .logo img { height: 38px; }
    .site-nav { display: flex; }
}

/* ==========================================================================
   Hero —— 「大气」的主体：全宽大图 + 大字号 + 主 CTA
   ========================================================================== */
.hero { position: relative; overflow: hidden; background: #0b3b57; }
.hero-art { display: block; width: 100%; }
.hero-art img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 58% 50%;   /* 全景图的视觉重心偏左中，窄屏时保住泳池与海面 */
    display: block;
}
@media (min-width: 640px) { .hero-art img { aspect-ratio: 16 / 9; } }
@media (min-width: 1280px) { .hero-art img { aspect-ratio: 21 / 9; } }

/* 渐变遮罩：保证白字在任何图上都可读 */
.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .30) 45%, rgba(0, 0, 0, .62) 100%);
    pointer-events: none;
}
.hero-body {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding-bottom: clamp(20px, 4vw, 56px);
    color: #fff;
}
.hero h1 {
    /* 流式字号：手机 22px → 桌面 44px，中间连续变化 */
    font-size: clamp(22px, 4.2vw, 44px);
    letter-spacing: .5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.hero .slogan {
    margin: 10px 0 0;
    font-size: clamp(13px, 1.5vw, 17px);
    opacity: .93;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.hero .cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(14px, 2.4vw, 26px);
}
.hero .cta a {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 999px;
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 500;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .55);
    backdrop-filter: blur(4px);
    transition: background .2s, transform .2s, border-color .2s;
}
.hero .cta a:hover { background: rgba(255, 255, 255, .3); transform: translateY(-1px); }
.hero .cta a.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.hero .cta a.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* ==========================================================================
   宫格入口
   ========================================================================== */
.tiles {
    background: #fff;
    padding: 18px 0 6px;
}
.tiles .grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.tiles a {
    display: block;
    text-align: center;
    padding: 8px 2px;
    border-radius: var(--radius);
    transition: background .18s;
}
.tiles a:hover { background: #f7fbfb; }
.tiles img { width: min(52px, 62%); height: auto; display: block; margin: 0 auto; }
.tiles span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 6px; }

@media (min-width: 640px) {
    .tiles { padding: 26px 0 10px; }
    .tiles .grid { gap: 12px; }
    .tiles img { width: min(64px, 58%); }
    .tiles span { font-size: 14px; }
}
@media (min-width: 960px) {
    .tiles .grid { gap: 18px; }
    .tiles a { padding: 14px 6px; }
    .tiles img { width: min(72px, 52%); }
}

/* ==========================================================================
   区块通用
   ========================================================================== */
.section { margin-top: 20px; }
.section > .wrap > .head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.section h2 {
    font-size: clamp(17px, 1.9vw, 22px);
    position: relative;
    padding-left: 12px;
}
.section h2::before {
    content: "";
    position: absolute;
    left: 0; top: .18em; bottom: .18em;
    width: 4px;
    border-radius: 2px;
    background: var(--brand);
}
.section .more { font-size: 13px; color: var(--ink-3); }
.section .more:hover { color: var(--brand); }

@media (min-width: 960px) { .section { margin-top: 34px; } }

/* ==========================================================================
   卡片（热卖 / 猜你喜欢 共用）
   ========================================================================== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
    height: 100%;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card .pic {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #eee;
}
.card .bd { padding: 10px; }
.card .t {
    font-size: 13px;
    line-height: 1.5;
    height: 3em;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card .p {
    margin-top: 6px;
    color: var(--price);
    font-size: 12px;
}
.card .p b { font-size: 17px; font-weight: 600; margin-right: 1px; }
.card .p.ask { color: var(--ink-3); font-size: 13px; }

@media (min-width: 960px) {
    .card .bd { padding: 12px; }
    .card .t { font-size: 14px; }
    .card .p { font-size: 13px; }
    .card .p b { font-size: 19px; }
}

/* 本周热卖：手机横滑（CSS scroll-snap，零 JS），桌面转静态网格 */
.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 152px;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

@media (min-width: 640px) {
    .rail { grid-auto-columns: 200px; gap: 14px; }
}
@media (min-width: 960px) {
    .rail {
        grid-auto-flow: row;
        grid-template-columns: repeat(6, 1fr);
        grid-auto-columns: auto;
        overflow: visible;
        gap: 16px;
    }
}

/* 猜你喜欢 */
.like-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 640px) { .like-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 960px) { .like-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* ==========================================================================
   热门主题卡 —— 文字是 HTML（不是烤在图里），爬虫可读
   ========================================================================== */
/* 主题卡：手机 1 列 / 平板 2 列 / 桌面 3 列。
   不用 auto-fit 是因为主题图是 750px 宽的设计横幅，列宽低于 ~300px 时
   图里自带的文字会缩到难认；当前 3 张卡在桌面正好排满一行。 */
.topics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 640px) { .topics-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 960px) { .topics-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.topic {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
}
.topic:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
/* 比例必须匹配素材：三张主题图都是 750x300 = 5:2 的设计横幅，
   文字是烤在图中间的，用 16:10 / 4:3 配 object-fit:cover 会把两侧和文字一起裁掉 */
.topic .banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 2;
    transition: transform .5s;
}
.topic:hover .banner { transform: scale(1.04); }
/* 说明文字放图下方，不做图上覆盖 —— 图里已经自带同义文案，叠加会糊成两层 */
.topic .cap { padding: 10px 12px 12px; }
.topic h3 { font-size: clamp(14px, 1.4vw, 16px); }
.topic p { margin: 3px 0 0; font-size: 12px; color: var(--ink-3); }

/* ==========================================================================
   常见问题（可见文本，与 FAQPage 结构化数据同源）
   ========================================================================== */
.faq { background: #fff; border-radius: var(--radius); padding: 4px 16px; box-shadow: var(--shadow); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 15px 26px 15px 0;
    position: relative;
    font-size: 15px;
    font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    position: absolute;
    right: 4px; top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    font-size: 18px;
    transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 16px; color: var(--ink-2); font-size: 14px; line-height: 1.75; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-foot {
    margin-top: 28px;
    background: #2b2b2b;
    color: #bdbdbd;
    font-size: 13px;
    padding: 26px 0 34px;
}
.site-foot .cols {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.site-foot .qr { display: flex; align-items: center; gap: 14px; }
.site-foot .qr img { width: 96px; height: 96px; border-radius: 6px; background: #fff; padding: 4px; }
.site-foot .qr p { margin: 0; color: #e8e8e8; }
.site-foot .links a { margin-right: 16px; color: #bdbdbd; }
.site-foot .links a:hover { color: #fff; }
.site-foot .cr { color: #8a8a8a; line-height: 1.9; }
.site-foot .cr a { color: #8a8a8a; }
.site-foot .cr img { vertical-align: -2px; }

@media (min-width: 960px) {
    .site-foot { margin-top: 40px; padding: 36px 0 44px; }
    .site-foot .cols { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ==========================================================================
   桌面右栏二维码（1280+）：sticky 常驻，替代原来的 position:fixed;top:460px
   —— fixed 会遮挡正文，sticky 既常驻又不挡内容
   ========================================================================== */
.desktop-layout { display: block; }
.qr-aside { display: none; }

@media (min-width: 1280px) {
    .desktop-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 200px;
        gap: 24px;
        align-items: start;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 16px;
    }
    .desktop-layout > .main { min-width: 0; }
    .desktop-layout > .main > .wrap { padding: 0; max-width: none; }
    .qr-aside {
        display: block;
        position: sticky;
        top: 92px;
        background: #fff;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 16px;
        text-align: center;
    }
    .qr-aside img { width: 100%; max-width: 160px; height: auto; border-radius: 6px; }
    .qr-aside p { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
    /* 桌面已有右栏二维码，页脚里那份就不重复显示 */
    .site-foot .qr { display: none; }
}

/* 首屏以下区块延迟渲染，提速首屏 */
.lazy-block { content-visibility: auto; contain-intrinsic-size: 620px; }

/* 尊重系统的减少动效设置 */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .card:hover, .topic:hover { transform: none; }
}
