/* ============================================================
   景区游玩攻略系统 前台样式（响应式自适应）
   主题色通过 CSS 变量由后台「在线模板」动态注入
   ============================================================ */
:root {
  --primary: #2f9e6e;
  --primary-dark: #1f7a52;
  --accent: #f5a623;
  --header-bg: rgba(255,255,255,.96);
  --header-text: #17332a;
  --bg: #ffffff;
  --radius: 12px;
  --font: system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --text: #2b3440;
  --text-light: #7a8694;
  --border: #e8edf2;
  --shadow: 0 6px 24px rgba(23,51,42,.08);
  --shadow-hover: 0 12px 32px rgba(23,51,42,.14);
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--header-text); }
.logo img { height: 36px; width: auto; }
.logo b { color: var(--primary); }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  padding: 8px 16px; border-radius: 8px; color: var(--header-text);
  font-size: 15px; font-weight: 500;
}
.main-nav a:hover { background: rgba(47,158,110,.1); color: var(--primary); }
.main-nav a.active { background: var(--primary); color: #fff; }
.header-search { display: flex; align-items: center; gap: 8px; }
.header-search input {
  width: 180px; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px; outline: none; transition: width .3s, border-color .2s;
}
.header-search input:focus { width: 230px; border-color: var(--primary); }
.header-search button {
  border: none; background: var(--primary); color: #fff; border-radius: 20px;
  padding: 8px 18px; cursor: pointer; font-size: 14px;
}
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; font-size: 20px; padding: 4px 10px; cursor: pointer; }

/* ---------- 首页横幅轮播 ---------- */
.banner-carousel { position: relative; overflow: hidden; border-radius: var(--radius); }
.banner-track { display: flex; transition: transform .5s ease; }
.banner-track .swiper-slide { min-width: 100%; position: relative; }
.banner-track img { width: 100%; height: 460px; object-fit: cover; }
.banner-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 24px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff; font-size: 26px; font-weight: 700;
}
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; line-height: 40px; text-align: center;
  background: rgba(255,255,255,.85); color: #333; border-radius: 50%;
  font-size: 24px; cursor: pointer; user-select: none; opacity: 0; transition: opacity .3s;
}
.banner-carousel:hover .banner-arrow { opacity: 1; }
.banner-arrow.prev { left: 16px; }
.banner-arrow.next { right: 16px; }
.banner-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: all .3s; }
.banner-dot.active { width: 22px; border-radius: 4px; background: #fff; }

/* ---------- 区块与标题 ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 8px; }
.section-title { font-size: 24px; font-weight: 800; color: var(--text); position: relative; padding-left: 14px; }
.section-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 5px; border-radius: 3px; background: var(--primary);
}
.section-more { font-size: 14px; color: var(--text-light); }
.widget-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 24px; position: relative; padding-left: 14px; }
.widget-title::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; background: var(--primary); }

/* ---------- 卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: block; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s; color: var(--text);
}
.card-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); color: var(--text); }
.card-thumb { display: block; overflow: hidden; aspect-ratio: 16/10; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-item:hover .card-thumb img { transform: scale(1.06); }
.card-body { display: block; padding: 14px 16px 16px; }
.card-body b { font-size: 16px; display: block; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { display: block; color: var(--text-light); font-size: 13px; height: 44px; overflow: hidden; margin-bottom: 10px; }
.card-meta { display: block; font-size: 12px; color: var(--accent); }
.card-meta .views { color: var(--text-light); float: right; }

/* ---------- 攻略列表 ---------- */
.guide-list { display: grid; gap: 16px; }
.guide-row {
  display: flex; gap: 16px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; padding: 12px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s; color: var(--text);
}
.guide-row:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); color: var(--text); }
.guide-thumb { flex: 0 0 220px; border-radius: 8px; overflow: hidden; }
.guide-thumb img { width: 220px; height: 132px; object-fit: cover; }
.guide-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.guide-info b { font-size: 16px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 图集 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; display: block; aspect-ratio: 1/1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(23,51,42,.35); opacity: 0; transition: opacity .3s; color: #fff; font-size: 26px;
}
.gallery-item:hover .gallery-mask { opacity: 1; }

/* ---------- 富文本内容 ---------- */
.rich-text { font-size: 15px; }
.rich-text p { margin-bottom: 14px; }
.rich-text h3 { margin: 22px 0 10px; font-size: 19px; color: var(--text); }
.rich-text h4 { margin: 18px 0 8px; font-size: 17px; }
.rich-text img { border-radius: var(--radius); margin: 10px 0; }
.rich-text ul, .rich-text ol { padding-left: 22px; margin-bottom: 14px; }
.rich-text blockquote {
  border-left: 4px solid var(--primary); background: rgba(47,158,110,.06);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 14px 0; color: var(--text-light);
}

/* ---------- 景点详情 ---------- */
.detail-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.detail-hero img { width: 100%; height: 420px; object-fit: cover; }
.detail-hero .detail-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 24px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff;
}
.detail-title h1 { font-size: 30px; margin-bottom: 6px; }
.detail-title p { opacity: .92; font-size: 14px; }
.info-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
  background: #f7faf8; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 28px;
}
.info-panel .info-item { min-width: 0; }
.info-panel .info-item b { display: block; color: var(--primary); font-size: 14px; margin-bottom: 2px; }
.info-panel .info-item span { display: block; font-size: 13px; color: var(--text-light); word-break: break-word; line-height: 1.6; }
.breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; }

/* ---------- 标签 ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block; padding: 4px 12px; font-size: 12px; border-radius: 20px;
  background: rgba(47,158,110,.1); color: var(--primary);
}

/* ---------- 侧栏 ---------- */
.layout-2col { display: grid; grid-template-columns: 1fr 300px; gap: 28px; }
.sidebar .panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px;
}
.panel h3 { font-size: 15px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); position: relative; }
.panel h3::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }
.side-links { list-style: none; }
.side-links li { border-bottom: 1px dashed var(--border); }
.side-links a { display: block; padding: 9px 0; font-size: 14px; color: var(--text); }
.side-links a:hover { color: var(--primary); padding-left: 6px; }
.hot-list { counter-reset: hot; list-style: none; }
.hot-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.hot-list li::before {
  counter-increment: hot; content: counter(hot);
  flex: 0 0 22px; height: 22px; line-height: 22px; text-align: center;
  background: rgba(47,158,110,.12); color: var(--primary); border-radius: 6px; font-size: 12px; font-weight: 700;
}
.hot-list li:nth-child(-n+3)::before { background: var(--primary); color: #fff; }
.hot-list a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 轮播/地图/FAQ 组件 ---------- */
.w-map { border-radius: var(--radius); overflow: hidden; }
.w-map iframe { display: block; }
.w-map-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--text-light); }
.w-map-meta span:first-child { font-weight: 700; color: var(--text); }
.w-map-placeholder { text-align: center; padding: 30px; background: #f7faf8; border-radius: var(--radius); }
.w-map-placeholder b { font-size: 18px; }
.w-map-placeholder p { color: var(--text-light); margin: 6px 0; }
.btn {
  display: inline-block; background: var(--primary); color: #fff !important;
  padding: 10px 28px; border-radius: 24px; font-size: 14px; transition: background .2s;
}
.btn:hover { background: var(--primary-dark); }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; position: relative; padding-right: 40px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 18px; top: 12px; font-size: 20px; color: var(--primary); }
.faq-item[open] summary::after { content: '−'; }
.faq-a { padding: 0 18px 14px; color: var(--text-light); font-size: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.two-col h3 { margin-bottom: 10px; }
.w-video { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius); background: #000; }
.w-image img { margin: 0 auto; border-radius: var(--radius); }

/* ---------- 页面头部条（列表页） ---------- */
.page-head { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 44px 0 38px; margin-bottom: 36px; }
.page-head h1 { font-size: 28px; margin-bottom: 6px; }
.page-head p { opacity: .9; font-size: 14px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 26px; }
.filter-bar .filter-label { font-size: 14px; color: var(--text-light); margin-right: 4px; }
.filter-bar a {
  padding: 6px 16px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border);
  color: var(--text); background: #fff;
}
.filter-bar a:hover { border-color: var(--primary); color: var(--primary); }
.filter-bar a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; margin: 36px 0; }
.pager ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; }
.pager a, .pager .dots {
  display: block; min-width: 38px; padding: 8px 12px; text-align: center;
  border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--text); background: #fff;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .active a { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 搜索 ---------- */
.search-hero { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); padding: 50px 0; text-align: center; color: #fff; }
.search-hero h1 { font-size: 26px; margin-bottom: 20px; }
.search-box { display: inline-flex; background: #fff; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.search-box input { border: none; outline: none; padding: 14px 22px; width: 360px; font-size: 15px; }
.search-box button { border: none; background: var(--primary); color: #fff; padding: 14px 30px; cursor: pointer; font-size: 15px; }
.hot-tags { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hot-tags a { color: rgba(255,255,255,.9); font-size: 13px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 16px; }
.hot-tags a:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer { background: #14231c; color: rgba(255,255,255,.75); margin-top: 60px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 44px 0 30px; }
.footer-main h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-main p, .footer-main li { font-size: 13px; line-height: 2; }
.footer-main ul { list-style: none; }
.footer-main a { color: rgba(255,255,255,.7); }
.footer-main a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 12px; text-align: center; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.65); }
.qr-box { text-align: center; }
.qr-box img { width: 110px; border-radius: 8px; margin: 0 auto 8px; }
.qr-box span { font-size: 12px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox-body { position: relative; max-width: 92vw; max-height: 88vh; }
.lightbox-body img { max-width: 92vw; max-height: 82vh; border-radius: 8px; margin: 0 auto; }
.lightbox-cap { text-align: center; color: #ddd; padding: 12px 0; font-size: 14px; }
.lightbox-close {
  position: absolute; top: -42px; right: 0; color: #fff; font-size: 30px; cursor: pointer;
  width: 40px; height: 40px; text-align: center; line-height: 36px; border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255,255,255,.15); }

/* ---------- 视频小窗口弹窗播放 ---------- */
.vm-modal {
  position: fixed; inset: 0; z-index: 1200;
  display: none; align-items: center; justify-content: center;
}
.vm-modal.show { display: flex; }
.vm-mask { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.vm-box {
  position: relative; width: min(900px, 94vw);
  background: #000; border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.vm-box video { display: block; width: 100%; max-height: 80vh; background: #000; }
.vm-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; transition: background .2s;
}
.vm-close:hover { background: rgba(0,0,0,.85); }
.vm-thumb {
  position: relative; display: block; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; margin-bottom: 28px;
}
.vm-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.vm-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 54px; color: #fff; background: rgba(0,0,0,.3);
  text-shadow: 0 2px 10px rgba(0,0,0,.55); transition: background .2s;
}
.vm-play:hover { background: rgba(0,0,0,.45); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .layout-2col { grid-template-columns: 1fr; }
  .info-panel { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 14px; }
  .header-inner { height: 56px; gap: 12px; }
  .nav-toggle { display: block; order: 3; }
  .header-search { order: 2; }
  .header-search input { width: 130px; }
  .header-search input:focus { width: 150px; }
  .header-search button { padding: 8px 12px; }
  .main-nav {
    position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; padding: 20px;
    transform: translateX(100%); transition: transform .3s; z-index: 99;
    box-shadow: -8px 0 24px rgba(0,0,0,.08);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 16px; font-size: 16px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .section { padding: 34px 0; }
  .banner-track img { height: 240px; }
  .banner-caption { font-size: 18px; }
  .detail-hero img { height: 240px; }
  .detail-title h1 { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .guide-row { flex-direction: column; }
  .guide-thumb, .guide-thumb img { width: 100%; height: 160px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .two-col { grid-template-columns: 1fr; }
  .search-box input { width: 60vw; }
  .footer-main { grid-template-columns: 1fr; gap: 20px; }
  .section-title, .widget-title { font-size: 20px; }
  .info-panel { padding: 14px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
}
