/* #336 /dokad/ „Dokąd polecę za X zł”. Site palette (navy, yellow, sand) and font (TL Plus Jakarta Sans), like /ferie/.
   Idea: the form is one sentence („Mam 500 zł na osobę, lecę z Krakowa w dowolnym terminie”), the results are
   boarding-pass cards with a yellow price tag. Side margins follow the shared header (#316). */
.dk-page { background: #fff; }
.dk, .dk * { box-sizing: border-box; }
.dk {
  --navy: #102e48; --navy-2: #1b4466; --ink: #17212b; --muted: #5a6b7d; --line: #e3e9ef;
  --sand: #fbf6ec; --sand-2: #f2e7d1; --sea: #0b7c8c; --blue: #0066cc;
  --yellow: #ffca32; --yellow-h: #ffbe0b; --r: 20px; --r-s: 12px;
  --gut: calc(max(0px, 50% - 640px) + clamp(16px, 3vw, 40px));
  --shadow: 0 1px 2px rgba(16, 46, 72, .06), 0 10px 28px rgba(16, 46, 72, .09);
  --shadow-lg: 0 2px 4px rgba(16, 46, 72, .06), 0 26px 64px rgba(16, 46, 72, .20);
  color: var(--ink); background: #fff;
  font-family: "TL Plus Jakarta Sans", "Open Sans", -apple-system, system-ui, sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.dk :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* Zero specificity: the site shell zeroes h1…p margins with body.tl-home-clean :is(…) (0,1,2), so text rules
   that need a margin start with #dk. */
:where(.dk) :where(h1, h2, h3, p, ol) { margin: 0; padding: 0; }
:where(.dk) button { font: inherit; cursor: pointer; }
.dk img { display: block; max-width: 100%; }
.dk .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- hero */
.dk-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: clamp(400px, 52vh, 540px); display: flex; align-items: flex-end;
  padding: 0 var(--gut) 132px;
}
#dk .dk-hero-photo, #dk .dk-hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.dk-hero-photo img { object-fit: cover; object-position: 50% 55%; transform: scale(1.05); animation: dk-drift 14s ease-out forwards; }
.dk-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 28, 46, .80) 0%, rgba(8, 28, 46, .50) 40%, rgba(8, 28, 46, 0) 74%),
    linear-gradient(0deg, rgba(8, 28, 46, .55) 0%, rgba(8, 28, 46, 0) 50%);
}
.dk-hero-inner { max-width: 640px; }
.dk-kicker span {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; margin-bottom: 18px;
  background: var(--yellow); color: var(--navy); border-radius: 999px; font-size: 13px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
}
.dk-kicker span::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: var(--navy);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dk-hero h1 {
  font-size: clamp(36px, 5.6vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.028em;
  text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
#dk-title-budget { color: var(--yellow); white-space: nowrap; }
#dk .dk-hero-lead { margin-top: 16px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; max-width: 32em; color: rgba(255, 255, 255, .92); text-wrap: pretty; }

/* ---------------------------------------------------------------- layout */
.dk-wrap { padding: 0 var(--gut) 80px; position: relative; }

/* ---------------------------------------------------------------- the sentence form */
.dk-form {
  position: relative; z-index: 2; margin-top: -92px; background: #fff; border-radius: 24px;
  box-shadow: var(--shadow-lg); padding: clamp(20px, 2.8vw, 34px) clamp(18px, 3vw, 38px);
  transition: opacity .2s;
}
.dk-form.is-loading { opacity: .72; }
#dk .dk-sentence {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  font-size: clamp(22px, 2.6vw, 34px); font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.25;
}
.dk-word { display: inline-flex; align-items: baseline; gap: 12px; min-width: 0; }
.dk-word-label { white-space: nowrap; }
.dk-word-label--free { font-weight: 800; }
.dk-money {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 0 4px 2px;
  border-bottom: 4px solid var(--yellow); transition: border-color .15s;
}
.dk-money:focus-within { border-color: var(--navy); }
#dk .dk-money input {
  width: 3.4ch; min-width: 0; border: 0; padding: 0; margin: 0; background: transparent; outline: none;
  font: inherit; font-size: 1.18em; color: var(--navy); letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.dk-money-cur { font-size: 1em; }
.dk-select { position: relative; display: inline-block; max-width: 100%; }
.dk-select::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -9px; pointer-events: none;
  border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(45deg);
}
#dk .dk-select select {
  appearance: none; -webkit-appearance: none; max-width: 100%; border: 0; border-bottom: 4px solid var(--yellow); border-radius: 0;
  background: transparent; padding: 0 30px 2px 4px; margin: 0; font: inherit; color: var(--navy); cursor: pointer;
  text-overflow: ellipsis; transition: border-color .15s;
}
#dk .dk-select select:hover, #dk .dk-select select:focus-visible { border-color: var(--navy); }
#dk .dk-select select:focus-visible { outline: none; }

.dk-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; padding-top: 20px; border-top: 1px dashed #d6dee7; }
.dk-type { display: inline-flex; padding: 4px; background: var(--sand); border-radius: 999px; flex: none; }
.dk-type label { position: relative; }
.dk-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dk-type span {
  display: block; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 800; color: var(--muted);
  transition: background .15s, color .15s; white-space: nowrap;
}
.dk-type input:checked + span { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(16, 46, 72, .25); }
.dk-type input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
#dk .dk-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 16px;
  border: 2px solid var(--line); background: #fff; border-radius: 999px; color: var(--navy);
  font-size: 15px; font-weight: 800; white-space: nowrap; transition: border-color .15s, background .15s, transform .15s;
}
#dk .dk-chip small {
  display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: var(--sand); color: var(--muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
#dk .dk-chip:hover { border-color: var(--navy); transform: translateY(-1px); }
#dk .dk-chip.is-on { background: var(--yellow); border-color: var(--yellow); }
#dk .dk-chip.is-on small { background: rgba(255, 255, 255, .6); color: var(--navy); }
#dk .dk-chip.is-solid { padding: 0 20px; background: var(--yellow); border-color: var(--yellow); }
#dk .dk-go { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--navy); font-weight: 800; }

/* ---------------------------------------------------------------- results */
.dk-results { margin-top: clamp(40px, 5vw, 64px); }
.dk-results:focus { outline: none; }
.dk-results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 24px; }
.dk-results-head h2 { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.15; font-weight: 800; color: var(--navy); letter-spacing: -.015em; text-wrap: balance; max-width: 26em; }
#dk .dk-results-sub { color: var(--muted); font-size: 15px; }

.dk-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: clamp(16px, 1.8vw, 24px); }
.dk-card { animation: dk-rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.dk-card article {
  position: relative; height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.dk-card article:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dk-ph { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--navy-2), var(--sea)); }
/* The shell sets body.tl-home-clean img { height: auto } (0,1,2): image sizes start with #dk. */
#dk .dk-ph img { width: 100%; height: 100%; object-fit: cover; }
.dk-ph-blank {
  position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .22);
  font-size: 72px; font-weight: 800; letter-spacing: .04em;
  background: radial-gradient(120% 90% at 85% 0%, rgba(255, 202, 50, .35), transparent 55%), linear-gradient(135deg, var(--navy) 0%, var(--sea) 100%);
}
/* The price tag hangs from the photo like a luggage tag. */
#dk .dk-price {
  position: absolute; left: 14px; bottom: -18px; z-index: 1; display: inline-flex; align-items: baseline; gap: 5px;
  padding: 8px 14px 8px 22px; background: var(--yellow); color: var(--navy); border-radius: 6px 12px 12px 6px;
  font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(16, 46, 72, .22); transform: rotate(-2deg);
}
#dk .dk-price::before { content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px rgba(16, 46, 72, .35); }
#dk .dk-price span { font-size: 13px; font-weight: 700; letter-spacing: 0; }
#dk .dk-price small { font-size: 13px; font-weight: 700; letter-spacing: 0; }
.dk-body { flex: 1; display: flex; flex-direction: column; padding: 30px 18px 18px; border-top: 2px dashed #e6ecf2; }
#dk .dk-country { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sea); }
#dk .dk-name { margin-top: 2px; font-size: 22px; line-height: 1.15; font-weight: 800; color: var(--navy); letter-spacing: -.015em; }
#dk .dk-when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.dk-nights { padding: 2px 9px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 13px; font-weight: 800; }
#dk .dk-route { margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
#dk .dk-hotel { margin-top: 8px; font-size: 14px; color: var(--ink); font-weight: 700; line-height: 1.35; }
.dk-stars { color: #e6a800; font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.dk-hotel-line { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; font-size: 13px; }
.dk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.dk a.dk-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 800; text-decoration: none; transition: background .15s;
}
/* The whole card opens the partner; „Inne terminy” stays clickable above it. */
.dk a.dk-cta::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.dk-card article:hover a.dk-cta { background: var(--navy-2); }
.dk a.dk-more { position: relative; z-index: 2; color: var(--blue); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dk a.dk-more:hover { color: var(--navy); }

.dk-more-wrap { display: flex; justify-content: center; margin-top: 32px; }
.dk-more-wrap[hidden], .dk-empty[hidden] { display: none; }
#dk .dk-more-btn {
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy);
  font-size: 16px; font-weight: 800; transition: background .15s, color .15s;
}
#dk .dk-more-btn:hover { background: var(--navy); color: #fff; }
.dk-empty {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  padding: 24px 26px; border-radius: var(--r); background: var(--sand); color: var(--ink); font-size: 17px;
}
.dk-empty a { color: var(--blue); font-weight: 700; }
.dk-empty strong { color: var(--navy); }
#dk .dk-note { margin-top: 28px; font-size: 13px; color: var(--muted); max-width: 52em; }
#dk .dk-note--photo { margin-top: 6px; font-size: 12px; }

/* ---------------------------------------------------------------- map teaser */
.dk-map {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  margin-top: clamp(48px, 6vw, 72px); padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 40px); border-radius: 24px;
  color: #fff; background:
    radial-gradient(90% 140% at 100% 0%, rgba(255, 202, 50, .28), transparent 50%),
    radial-gradient(60% 120% at 0% 100%, rgba(11, 124, 140, .55), transparent 60%), var(--navy);
}
.dk-map h2 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
#dk .dk-map p { margin-top: 6px; color: rgba(255, 255, 255, .85); font-size: 15px; }
.dk a.dk-map-link {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 26px; border-radius: 999px; background: var(--yellow);
  color: var(--navy); font-weight: 800; text-decoration: none; white-space: nowrap; transition: background .15s;
}
.dk a.dk-map-link:hover { background: var(--yellow-h); }
.dk-map-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.dk a.dk-map-alt { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.dk a.dk-map-alt:hover { color: var(--yellow); }

/* ---------------------------------------------------------------- motion (movement only: no opacity, content stays visible) */
@keyframes dk-drift { to { transform: scale(1); } }
@keyframes dk-rise { from { transform: translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .dk-hero-photo img, .dk-card { animation: none; }
  .dk-card article, #dk .dk-chip { transition: none; }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 759px) {
  .dk-hero { min-height: 0; padding-top: 120px; padding-bottom: 104px; }
  .dk-hero::before { background: linear-gradient(0deg, rgba(8, 28, 46, .86) 0%, rgba(8, 28, 46, .45) 55%, rgba(8, 28, 46, .15) 100%); }
  .dk-form { margin-top: -72px; border-radius: 20px; }
  #dk .dk-sentence { font-size: 23px; gap: 4px 10px; }
  .dk-form-row { gap: 14px; }
  .dk-type { width: 100%; }
  .dk-type label { flex: 1; }
  .dk-type span { text-align: center; padding: 10px 8px; }
  /* Chips scroll sideways inside the card instead of wrapping into four rows. */
  .dk-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; width: calc(100% + 36px); scroll-snap-type: x proximity; }
  .dk-chips::-webkit-scrollbar { display: none; }
  #dk .dk-chip { scroll-snap-align: start; }
  .dk-results-head { margin-bottom: 18px; }
  /* Compact cards: photo on the left, so a phone screen shows three or four places at once. */
  .dk-grid { gap: 14px; }
  .dk-card article { display: grid; grid-template-columns: 116px minmax(0, 1fr); border-radius: 16px; }
  /* The photo is too narrow for the tag: on a phone the tag sits in the card's bottom row, left of the button. */
  .dk-ph { position: static; aspect-ratio: auto; min-height: 148px; }
  #dk .dk-ph img { position: absolute; top: 0; left: 0; width: 116px; height: 100%; }
  .dk-ph-blank { right: auto; width: 116px; font-size: 30px; }
  #dk .dk-price { left: 130px; bottom: 16px; transform: none; font-size: 17px; padding: 7px 10px 7px 19px; }
  #dk .dk-price span, #dk .dk-price small { font-size: 11px; }
  .dk-body { padding: 12px 14px 14px; border-top: 0; border-left: 2px dashed #e6ecf2; }
  #dk .dk-name { font-size: 19px; }
  #dk .dk-when { font-size: 14px; margin-top: 6px; }
  .dk-actions { justify-content: flex-end; padding-top: 12px; min-height: 52px; }
  .dk a.dk-more { display: none; }
  /* The whole card is the link; the button shrinks to an arrow so the price tag keeps the row. */
  .dk a.dk-cta { position: static; width: 44px; height: 44px; min-height: 0; padding: 0; font-size: 0; flex: none; }
  .dk a.dk-cta::before {
    content: ""; width: 18px; height: 18px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .dk a.dk-cta::after { border-radius: 16px; }
  .dk-map { border-radius: 20px; }
}
@media (max-width: 380px) {
  .dk-card article { grid-template-columns: 96px minmax(0, 1fr); }
  #dk .dk-ph img, .dk-ph-blank { width: 96px; }
  #dk .dk-price { left: 110px; font-size: 16px; padding: 6px 9px 6px 18px; }
  #dk .dk-sentence { font-size: 21px; }
}
