﻿/* ===========================================================
   Cẩm nang du lịch Đà Nẵng — /{lang}/cam-nang, /{lang}/cam-nang/{slug}
   Dùng biến màu của travel.css; thuộc tính logical để tự đảo chiều khi dir="rtl".
   Mốc: ≤1199 · ≤991 (ẩn cột phải, hiện thanh liên hệ dưới) · ≤767 · ≤380
   =========================================================== */
.gd { --wa: #25d366; --wa-dark: #1da851; overflow-wrap: break-word; }

/* ---------- Đầu trang ---------- */
.gd-head {
  background: linear-gradient(135deg, var(--brand-deep, #0b3a4a), var(--brand-dark, #077a95));
  color: #fff; padding: 44px 0 40px;
}
.gd-head--hub { padding: 56px 0 52px; }
.gd-head__inner { max-width: 1200px; }
.gd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; opacity: .85; margin-bottom: 14px; }
.gd-crumbs a { color: #fff; }
.gd-crumbs a:hover { color: var(--gold, #ffd166); }
.gd-title { color: #fff; font-size: clamp(26px, 4vw, 42px); line-height: 1.25; margin: 0 0 14px; max-width: 900px; }
.gd-lead { font-size: 17.5px; max-width: 760px; margin: 0; opacity: .92; line-height: 1.6; }
.gd-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-size: 14px; opacity: .9; }
.gd-meta i { margin-inline-end: 5px; }

/* ---------- Bố cục bài + cột phải ---------- */
.gd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 36px 64px; max-width: 1200px; }
.gd-article { min-width: 0; }
.gd-cover { margin: 0 0 24px; border-radius: var(--radius, 16px); overflow: hidden; box-shadow: var(--shadow); }
.gd-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.gd-cover { position: relative; }
.gd-credit { position: absolute; inset-inline-end: 0; bottom: 0; max-width: 90%; padding: 4px 10px; font-size: 11.5px; line-height: 1.4;
  color: rgba(255,255,255,.92); background: rgba(0,0,0,.45); border-start-start-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.gd-sapo { font-size: 19px; line-height: 1.7; font-weight: 600; color: var(--ink); margin: 0 0 24px; }

/* Mục lục */
.gd-toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.gd-toc a { color: var(--brand-dark); }
.gd-toc a:hover { color: var(--accent); }
.gd-toc--inline { display: none; background: #f3f8fa; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 26px; }
.gd-toc--inline summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.gd-toc--inline ol { margin-top: 10px; }
.gd-side__sticky { position: sticky; top: 96px; display: grid; gap: 18px; }
.gd-toc--side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-size: 14.5px; max-height: calc(100vh - 340px); overflow: auto; }
.gd-toc--side b { display: block; margin-bottom: 10px; color: var(--ink); }

/* Nội dung bài */
.gd-body { font-size: 17px; line-height: 1.8; color: #2b3a40; }
.gd-body h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.35; margin: 40px 0 14px; color: var(--ink); scroll-margin-top: 96px; }
.gd-body h3 { font-size: 20px; margin: 28px 0 10px; color: var(--ink); }
.gd-body p { margin: 0 0 16px; }
.gd-body ul, .gd-body ol { margin: 0 0 18px; padding-inline-start: 22px; }
.gd-body li { margin-bottom: 8px; }
.gd-body a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.gd-body a:hover { color: var(--accent); }
.gd-body figure { margin: 24px 0; }
.gd-body figure img { width: 100%; border-radius: 14px; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.gd-body figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.gd-body table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15.5px; }
.gd-body th, .gd-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; vertical-align: top; }
.gd-body th { background: #f3f8fa; }
.gd-body .gd-table { overflow-x: auto; margin-bottom: 20px; }
.gd-body .gd-table table { margin: 0; min-width: 520px; }
.gd-body .gd-tip { background: #fff7ef; border-inline-start: 4px solid var(--accent); border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; }
.gd-body .gd-tip p:last-child { margin: 0; }
.gd-body .gd-note { font-size: 14.5px; color: var(--muted); font-style: italic; }

/* FAQ */
.gd-faq { margin-top: 44px; }
.gd-faq h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 16px; }
.gd-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; background: #fff; }
.gd-faq summary { cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand); flex: 0 0 auto; }
.gd-faq details[open] summary::after { content: "−"; }
.gd-faq details p { margin: 0 0 16px; line-height: 1.7; }

/* Tour liên quan */
.gd-tours { margin-top: 44px; }
.gd-tours h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 16px; }
.gd-tours__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gd-tour { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.gd-tour img, .gd-tour__ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.gd-tour__ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-deep, #0b3a4a), var(--brand, #0aa1c4)); color: #fff; font-size: 26px; }
.gd-tour__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gd-tour__body small { color: var(--accent-dark); font-weight: 800; letter-spacing: 1px; }
.gd-tour__body b { line-height: 1.4; flex: 1; }
.gd-tour__go { color: var(--brand-dark); font-weight: 700; font-size: 14px; }
.gd-tour__price { color: var(--accent-dark); font-weight: 800; font-size: 15px; }

/* Nút + hộp liên hệ */
.gd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px;
  padding: 11px 20px; border-radius: 999px; font-weight: 800; text-align: center; line-height: 1.3;
}
.gd-btn--wa { background: var(--wa); color: #fff; }
.gd-btn--wa:hover, .gd-btn--wa:focus-visible { background: var(--wa-dark); color: #fff; }
.gd-btn i { font-size: 1.2em; }
.gd-btn bdi { white-space: nowrap; }
.gd-cta { background: linear-gradient(160deg, #e9f8fb, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.gd-cta b { display: block; font-size: 17px; margin-bottom: 6px; color: var(--ink); }
.gd-cta p { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.6; }
.gd-cta .gd-btn { width: 100%; }
.gd-sticky { display: none; }

/* ---------- Thẻ bài viết (trang tổng hợp + bài khác) ---------- */
.gd-hub { padding-block: 40px 70px; }
.gd-section + .gd-section { margin-top: 52px; }
.gd-section h2, .gd-more h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 20px; }
.gd-region { font-size: 18px; margin: 26px 0 14px; color: var(--brand-dark); }
.gd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.gd-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.gd-card img, .gd-card__ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.gd-card__ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-deep, #0b3a4a), var(--brand, #0aa1c4)); color: #fff; font-size: 30px; }
.gd-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.gd-card__body b { font-size: 17px; line-height: 1.4; }
.gd-card__sum { color: var(--muted); font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gd-more { background: #f5f9fb; padding: 56px 0 64px; }
.gd-empty { text-align: center; color: var(--muted); padding: 40px 0; }

@media (hover: hover) and (pointer: fine) {
  .gd-card:hover, .gd-tour:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
}
[dir="rtl"] .gd-flip { transform: scaleX(-1); }
[dir="rtl"] .gd-title { line-height: 1.4; }

/* ---------- Laptop nhỏ ---------- */
@media (max-width: 1199px) {
  .gd-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 36px; }
}
/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  .gd-layout { grid-template-columns: 1fr; padding-bottom: 40px; }
  .gd-side { display: none; }
  .gd-toc--inline { display: block; }
  .gd { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .gd-sticky {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; justify-content: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 20px rgba(11,58,74,.12);
  }
  .gd-sticky .gd-btn { flex: 0 1 460px; }
}
/* ---------- Điện thoại ---------- */
@media (max-width: 767px) {
  .gd-head { padding: 30px 0 28px; }
  .gd-head--hub { padding: 38px 0 34px; }
  .gd-lead { font-size: 16px; }
  .gd-meta { font-size: 13px; gap: 6px 14px; }
  .gd-layout { padding-top: 22px; }
  .gd-cover { margin-inline: -16px; border-radius: 0; }
  .gd-sapo { font-size: 17px; }
  .gd-body { font-size: 16px; line-height: 1.75; }
  .gd-body h2 { margin-top: 32px; }
  .gd-body h3 { font-size: 18px; }
  .gd-cards { grid-template-columns: 1fr; gap: 14px; }
  .gd-tours__grid { grid-template-columns: 1fr; }
  .gd-tour { flex-direction: row; }
  .gd-tour img, .gd-tour__ph { width: 112px; aspect-ratio: auto; flex: 0 0 112px; }
  .gd-hub { padding-block: 28px 48px; }
  .gd-more { padding: 40px 0 44px; }
}
@media (max-width: 380px) {
  .gd .container { padding-inline: 12px; }
  .gd-cover { margin-inline: -12px; }
  .gd-title { font-size: 24px; }
  .gd-tour img, .gd-tour__ph { width: 90px; flex-basis: 90px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .gd-sticky { padding-block: 6px calc(6px + env(safe-area-inset-bottom)); }
  .gd-sticky .gd-btn { min-height: 40px; padding-block: 7px; }
  .gd { padding-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .gd-card, .gd-tour { transition: none; }
}
@media print {
  .gd-side, .gd-sticky, .gd-more, .gd-tours, .gd-toc--inline { display: none !important; }
  .gd-head { background: none; color: #000; }
  .gd-title, .gd-crumbs a { color: #000; }
}
