/* Generic CMS content page (page.html) — terms, CSR, travel insurance,
   loyalty & referral, scan to pay, etc. The Page model has no image, so the
   header is an editorial text header; long documents (3+ h2s) get a sticky
   "On this page" sidebar, built in page.html. */

.docHeader,
.docBodyWrap {
  --dc-accent: var(--color-accent-1, #EB662B);
  --dc-accent-dark: var(--color-accent-1-dark, #CE5A25);
  --dc-dark: var(--color-dark-1, #05073C);
  --dc-muted: var(--color-text-muted, #4A4D63);
  --dc-border: #E7E6E6;
  --dc-surface: #FBF7F4;
}

/* ---------- Header ---------- */

.docHeader {
  padding: 44px 0 40px;
  background:
    radial-gradient(circle at 90% 0%, rgba(235, 102, 43, 0.1), transparent 40%),
    linear-gradient(180deg, var(--dc-surface) 0%, #fff 100%);
  border-bottom: 1px solid var(--dc-border);
}

.docHeader .breadcrumbs {
  margin-bottom: 30px;
}

.docHeader__main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.docHeader__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dc-accent);
}

.docHeader__title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--dc-dark);
}

.docHeader__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--dc-muted);
}

.docHeader__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.docHeader__meta i {
  color: var(--dc-accent);
}

.docHeader__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C6C6D2;
}

.docHeader__print {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  background: #fff;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dc-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.docHeader__print:hover {
  border-color: var(--dc-accent);
  color: var(--dc-accent);
}

/* ---------- Layout ---------- */

.docBodyWrap {
  padding: 56px 0 90px;
}

.docBody {
  max-width: 860px;
  margin: 0 auto;
}

.docBody.has-toc {
  max-width: none;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.docBody.has-toc .docMain {
  max-width: 860px;
}

/* ---------- On this page ---------- */

.docToc {
  align-self: stretch;
}

.docToc__inner {
  position: sticky;
  top: 110px;
  padding: 22px;
  border: 1px solid var(--dc-border);
  border-radius: 16px;
  background: #fff;
}

.docToc__label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dc-muted);
}

.docToc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.docToc__list a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--dc-border);
  font-size: 14px;
  line-height: 1.45;
  color: var(--dc-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.docToc__list a:hover,
.docToc__list a.is-active {
  color: var(--dc-accent);
  border-left-color: var(--dc-accent);
}

.docToc__list a.is-active {
  font-weight: 600;
}

/* ---------- Document typography ---------- */

/* The editor pasted a near-black inline color on every span — let the
   page's text colors apply instead. */
.docContent [style*="color"] {
  color: inherit !important;
}

.docContent {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--dc-dark);
  overflow-x: visible;
}

.docContent p {
  font-size: 16.5px;
  line-height: 1.8;
  margin: 0 0 1.1em;
}

.docContent > :first-child {
  margin-top: 0;
}

.docContent > :last-child {
  margin-bottom: 0;
}

/* Some pages start with their own h1 — size it as a section title so it
   doesn't compete with the page title above. */
.docContent h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 14px;
}

.docContent h2 {
  position: relative;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--dc-border);
  font-size: 24px;
  line-height: 1.35;
  color: var(--dc-dark);
  scroll-margin-top: 110px;
}

.docContent h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: var(--dc-accent);
}

.docContent > h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.docContent > h2:first-child::before {
  display: none;
}

.docContent h3 {
  margin: 32px 0 12px;
  font-size: 20px;
  line-height: 1.4;
  color: var(--dc-dark);
}

.docContent h4 {
  margin: 24px 0 10px;
  font-size: 17px;
  color: var(--dc-dark);
}

/* Lists: orange dot bullets, tidy nesting */
.docContent ul,
.docContent ol {
  margin: 12px 0 20px;
  padding-left: 0;
}

.docContent ul {
  list-style: none;
}

.docContent ol {
  list-style: decimal;
  padding-left: 1.4em;
}

.docContent ul > li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  list-style: none;
}

.docContent ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dc-accent);
}

.docContent ul ul {
  margin: 8px 0 4px;
}

.docContent ul ul > li::before {
  width: 6px;
  height: 6px;
  background: transparent;
  border: 1.5px solid var(--dc-accent);
}

.docContent li > p {
  margin: 0;
}

.docContent a {
  color: var(--dc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docContent blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--dc-accent);
  border-radius: 0 10px 10px 0;
  background: var(--dc-surface);
  font-style: normal;
}

/* Tables */
.docContent figure.table {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--dc-border);
  border-radius: 12px;
}

.docContent table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 15px;
}

.docContent > table {
  margin: 24px 0;
  border: 1px solid var(--dc-border);
}

.docContent th,
.docContent td {
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--dc-border);
  text-align: left;
  vertical-align: top;
}

.docContent tr:last-child td {
  border-bottom: 0;
}

.docContent th,
.docContent thead td {
  background: var(--dc-surface);
  font-weight: 700;
}

.docContent tbody tr:nth-child(even) td {
  background: #FCFCFD;
}

/* Images (e.g. the Scan to Pay QR code) — centered and kept to a sensible
   size instead of stretching across the column. */
.docContent figure.image {
  margin: 8px auto 24px;
  text-align: center;
}

.docContent img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.docContent figure.image img {
  width: auto;
  max-height: 75vh;
  box-shadow: 0 16px 40px rgba(5, 7, 60, 0.12);
}

/* ---------- Help box ---------- */

.docHelp {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 56px;
  padding: 24px 28px;
  border: 1px solid var(--dc-border);
  border-radius: 18px;
  background: var(--dc-surface);
}

.docHelp__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--dc-accent);
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(5, 7, 60, 0.06);
}

.docHelp__text {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}

.docHelp__text strong {
  font-size: 17px;
  color: var(--dc-dark);
}

.docHelp__text span {
  font-size: 14.5px;
  color: var(--dc-muted);
}

.docHelp__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.docHelp__actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dc-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.docHelp__actions a:hover {
  color: var(--dc-accent);
}

.docHelp__actions a.docHelp__button {
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--dc-accent);
  color: #fff;
  transition: background 0.2s ease;
}

.docHelp__actions a.docHelp__button:hover {
  background: var(--dc-accent-dark);
  color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .docBody.has-toc {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 991px) {
  /* On-page nav is a desktop aid; hide it on smaller screens. */
  .docBody.has-toc {
    display: block;
    max-width: 860px;
  }

  .docToc {
    display: none;
  }
}

@media (max-width: 767px) {
  .docHeader {
    padding: 32px 0 28px;
  }

  .docHeader .breadcrumbs {
    margin-bottom: 22px;
  }

  .docHeader__main {
    flex-direction: column;
    align-items: flex-start;
  }

  .docHeader__title {
    font-size: 30px;
  }

  .docBodyWrap {
    padding: 36px 0 60px;
  }

  .docContent,
  .docContent p {
    font-size: 16px;
  }

  .docContent h2 {
    margin-top: 36px;
    font-size: 21px;
  }

  .docHelp {
    padding: 22px 20px;
  }
}

/* ---------- Print (terms, policies) ---------- */

@media print {
  .header,
  .menu,
  .site-footer,
  footer,
  .docHeader .breadcrumbs,
  .docHeader__print,
  .docToc,
  .docHelp,
  .contact_icon,
  .text_icon {
    display: none !important;
  }

  .docHeader {
    padding: 0 0 16px;
    background: none;
  }

  .docBodyWrap {
    padding: 16px 0 0;
  }

  .docBody.has-toc {
    display: block;
  }

  .docContent h2 {
    break-after: avoid;
  }

  .docContent figure.image img {
    box-shadow: none;
  }
}
