/* ==========================================================================
   地市专题页【热门景点】竖条面板  assets/css/city-spots.css
   —— 形制参考莫高窟预约网（mgk.org.cn）首页的多景区入口：
      一屏并排若干竖条，竖排景区名，悬停时实拍图显出、面板加宽、底部提示浮现。
   仅地市页使用（_build_cities.py 注入），不影响其它页面。
   ========================================================================== */

.spots-panels {
    display: flex;
    gap: .8rem;
    height: clamp(330px, 40vw, 480px);
}

/* 城市页翻到景点区时，为完整的标题与说明保留空间；矮屏同步收紧卡片。 */
body.cd-page main > #spots { scroll-margin-top: var(--site-nav-height, 72px); }
@media (min-width: 981px) {
    body.cd-page main > #spots {
        padding-block: clamp(24px, 4svh, 40px);
    }
    body.cd-page #spots .section-head {
        margin-bottom: clamp(24px, 4svh, 36px);
    }
    body.cd-page #spots .section-head h2 {
        font-size: clamp(28px, 3vw, 36px);
        line-height: 1.35;
        margin: 0 0 12px;
    }
    body.cd-page #spots .section-head .subtitle {
        max-width: 58rem;
        margin: 12px auto 0;
        font-size: 15px;
        line-height: 1.8;
    }
    body.cd-page #spots .spots-panels {
        height: clamp(300px, calc(100svh - var(--site-nav-height, 72px) - 250px), 480px);
    }
}

.spotpanel {
    position: relative;
    flex: 1 1 0%;
    min-width: 0;
    border-radius: 1.1rem;
    overflow: hidden;
    isolation: isolate;              /* 让内部负 z-index 层只压在自身渐变之上 */
    box-shadow: var(--shadow-card);
    transition: flex-grow .62s var(--ease-smooth), box-shadow .4s var(--ease-smooth);
}
.spotpanel:hover,
.spotpanel:focus-within {
    flex-grow: 1.62;
    box-shadow: var(--shadow-card-hover);
}

/* --- 实拍图（默认压暗作底纹，悬停整张显出） --- */
.spotpanel__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    opacity: .45;
    filter: saturate(.82);
    transform: scale(1.02);
    transition: opacity .7s var(--ease-smooth), transform 1.4s var(--ease-smooth), filter .7s;
}
.spotpanel:hover .spotpanel__bg,
.spotpanel:focus-within .spotpanel__bg {
    opacity: 1;
    filter: saturate(1);
    transform: scale(1.08);
}

/* --- 文字可读性压暗层（悬停换成更重的上/下压暗，保证亮图上名字仍清楚） --- */
.spotpanel__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
                rgba(24,14,9,.62) 0%,
                rgba(24,14,9,.26) 34%,
                rgba(24,14,9,.38) 62%,
                rgba(24,14,9,.70) 100%);
    transition: opacity .6s var(--ease-smooth);
}
.spotpanel:hover .spotpanel__veil,
.spotpanel:focus-within .spotpanel__veil {
    background: linear-gradient(180deg,
                rgba(22,12,8,.66) 0%,
                rgba(22,12,8,.34) 32%,
                rgba(22,12,8,.42) 60%,
                rgba(22,12,8,.74) 100%);
}

/* --- 竖排景区名 + 小字（右为名，左为「级别 · 类别」） --- */
.spotpanel__text {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    writing-mode: vertical-rl;
    text-align: center;
    padding: 1.3rem .75rem;
    border-radius: 999px;
    background: radial-gradient(58% 58% at 50% 50%, rgba(18,10,6,.40), rgba(18,10,6,0) 74%);
    pointer-events: none;
}
.spotpanel__name {
    display: block;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', STSong, SimSun, serif;
    font-size: clamp(1.05rem, 1.45vw, 1.5rem);
    font-weight: 600;
    letter-spacing: .3em;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.spotpanel__cat {
    display: block;
    margin-right: .55rem;             /* 竖排下 = 与名字的横向间距 */
    font-size: clamp(.68rem, .78vw, .78rem);
    letter-spacing: .18em;
    color: rgba(255,255,255,.74);
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

/* --- 顶部装饰图标 --- */
.spotpanel__ico {
    position: absolute;
    top: .95rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.9);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
    transition: transform .5s var(--ease-spring), color .4s;
}
.spotpanel__ico svg { width: 24px; height: 24px; }
.spotpanel:hover .spotpanel__ico { transform: translateX(-50%) scale(1.12); color: var(--accent); }

/* --- 底部「点击进入」 --- */
.spotpanel__foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .32rem;
    pointer-events: none;
}
.spotpanel__cta {
    display: inline-flex;
    align-items: center;
    gap: .34rem;
    padding-bottom: .16rem;
    border-bottom: 1px solid rgba(255,255,255,.45);
    font-size: .8rem;
    letter-spacing: .1em;
    white-space: nowrap;
    color: #fff;
    opacity: .9;
    transition: opacity .3s, transform .38s var(--ease-smooth), border-color .3s, color .3s;
}
.spotpanel__cta svg { width: 14px; height: 14px; }
.spotpanel:hover .spotpanel__cta,
.spotpanel:focus-within .spotpanel__cta {
    opacity: 1;
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--accent);
}

/* --- 点击热区（整块面板）与角标「景点详情」（有官网时才出现） --- */
.spotpanel__hit {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}
.spotpanel__more {
    position: absolute;
    z-index: 3;
    top: .75rem;
    right: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    padding: .26rem .58rem;
    border-radius: 9999px;
    font-size: .7rem;
    letter-spacing: .04em;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    background: rgba(31,23,18,.55);
    border: 1px solid rgba(255,255,255,.34);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: opacity .3s, transform .3s, background .3s, border-color .3s;
}
.spotpanel__more svg { width: 12px; height: 12px; }
.spotpanel__more:hover { background: var(--primary); border-color: var(--primary); }

@media (hover: hover) {
    .spotpanel__more { opacity: 0; transform: translateY(-5px); }
    .spotpanel:hover .spotpanel__more,
    .spotpanel:focus-within .spotpanel__more { opacity: 1; transform: none; }
}

.spotpanel__hit:focus-visible,
.spotpanel__more:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===== 窄屏：竖条改横向长条，名字横排，入口在右侧 ===== */
@media (max-width: 820px) {
    .spots-panels {
        flex-direction: column;
        height: auto;
        gap: .7rem;
    }
    .spotpanel {
        flex: none;
        height: 98px;
        border-radius: .9rem;
    }
    .spotpanel:hover,
    .spotpanel:focus-within { flex-grow: 0; }
    .spotpanel__text {
        writing-mode: horizontal-tb;
        left: 1.15rem;
        right: 8.6rem;
        top: 50%;
        transform: translateY(-50%);
        text-align: left;
        padding: 0;
        border-radius: 0;
        background: none;
    }
    .spotpanel__name {
        font-size: 1.02rem;
        line-height: 1.3;
        letter-spacing: .04em;
    }
    .spotpanel__cat {
        margin: .18rem 0 0;
        font-size: .7rem;
        letter-spacing: .04em;
    }
    .spotpanel__ico { display: none; }
    .spotpanel__foot {
        left: auto;
        right: 1.05rem;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        align-items: flex-end;
    }
    .spotpanel__cta { font-size: .74rem; letter-spacing: .02em; }
    .spotpanel__more {
        top: 50%;
        right: 1.05rem;
        transform: translateY(calc(-50% - 1.6rem));
    }
    @media (hover: hover) {
        .spotpanel__more { opacity: 1; transform: translateY(calc(-50% - 1.6rem)); }
    }
    .spotpanel__bg { opacity: .58; }
}

@media (prefers-reduced-motion: reduce) {
    .spotpanel, .spotpanel__bg, .spotpanel__cta, .spotpanel__more, .spotpanel__ico {
        transition: none !important;
    }
}

/* --- 右上角「官网」角标（常显，金色描边；点击跳转景区官网） --- */
.spotpanel__web {
    position: absolute;
    z-index: 3;
    top: .75rem;
    right: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    padding: .26rem .6rem;
    border-radius: 9999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    white-space: nowrap;
    color: #F6E7C6;
    text-decoration: none;
    background: rgba(25, 59, 56, .62);
    border: 1px solid rgba(216, 180, 116, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .25s, border-color .25s, color .25s, transform .25s;
}
.spotpanel__web svg {
    width: 11px;
    height: 11px;
    transform: rotate(-45deg);
}
.spotpanel__web:hover,
.spotpanel__web:focus-visible {
    background: var(--accent, #D8B474);
    border-color: var(--accent, #D8B474);
    color: #193B38;
}
@media (max-width: 560px) {
    /* 手机端面板是横条，角标缩小并贴右上，避免与底部 CTA 挤在一起 */
    .spotpanel__web { font-size: .64rem; padding: .16rem .44rem; top: .5rem; right: .55rem; gap: .14rem; }
    .spotpanel__web svg { width: 9px; height: 9px; }
}

/* 「简介」按钮要盖在整块点击热区之上 */
.spotpanel__intro { position: relative; z-index: 3; pointer-events: auto; cursor: pointer; }
