@charset "utf-8";

:root{
  --page-min-h: 100vh;
  --page-min-h-dyn: 100dvh;
}

/* ====================== ОБЩИЕ СТИЛИ ====================== */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(45deg, #fff1eb, #ace0f9);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  margin: 10px 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.main,
.hotel,
.location,
.contacts{
  min-height: var(--page-min-h);
  min-height: var(--page-min-h-dyn);
  height: auto;
}

/* ====================== КОНТЕЙНЕРЫ ====================== */
.container1p,
.container2p,
.container3p,
.container4p {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ====================== PAGE 1 — WELCOME ====================== */
.main {
  background-color: lightblue;
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
}

.main{
  position: relative; /* якорь для ::before */
  z-index: 0;         /* создаём stacking context, чтобы z-index:-1 не "утёк" наружу */
}

.main::before{
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    rgba(0,0,0,.18),
    rgba(0,0,0,.08) 40%,
    rgba(0,0,0,.06) 60%,
    rgba(0,0,0,.12)
  );

  z-index: -1;         /* overlay строго под всем контентом .main */
  pointer-events: none;
}

.topic1p-top {
  display: flex;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.top-text-title {
  font-family: serif;
  padding-left: 50px;
  padding-top: 22px;
  margin-right: 20px;
  font-size: 27px;
  font-weight: 500;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.top-text-title span{
  white-space: nowrap;
  margin-top: 6px;
  font-size: 22px;
}

.top-whatsapp,
.top-viber,
.top-telegram,
.top-phone,
.top-email {
  border: 3px solid transparent;
  border-radius: 10px;
  padding: 5px;
  transition: background-color .3s ease, border-color .3s ease;
}

.top-whatsapp:hover,
.top-viber:hover,
.top-telegram:hover,
.top-phone:hover,
.top-email:hover {
  border-color: whitesmoke;
  background-color: #cfd6dd; /* цвет ховер иконки */
}

.topic1p-middle{
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* верх + низ */
}
.left-side-main{
  display: flex;
  flex-direction: column;
  padding-top: 90px;
}
.main-left-one {
  font-family: 'Bad Script', cursive;
  font-size: 60px;
  font-weight: 700;
}
.main-left-two {
  font-size: 27px;
  font-weight: 700;
  margin-top: 15px;
}

.main-right-one {
  font-size: 27px;
  font-weight: 600;
}
.main-right-two {
  font-size: 20px;
  font-weight: 600;
  margin-top: 10px;
}
/* Нижняя половина первой страницы — делим пополам и центрируем текст справа */

/* Нижняя половина первой страницы */
.right-side-main{
  width: 100%;
  padding: 0;
}

/* контейнер нижнего текста */
.bottom-half-wrapper{
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;     /* вернуть */
  padding: 0 20px 60px;
}

/* сам блок с текстом */
.main-title-2{
  width: min(640px, 100%);     /* ограничиваем ширину */
  text-align: center;
}

.main-right-one,
.main-right-two {
  margin: 0 auto;
  padding-left: 0 !important;      /* убираем старый вредный отступ 50% */
}

.main .main-left-one,
.main .main-left-two,
.main .main-right-one,
.main .main-right-two,
.main .top-text-title,
.main .top-text-title span{
  color: rgba(255,255,255,.98);

  text-shadow:
    0 1px 1px rgba(0,0,0,.95),
    0 2px 6px rgba(0,0,0,.85),
    0 12px 32px rgba(0,0,0,.65);
}

/* ====================== PAGE 2 — ROOMS & PHOTOS ====================== */
.hotel {
  background-color: lightblue;
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
  padding: 40px 0;
}
.topic2p-title-top {
  font-family: 'Bad Script', cursive;
  font-size: 60px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: rgba(0,0,0,.90);
}
.topic2p-middle {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.left-side-description {
  flex: 1 1 500px;
}
.details2p {
  text-align: justify;
  font-size: 18px;
  line-height: 1.6;
}
.details2p h3 {
  font-size: 25px;
  margin-top: 30px;
  margin-bottom: 15px;
}
.topic2p-suptitle {
  font-size: 20px;
  padding-left: 30px;
}
.topic2p-suptitle li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 18px;
  line-height: 1.6;
}
.topic2p-suptitle li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #1e3a8a;
  font-weight: bold;
  font-size: 18px;
}
.right-side-photo {
  flex: 1 1 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hotel .details2p{
  color: rgba(0,0,0,.90);

  background: rgba(255,255,255,.42);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  padding: 18px 22px;

  border-radius: 10px;

  box-shadow:
    0 4px 18px rgba(0,0,0,.12);

  border: 1px solid rgba(255,255,255,.25);
}


/* ====== SLIDER STRIP + INDICATOR (вместо точек) ====== */
.slider-dots{
  position: relative;
  margin-top: 15px;

  height: 8px;
  padding: 0;
  border-radius: 999px;

  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(0,0,0,0.12);

  overflow: hidden; /* важно для ползунка */
}

/* ползунок (двигается через CSS-переменную --dots-pos из JS) */
.slider-dots::after{
  content: "";
  position: absolute;
  top: 0; bottom: 0;

  width: 10%;
  left: clamp(5%, var(--dots-pos, 0%), 95%); /* 5% = половина width (10%) */
  transform: translateX(-50%);

  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  transition: left .25s ease;
}

/* сами dot-элементы остаются в DOM (для JS), но визуально скрыты */
.slider-dots .dot{
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* ====================== PAGE 3 — LOCATION ====================== */
.location {
  background-color: lightblue;
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
  padding: 40px 0;
}
.topic3p-title-top {
  font-family: 'Bad Script', cursive;
  font-size: 60px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: rgba(0,0,0,.90);
}
.topic3p-middle {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.left-side-legend {
  flex: 1 1 500px;
}
.details3p {
  text-align: justify;
  font-size: 18px;
  line-height: 1.6;
}
.details3p h3 {
  font-size: 25px;
  margin-top: 30px;
  margin-bottom: 15px;
}
.details3p ul {
  padding-left: 30px;
  margin: 20px 0;
}
.details3p ul li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 18px;
  line-height: 1.6;
  font-size: 18px;
}
.details3p ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #1e3a8a;
  font-weight: bold;
  font-size: 18px;
}
.right-side-map {
  flex: 1 1 500px;
}
.map iframe {
  width: 100%;
  height: 500px;
  border: 0;
}

.location .details3p{
  color: rgba(0,0,0,.90);

  background: rgba(255,255,255,.42);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  padding: 18px 22px;

  border-radius: 10px;

  box-shadow:
    0 4px 18px rgba(0,0,0,.12);

  border: 1px solid rgba(255,255,255,.25);
}

/* ====================== PAGE 4 — CONTACTS ====================== */
.contacts {
  padding: 60px 0;
  background-color: lightblue;
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
}

.content4p {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 4px 4px 20px rgba(34, 60, 80, 0.2);
  max-width: 1200px;
  margin: 0 auto;
}
.left-side-contacts {
  flex: 1 1 300px;
  position: relative;
  padding-right: 40px;
}
.left-side-contacts::before {
  content: "";
  position: absolute;
  height: 107%;
  width: 2px;
  background: #afafb6;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.details4p {
  margin-bottom: 40px;
  text-align: left;
}
.topic4p {
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}
.text-one-4p,
.text-two-4p {
  font-size: 18px;
  color: #666;
  line-height: 1.5;
}
.right-side-contacts {
  flex: 2 1 600px;
}
.topic-text {
  font-size: 30px;
  font-weight: 700;
  color: #1e90ff;
  margin-bottom: 15px;
}
.right-side-contacts p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #555;
}
/* Page 4: privacy link near "Write to us" */
.topic-text-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap; /* важно для mobile */
}

.privacy-link{
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  color: #6b7280;
  transition: color 0.2s ease;
}

.privacy-link:hover{
  color: #000000;
}

/* Page 4: clickable address card without changing flex structure */
.contacts .left-side-contacts .address-4p {
  position: relative;
}

/* overlay link */
.contacts .left-side-contacts .address-4p > .card-link {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 2;
  text-decoration: none;
  color: inherit;
}

/* ====================== ФОРМА ====================== */
.form > .input-box,
.form > .guests-group,
.form > .phone-group,
.form > .button {
  margin-bottom: 28px;
}
.form > .button {
  margin-bottom: 0;
}
.form .input-box {
  position: relative;
}
.form .input-box input,
.form .input-box textarea,
.form .input-box #country_search,
.form .input-box select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
    
  box-sizing: border-box;
  line-height: 1.2;
    
  color: #333;
  background-color: #f0f8ff;
  transition: all 0.3s ease;
}

/* Default (empty) state: make date/select look like placeholder */
.form .input-box #check_in:required:invalid,
.form .input-box #check_out:required:invalid,
.form .input-box #adults:required:invalid {
  color: #b3b3b3;
}

/* When valid (chosen/filled) – keep normal text color */
.form .input-box #check_in:required:valid,
.form .input-box #check_out:required:valid,
.form .input-box #adults:required:valid {
  color: #333;
}

/* children: default (0) looks like placeholder */
.form .input-box #children {
  color: #b3b3b3;
}

/* children: user has chosen a value */
.form .input-box #children.is-chosen {
  color: #333;
}

.form .input-box input[type="date"] {
  padding: 14px 16px;
}

.form .input-box input::placeholder,
.form .input-box textarea::placeholder,
.form .input-box #country_search::placeholder,
.form .input-box #user_name::placeholder,
.form .input-box #user_email::placeholder,
.form .input-box #user_phone::placeholder,
.form .input-box #user_message::placeholder {
  color: #b3b3b3;
  opacity: 1; /* Firefox */
}

/* optional: hide placeholder while typing (on focus) */
.form .input-box #user_name:focus::placeholder,
.form .input-box #user_email:focus::placeholder,
.form .input-box #country_search:focus::placeholder,
.form .input-box #user_phone:focus::placeholder,
.form .input-box #user_message:focus::placeholder{
  opacity: 0;
  color: transparent;
}

.form .input-box input:focus,
.form .input-box textarea:focus,
.form .input-box #country_search:focus,
.form .input-box select:focus {
  border-color: #1e90ff;
  background-color: #e6f3ff;
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.3);
  outline: none;
}

/* page 1 – field hover & icon interaction (variant 2) */
.main .input-box {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* hover on field or icons */
.main .input-box:hover {
  background-color: #e3f1fb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* focus inside (click on input or icon) */
.main .input-box:focus-within {
  background-color: #d6ebfa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border-color: #ffffff;
}

.form .input-box label {
  position: absolute;
  top: 14px;
  left: 16px;
  color: #666;
  font-size: 16px;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.3s ease;
}
.form .input-box input:focus + label,
.form .input-box input:not(:placeholder-shown) + label,
.form .input-box textarea:focus + label,
.form .input-box textarea:not(:placeholder-shown) + label,
.form .input-box #country_search:focus + label,
.form .input-box #country_search:not(:placeholder-shown) + label,
.form .input-box select:focus + label,
.form .input-box select:valid + label,
.form .input-box #adults:invalid + label,
.form .input-box input[type="date"]:focus + label,
.form .input-box input[type="date"]:valid + label {
  top: -10px;
  left: 12px;
  font-size: 12px;
  color: #1e90ff;
  background-color: white;
  padding: 0 6px;
}

.form .input-box :where(#user_name, #user_email, #country_search, #user_phone, #user_message) + label{
  top: -10px;
  left: 12px;
  font-size: 12px;
  color: #1e90ff;
  background-color: white;
  padding: 0 6px;
}

.guests-group {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.guests-group .input-box {
  flex: 1;
}
.guests-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}
.phone-group {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap; /* ✅ безопасно: на широких не изменит вид, на узких спасёт от overflow */
}
.phone-group > div:first-child {
  flex: 0 0 clamp(180px, 20vw, 240px);
}
.phone-group > div:last-child {
  flex: 1 1 auto;
  min-width: 220px; /* чтобы телефон не становился слишком узким */
}
.country-select-wrapper {
  position: relative;
}
#country_code {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 10;
  display: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
#country_code.show {
  display: block;
}
.error-message {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 6px;
  display: block;
}

.input-box.error input,
.input-box.error select,
.input-box.error textarea {
  border-color: #e74c3c;
  background-color: #ffe6e6;
}
.input-box.error label {
  color: #e74c3c;
}
.button {
  text-align: center;
}
.button button {
  background: linear-gradient(135deg, #1e90ff, #00bfff);
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 32px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(30, 144, 255, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button button:hover {
  background: linear-gradient(135deg, #00bfff, #1e90ff);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(30, 144, 255, 0.4);
}

.button button:disabled,
.button button[disabled]{
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button button:disabled:hover,
.button button[disabled]:hover{
  transform: none;
  box-shadow: none;
}

.button button::after {
  content: "✈";
  font-size: 16px;
}

/* ====================== СЛАЙДЕР ====================== */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}
.mySlides {
  display: none;
  width: 100%;
  height: 500px;
  position: relative;
}
.mySlides img,
.mySlides video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.numbertext {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 5;
}
.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.35); /* светлый прозрачный фон */
  border-radius: 50%;
  border: 2px solid #ffffff; /* белый контур */

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 20;

  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3); /* лёгкая тень */
  transition: all 0.3s ease;
  backdrop-filter: blur(5px); /* стеклянный эффект */
}

/* Треугольник Play */
.play-button::before {
  content: "▶";
  font-size: 50px; 
  color: #ffffff;  /* белый треугольник */
  margin-left: 4px; 
}

/* Анимация при наведении */
.play-button:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

/* Скрытие при воспроизведении видео */
.play-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.7);
  transition: all 0.4s ease;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  color: #fff;
  font-weight: bold;
  font-size: 30px;

  background-color: rgba(0,0,0,0.5);
  border-radius: 0 5px 5px 0;
  transform: translateY(-50%);
  z-index: 10;
  user-select: none;
  transition: background-color 0.3s;

  /* reset для button */
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}

.prev { 
    left: 0; 
}

.next {
  right: 0;
  border-radius: 5px 0 0 5px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* нормальный фокус (только клавиатура) */
.prev:focus-visible,
.next:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.slide-caption {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.35);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 16px;
}

/* ====================== PROGRESS BAR (slider + lightbox) ====================== */
.progress{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;

  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);

  z-index: 35;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.progress__bar{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: width .25s ease;
}

/* ====================== ЛАЙТБОКС ====================== */
.lightbox {
  /* БАЗОВЫЕ ПЕРЕМЕННЫЕ (потом переопределяем в responsive.css) */
  --lb-gutter: 16px;             /* “безопасные поля” по бокам */
  --lb-pad-y: 16px;              /* вертикальные отступы сверху/снизу */
  --lb-max-width: 1200px;        /* дефолтное ограничение ширины контента */
  --lb-media-vh: 80vh;           /* целевая высота медиа */
  --lb-ui-reserve: 180px;        /* запас под caption/progress/кнопки */
  --lb-arrow-offset: 24px;       /* отступ стрелок от края */
  --lb-arrow-size: 50px;         /* размер стрелок */

  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;

  /* fallback, если фон-картинка не загрузилась */
  background-color: #BFD8E6;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;

  padding: var(--lb-pad-y) var(--lb-gutter);
  box-sizing: border-box;

  isolation: isolate;
}

/* ФОН-КАРТИНКА (универсальная, размытая) */
/* замена картинки на картинку с bluer
.lightbox::before{
  content: "";
  position: absolute;
  inset: -40px; 

  background-image: url("photo/ui/lightbox-bg-320.webp");
  background-position: 50% 100%;
  background-size: cover;
  background-repeat: no-repeat;

  filter: blur(3px); 
  transform: scale(1.06);
  opacity: 0.85; 
  z-index: 0;
  pointer-events: none;
}
*/

.lightbox::before{
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("photo/ui/lightbox-bg-320.webp");
  background-position: 50% 100%;
  background-size: cover;
  background-repeat: no-repeat;

  opacity: 0.85;
  z-index: 0;
  pointer-events: none;

  will-change: opacity;
}

@media (min-width: 640px){
  .lightbox::before{
    background-image: url("photo/ui/lightbox-bg-640.webp");
  }
}

@media (min-width: 1024px){
  .lightbox::before{
    background-image: url("photo/ui/lightbox-bg-1024.webp");
  }
}

@media (min-width: 1920px){
  .lightbox::before{
    background-image: url("photo/ui/lightbox-bg-1920.webp");
  }
}

/* затемняющая вуаль поверх фон-картинки — чтобы фото читались */
.lightbox::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.0);  /* затемнение фона */
  z-index: 1;
  pointer-events: none;
}

/* Контентная зона: 100% ширины внутри padding’ов .lightbox */
.lightbox-content {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: var(--lb-max-width);
  margin: 0 auto;
  box-sizing: border-box;

  height: 100%;
}

/* ------------------------------------------------------------------
ПРИМЕЧАНИЕ (изменение архитектуры):
Лайтбокс ранее ограничивал высоту медиафайлов с помощью:
height: min(var(--lb-media-vh), calc(100vh - var(--lb-ui-reserve)));
После перехода к полноэкранному режиму наложения (элементы пользовательского интерфейса размещаются
поверх медиафайлов), эти переменные больше не используются.
--lb-media-vh
--lb-ui-reserve
Они по-прежнему определены в responsive.css, но в настоящее время НЕ
участвуют в расчетах компоновки.
Если лайтбокс когда-либо вернется к компоновке на основе потока
(подпись/прогресс под медиафайлом), формула высоты должна быть
восстановлена ​​соответствующим образом.
------------------------------------------------------------------ */

.lightbox-media-wrapper {
  position: relative;
  width: 100%;

  height: 100%;

  /* ВАЖНО: убираем чёрный фон, который и давал “уши” */
  background: transparent;

  border-radius: 8px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ПРОЗРАЧНЫЕ "уши" — показываем фон лайтбокса, а не фон внутри рамки */
.lightbox-media-wrapper::before{
  content: none !important;
}

/* если браузер поддерживает dvh — используем его (лучше на мобилках) */
@supports (height: 100dvh) {
  .lightbox-media-wrapper {
    height: 100%;
  }
}

#lightbox-img,
#lightbox-video {
  position: relative;
  z-index: 1;

  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#lightbox-video {
  cursor: pointer;
}

.lightbox-caption {
  position: absolute;
  left: calc(var(--lb-gutter) + env(safe-area-inset-left));
  right: calc(var(--lb-gutter) + env(safe-area-inset-right));
  bottom: calc(6px + 8px + 6px + env(safe-area-inset-bottom));

  width: fit-content;
  margin-left: auto;
  margin-right: auto;

  max-width: calc(100% - (var(--lb-gutter) * 2));
  white-space: normal;

  color: #fff;
  font-size: 20px;
  text-align: center;
  margin-top: 0;
  font-weight: 600;

  background: rgba(0, 0, 0, 0.35);
  padding: 8px 14px;
  border-radius: 6px;

  z-index: 20;
  pointer-events: none;
}

/* Кнопка закрытия */
.lightbox-close {
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid rgba(255,255,255,0.85);

  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  width: 48px;
  height: 48px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));

  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
  z-index: 20;

  transition: transform .15s ease, background .15s ease;
}
.lightbox-close:hover { background: rgba(0,0,0,0.55); transform: translateY(-1px); }
.lightbox-close:active { transform: translateY(0); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Стрелки — настраиваются переменными */
.lightbox-prev,
.lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 20px;
  color: #fff;
  font-weight: bold;
  font-size: var(--lb-arrow-size);

  background-color: rgba(0,0,0,0.5);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background-color 0.3s;
  z-index: 10;
  user-select: none;

  /* reset для button */
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(0,0,0,0.8);
}

.lightbox-prev { left: var(--lb-arrow-offset); }
.lightbox-next { right: var(--lb-arrow-offset); }

/* нормальный фокус (только клавиатура) */
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@supports not selector(:focus-visible) {
  .prev:focus,
  .next:focus,
  .lightbox-prev:focus,
  .lightbox-next:focus {
    outline: 2px solid #fff;
    outline-offset: 3px;
  }
}

/* Progress bar (lightbox) */
.progress--lightbox{
  position: absolute;
  left: calc(var(--lb-gutter) + env(safe-area-inset-left));
  right: calc(var(--lb-gutter) + env(safe-area-inset-right));
  bottom: calc(6px + env(safe-area-inset-bottom));

  margin: 0;
  width: auto;
  max-width: var(--lb-max-width);
  height: 8px;

  z-index: 20;
  pointer-events: none;
}

.lightbox-video-wrapper .play-button {
  width: 110px;
  height: 110px;
  font-size: 58px;
}

.lightbox-video-wrapper .play-button::before {
  font-size: 58px;
}

/* ====================== MINI FULLSCREEN ICON BUTTON ====================== */

.open-lightbox-btn{
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  line-height: 1;
  font: inherit;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 40;

  width: 44px;
  height: 44px;

  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 10px;

  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.open-lightbox-btn::before{
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background:
    linear-gradient(#fff,#fff) left top/8px 2px no-repeat,
    linear-gradient(#fff,#fff) left top/2px 8px no-repeat,

    linear-gradient(#fff,#fff) right top/8px 2px no-repeat,
    linear-gradient(#fff,#fff) right top/2px 8px no-repeat,

    linear-gradient(#fff,#fff) left bottom/8px 2px no-repeat,
    linear-gradient(#fff,#fff) left bottom/2px 8px no-repeat,

    linear-gradient(#fff,#fff) right bottom/8px 2px no-repeat,
    linear-gradient(#fff,#fff) right bottom/2px 8px no-repeat;
  opacity: 0.95;
}

.open-lightbox-btn:active{
  transform: translateY(0);
}

.open-lightbox-btn:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* курсоры: картинка = zoom, видео = play */
.mySlides img { cursor: zoom-in; }
.mySlides video { cursor: pointer; }

/* ===== JUSTVALIDATE: подсветка ошибок (если класс ставится на поле) ====== */
.form .input-box input.error,
.form .input-box select.error,
.form .input-box textarea.error,
.form .input-box #country_search.error {
  border-color: #e74c3c;
  background-color: #ffe6e6;
}

.form .input-box input.error:focus,
.form .input-box select.error:focus,
.form .input-box textarea.error:focus,
.form .input-box #country_search.error:focus {
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.25);
}

/* опционально: когда поле валидное (если JustValidate реально добавляет success-класс на поле) */
.form .input-box input.success,
.form .input-box select.success,
.form .input-box textarea.success,
.form .input-box #country_search.success {
  border-color: #2ecc71;
  background-color: #eafff2;
}

@media (hover:hover){
  .open-lightbox-btn:hover{
    background: rgba(0,0,0,0.80);
    transform: translateY(-1px);
    box-shadow: 0 14px 35px rgba(0,0,0,0.45);
  }
}

/* =========================
   Preloader (premium, safe)
   ========================= */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 35%, #2a7e8a 0%, #0f3c4a 70%);
  /* background: #1f6f7a; цвет garifalo */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  width: min(520px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.preloader-logo {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(6px);
  animation: preloader-logo-in 0.55s ease forwards;
}

@keyframes preloader-logo-in {
  to { opacity: 1; transform: translateY(0); }
}

.preloader-bar {
  width: min(440px, 82vw);
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.preloader-bar-indeterminate {
  position: absolute;
  top: 0;
  left: -45%;
  height: 100%;
  width: 45%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,1) 45%,
    rgba(255,255,255,0) 100%
  );
  border-radius: 999px;
  animation: preloader-bar-move 1.4s ease-in-out infinite;
}

@keyframes preloader-bar-move {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(170%); }
  100% { transform: translateX(340%); }
}

/* (опционально) кнопка Continue для очень медленной загрузки */
.preloader-continue {
  margin-top: 6px;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: rgba(255,255,255,0.9);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#preloader.show-continue .preloader-continue {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .preloader-logo { animation: none; opacity: 1; transform: none; }
  .preloader-bar-indeterminate { animation: none; left: 0; width: 40%; }
  #preloader { transition: none; }
}

/* iOS Safari: stabilize native form control metrics (date/select) вариант 1
@supports (-webkit-touch-callout: none) {

  .form .input-box input[type="date"]{
    min-height: calc(16px * 1.2 + 28px);
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
  }

  .form .input-box select{
    min-height: calc(16px * 1.2 + 28px);
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
  }
} */

/* iOS (WebKit-based browsers): stabilize native form control metrics вариант 2 */
@supports (-webkit-touch-callout: none) {

  .form .input-box input[type="date"]{
    min-height: calc(16px * 1.2 + 28px);
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;

    background-color: #f0f8ff;

    padding-right: 44px;
    background-image: url("logo/calendar-ios.svg");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px 18px;
  }

  .form .input-box select{
    min-height: calc(16px * 1.2 + 28px);
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
  }
}