/* ==========================================================================
   components.css — кнопки, поля, галерея, видео, лайтбокс, карточки
   ========================================================================== */

/* --- Иконки ------------------------------------------------------------ */

.icon {
  flex: none;
}

/* --- Бренд (шапка главной и страницы политики) ------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__text {
  display: grid;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.brand__role {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .brand__role {
    display: none;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
  }
}

/* --- Кнопки ------------------------------------------------------------ */

.btn {
  --btn-bg: var(--ink);
  --btn-color: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  --btn-bg: var(--red);
  --btn-color: #fff;
  box-shadow: 0 6px 18px rgba(184, 35, 31, 0.22);
}

.btn--primary:hover {
  --btn-bg: var(--red-dark);
  box-shadow: 0 10px 24px rgba(142, 25, 22, 0.28);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-color: var(--ink);
  --btn-border: var(--line);
}

.btn--ghost:hover {
  --btn-border: var(--ink);
  --btn-bg: rgba(23, 20, 15, 0.04);
}

.btn--light {
  --btn-bg: #fff;
  --btn-color: var(--ink);
}

.btn--light:hover {
  --btn-bg: var(--paper-2);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn--lg {
  padding: 17px 34px;
  font-size: 16px;
}

.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

/* --- Поля формы -------------------------------------------------------- */

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.field__req {
  color: var(--red);
}

.field__input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field__input::placeholder {
  color: #a79f93;
}

.field__input:hover {
  border-color: #cfc7b8;
}

.field__input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(184, 35, 31, 0.12);
}

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236f675c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}

.field__textarea {
  resize: vertical;
  min-height: 96px;
}

.field.is-invalid .field__input {
  border-color: var(--red);
  background: #fffafa;
}

.field__error {
  min-height: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--red);
}

.field__error:empty {
  display: none;
}

/* Чекбокс согласия */

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}

.checkbox__input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--red);
  cursor: pointer;
}

.checkbox.is-invalid .checkbox__text {
  color: var(--red);
}

/* Согласие на обработку данных + ссылка на политику */

.consent {
  margin-top: 20px;
}

.consent .checkbox {
  margin-top: 0;
}

.consent__policy {
  display: inline-block;
  margin: 6px 0 0 28px;
  font-size: 13px;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__policy:hover {
  color: var(--red-dark);
}

/* Ловушка для спам-ботов */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Галерея экскурсии ------------------------------------------------- */

.tour__stage {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-3);
  cursor: zoom-in;
}

.tour__stage picture {
  display: block;
  height: 100%;
}

.tour__image {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.tour__stage:hover .tour__image {
  transform: scale(1.035);
}

.tour__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.tour__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-3);
  opacity: 0.55;
  transition: opacity 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.tour__thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tour__thumb:hover {
  opacity: 0.85;
}

.tour__thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--red);
}

/* --- Карточка формата -------------------------------------------------- */

.type-card {
  padding: clamp(22px, 2.6vw, 30px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.type-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
}

.type-card__title {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.type-card__text {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --- Карточка отзыва --------------------------------------------------- */

.review {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.8vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.review__text {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink-2);
}

.review__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.review__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.review__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* --- Видео ------------------------------------------------------------- */

.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #17140f;
  box-shadow: var(--shadow-lg);
}

.video--small {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.video__facade {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #17140f;
  color: #fff;
  overflow: hidden;
}

.video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 0.9s var(--ease), opacity 0.3s var(--ease);
}

.video__facade::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(13, 11, 8, 0.25) 0%,
    rgba(13, 11, 8, 0.5) 55%,
    rgba(13, 11, 8, 0.8) 100%
  );
  pointer-events: none;
}

.video__facade:hover .video__poster {
  transform: scale(1.03);
  opacity: 0.9;
}

.video__play {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  color: var(--red);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.video__play svg {
  margin-left: 4px;
}

.video__facade:hover .video__play {
  transform: scale(1.07);
  background: var(--red);
  color: #fff;
}

.video__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.video--small .video__play {
  width: 64px;
  height: 64px;
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Соцсети ----------------------------------------------------------- */

.socials {
  display: flex;
  gap: 10px;
}

.socials__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.socials__link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* --- Кнопка «наверх» --------------------------------------------------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.to-top:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.to-top[hidden] {
  display: none;
}

/* --- Лайтбокс ---------------------------------------------------------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(10, 8, 6, 0.94);
}

.lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 100%;
  padding: 0 12px;
}

.lightbox__img {
  max-width: min(94vw, 1400px);
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox__caption {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background-color 0.2s var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox__close {
  top: 20px;
  right: 20px;
}

.lightbox__nav--prev {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }
}
