/* ==========================================================================
   城市详情页 v2（兰州样板）  assets/css/city-detail.css
   —— 结构：主视觉 / 搜索条 / 城市概览 / 精选景点 / 主题探索 / 旅行贴士 / AI / 快捷带
   —— 只作用于 .cd-page，其他城市页不受影响
   ========================================================================== */

.cd-page { background-color: transparent; }

/* ---------- ① 主视觉 ---------- */
.cd-hero {
    position: relative;
    display: flex; align-items: center;
    padding: 8.2rem 0 4.6rem;
    min-height: 560px;
    isolation: isolate; overflow: hidden;
    width: 100%;
    background: #17211d center / cover no-repeat;
}
@media (min-width: 900px) {
    /* 壁纸原图 16:9：首屏同比例，等于完整展示、几乎不裁切 */
    .cd-hero { aspect-ratio: 16 / 9; min-height: 0; max-height: none; width: 100%; padding: 6.4rem 0 3.2rem; }
}
.cd-hero .container { display: flex; justify-content: flex-end; }
.cd-hero__box {
    max-width: 33rem;
    padding: 1.5rem 1.7rem 1.6rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(18, 26, 23, .66), rgba(18, 26, 23, .48));
    border: 1px solid rgba(216, 180, 116, .22);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 22px 60px rgba(12, 18, 15, .34);
}
/* 壁纸自带书法城市名 → 页面标题只留屏幕阅读器可读，避免重复 */
.cd-hero h1, .cd-hero__en {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.cd-hero__scrim {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(120% 90% at 80% 50%, rgba(14, 20, 17, .42), rgba(14, 20, 17, 0) 62%),
        linear-gradient(0deg, rgba(14, 20, 17, .46), rgba(14, 20, 17, 0) 34%);
}
.cd-hero__eyebrow {
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: .74rem; letter-spacing: .3em;
    color: rgba(240, 224, 186, .86);
    margin-bottom: 1rem;
}
.cd-hero__eyebrow::before { content: ""; width: 30px; height: 1px; background: currentColor; opacity: .6; }
.cd-hero h1 {
    margin: 0;
    font-family: var(--font-serif, "Noto Serif SC", serif);
    font-size: clamp(2.8rem, 6.2vw, 4.6rem);
    line-height: 1.08; letter-spacing: .12em;
    color: #fdf6e6;
    text-shadow: 0 8px 34px rgba(0, 0, 0, .5);
}
.cd-hero__en {
    margin: .5rem 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(.78rem, 1.2vw, .95rem);
    letter-spacing: .42em; color: rgba(233, 210, 166, .82);
}
.cd-hero__tagline {
    margin: 1.15rem 0 0;
    font-size: clamp(1.02rem, 1.6vw, 1.24rem);
    letter-spacing: .08em; color: #f6ecd6;
}
.cd-hero__desc {
    margin: .85rem 0 0; max-width: 32rem;
    font-size: .93rem; line-height: 1.95; color: rgba(246, 240, 226, .78);
}
.cd-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: 1.9rem; }

.cd-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8rem 1.5rem; border-radius: 9999px;
    font-size: .92rem; font-weight: 600; letter-spacing: .04em;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: transform .22s ease, background .22s ease, border-color .22s ease;
}
.cd-btn svg { width: 15px; height: 15px; }
.cd-btn--ink { background: #1d3b36; color: #f7efdc; box-shadow: 0 12px 30px rgba(0, 0, 0, .28); }
.cd-btn--ink:hover { transform: translateY(-2px); background: #24483f; }
.cd-btn--line { background: rgba(255,255,255,.06); color: #f7efdc; border-color: rgba(255,255,255,.42); }
.cd-btn--line:hover { background: rgba(255,255,255,.14); }
.cd-btn__play {
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.42);
    margin-left: -.2rem;
}
.cd-btn__play svg { width: 10px; height: 10px; }


/* ---------- 版块基础留白（此前 .cd-sec 无样式，删掉标签条后显得贴紧） ---------- */
.cd-sec { padding: clamp(3rem, 5.4vw, 5rem) 0; }
.cd-sec#about { padding-top: clamp(2rem, 3.6vw, 3.2rem); }
@media (max-width: 760px) {
    .cd-sec { padding: 2.4rem 0; }
    .cd-sec#about { padding-top: 1.8rem; }
}

/* ---------- ③ 城市概览 ---------- */
.cd-about__grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(1.2rem, 3vw, 2.6rem); align-items: start; }
.cd-about__copy p { margin: 0 0 .8rem; font-size: .93rem; line-height: 2; color: var(--secondary); }
.cd-about__copy p:last-of-type { margin-bottom: 1.1rem; }
.cd-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.cd-fact {
    background: #fff; border: 1px solid rgba(38, 61, 56, .1);
    border-radius: .6rem; padding: .75rem .8rem;
    display: flex; gap: .55rem; align-items: flex-start;
}
.cd-fact__ico {
    width: 26px; height: 26px; flex: none; border-radius: 50%;
    display: grid; place-items: center; background: rgba(216, 180, 116, .18);
    color: var(--ochre);
}
.cd-fact__ico svg { width: 13px; height: 13px; }
.cd-fact__k { font-size: .7rem; color: var(--gray-500); letter-spacing: .06em; }
.cd-fact__v { font-size: .8rem; color: var(--dark); font-weight: 600; margin-top: .1rem; line-height: 1.5; word-break: keep-all; }

/* ---------- ④ 精选景点 ---------- */
.cd-spots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cd-spots::-webkit-scrollbar { display: none; }
.cd-spot {
    position: relative; display: block; overflow: hidden; text-decoration: none;
    border-radius: .6rem; aspect-ratio: 4 / 3; background: #e3d9c7;
    scroll-snap-align: start;
}
.cd-spot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.cd-spot::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(16, 12, 8, .84) 0%, rgba(16, 12, 8, .26) 50%, rgba(16, 12, 8, .04) 76%);
}
.cd-spot:hover img { transform: scale(1.05); }
.cd-spot__t { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: .75rem .85rem .8rem; }
.cd-spot__t b { display: block; font-size: .95rem; letter-spacing: .06em; color: #fdf5e4; }
.cd-spot__t small { display: block; margin-top: .2rem; font-size: .72rem; line-height: 1.6; color: rgba(253,245,228,.72); }
.cd-spot__cat {
    position: absolute; left: .7rem; top: .7rem; z-index: 2;
    padding: .18rem .5rem; border-radius: 9999px;
    font-size: .66rem; letter-spacing: .08em; color: #f7efdc;
    background: rgba(23, 47, 43, .68); border: 1px solid rgba(255,255,255,.2);
}
.cd-spot__go {
    position: absolute; right: .6rem; bottom: .65rem; z-index: 2;
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid rgba(253,245,228,.5); color: #fdf5e4;
}
.cd-spot__go svg { width: 10px; height: 10px; }

/* ---------- ⑤ 主题探索 ---------- */
.cd-themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.cd-theme {
    position: relative; display: block; overflow: hidden; text-decoration: none;
    border-radius: .6rem; aspect-ratio: 3 / 4; box-shadow: 0 10px 26px rgba(30,24,16,.12);
}
.cd-theme img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease; }
.cd-theme::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(16,12,8,.86) 0%, rgba(16,12,8,.22) 56%, rgba(16,12,8,0) 80%);
}
.cd-theme:hover img { transform: scale(1.05); }
.cd-theme__t { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: .85rem .9rem .9rem; }
.cd-theme__t b { display: block; font-size: .96rem; letter-spacing: .08em; color: #fdf5e4; }
.cd-theme__t small { display: block; margin-top: .25rem; font-size: .71rem; line-height: 1.6; color: rgba(253,245,228,.7); }

/* ---------- ⑥ 旅行贴士 ---------- */
.cd-tips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.cd-tip {
    background: #fff; border: 1px solid rgba(38,61,56,.1); border-radius: .6rem;
    padding: .85rem .9rem 1rem;
}
.cd-tip__ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(216,180,116,.18); color: var(--ochre); margin-bottom: .55rem; }
.cd-tip__ico svg { width: 14px; height: 14px; }
.cd-tip b { display: block; font-size: .86rem; color: var(--dark); letter-spacing: .04em; }
.cd-tip p { margin: .35rem 0 0; font-size: .79rem; line-height: 1.8; color: var(--gray-600); }

/* ---------- ⑦ AI 横幅 ---------- */
.cd-ai {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(2.8rem, 5vw, 4rem) 0;
    background: #16211d center 55% / cover no-repeat;
}
.cd-ai::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(14, 26, 23, .94) 0%, rgba(14, 26, 23, .78) 48%, rgba(14, 26, 23, .42) 100%);
}
.cd-ai__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(1.2rem, 3vw, 2.6rem); align-items: center; }
.cd-ai h2 {
    margin: 0 0 .6rem; font-family: var(--font-serif, serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.35; letter-spacing: .06em; color: #fdf6e6;
}
.cd-ai p { margin: 0 0 1.3rem; font-size: .9rem; line-height: 1.9; color: rgba(247,238,218,.76); max-width: 32rem; }
.cd-ai__list { display: grid; gap: .6rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.cd-ai__list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; color: rgba(247,238,218,.88); }
.cd-ai__list svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: .15rem; }

/* ---------- ⑧ 快捷带 ---------- */
.cd-quick { background: #14302c; padding: 1.4rem 0 1.6rem; }
.cd-quick__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.cd-quick a {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    text-decoration: none; text-align: center; color: rgba(246,234,208,.86);
    transition: color .2s ease, transform .2s ease;
}
.cd-quick a:hover { color: #fff; transform: translateY(-2px); }
.cd-quick svg { width: 19px; height: 19px; color: var(--accent); }
.cd-quick b { font-size: .82rem; letter-spacing: .08em; font-weight: 500; }
.cd-quick small { font-size: .68rem; color: rgba(246,234,208,.55); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .cd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cd-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cd-tips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cd-about__grid { grid-template-columns: 1fr; }
    .cd-ai__grid { grid-template-columns: 1fr; }
    .cd-quick__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1rem; }
}
@media (max-width: 760px) {
    /* 手机端：首屏加高、文字压在底部，先让壁纸露出来 */
    .cd-hero { min-height: 620px; aspect-ratio: auto; padding: 5.4rem 0 2.2rem; align-items: flex-end;
               background-position: 4% center; }
    .cd-hero .container { justify-content: flex-start; align-items: flex-end; }
    .cd-hero__box { max-width: none; padding: 1rem 1.05rem 1.15rem; background: rgba(18, 26, 23, .58); }
    .cd-hero__desc { font-size: .88rem; line-height: 1.85; }
    .cd-spots { grid-auto-columns: 74%; }
    .cd-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cd-tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cd-quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .cd-facts { grid-template-columns: 1fr; }
    .cd-hero h1 { font-size: clamp(2.3rem, 12vw, 3rem); }
}
@media (prefers-reduced-motion: reduce) {
    .cd-spot img, .cd-theme img { transition: none !important; }
}
