/* ============================================
   ДАЛИ ВИДАЛИ — Components
   ============================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg-alt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
button { font-family: inherit; cursor: pointer; }

/* ——— Typography ——— */
.t-display { font-family: var(--font-head); font-style: italic; font-weight: 500; line-height: 1; letter-spacing: -.025em; }
.t-script  { font-family: var(--font-head); font-style: italic; font-weight: 500; letter-spacing: -.02em; }
.t-h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(40px, 5vw, 64px); line-height: var(--lh-tight); letter-spacing: -.02em; margin: 0; }
.t-h2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(32px, 3.4vw, 44px); line-height: var(--lh-snug); letter-spacing: -.015em; margin: 0; }
.t-h3 { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-28); line-height: var(--lh-snug); margin: 0; }
.t-h4 { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-20); line-height: var(--lh-snug); margin: 0; }
.t-eyebrow { font: 600 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.t-mono { font-family: var(--font-mono); font-size: 12px; }
.t-muted { color: var(--text-muted); }
.t-dim { color: var(--text-dim); }

/* ——— Layout helpers ——— */
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.container-tight { max-width: var(--container-tight); margin: 0 auto; padding-inline: var(--gutter); }
.row { display: flex; gap: var(--s-4); }
.col { display: flex; flex-direction: column; gap: var(--s-4); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.center { display: flex; align-items: center; justify-content: center; }
.stack-2 { display: flex; flex-direction: column; gap: var(--s-2); }
.stack-3 { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-4 { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-6 { display: flex; flex-direction: column; gap: var(--s-6); }
.stack-8 { display: flex; flex-direction: column; gap: var(--s-8); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: 600 15px/1 var(--font-body); letter-spacing: -.005em;
  background: var(--n-100); color: var(--text);
  transition: transform var(--d-1) var(--ease), background var(--d-2), box-shadow var(--d-2), color var(--d-2);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 18px; height: 18px; }

.btn-primary    { background: var(--dv-sea); color: #fff; box-shadow: var(--sh-glow-sea); }
.btn-primary:hover { background: var(--dv-sea-deep); color: #fff; }
.btn-sun        { background: var(--dv-sun); color: var(--dv-night); box-shadow: var(--sh-glow-sun); }
.btn-sun:hover  { background: var(--dv-sun-deep); color: var(--dv-night); }
.btn-night      { background: var(--dv-night); color: #fff; }
.btn-night:hover{ background: var(--dv-night-ink); color: #fff; }
.btn-outline    { background: transparent; color: var(--dv-night); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--dv-night); }
.btn-ghost      { background: transparent; color: var(--accent); }
.btn-ghost:hover{ background: var(--accent-soft); color: var(--accent-deep); }
.btn-on-dark    { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.btn-on-dark:hover{ background: rgba(255,255,255,.22); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn-xl { height: 64px; padding: 0 32px; font-size: 17px; }

.btn-icon { width: 44px; padding: 0; aspect-ratio: 1; }
.btn-icon.btn-sm { width: 36px; height: 36px; }
.btn-icon.btn-lg { width: 56px; height: 56px; }

/* Link button */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.link-arrow:hover { gap: 12px; }

/* ============================================
   BADGES & CHIPS
   ============================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-pill);
  font: 600 12px/1 var(--font-body);
  background: var(--n-100); color: var(--n-700);
}
.badge-sun     { background: #FFF1C7; color: #7A5800; }
.badge-leaf    { background: #E6F4D9; color: #2F6B1A; }
.badge-sea     { background: #E2EEFB; color: var(--dv-sea-deep); }
.badge-sky     { background: var(--dv-sky-soft); color: var(--dv-sea-deep); }
.badge-night   { background: var(--dv-night); color: #fff; }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-fire    { background: linear-gradient(90deg,#FF6A3D,#E5A600); color: #fff; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--border);
  font: 500 14px/1 var(--font-body); color: var(--text);
  cursor: pointer; transition: all var(--d-1) var(--ease);
}
.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed="true"], .chip.active {
  background: var(--dv-night); color: #fff; border-color: var(--dv-night);
}
.chip-soft { background: var(--n-100); border-color: transparent; }
.chip-x { width: 16px; height: 16px; opacity: .55; }

/* ============================================
   FORM CONTROLS
   ============================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font: 600 12px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--n-600);
}
.field-help { font-size: 12px; color: var(--text-muted); }
.field-error { font-size: 12px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  background: #fff; color: var(--text);
  font: 400 15px/1 var(--font-body);
  transition: border-color var(--d-1), box-shadow var(--d-1), background var(--d-1);
}
.textarea { height: auto; min-height: 120px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(27,95,174,.15);
}
.input::placeholder { color: var(--text-dim); }

.input-group {
  position: relative; display: flex; align-items: center;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--r-md);
  transition: border-color var(--d-1);
}
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(27,95,174,.15); }
.input-group .input { border: none; background: transparent; box-shadow: none !important; }
.input-group:focus-within .input { border: none; }
.input-group .lead, .input-group .trail { display:flex; align-items:center; justify-content:center; padding: 0 14px; color: var(--text-muted); }
.input-group .lead + .input { padding-left: 0; }

.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px;
}
.checkbox input, .radio input { display: none; }
.checkbox .box, .radio .box {
  width: 22px; height: 22px; border: 1.5px solid var(--border-strong);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--d-1);
}
.checkbox .box { border-radius: 6px; }
.radio .box { border-radius: 50%; }
.checkbox input:checked + .box {
  background: var(--accent); border-color: var(--accent);
}
.checkbox input:checked + .box::after {
  content: ""; width: 12px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px,-1px);
}
.radio input:checked + .box {
  border-color: var(--accent);
}
.radio input:checked + .box::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}

.switch { position: relative; width: 48px; height: 28px; background: var(--n-300); border-radius: var(--r-pill); cursor: pointer; transition: background var(--d-2); }
.switch::after { content:""; position:absolute; top:2px; left:2px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow: var(--sh-1); transition: transform var(--d-2) var(--ease); }
.switch.on { background: var(--dv-leaf-deep); }
.switch.on::after { transform: translateX(20px); }

.range { width: 100%; -webkit-appearance:none; appearance:none; height: 6px; background: var(--n-200); border-radius: var(--r-pill); outline:none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width:22px; height:22px; border-radius:50%; background: var(--dv-sea); border: 3px solid #fff; box-shadow: var(--sh-2); cursor:pointer; }

/* Stepper (passengers) */
.stepper { display:inline-flex; align-items:center; gap: 0; border:1.5px solid var(--border); border-radius: var(--r-pill); padding:4px; background:#fff; }
.stepper button { width:32px; height:32px; border-radius:50%; border:none; background: var(--n-100); color: var(--text); font-size:18px; line-height:1; }
.stepper button:hover { background: var(--n-200); }
.stepper .val { min-width: 36px; text-align:center; font-weight: 700; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); border: 1px solid var(--border);
  overflow: hidden; transition: transform var(--d-2) var(--ease), box-shadow var(--d-2);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.card-pad { padding: var(--s-5); }

/* Tour card */
.tour-card { display:flex; flex-direction:column; }
.tour-card .media {
  position: relative; aspect-ratio: 16/11; background: var(--n-200) center/cover;
}
.tour-card .media .badges { position:absolute; top:14px; left:14px; display:flex; gap:6px; flex-wrap:wrap; }
.tour-card .media .fav { position:absolute; top:14px; right:14px; width:36px; height:36px; border-radius:50%; background: rgba(255,255,255,.92); border:none; display:flex; align-items:center; justify-content:center; }
.tour-card .body { padding: 18px 20px 20px; display:flex; flex-direction:column; gap: 10px; flex:1; }
.tour-card .title { font: 600 18px/1.25 var(--font-head); color: var(--text); }
.tour-card .meta { display:flex; flex-wrap:wrap; gap: 14px; color: var(--text-muted); font-size: 13px; }
.tour-card .price-row { display:flex; align-items:flex-end; justify-content:space-between; padding-top: 8px; border-top: 1px dashed var(--border); margin-top: 4px; }
.tour-card .price { font: 700 22px/1 var(--font-head); color: var(--text); }
.tour-card .price small { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Hot tour card (gradient) */
.hot-card {
  position: relative; color: #fff; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #FF6A3D 0%, #E5A600 60%, #FFC72C 100%);
  padding: 22px; overflow: hidden;
}
.hot-card::after {
  content:""; position: absolute; inset: -40px -40px auto auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 65%);
}
.hot-card .label { font: 700 11px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; opacity:.9; }
.hot-card .title { font: 700 22px/1.2 var(--font-head); margin-top: 6px; }
.hot-card .meta { margin-top: 10px; opacity:.85; font-size: 14px; }
.hot-card .row-bottom { display:flex; align-items:center; justify-content:space-between; margin-top: 18px; position:relative; z-index:2; }
.hot-card .price { font: 800 24px/1 var(--font-head); }
.hot-card .price s { opacity: .55; font-weight: 500; font-size: 14px; margin-right: 8px; }

/* Flight card (horizontal) */
.flight-card { display:grid; grid-template-columns: 1fr auto; gap: 0; align-items:center; padding: 18px 20px; }
.flight-card .route { display:grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items:center; }
.flight-card .leg { display:flex; flex-direction:column; gap:4px; }
.flight-card .leg .time { font: 700 24px/1 var(--font-head); }
.flight-card .leg .city { font-size: 13px; color: var(--text-muted); }
.flight-card .duration { display:flex; flex-direction:column; align-items:center; gap:4px; min-width: 140px; color: var(--text-muted); font-size:12px; }
.flight-card .duration .line { position:relative; height:2px; width:100%; background: var(--border); }
.flight-card .duration .line::before, .flight-card .duration .line::after { content:""; position:absolute; top:-3px; width:8px; height:8px; border-radius:50%; background: var(--accent); }
.flight-card .duration .line::before { left:0; }
.flight-card .duration .line::after { right:0; }
.flight-card .price-block { text-align:right; padding-left: 24px; border-left: 1px dashed var(--border); }
.flight-card .price { font: 800 22px/1 var(--font-head); }
.flight-card .price small { display:block; font-size:12px; color: var(--text-muted); margin-top:4px; font-weight:500; }

/* Car card */
.car-card .media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--n-100), var(--n-50)); display:flex; align-items:center; justify-content:center; padding: 14px; }
.car-card .media img { max-height: 100%; object-fit: contain; }
.car-card .specs { display:grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 8px 0; font-size: 13px; color: var(--text-muted); }
.car-card .specs span { display:inline-flex; align-items:center; gap:6px; }

/* Excursion card (compact) */
.exc-card { display:grid; grid-template-columns: 140px 1fr; gap: 0; min-height: 140px; }
.exc-card .media { background: var(--n-200) center/cover; }
.exc-card .body { padding: 14px 16px; display:flex; flex-direction:column; gap:6px; }
.exc-card .title { font: 600 16px/1.3 var(--font-head); }
.exc-card .meta { font-size: 12px; color: var(--text-muted); display:flex; flex-wrap:wrap; gap: 10px; }
.exc-card .foot { margin-top: auto; display:flex; justify-content:space-between; align-items:flex-end; }
.exc-card .price { font: 700 18px/1 var(--font-head); }

/* Promo card (uses pattern) */
.promo-card { color:#fff; padding: 28px; border-radius: var(--r-xl); position:relative; overflow:hidden; min-height: 220px; display:flex; flex-direction:column; justify-content:flex-end; }
.promo-card::before { content:""; position:absolute; inset:0; background-image: url('../assets/pattern.svg'); background-size: cover; background-position: center; }
.promo-card::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(14,44,92,.15), rgba(14,44,92,.7)); }
.promo-card > * { position:relative; z-index:1; }

/* ============================================
   TABS / SEGMENTED
   ============================================ */
.tabs {
  display: inline-flex; padding: 6px; gap: 4px;
  background: var(--n-100); border-radius: var(--r-pill);
}
.tabs button {
  border: none; background: transparent; color: var(--text-muted);
  height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  font: 600 14px/1 var(--font-body);
  display:inline-flex; align-items:center; gap:8px;
  transition: all var(--d-1) var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"], .tabs button.active {
  background: var(--dv-night); color: #fff;
}
.tabs.tabs-on-dark { background: rgba(255,255,255,.1); }
.tabs.tabs-on-dark button { color: rgba(255,255,255,.7); }
.tabs.tabs-on-dark button.active { background: #fff; color: var(--dv-night); }

.tabs-line { display:flex; gap: 28px; border-bottom: 1px solid var(--border); }
.tabs-line button { background:none; border:none; padding: 14px 0; font: 600 15px/1 var(--font-body); color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom:-1px; cursor:pointer; }
.tabs-line button.active { color: var(--text); border-color: var(--dv-sea); }

/* ============================================
   UNIVERSAL SEARCH BAR
   ============================================ */
.search-bar { background: #fff; border-radius: 28px; box-shadow: var(--sh-4); padding: 10px; }
.search-bar .seg { display:grid; grid-template-columns: repeat(4, 1fr); gap: 0; align-items:stretch; }
.search-bar .cell { padding: 10px 18px; border-right: 1px solid var(--border); display:flex; flex-direction:column; gap:2px; min-width: 0; }
.search-bar .cell:last-of-type { border-right: none; }
.search-bar .cell label { font: 600 11px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--n-500); }
.search-bar .cell .val { font: 600 16px/1.3 var(--font-body); color: var(--text); border:none; background:none; outline:none; padding:0; min-width:0; }
.search-bar .cell .sub { font-size: 12px; color: var(--text-muted); }
.search-bar .go { display:flex; align-items:center; }

/* ============================================
   STAR RATING
   ============================================ */
.stars { display:inline-flex; gap: 2px; color: var(--dv-sun-deep); }
.stars .s { width: 14px; height: 14px; }

/* ============================================
   STAT
   ============================================ */
.stat { display:flex; flex-direction:column; gap: 6px; }
.stat .num { font: 800 48px/1 var(--font-head); letter-spacing: -.02em; color: var(--text); }
.stat .num em { font-family: var(--font-display); font-style: normal; color: var(--dv-sea); font-weight: 600; }
.stat .lbl { color: var(--text-muted); font-size: 14px; max-width: 18ch; }

/* ============================================
   BREADCRUMBS / PAGINATION
   ============================================ */
.breadcrumbs { display:flex; align-items:center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { opacity: .5; }

.pagination { display:inline-flex; gap: 6px; }
.pagination button { width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--border); background:#fff; font: 600 14px/1 var(--font-body); color: var(--text); }
.pagination button.active { background: var(--dv-night); color:#fff; border-color: var(--dv-night); }
.pagination button:disabled { opacity: .4; }

/* ============================================
   STEPPER (multi-step form)
   ============================================ */
.steps { display:flex; align-items:center; gap: 0; }
.steps .step { display:flex; align-items:center; gap: 12px; flex:1; }
.steps .step:last-child { flex: 0; }
.steps .dot { width: 36px; height: 36px; border-radius:50%; border: 2px solid var(--border); background:#fff; display:flex; align-items:center; justify-content:center; font: 700 14px/1 var(--font-body); color: var(--text-muted); flex: 0 0 auto; }
.steps .step .lbl { font: 600 14px/1.2 var(--font-body); color: var(--text-muted); }
.steps .line { flex:1; height: 2px; background: var(--border); margin: 0 12px; border-radius:2px; }
.steps .step.done .dot { background: var(--dv-leaf-deep); border-color: var(--dv-leaf-deep); color:#fff; }
.steps .step.active .dot { background: var(--dv-sea); border-color: var(--dv-sea); color:#fff; }
.steps .step.active .lbl, .steps .step.done .lbl { color: var(--text); }

/* ============================================
   DECORATIVE PATTERN BG
   ============================================ */
.bg-pattern { background-image: url('../assets/pattern.svg'); background-size: cover; background-position: center; color:#fff; }
.bg-night { background: var(--dv-night); color:#fff; }
.bg-night-deep { background: var(--dv-night-ink); color:#fff; }
.bg-sea-grad { background: linear-gradient(135deg, var(--dv-sea-deep) 0%, var(--dv-sea) 60%, var(--dv-sky) 100%); color:#fff; }
.bg-soft { background: var(--n-50); }

/* utility */
.divider { height:1px; background: var(--border); }
.kbd { font-family: var(--font-mono); font-size: 12px; background: var(--n-100); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
