/* ====================================================
   HOW-TO PAGE  (hw-*)
   Self-contained namespace. Relies on .tr-page tokens
   (--trx-ink / --trx-sub / --trx-line / --trx-blue …)
   defined in table-reservations.css.
   ==================================================== */

.howto-page {
  background: var(--trx-bg);
}

/* ---- Hero tweaks (uses shared .trx-hero) ---- */
.howto-page .trx-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 48px;
}

.howto-page .trx-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 8px;
}

/* ====================================================
   HERO VISUAL — tutorial player mock (faded behind text)
   ==================================================== */
.hw-herobg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.22;
}

.hw-herostage {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding: 30px 0;
  transform: scale(1.06);
}

.hw-hplayer {
  position: relative;
  z-index: 2;
  border: 1px solid var(--trx-line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease;
}

.hw-hplayer:hover {
  transform: translateY(-4px);
  border-color: var(--trx-blue);
}

.hw-hplayer:focus-visible {
  outline: 3px solid var(--trx-blue);
  outline-offset: 3px;
}

.hw-hplayer__screen {
  position: relative;
  aspect-ratio: 16 / 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(27, 116, 228, 0.06), rgba(233, 144, 0, 0.06)),
    #f7f8fb;
  background-size:
    cover,
    28px 28px;
}

.hw-hplayer__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 37, 116, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 37, 116, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    circle at center,
    #000 30%,
    transparent 78%
  );
}

.hw-hplayer__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--trx-blue);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--trx-line);
  padding: 6px 12px;
  border-radius: 999px;
}

.hw-hplayer__play {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #e99000, #1b74e4);
}

.hw-hplayer__play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}

.hw-hplayer__play::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(27, 116, 228, 0.35);
  animation: hwPulse 2.2s ease-out infinite;
}

@keyframes hwPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.hw-hplayer:hover .hw-hplayer__play {
  transform: scale(1.06);
}

.hw-hplayer__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--trx-line);
}

.hw-hplayer__time {
  font-family: "Neuzeit Grotesk Regular";
  font-size: 13px;
  color: var(--trx-sub);
  flex-shrink: 0;
}

.hw-hplayer__track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--trx-line);
  overflow: hidden;
}

.hw-hplayer__prog {
  display: block;
  width: 22%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e99000, #1b74e4);
}

/* ---- Floating chips ---- */
.hw-hchip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 14px;
  color: var(--trx-ink);
  background: #fff;
  border: 1px solid var(--trx-line);
  padding: 10px 15px;
  border-radius: 999px;
  animation: hwFloat 5s ease-in-out infinite;
}

.hw-hchip svg {
  width: 17px;
  height: 17px;
}

.hw-hchip--1 {
  top: 6%;
  left: -34px;
  color: #1b74e4;
  animation-delay: 0s;
}

.hw-hchip--2 {
  top: 44%;
  right: -46px;
  color: #e99000;
  animation-delay: 1.1s;
}

.hw-hchip--3 {
  bottom: 4%;
  left: 4%;
  color: #25a029;
  animation-delay: 2.2s;
}

@keyframes hwFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-hplayer__play::after,
  .hw-hchip {
    animation: none;
  }
}

@media (max-width: 767px) {
  .hw-herostage {
    max-width: 440px;
    margin: 0;
    transform: scale(1);
  }
  .hw-hplayer__play {
    width: 68px;
    height: 68px;
  }
  .hw-hplayer__play svg {
    width: 28px;
    height: 28px;
  }
  .hw-hchip {
    display: none;
  }
}

/* ====================================================
   TABS WRAPPER
   ==================================================== */
.hw-tabs {
  padding-bottom: 120px;
}

/* ---- Top-level segmented switch ---- */
.hw-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin: 0 auto 12px;
  background: var(--trx-bg2);
  border: 1px solid var(--trx-line);
  border-radius: 999px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.hw-switch__btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 16px;
  color: var(--trx-sub);
  padding: 12px 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
  white-space: nowrap;
}

.hw-switch__btn svg {
  width: 20px;
  height: 20px;
}

.hw-switch__btn:hover {
  color: var(--trx-ink);
}

.hw-switch__btn.is-active {
  color: var(--trx-blue);
  background: #fff;
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); */
}

/* ====================================================
   TOP PANEL
   ==================================================== */
.hw-top {
  display: none;
  --hw-accent: var(--trx-blue);
}

.hw-top.is-active {
  display: block;
  animation: hwFade 0.4s ease;
}

@keyframes hwFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hw-top__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.hw-top__desc {
  font-family: "Neuzeit Grotesk Regular";
  font-size: 19px;
  line-height: 1.45;
  color: var(--trx-sub);
  margin: 0;
}

/* ---- Nested sub-tabs (Videos / Guides) ---- */
.hw-sub {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 48px;
  border-bottom: 1px solid var(--trx-line);
  max-width: 520px;
}

.hw-sub__btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 17px;
  color: var(--trx-sub);
  padding: 14px 26px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color 0.25s ease;
}

.hw-sub__btn svg {
  width: 19px;
  height: 19px;
}

.hw-sub__btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--hw-accent);
  transform: scaleX(0);
  transition: transform 0.28s ease;
}

.hw-sub__btn:hover {
  color: var(--trx-ink);
}

.hw-sub__btn.is-active {
  color: var(--trx-ink);
}

.hw-sub__btn.is-active::after {
  transform: scaleX(1);
}

.hw-sub__count {
  font-family: "Neuzeit Grotesk Regular";
  font-size: 13px;
  color: #fff;
  background: var(--hw-accent);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

/* ====================================================
   PANELS & GRID
   ==================================================== */
.hw-panel {
  display: none;
}

.hw-panel.is-active {
  display: block;
  animation: hwFade 0.4s ease;
}

.hw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ====================================================
   CARD
   ==================================================== */
.hw-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--trx-line);
  background: var(--trx-bg);
  border-radius: 5px;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.hw-card:hover {
  transform: translateY(-6px);
  border-color: var(--hw-accent);
}

.hw-card:focus-visible {
  outline: 3px solid var(--hw-accent);
  outline-offset: 2px;
}

/* ---- Media area (button that opens the video) ---- */
.hw-card__media {
  appearance: none;
  border: none;
  margin: 0;
  padding: 0;
  width: 100%;
  font: inherit;
  cursor: pointer;
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0b1a3a, #002574);
  overflow: hidden;
  display: block;
}

.hw-card__media:focus-visible {
  outline: 3px solid var(--hw-accent);
  outline-offset: -3px;
}

.hw-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* background: #0b1a3a; */
}

.hw-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.35) 100%
  );
  transition: opacity 0.3s ease;
}

/* Play button */
.hw-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease;
}

.hw-card__play svg {
  width: 24px;
  height: 24px;
  color: var(--hw-accent);
  margin-left: 3px;
}

.hw-card:hover .hw-card__play {
  transform: translate(-50%, -50%) scale(1.12);
  background: #fff;
}

/* Tag chip */
.hw-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hw-card__tag--pdf {
  background: #d1341f;
}

/* ---- PDF document mock media ---- */
.hw-card__media--doc {
  background: linear-gradient(135deg, #f0f1f5, #dfe3ec);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hw-doc {
  width: 46%;
  aspect-ratio: 3 / 4;
  background: #fff;
  border-radius: 8px 8px 8px 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 55, 0.22);
  position: relative;
  padding: 16% 14% 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hw-doc::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 22px 22px 0;
  border-style: solid;
  border-color: #d1341f #f7f7f9;
  border-radius: 0 8px 0 0;
}

.hw-card:hover .hw-doc {
  transform: translateY(-4px) rotate(-1.5deg);
}

.hw-doc__lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hw-doc__lines i {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: #c7ccd8;
}

.hw-doc__lines i:nth-child(1) {
  width: 80%;
  background: #9aa3b6;
}
.hw-doc__lines i:nth-child(2) {
  width: 100%;
}
.hw-doc__lines i:nth-child(3) {
  width: 92%;
}
.hw-doc__lines i:nth-child(4) {
  width: 60%;
}

/* ---- Card info ---- */
.hw-card__info {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.hw-card__title {
  font-family: "Neuzeit Grotesk Bold";
  font-size: 18px;
  line-height: 1.25;
  color: var(--trx-ink);
  letter-spacing: -0.01em;
}

.hw-card__desc {
  font-family: "Neuzeit Grotesk Regular";
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--trx-sub);
}

/* ---- Read Guide (PDF) button ---- */
.hw-card__guide {
  appearance: none;
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 14px;
  cursor: pointer;
  color: var(--hw-accent);
  background: color-mix(in srgb, var(--hw-accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--hw-accent) 32%, #fff);
  padding: 9px 16px;
  border-radius: 999px;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
}

.hw-card__guide svg {
  width: 16px;
  height: 16px;
}

.hw-card__guide:hover {
  background: var(--hw-accent);
  color: #fff;
  border-color: var(--hw-accent);
}

.hw-card__guide:focus-visible {
  outline: 3px solid var(--hw-accent);
  outline-offset: 2px;
}

/* ====================================================
   GUIDES — LIST LAYOUT
   ==================================================== */
.hw-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.hw-row {
  appearance: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid var(--trx-line);
  background: var(--trx-bg);
  border-radius: 14px;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.hw-row:hover {
  transform: translateX(4px);
  border-color: var(--hw-accent);
  background: var(--trx-bg2);
}

.hw-row:focus-visible {
  outline: 3px solid var(--hw-accent);
  outline-offset: 2px;
}

.hw-row__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--hw-accent) 12%, #fff);
  color: var(--hw-accent);
}

.hw-row__icon svg {
  width: 22px;
  height: 22px;
}

.hw-row__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hw-row__title {
  font-family: "Neuzeit Grotesk Bold";
  font-size: 17px;
  line-height: 1.25;
  color: var(--trx-ink);
  letter-spacing: -0.01em;
}

.hw-row__desc {
  font-family: "Neuzeit Grotesk Regular";
  font-size: 14px;
  line-height: 1.4;
  color: var(--trx-sub);
}

.hw-row__tag {
  flex-shrink: 0;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #d1341f;
  padding: 5px 11px;
  border-radius: 999px;
}

.hw-row__action {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--trx-sub);
  background: var(--trx-bg2);
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.hw-row__action svg {
  width: 17px;
  height: 17px;
}

.hw-row:hover .hw-row__action {
  color: #fff;
  background: var(--hw-accent);
  transform: translateX(2px);
}

/* ---- Empty state ---- */
.hw-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--trx-sub);
  font-family: "Neuzeit Grotesk Regular";
  font-size: 17px;
}

/* ====================================================
   MODAL
   ==================================================== */
.hw-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hw-modal.is-open {
  display: flex;
}

.hw-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 25, 0.78);
  backdrop-filter: blur(6px);
  animation: hwFade 0.25s ease;
}

.hw-modal__box {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: hwZoom 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hwZoom {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hw-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--trx-line);
  flex-shrink: 0;
}

.hw-modal__title {
  font-family: "Neuzeit Grotesk Bold";
  font-size: 19px;
  color: var(--trx-ink);
  margin: 0;
  line-height: 1.3;
}

.hw-modal__close {
  appearance: none;
  border: none;
  background: var(--trx-bg2);
  color: var(--trx-ink);
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.hw-modal__close:hover {
  background: #e6e6ea;
  transform: rotate(90deg);
}

.hw-modal__body {
  flex: 1;
  min-height: 0;
  background: #000;
  display: flex;
}

.hw-modal__video {
  width: 100%;
  max-height: 78vh;
  display: block;
  background: #000;
}

.hw-modal__pdf {
  width: 100%;
  height: 78vh;
  border: none;
  background: #525659;
}

.hw-modal__foot {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid var(--trx-line);
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
}

.hw-modal__foot:empty {
  display: none;
}

.hw-modal__dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Neuzeit Grotesk Bold";
  font-size: 14px;
  color: #fff;
  background: var(--trx-blue);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.hw-modal__dl:hover {
  background: #001a54;
  color: #fff;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 991px) {
  .hw-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .hw-tabs {
    padding-bottom: 80px;
  }
}

@media (max-width: 640px) {
  .hw-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hw-switch {
    display: flex;
    width: 100%;
    left: 0;
    transform: none;
    gap: 4px;
  }
  .hw-switch__btn {
    flex: 1;
    justify-content: center;
    padding: 11px 6px;
    font-size: 13px;
    gap: 6px;
  }
  .hw-switch__btn svg {
    display: none;
  }
  .hw-sub {
    max-width: 100%;
  }
  .hw-sub__btn {
    flex: 1;
    justify-content: center;
    padding: 14px 8px;
    font-size: 15px;
  }
  .hw-top__desc {
    font-size: 17px;
  }
  .hw-modal {
    padding: 0;
  }
  .hw-modal__box {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    width: 100%;
  }
  .hw-modal__video {
    max-height: 60vh;
  }
  .hw-modal__pdf {
    height: 70vh;
  }
  .hw-row {
    gap: 14px;
    padding: 14px 16px;
  }
  .hw-row__tag {
    display: none;
  }
  .hw-row__icon {
    width: 40px;
    height: 40px;
  }

  .howto-page .trx-hero,
  .hw-herostage {
    padding-bottom: 0;
  }
}

