/* ============================================================
   Chengdu-Holiday 前端修复补丁  fix.css  v1.0
   用法：在 /css/index.css 之后引入（全站共用头部模板里加一行）
   <link href="/css/fix.css?v=1" rel="stylesheet" type="text/css" />
   只覆盖、不改动原样式表，可随时删除回滚。
   ============================================================ */

/* box-sizing 只在小屏生效：桌面端保持原始几何（经实测，全局生效会让搜索框偏 2px） */
@media (max-width: 1000px) {
  *, *::before, *::after { box-sizing: border-box; }
}

html { -webkit-text-size-adjust: 100%; }
img { border: 0; }

/* 键盘可见焦点（原本全局 outline 被清除，键盘用户无法定位） */
a:focus-visible,
input:focus-visible,
button:focus-visible { outline: 2px solid #006600; outline-offset: 2px; }

/* 搜索框占位文字 #c2c2c2 对比度不足，加深到可读 */
.destle .srh .txt { color: #8f8f8f; }
.destle .srh .txt.sel { color: #000; }

/* ---------------- 1. 主体宽度改为流式（>=1000px 时视觉无变化） ---------------- */
.wrap { width: 100%; max-width: 1000px; margin: 0 auto; }
.top .wrap { max-width: 1224px; }

/* ---------------- 2. 顶部导航：<1240px 时放弃 1224px 雪碧图，改用文字导航 ---------------- */
@media (max-width: 1239px) {
  .top { height: auto; padding: 4px 0; }
  .top .wrap {
    width: 100% !important; max-width: 1224px;
    box-sizing: border-box;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 0 2px; padding: 0 10px;
  }
  .top a {
    float: none; width: auto !important; height: auto !important; min-height: 0 !important;
    background-image: none !important; text-indent: 0 !important; overflow: visible;
    font-family: "architects_daughterregular", "Calibri", "Verdana", sans-serif;
    font-size: 16px; line-height: 1.2; letter-spacing: .05em;
    text-transform: uppercase; color: #2f2f2f;
    padding: 9px 13px; border-radius: 4px;
  }
  .top a:hover, .top a.sel { background: #fff; color: #006600; text-decoration: none; }
  /* logo 取雪碧图左上角，按 0.64 等比缩放 */
  .top a.logo {
    width: 64px !important; height: 80px !important;
    background: url(../images/nav.png) no-repeat 0 0 !important;
    background-size: 783px 160px !important;
    text-indent: -999px !important; padding: 0; border-radius: 0;
  }
  .top a.logo:hover { background-color: transparent; }
}

/* ---------------- 3. 首页 banner ---------------- */
@media (max-width: 1000px) {
  .banner, .banner ul.slider, .banner ul.slider li, .banner .ejbanner, .banner .ejbanner img {
    height: 340px;
  }
  /* banner 图的文字是「烤」在图片里的，窄屏只能取右侧干净区域，文字改用 HTML 覆盖层 */
  .banner ul.slider li {
    background-size: cover !important;
    background-position: 100% center !important;
    position: relative;
  }
  .banner ul.slider li::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
    pointer-events: none;
  }
  .banner .hero-txt {
    position: absolute; left: 16px; right: 16px; bottom: 48px; z-index: 900;
    color: #fff; text-decoration: none; display: block;
  }
  .banner .hero-txt .hero-t {
    display: block; font-family: "Scrappers", Calibri, sans-serif;
    font-size: 30px; line-height: 1.15; color: #efcc00; text-shadow: 0 2px 10px rgba(0,0,0,.65);
  }
  .banner .hero-txt .hero-m {
    display: inline-block; margin-top: 10px; padding: 9px 18px;
    background: #efcc00; color: #231f20; border-radius: 4px;
    font: 600 14px/1 Calibri, sans-serif;
  }
  .banner .brmc { display: none; }            /* 左右白色蒙层在窄屏遮挡内容 */
  .banner ul.num { left: auto !important; right: 14px !important; margin-left: 0 !important; width: auto !important; bottom: 14px; text-align: right; }
  .banner ul.num li { text-indent: -999px !important; font-size: 0 !important; margin: 0 6px 0 0 !important; }
  .banner a.more { display: none; }            /* 已有 CTA 按钮，去掉重复入口 */
}

/* 1024 左右的笔记本：导航收紧一点，避免 FACEBOOK 单独掉到第二行 */
@media (min-width: 761px) and (max-width: 1150px) {
  .top a { font-size: 13px; padding: 8px 8px; letter-spacing: 0; }
  .top a.logo { width: 52px !important; height: 65px !important; background-size: 636px 130px !important; }
}

/* 手机：导航改单行横向滑动，省掉 3 行高度 */
@media (max-width: 760px) {
  .top { padding: 2px 0; }
  .top .wrap {
    flex-wrap: nowrap; justify-content: flex-start; gap: 0;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 0 6px;
  }
  .top .wrap::-webkit-scrollbar { display: none; }
  .top a { flex: 0 0 auto; font-size: 14px; padding: 8px 9px; white-space: nowrap; }
  /* 右缘渐隐 + 尾部留白，暗示这一行可以横向滑动，而不是被硬切 */
  .top .wrap {
    padding-right: 26px;
    -webkit-mask-image: linear-gradient(to right, #000 88%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, #000 88%, rgba(0,0,0,0) 100%);
  }
  .top a.logo { width: 52px !important; height: 65px !important; background-size: 636px 130px !important; }
  .banner, .banner ul.slider, .banner ul.slider li { height: 300px; }
  .banner .hero-txt { bottom: 44px; left: 14px; right: 14px; }
  .banner .hero-txt .hero-t { font-size: 25px; }

  .wrap { padding-left: 14px; padding-right: 14px; }
}

/* ---------------- 4. 首页「Recommended Destination」拼图 → 自适应网格 ---------------- */
@media (max-width: 1000px) {
  .despnl { width: 100% !important; }
  .despnl > ul,
  .despnl ul.l1, .despnl ul.l2, .despnl ul.l3 {
    float: none !important; width: 100% !important;
    margin: 0 0 8px 0 !important;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .despnl ul li {
    float: none !important; width: auto !important; height: auto !important;
    aspect-ratio: 4 / 3; margin: 0 !important; background: #dedede;
  }
  /* 大图块占满两列 */
  .despnl ul li.d1, .despnl ul li.d4, .despnl ul li.d7, .despnl ul li.d10 { grid-column: span 2; aspect-ratio: 16 / 10; }
  .despnl ul li img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
  .despnl ul li .hvr { display: none !important; }   /* 触屏无 hover，遮罩会盖住图片 */
  .despnl ul li:hover img { display: block !important; }
  .despnl ul li:hover .mark { display: block !important; }
  .despnl ul li .mark { font-size: 15px !important; line-height: 1.4; padding: 4px 8px; }
  .despnl ul li.d11 { display: flex; align-items: center; justify-content: center; line-height: 1.4; }
  .despnl ul li.d11 a { width: auto !important; height: auto !important; line-height: 1.4 !important; font-size: 18px; }

  /* 标题与搜索框改为两行 */
  .destle { height: auto; line-height: 1.4; padding: 10px 0; }
  .destle .nm { float: none; font-size: 22px; padding: 0 0 8px 0; }
  .destle .srh { float: none; width: 100%; height: 46px; }
  .destle .srh .txt { width: calc(100% - 46px); height: 44px; font-size: 16px; }
}

/* ---------------- 5. 页脚 ---------------- */
@media (max-width: 900px) {
  .btm .b1, .btm .b2, .btm .b3, .btm .b4 {
    float: none !important; width: 100% !important; padding: 12px 0 !important; height: auto !important;
  }
  .btm .b2 { display: none; }
  .btm .b3 table, .btm .b3 tbody, .btm .b3 tr, .btm .b3 td { display: block; width: 100% !important; }
  .btm .b3 td { text-align: left !important; padding: 2px 0 !important; }
  .btm .b3 td.fi { color: #666; }
  .btm .b4 { display: flex; gap: 24px; justify-content: flex-start; }
  .btm .b4 .l, .btm .b4 .r { float: none !important; }
}

/* ---------------- 6. 视频容器（TCPlayer 硬编码 1000×562） ---------------- */
.video_pnl { width: 100%; }
.video_pnl video,
.video_pnl .video-js,
.video_pnl .tcplayer { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; display: block; }

/* ---------------- 7. 内页：see and do / 图墙 ---------------- */
@media (max-width: 960px) {
  .itempnl h1 { padding: 40px 0 14px; font-size: 30px; }
  .itempnl .dis { padding: 0 0 34px; line-height: 1.6; }

  .photowall { width: 100% !important; padding: 12px !important; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .photowall ul, .photowall ul.c1, .photowall ul.c2, .photowall ul.c3, .photowall ul.c4 { float: none !important; width: 100% !important; padding: 0 !important; }
  .photowall ul li, .photowall ul.c1 li, .photowall ul.c2 li { width: 100% !important; height: auto !important; padding: 6% !important; }
  .photowall ul li img, .photowall ul.c1 li img, .photowall ul.c2 li img { width: 100% !important; height: auto !important; }

  .doscolpnl { width: 100% !important; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .doscolpnl ul { float: none !important; width: 100% !important; }
  .doscolpnl li { float: none !important; width: 100% !important; height: auto !important; margin: 0 !important; padding: 10px 10px 0 !important; }
  .doscolpnl li img { width: 100% !important; height: auto !important; }
}

/* ---------------- 8. 内页：destination 列表 / 详情 ---------------- */
@media (max-width: 960px) {
  .deslist, .picdtpnl, .linelist { width: 100% !important; }
  .deslist .item, .picdtpnl .item, .linelist .item { height: auto !important; padding: 6px !important; }
  .deslist .item .face, .picdtpnl .item .face, .linelist .item .face {
    float: none !important; width: 100% !important; height: auto !important; max-width: 100%;
  }
  .deslist .item .intro, .deslist .item .dis, .linelist .item .dis, .picdtpnl .item a.p {
    width: 100% !important; max-width: 100% !important; float: none !important;
    margin: 8px 0 0 !important; padding: 0 !important;
  }
  .deslist .item .intro { max-height: none !important; line-height: 1.7; }
  /* 列表摘要原来固定 75px 高，正好把第三行切一半；移动端放开完整显示 */
  .linelist .item .dis .guid { height: auto !important; max-height: none !important; overflow: visible !important; line-height: 1.65 !important; }
  .linelist .item .dis .guid p { width: auto !important; max-width: 100% !important; margin: 0 0 8px 0 !important; }
  .destination { width: 100% !important; }
  .introduction {
    position: static !important; width: 100% !important; margin: 0 0 16px !important;
    left: auto; top: auto;
  }
  .introduction .introzoom, .introduction .inzoom { width: 100% !important; max-height: none !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; }
}

/* ---------------- 9. 内页：行程 / 酒店 ---------------- */
@media (max-width: 960px) {
  .itinerary .it_head .face { float: none !important; max-width: 100% !important; }
  .itinerary .it_head .it_attr { float: none !important; width: 100% !important; padding: 12px 0 0 !important; line-height: 1.7; font-size: 18px; }
  .itinerary .it_zoom { padding: 0 !important; font-size: 16px; line-height: 1.8; }
  .itinerary .it_zoom img { max-width: 100% !important; }

  .hotel_pnl { width: 100% !important; }
  .hotel_pnl .hotel_about img { max-width: 100% !important; }
  .hotel_dtl, .hotel_pic, .htl_slide, .htl_slide .slides_container, .htl_slide .slides_container div,
  .htl_slide .slides_container div img { width: 100% !important; float: none !important; margin: 0 0 12px !important; }
  .htl_book table { width: 100%; }
}

/* ---------------- 10. 内页：问答 / 留言表单 ---------------- */
@media (max-width: 960px) {
  .qustionlist li { font-size: 16px; line-height: 1.7; }
  .qustionlist li a.p { font-size: 17px; }
  .msgpnl { padding: 0 !important; }
  .msgpnl .txt { width: 100% !important; }
  .float_box { width: calc(100% - 20px) !important; left: 10px !important; margin-left: 0 !important; }
}

/* ---------------- 11. 回到顶部按钮位置 ---------------- */
@media (max-width: 1239px) {
  .arrow { left: auto !important; right: 16px; margin-left: 0 !important; bottom: 24px !important; }
  @keyframes arrow { 0%, 100% { bottom: 24px; opacity: 1; } 50% { bottom: 30px; opacity: .5; } }
  @-webkit-keyframes arrow { 0%, 100% { bottom: 24px; opacity: 1; } 50% { bottom: 30px; opacity: .5; } }
}

/* ---------------- 12. 打印 ---------------- */
@media print { .top, .banner, .arrow, .btm .b4 { display: none !important; } }
