/* ============================================================
   城市分站「友情链接」下拉
   依赖：footer-grand.css 的 .site-footer 深色底 (#1d1723)
   收起时链接仍在 DOM 中（利于抓取），仅视觉折叠
   ============================================================ */

/* 作为 .footer-main 网格的子项，跨满整行、按钮靠右。
   整行宽度是为了让弹层（left:0;right:0）能铺开。 */
.footer-citylinks {
    position: relative;
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    border-top: 0;
}

/* ---------- 触发按钮 ---------- */
.fc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px 10px 22px;
    border: 1px solid #ffffff2b;
    border-radius: 999px;
    background: #ffffff0a;
    color: #eadce7;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1em;
    cursor: pointer;
    transition: border-color .24s, background .24s, color .24s, box-shadow .24s;
}

.fc-toggle:hover {
    border-color: #ef9cc45c;
    background: #ffffff14;
    color: #fff5fb;
    box-shadow: 0 8px 22px #09070e3d;
}

.fc-toggle:focus-visible {
    outline: 2px solid #efd1e2;
    outline-offset: 4px;
}

.fc-chevron {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.footer-citylinks.is-open .fc-chevron { transform: rotate(180deg); }

/* ---------- 面板（向上展开） ---------- */
.fc-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 40;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 6px #09070e14,
                0 26px 60px -22px #09070ebf,
                0 60px 120px -50px #09070e8c;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height .36s cubic-bezier(.4, 0, .2, 1),
                opacity .26s,
                visibility .36s;
}

.footer-citylinks.is-open .fc-panel {
    max-height: 302px;
    opacity: 1;
    visibility: visible;
}

.fc-scroll {
    max-height: 302px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 7px;
    scrollbar-width: thin;
    scrollbar-color: #d9c8d3 #f6f1f4;
}

.fc-scroll::-webkit-scrollbar { width: 9px; }
.fc-scroll::-webkit-scrollbar-track { background: #f6f1f4; border-radius: 9px; }
.fc-scroll::-webkit-scrollbar-thumb { background: #d9c8d3; border-radius: 9px; }
.fc-scroll::-webkit-scrollbar-thumb:hover { background: #c4a9bb; }

/* 1px gap + 底色 = 发丝分隔线 */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 1px;
    background: #1c16180f;
    border-radius: 9px;
    overflow: hidden;
}

.fc-grid a {
    display: block;
    padding: 10px 13px;
    background: #fff;
    font-size: 12.5px;
    color: #4a3f45;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .18s, color .18s;
}

.fc-grid a:hover,
.fc-grid a:focus-visible {
    background: #fdf2f7;
    color: #b52c68;
    outline: none;
}

/* ---------- 无 hover 设备：隐藏滚动条留白 ---------- */
@media (hover: none) {
    .fc-scroll { padding: 6px; }
}

/* ---------- 小屏 ---------- */
@media (max-width: 760px) {
    .fc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-citylinks.is-open .fc-panel { max-height: 250px; }
    .fc-scroll { max-height: 250px; }
    .fc-grid a { padding: 9px 11px; font-size: 12px; }
}

/* ---------- 尊重系统「减弱动态效果」 ---------- */
@media (prefers-reduced-motion: reduce) {
    .fc-panel { transition: none; }
    .fc-chevron { transition: none; }
}
