/* ChesTour — стили главной страницы и мастера подбора */
:root {
  --ct-blue: #0B6BCB;
  --ct-blue-strong: #1D4ED8;
  --ct-sun: #FFC533;
  --ct-ink: #111827;
  --ct-muted: #4B5563;
  --ct-ground: #F4F6FA;
  --ct-card: #FFFFFF;
  --ct-line: #D5DBE7;
  --ct-tint: #EEF3FE;
  --ct-tint-ink: #1E3A8A;
  --ct-good-bg: #DCFCE7;
  --ct-good-ink: #14532D;
  --ct-radius: 20px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ct-ground);
  color: var(--ct-ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
}
a { color: inherit; }
button, input, select { font: inherit; }
.ct-container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.ct-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Баннер (hero) ---------- */
.ct-hero { position: relative; overflow: hidden; padding-bottom: 120px; }
.ct-hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right bottom; pointer-events: none; }
.ct-hero__inner { position: relative; display: flex; flex-direction: column; gap: 28px; }
.ct-hero__text { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.ct-hero__title { margin: 0; font-size: 48px; line-height: 1.1; font-weight: 800; }
.ct-hero__bar { width: 96px; height: 6px; border-radius: 3px; background: var(--ct-sun); }
.ct-hero__lead { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 500; }

/* Фон 3 (основной): светлый с маршрутом */
.ct-hero--route { background: #E3EEFD; color: var(--ct-ink); }
/* Фон 1 (резерв): чистый цвет */
.ct-hero--solid { background: var(--ct-blue); color: #FFFFFF; }

/* Компактный баннер для мастера по шагам */
.ct-hero--compact { padding-bottom: 150px; }
.ct-hero--compact .ct-hero__title { font-size: 34px; line-height: 1.15; }

/* ---------- Шапка ---------- */
.ct-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.ct-header__logo img { display: block; height: 40px; width: auto; }
.ct-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.ct-nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ct-nav a:hover { text-decoration: underline; }
.ct-nav__login { padding: 0 20px; border-radius: 22px; background: var(--ct-ink); color: #FFFFFF; }
.ct-hero--solid .ct-nav__login { background: #FFFFFF; color: var(--ct-ink); }

/* ---------- Основная колонка ---------- */
.ct-main { position: relative; margin-top: -84px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.ct-main--wizard { margin-top: -114px; }
.ct-card { background: var(--ct-card); border-radius: var(--ct-radius); padding: 28px; }
.ct-card--raised { box-shadow: 0 8px 32px rgba(17, 24, 39, 0.08); }

/* ---------- Форма поиска ---------- */
.ct-search { display: flex; flex-direction: column; gap: 20px; }
.ct-search__pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.ct-label { font-size: 13px; font-weight: 700; color: var(--ct-muted); }
.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.ct-picker { position: relative; }
.ct-picker__box {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 60px; padding: 8px;
  background: var(--ct-ground); border: 1px solid var(--ct-line); border-radius: 14px;
}
.ct-tag, .ct-picker__add {
  height: 44px; padding: 0 14px; border-radius: 22px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.ct-tag { background: var(--ct-blue-strong); color: #FFFFFF; border: none; }
.ct-tag:hover { background: #1740B5; }
.ct-picker__add { background: #FFFFFF; color: var(--ct-blue-strong); border: 1px dashed var(--ct-blue-strong); }
.ct-picker__menu {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); max-height: 280px; overflow: auto;
  margin: 0; padding: 8px; list-style: none; background: #FFFFFF; border: 1px solid var(--ct-line);
  border-radius: 14px; box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
}
.ct-picker__menu[hidden] { display: none; }
.ct-picker__option {
  width: 100%; min-height: 44px; padding: 0 12px; text-align: left; background: none; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ct-ink);
}
.ct-picker__option:hover, .ct-picker__option:focus { background: var(--ct-tint); outline: none; }
.ct-picker__empty { padding: 12px; font-size: 14px; color: var(--ct-muted); }

.ct-search__params { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ct-input, .ct-select {
  width: 100%; height: 48px; padding: 0 12px; background: var(--ct-ground); border: 1px solid var(--ct-line);
  border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ct-ink);
}
.ct-input:focus, .ct-select:focus, .ct-btn:focus-visible, .ct-tag:focus-visible, .ct-picker__add:focus-visible {
  outline: 3px solid #93B4F5; outline-offset: 2px;
}
.ct-search__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ct-directions { margin-right: auto; padding: 10px 14px; border-radius: 12px; background: var(--ct-tint); color: var(--ct-tint-ink); font-size: 15px; font-weight: 700; }
.ct-directions--over { background: #FEE2E2; color: #7F1D1D; }

.ct-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px;
  border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; border: 1px solid transparent;
}
.ct-btn--primary { background: var(--ct-blue-strong); color: #FFFFFF; }
.ct-btn--primary:hover { background: #1740B5; }
.ct-btn--ghost { background: #FFFFFF; color: var(--ct-blue-strong); border-color: var(--ct-blue-strong); }
.ct-btn--plain { background: #FFFFFF; color: var(--ct-ink); border-color: var(--ct-line); }
.ct-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Жёлтая лента ---------- */
.ct-promise {
  background: var(--ct-sun); color: var(--ct-ink); border-radius: 16px; padding: 18px 24px;
  display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: 16px; font-weight: 700; margin: 0; list-style: none;
}

/* ---------- Таблица минимальных цен ---------- */
.ct-section { display: flex; flex-direction: column; gap: 12px; }
.ct-section__title { margin: 0; font-size: 22px; font-weight: 800; }
.ct-section__hint { margin: 0; font-size: 15px; color: var(--ct-muted); }
.ct-matrix-wrap { background: var(--ct-card); border-radius: 16px; overflow-x: auto; }
.ct-matrix { width: 100%; min-width: 640px; border-collapse: collapse; }
.ct-matrix th, .ct-matrix td { padding: 10px 20px; text-align: left; border-bottom: 1px solid #E5E9F2; }
.ct-matrix tbody tr:last-child th, .ct-matrix tbody tr:last-child td { border-bottom: none; }
.ct-matrix thead th { padding: 16px 20px; font-size: 15px; font-weight: 800; }
.ct-matrix thead th:first-child { font-size: 13px; color: var(--ct-muted); font-weight: 700; }
.ct-matrix tbody th { font-weight: 800; }
.ct-price {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
  background: var(--ct-ground); font-weight: 700; text-decoration: none;
}
.ct-price:hover { background: var(--ct-tint); }
.ct-price--best { background: var(--ct-good-bg); color: var(--ct-good-ink); font-weight: 800; }
.ct-matrix__none { color: var(--ct-muted); }

/* ---------- Карточка тура ---------- */
.ct-tour {
  background: var(--ct-card); border-radius: 16px; padding: 16px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.ct-tour__info { display: flex; flex-direction: column; gap: 4px; }
.ct-tour__name { font-size: 16px; font-weight: 700; }
.ct-tour__meta { font-size: 14px; color: var(--ct-muted); }
.ct-tour__buy { display: flex; align-items: center; gap: 14px; }
.ct-tour__price { font-size: 20px; font-weight: 800; }

/* ---------- Мастер по шагам ---------- */
.ct-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 700; }
.ct-steps a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px;
  background: #FFFFFF; color: var(--ct-muted); text-decoration: none;
}
.ct-steps .is-done a { background: var(--ct-good-bg); color: var(--ct-good-ink); }
.ct-steps .is-current a { background: var(--ct-sun); color: var(--ct-ink); }
.ct-wizard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.ct-wizard__step { display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 24px; }
.ct-wizard__title { margin: 0; font-size: 36px; font-weight: 800; }
.ct-wizard__lead { margin: 8px 0 0; color: var(--ct-muted); }
.ct-tiles { margin: 0; padding: 0; border: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.ct-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px;
  border: 2px solid var(--ct-line); background: #FFFFFF; cursor: pointer;
}
.ct-tile img { width: 100%; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.ct-tile__name { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.ct-tile input { width: 20px; height: 20px; accent-color: var(--ct-blue-strong); }
.ct-tile:has(input:checked) { border-color: var(--ct-blue-strong); background: var(--ct-tint); }
.ct-wizard__nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.ct-summary { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 24px; }
.ct-summary__title { margin: 0; font-size: 18px; font-weight: 800; }
.ct-summary__group { display: flex; flex-direction: column; gap: 6px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
.ct-chips li { background: var(--ct-tint); color: var(--ct-tint-ink); border-radius: 14px; padding: 6px 12px; }
.ct-summary__rest { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ct-muted); }

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
  .ct-container { padding: 0 16px; }
  .ct-hero__title { font-size: 34px; }
  .ct-hero--compact .ct-hero__title { font-size: 26px; }
  .ct-hero__art { opacity: 0.35; }
  .ct-nav { gap: 16px; }
  .ct-card { padding: 20px; }
  .ct-search__pickers { grid-template-columns: 1fr; }
  .ct-wizard { grid-template-columns: 1fr; }
  .ct-wizard__step { padding: 20px; }
  .ct-wizard__title { font-size: 28px; }
  .ct-search__footer .ct-btn { flex: 1 1 100%; }
}

/* Дополнения при интеграции Laravel */
.ct-notice { border: 1px solid var(--ct-line); }
.ct-notice p { margin: 12px 0 0; }
.ct-alert { background: #FFF1F2; border: 1px solid #FECDD3; }
.ct-alert ul { margin: 8px 0 0; padding-left: 20px; }
.ct-summary .ct-btn { height: auto; min-height: 48px; text-align: center; }
.ct-info-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ct-tour__info, .ct-summary { min-width: 0; }
@media (max-width: 380px) {
  .ct-search__params { grid-template-columns: minmax(0, 1fr); }
  .ct-btn { height: auto; min-height: 48px; text-align: center; padding: 10px 16px; }
  .ct-directions { max-width: 100%; overflow-wrap: anywhere; }
}
.ct-birthdays { grid-column: 1 / -1; border: 1px solid var(--ct-line); border-radius: 12px; padding: 16px; margin: 0; min-width: 0; }
.ct-birthdays .ct-search__params { margin-top: 12px; }
.ct-birthdays[hidden] { display: none; }
.ct-result-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.ct-result-filters .ct-field { flex: 1 1 160px; }
.ct-tour__buy { flex-direction: column; align-items: flex-end; }
.ct-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.ct-tour__info { overflow-wrap: anywhere; max-width: 100%; }
/* Date and duration controls */
.ct-range-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; grid-column: span 2; min-width: 0; }
.ct-range-fields .ct-input { min-width: 0; }
.ct-field-error, .ct-required { color: #b42318; font-size: 13px; }
.ct-input[aria-invalid="true"] { border-color: #d92d20; background: #fff6f5; }
.ct-input[data-date-picker] { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23505e78' stroke-width='1.6'%3E%3Crect x='2' y='4' width='14' height='12' rx='2'/%3E%3Cpath d='M2 8h14M6 2v4M12 2v4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.air-datepicker { --adp-font-family: Manrope,system-ui,sans-serif; --adp-border-radius: 16px; --adp-cell-border-radius: 9px; --adp-accent-color: #1d4ed8; --adp-cell-background-color-selected: #1d4ed8; --adp-cell-background-color-selected-other-month: #3f65df; --adp-cell-background-color-selected-hover: #1740b5; --adp-cell-background-color-hover: #eef3fe; --adp-width: 292px; --adp-cell-height: 38px; box-shadow: 0 16px 48px rgba(17,24,39,.16); }
.air-datepicker.-is-mobile- { --adp-width: min(340px,calc(100vw - 24px)); --adp-cell-height: 42px; }
@media(max-width:760px) { .ct-range-fields { grid-column: 1 / -1; } }
