:root {
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #f26522;
  --accent-dark: #d95518;
  --shell-radius: 28px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  --font: "Montserrat", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  background: #8b9aa8;
}

/* Размытый фон за «карточкой» сайта */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80");
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.85);
  transform: scale(1.05);
}

.page-home .page-bg,
.page-tour .page-bg {
  background-image: var(--page-bg-img, url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80"));
}

/* Белый контейнер с скруглением */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 1.5rem auto 2rem;
  background: var(--white);
  border-radius: var(--shell-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ——— Шапка ——— */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  justify-self: start;
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #ff8a4c);
  box-shadow: 0 4px 12px rgba(242, 101, 34, 0.35);
}

.logo__text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo__text span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.75rem;
  justify-self: center;
}

.nav__link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.35rem;
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--text);
}

.nav__link--active {
  color: var(--text);
}

.nav__link--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
}

.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.topbar__phone-icon {
  width: 18px;
  height: 18px;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.7 3.5.7.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.3 2.4.7 3.5.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.7 3.5.7.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.3 2.4.7 3.5.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.shell__main {
  min-height: 400px;
}

.shell__footer {
  padding: 1.25rem 2rem 1.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.shell__footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 420px;
  background-image: var(--hero-img, linear-gradient(135deg, #5a6d7a, #8fa9b8));
  background-size: cover;
  background-position: center 40%;
  overflow: hidden;
}

.hero__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
  background-image: url("data:image/svg+xml,%3Csvg width='800' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M80 280 Q 200 180 320 240 T 560 200 T 720 260' fill='none' stroke='%23f26522' stroke-width='2' stroke-dasharray='6 10'/%3E%3Ccircle cx='80' cy='280' r='6' fill='%23f26522'/%3E%3Ccircle cx='320' cy='240' r='6' fill='%23f26522'/%3E%3Ccircle cx='560' cy='200' r='6' fill='%23f26522'/%3E%3Ccircle cx='720' cy='260' r='6' fill='%23f26522'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 15% 55%;
  background-size: 70% auto;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem 5rem;
  max-width: 620px;
}

.hero__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero__title--sm {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.hero__meta {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 420px;
}

.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.85) 55%, var(--white) 100%);
  pointer-events: none;
}

/* ——— Секция каталога ——— */
.intro {
  padding: 0 2rem 1.5rem;
  margin-top: -2rem;
  position: relative;
  z-index: 3;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.intro__text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
}

.rating-updated {
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: #fff4ee;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

/* ——— Каталог: рейтинг слева ——— */
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 0 2rem 2rem;
}

.catalog-main {
  min-width: 0;
}

.catalog-main .destinations {
  padding: 0 0 2rem;
}

.catalog-main .pager {
  padding: 0 0 2.5rem;
}

.rating-sidebar {
  position: sticky;
  top: 1rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  padding: 1.15rem 1rem 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.rating-sidebar__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.rating-sidebar__note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  line-height: 1.4;
}

.rating-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rating-sidebar__item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rating-sidebar__item:last-child {
  border-bottom: none;
}

.rating-sidebar__rank {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--white);
  background: var(--accent);
  border-radius: 50%;
}

.rating-sidebar__item:nth-child(1) .rating-sidebar__rank {
  background: #f5b301;
  color: #1a1a1a;
}

.rating-sidebar__item:nth-child(2) .rating-sidebar__rank {
  background: #b0bec5;
  color: #1a1a1a;
}

.rating-sidebar__item:nth-child(3) .rating-sidebar__rank {
  background: #cd7f32;
}

.rating-sidebar__body {
  min-width: 0;
  flex: 1;
}

.rating-sidebar__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.rating-sidebar__name:hover {
  color: var(--accent);
}

.rating-sidebar__stars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.05rem;
}

.rating-sidebar__star {
  font-size: 0.82rem;
  line-height: 1;
  color: rgba(0, 0, 0, 0.15);
}

.rating-sidebar__star--on {
  color: #f5b301;
}

.rating-sidebar__avg {
  margin-left: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.rating-sidebar__count {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.rating-sidebar__empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ——— Карточки направлений ——— */
.destinations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 0 2rem 2rem;
}

.dest-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--white);
}

.dest-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.dest-card__link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 3 / 4;
}

.dest-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dest-card__img--ph {
  background: linear-gradient(160deg, #6b7f8f, #a8bcc9);
  min-height: 100%;
}

.dest-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
}

.dest-card__name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.3;
}

.dest-card__meta {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
}

.dest-card__badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  padding: 0.3rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1a1a;
  background: #ffd54f;
  border-radius: 6px;
}

.dest-card__foot {
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dest-card__foot .rating-block {
  margin-top: 0;
}

.dest-card__foot .stars__btn {
  font-size: 1.25rem;
  color: rgba(0, 0, 0, 0.22);
}

.dest-card__foot .stars__btn--on {
  color: #f5b301;
}

.dest-card__foot .stars__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dest-card__rate-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.dest-card__rate-link:hover {
  text-decoration: underline;
}

/* ——— Кнопки и пагинация ——— */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 2rem 2.5rem;
  flex-wrap: wrap;
}

.pager__info {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn--accent {
  background: var(--accent);
  color: var(--white);
}

.btn--accent:hover {
  background: var(--accent-dark);
}

.btn--ghost {
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

/* ——— Страница тура ——— */
.back-link {
  display: inline-block;
  margin: 1.25rem 2rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.tour-hero {
  position: relative;
  min-height: 320px;
  margin: 0.75rem 1.25rem 0;
  border-radius: 20px;
  overflow: hidden;
  background-image: var(--hero-img, linear-gradient(135deg, #5a6d7a, #8fa9b8));
  background-size: cover;
  background-position: center;
}

.tour-hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 50%);
}

.tour-hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem;
  z-index: 1;
}

.tour-hero__price {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--white);
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
}

.tour-body {
  padding: 1.5rem 2rem 2.5rem;
}

.panel {
  margin-bottom: 1.5rem;
}

.panel--center {
  text-align: center;
  padding: 3rem 2rem;
}

.panel__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--text);
}

.panel__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}

.panel--center .panel__title::after {
  margin-left: auto;
  margin-right: auto;
}

.panel__text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline {
  list-style: none;
  padding: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding-bottom: 1.25rem;
  position: relative;
}

.timeline__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent), rgba(242, 101, 34, 0.15));
}

.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.2);
}

.timeline__item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.timeline__item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gallery {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.gallery img {
  width: 120px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.prices {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.prices th,
.prices td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.prices th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #fafafa;
  color: var(--text-muted);
}

.prices__sum {
  font-weight: 700;
  color: var(--accent);
}

/* ——— Оценки ——— */
.rating-block {
  margin-top: 1rem;
}

.rating-block--compact {
  margin-top: 0.5rem;
}

.rating-block--compact .rating-block__hint,
.rating-block--compact .rating-block__thanks {
  display: none;
}

.rating-block--large .stars__btn,
.stars__btn--lg {
  font-size: 2rem;
}

.rating-block--large .stars {
  gap: 0.35rem;
}

.panel--rate {
  background: linear-gradient(135deg, #fff8f4 0%, #fff 100%);
  border: 2px solid rgba(242, 101, 34, 0.25);
}

.rating-sort-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rating-block__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.stars {
  display: inline-flex;
  gap: 0.15rem;
}

.stars__btn {
  border: none;
  background: none;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}

.stars__btn--on {
  color: #f5b301;
}

.stars__btn:hover {
  transform: scale(1.12);
}

.stars--busy {
  opacity: 0.55;
  pointer-events: none;
}

.stars__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.rating-block__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.rating-block__thanks {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.25rem;
}


/* ——— Адаптив ——— */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1rem 1.25rem;
  }

  .logo,
  .topbar__phone {
    justify-self: center;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero__content {
    padding: 2rem 1.5rem 4rem;
  }

  .destinations,
  .intro,
  .tour-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .rating-sidebar {
    position: static;
    max-height: none;
  }

  .shell {
    margin: 0.75rem;
    border-radius: 20px;
  }
}

@media (max-width: 520px) {
  .destinations {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .dest-card__link {
    aspect-ratio: 4 / 5;
  }
}
