/* =====================================================================
   Beyond Journey - the offers page (bjo-)
   ---------------------------------------------------------------------
   /offers, /offers/{category} and /flights-offers: one page, drawn from
   SiteOffers (Models/SiteOffer.cs).

   The layout is the designer's reference (2026-10-01), a travel portal's
   offers page: a FILTERS card down the left - the categories, each with
   its count, chosen like radio buttons - and the offers as cards on the
   right, each one the same six things in the same order: category,
   photograph, title, a line about it, how long it runs, one button.

   The look is the site's own: navy and orange, Poppins on the scale in
   css/bj-type.css (400 text, 500 labels, 600 titles and buttons), pill
   buttons, 16px cards on the legal pages' canvas. The hero is the site's
   hero from css/bj-legal.css - the page wraps itself in .bjlg, which also
   undoes the template's section padding, inline list items and
   capitalised headings.

   js/bj-offers.js filters the cards in place and copies a coupon code;
   without it the category links are ordinary links to /offers/{category}.

   Before this the file styled the template's .trend-item cards for a grid
   of nine hand-written flight offers.
   ===================================================================== */

.bjo {
  --bjo-navy: #17233e;
  --bjo-navy-2: #22315a;
  --bjo-orange: #f5761a;
  --bjo-orange-600: #dd660f;
  --bjo-orange-50: #fff3e8;
  --bjo-ink: #17233e;
  --bjo-body: #5a6377;
  --bjo-faint: #8b93a5;
  --bjo-line: #e9e8e3;
  --bjo-canvas: #f7f6f2;
  --bjo-ease: cubic-bezier(.4, 0, .2, 1);
  /* the header's pinned row plus breathing room: the sticky filters and
     the heading the page scrolls back to both clear it */
  --bjo-top: 84px;
}

/* no "at a glance" cards hang over this hero's edge, so it ends sooner */
.bjlg.bjo .bjlg-hero { padding-bottom: 56px; }

.bjo .bjo-body { padding: 32px 0 64px; background: var(--bjo-canvas); }
.bjo-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; align-items: start; }

/* ------------------------------------------------------------------
   Filters
   ------------------------------------------------------------------ */
.bjo-filters { position: sticky; top: var(--bjo-top); display: grid; gap: 16px; }
.bjo-filters__card {
  padding: 16px 12px 10px; border-radius: 16px;
  background: #fff; border: 1px solid var(--bjo-line);
  box-shadow: 0 10px 30px rgba(23, 35, 62, .06);
}
.bjo-filters__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 6px 12px; border-bottom: 1px solid var(--bjo-line);
}
.bjo-filters__title { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bjo-ink); }
.bjo .bjo-filters__clear { font-size: 11.5px; font-weight: 500; color: var(--bjo-orange-600); }
.bjo .bjo-filters__clear:hover { color: var(--bjo-ink); }
.bjo-filters__label { margin: 12px 6px 4px; font-size: 12.5px; font-weight: 500; color: var(--bjo-ink); }

.bjo-cats { display: grid; gap: 2px; }
.bjo .bjo-cat {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: 10px;
  font-size: 13px; font-weight: 400; line-height: 1.3; color: var(--bjo-body);
  transition: background-color .2s var(--bjo-ease), color .2s;
}
.bjo .bjo-cat:hover { background: var(--bjo-canvas); color: var(--bjo-ink); }
/* the radio: a ring, filled when its category is the one showing */
.bjo-cat__dot {
  position: relative; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #c3c8d4; background: #fff;
  transition: border-color .2s var(--bjo-ease);
}
.bjo-cat__dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--bjo-orange); transform: scale(0);
  transition: transform .2s var(--bjo-ease);
}
.bjo-cat__n { margin-left: auto; font-size: 11.5px; color: var(--bjo-faint); font-variant-numeric: tabular-nums; }
.bjo .bjo-cat[aria-current="true"] { color: var(--bjo-ink); font-weight: 500; background: var(--bjo-orange-50); }
.bjo-cat[aria-current="true"] .bjo-cat__dot { border-color: var(--bjo-orange); }
.bjo-cat[aria-current="true"] .bjo-cat__dot::after { transform: scale(1); }
.bjo-cat[aria-current="true"] .bjo-cat__n { color: var(--bjo-orange-600); }
.bjo-cat:focus-visible, .bjo-filters__clear:focus-visible, .bjo-code:focus-visible,
.bjo-card__go:focus-visible, .bjo-help__btn:focus-visible, .bjo-card h3 a:focus-visible {
  outline: 3px solid rgba(245, 118, 26, .45); outline-offset: 2px;
}

/* the navy help card of the site's FAQ sections, under the filters */
.bjo-help {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 18px 16px; border-radius: 16px;
  background: linear-gradient(140deg, #111c35 0%, var(--bjo-navy) 45%, var(--bjo-navy-2) 100%);
  color: rgba(255, 255, 255, .78);
}
.bjo-help::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 210px; height: 210px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(245, 118, 26, .34), rgba(245, 118, 26, 0) 70%);
}
.bjo-help__ico {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #ffb27a;
}
.bjo-help__ico > svg, .bjo-help__ico > i { width: 1em; height: 1em; }
.bjo-help strong { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; line-height: 1.35; color: #fff; }
.bjo .bjo-help p { margin-top: 6px; font-size: 12px; line-height: 1.6; }
.bjo-help__btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 14px; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--bjo-orange) 0%, var(--bjo-orange-600) 100%); color: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.2; cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(245, 118, 26, .8);
  transition: transform .2s var(--bjo-ease);
}
.bjo-help__btn:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------------
   The offers
   ------------------------------------------------------------------ */
.bjo-results { min-width: 0; }
.bjo-results__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; scroll-margin-top: var(--bjo-top);
}
.bjo .bjo-results__head h2 { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.bjo-results__count { flex: 0 0 auto; font-size: 12.5px; color: var(--bjo-body); }

.bjo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.bjo-card {
  display: flex; flex-direction: column; min-width: 0;
  padding: 12px; border-radius: 16px;
  background: #fff; border: 1px solid var(--bjo-line);
  box-shadow: 0 1px 2px rgba(23, 35, 62, .04);
  transition: transform .25s var(--bjo-ease), box-shadow .25s var(--bjo-ease), border-color .25s var(--bjo-ease);
}
.bjo-card[hidden] { display: none; }
.bjo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 118, 26, .4);
  box-shadow: 0 16px 32px -18px rgba(23, 35, 62, .4);
}
.bjo .bjo-card__cat {
  display: flex; align-items: center; gap: 7px;
  margin: 0 2px 9px; font-size: 11.5px; font-weight: 500; line-height: 1.3; color: var(--bjo-body);
}
.bjo-card__cat > svg, .bjo-card__cat > i { font-size: 11px; color: var(--bjo-orange); }
.bjo-card__media {
  position: relative; display: block; flex: none;
  aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #eceef2;
}
.bjo-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--bjo-ease);
}
.bjo-card:hover .bjo-card__media img { transform: scale(1.05); }
.bjo-card__tag {
  position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(23, 35, 62, .88); color: #fff;
  font-size: 10.5px; font-weight: 500; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bjo .bjo-card h3 {
  margin: 12px 2px 0; font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bjo .bjo-card h3 a { color: inherit; }
.bjo .bjo-card:hover h3 a { color: var(--bjo-orange-600); }
.bjo .bjo-card__text {
  margin: 6px 2px 0; font-size: 12.5px; line-height: 1.6; color: var(--bjo-body);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* the coupon: tap to copy */
.bjo-code {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  margin: 10px 2px 0; padding: 5px 10px; border-radius: 8px;
  border: 1px dashed rgba(245, 118, 26, .6); background: var(--bjo-orange-50);
  font-family: inherit; line-height: 1.3; color: var(--bjo-ink); cursor: pointer;
  transition: background-color .2s var(--bjo-ease), border-color .2s var(--bjo-ease);
}
.bjo-code span { font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #a85a1c; }
.bjo-code b { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.bjo-code > svg, .bjo-code > i { font-size: 11px; color: var(--bjo-orange); }
.bjo-code:hover { border-color: var(--bjo-orange); }
.bjo-code.is-copied { background: #edf8f1; border-color: #7cc79a; }
.bjo-code.is-copied span { color: #1a7f4b; }

/* how long it runs, and the one button - always on the card's last line */
.bjo-card__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding: 14px 2px 2px;
}
.bjo-card__till {
  flex: 0 0 auto; max-width: 100%;
  padding: 5px 9px; border-radius: 999px;
  background: var(--bjo-navy); color: #fff;
  font-size: 10.5px; font-weight: 500; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bjo-card__till.is-soon { background: #c0392b; }
.bjo .bjo-card__go {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--bjo-orange) 0%, var(--bjo-orange-600) 100%); color: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(245, 118, 26, .75);
  transition: transform .2s var(--bjo-ease), box-shadow .2s var(--bjo-ease);
}
.bjo .bjo-card__go:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 22px -10px rgba(245, 118, 26, .85); }

.bjo .bjo-empty {
  margin-top: 4px; padding: 28px 20px; border-radius: 16px; text-align: center;
  background: #fff; border: 1px dashed #d9d8d2; font-size: 13.5px; color: var(--bjo-body);
}
.bjo-empty[hidden] { display: none; }
.bjo .bjo-empty a { color: var(--bjo-orange-600); font-weight: 500; }
.bjo .bjo-note { margin-top: 18px; font-size: 11.5px; line-height: 1.6; color: var(--bjo-faint); }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1199px) {
  .bjo-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 20px; }
  .bjo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the filters stop being a column: the categories become a row of pills
   over the cards, which a thumb can swipe along */
@media (max-width: 991px) {
  .bjlg.bjo .bjlg-hero { padding-bottom: 48px; }
  .bjo .bjo-body { padding-top: 20px; }
  .bjo-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bjo-filters { position: static; display: block; min-width: 0; }
  .bjo-filters__card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .bjo-filters__head, .bjo-filters__label, .bjo-help { display: none; }
  .bjo-cats {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .bjo-cats::-webkit-scrollbar { display: none; }
  .bjo .bjo-cat {
    flex: 0 0 auto; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px;
    border: 1px solid #e0ddd5; background: #fff; font-weight: 500; color: var(--bjo-ink); white-space: nowrap;
  }
  .bjo-cat__dot { display: none; }
  .bjo-cat__n { margin-left: 0; }
  .bjo .bjo-cat[aria-current="true"] { background: var(--bjo-navy); border-color: var(--bjo-navy); color: #fff; }
  .bjo-cat[aria-current="true"] .bjo-cat__n { color: #ffb27a; }
  .bjo-grid { gap: 14px; }
}

/* a phone: one offer to a row, the photograph beside the words, so a
   screen holds three offers rather than one */
@media (max-width: 575px) {
  .bjlg.bjo .bjlg-hero { padding-bottom: 36px; }
  .bjo .bjo-body { padding: 16px 0 44px; }
  .bjo .bjo-cat { min-height: 32px; padding: 0 12px; font-size: 12px; }
  .bjo .bjo-results__head h2 { font-size: 17px; }
  .bjo-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bjo-card {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px; align-items: start;
    padding: 10px; border-radius: 14px;
  }
  .bjo-card:hover { transform: none; }
  .bjo-card__media { grid-column: 1; grid-row: 1 / span 3; aspect-ratio: 1; border-radius: 10px; }
  /* a long tag takes a second line on the small photograph rather than
     ending in "..." */
  .bjo-card__tag {
    left: 5px; top: 5px; max-width: calc(100% - 10px); padding: 3px 7px; font-size: 9.5px;
    white-space: normal; border-radius: 9px; line-height: 1.25;
  }
  .bjo .bjo-card__cat { grid-column: 2; grid-row: 1; margin: 0 0 3px; font-size: 11px; }
  .bjo .bjo-card h3 { grid-column: 2; grid-row: 2; margin: 0; font-size: 13.5px; line-height: 1.35; }
  .bjo .bjo-card__text { grid-column: 2; grid-row: 3; margin: 4px 0 0; font-size: 12px; line-height: 1.5; -webkit-line-clamp: 2; }
  .bjo-code { grid-column: 1 / -1; justify-self: start; margin: 10px 0 0; }
  .bjo-card__foot { grid-column: 1 / -1; margin-top: 0; padding: 10px 0 0; }
  /* the owner's phone button scale (css/bj-phone-buttons.css): a button
     inside a card is 11.5px, and only as wide as its label */
  .bjo .bjo-card__go { min-height: 30px; padding: 0 14px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .bjo-card, .bjo-card__media img, .bjo-card__go, .bjo-help__btn, .bjo-cat, .bjo-cat__dot, .bjo-cat__dot::after { transition: none; }
  .bjo-card:hover, .bjo .bjo-card__go:hover, .bjo-help__btn:hover { transform: none; }
  .bjo-card:hover .bjo-card__media img { transform: none; }
}

/* =====================================================================
   2026-10-06 - the banner lighter, and the cards on a tablet and a phone
   ---------------------------------------------------------------------
   The designer: "banner pe overlay jyda h, desktop pe bhi or mob pe bhi
   overlay km kro", and "iska mob view or tab view aache se bnao".
   - The veil over the photograph, on this page only (the legal pages
     share .bjlg-hero--photo and keep theirs): left .74 -> .55, middle
     .52 -> .30, right .18 -> .04 on a laptop, without the orange glow;
     .66/.54 -> .42/.30 where the words run the full width. The words keep
     their shadow, so they still read over the brighter picture.
   - The photograph follows the chosen filter (Offers.cshtml sets it,
     js/bj-offers.js swaps it), cut at --bjo-hero-at.
   - Tablet: the 2-up cards were ~450px tall, most of it a 16:10 photo -
     nine offers ran to five screens. They take the phone's shape
     instead (photo beside the words), two to a row from 768px.
   - Tablet and phone: the coupon sits under the words beside the photo,
     not on a row of its own; "Valid till" is quiet grey text, not a
     navy pill (red only in an offer's last week); a hairline, then the
     validity left and the one button right.
   ===================================================================== */
.bjlg.bjo .bjlg-hero--photo {
  background:
    linear-gradient(90deg, rgba(13, 22, 43, .55) 0%, rgba(20, 31, 57, .3) 45%, rgba(23, 35, 62, .04) 100%),
    var(--bjlg-hero-photo, none) var(--bjo-hero-at, center) / cover no-repeat,
    #17233e;
}

@media (max-width: 991px) {
  .bjlg.bjo .bjlg-hero--photo {
    background:
      linear-gradient(180deg, rgba(13, 22, 43, .42) 0%, rgba(20, 31, 57, .3) 100%),
      var(--bjlg-hero-photo, none) var(--bjo-hero-at, center) / cover no-repeat,
      #17233e;
  }

  /* the cards: photo beside the words */
  .bjo-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bjo-card {
    display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 14px; align-items: start;
    padding: 12px; border-radius: 14px;
  }
  .bjo-card:hover { transform: none; }
  .bjo-card__media { grid-column: 1; grid-row: 1 / span 4; aspect-ratio: 1; border-radius: 10px; }
  .bjo-card__tag {
    left: 5px; top: 5px; max-width: calc(100% - 10px); padding: 3px 7px; font-size: 9.5px;
    white-space: normal; border-radius: 9px; line-height: 1.25;
  }
  .bjo .bjo-card__cat { grid-column: 2; grid-row: 1; margin: 0 0 3px; font-size: 11px; }
  .bjo .bjo-card h3 { grid-column: 2; grid-row: 2; margin: 0; font-size: 14px; line-height: 1.35; -webkit-line-clamp: 2; }
  .bjo .bjo-card__text { grid-column: 2; grid-row: 3; margin: 4px 0 0; font-size: 12px; line-height: 1.5; -webkit-line-clamp: 2; }
  /* the coupon under the words, beside the photo */
  .bjo-code { grid-column: 2; grid-row: 4; justify-self: start; margin: 8px 0 0; padding: 3px 8px; gap: 6px; }
  .bjo-code b { font-size: 11.5px; }
  /* a hairline, then how long it runs and the button */
  .bjo-card__foot {
    grid-column: 1 / -1; grid-row: 5; flex-wrap: nowrap;
    margin-top: 12px; padding: 10px 0 0; border-top: 1px solid var(--bjo-line);
  }
  .bjo-card__till {
    flex: 1 1 auto; min-width: 0; padding: 0; border-radius: 0; background: none;
    font-size: 11.5px; color: var(--bjo-body);
  }
  .bjo-card__till.is-soon { background: none; color: #c0392b; font-weight: 600; }
}

@media (min-width: 768px) and (max-width: 991px) {
  .bjo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* two to a row leaves the title ~180px: three lines, not a title cut short */
@media (min-width: 576px) and (max-width: 991px) {
  .bjo .bjo-card h3 { -webkit-line-clamp: 3; }
}

@media (max-width: 575px) {
  .bjo-grid { gap: 10px; }
  .bjo-card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; padding: 10px; }
  .bjo .bjo-card h3 { font-size: 13.5px; }
  .bjo .bjo-card__text { font-size: 11.5px; }
  .bjo-card__foot { margin-top: 10px; padding-top: 9px; }
  .bjo-card__till { font-size: 11px; }
  .bjlg.bjo .bjlg-hero__lead { font-size: 13px; line-height: 1.55; }
}