.hero-gallery-section {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--site-header-height, 80px));
  min-height: calc(100dvh - var(--site-header-height, 80px));
  background: #223c70; /* fallback, если нет изображения */
  overflow: hidden;
}

.hero-gallery-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--site-header-height, 80px));
  height: calc(100dvh - var(--site-header-height, 80px));
}

.hero-gallery-img {
  width: 100%;
  height: calc(100vh - var(--site-header-height, 80px));
  height: calc(100dvh - var(--site-header-height, 80px));
  object-fit: cover;
  display: block;
}

.hero-gallery-content {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 40px;
  z-index: 2;
  pointer-events: none;
}

.hero-title,
.hero-subtitle,
.hero-checkin,
.hero-btn-block,
.hero-microcopy {
  pointer-events: auto;
  margin-bottom: 20px;
}

.hero-title,
.hero-subtitle,
.hero-microcopy {
  text-align: center;
}

.hero-title {
  font-family: var(--font_aiRLZQUIgh_default);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  text-shadow: 2px 2px 2px #091424;
  order: 1;
}
.hero-subtitle {
  font-family: var(--font_default);
  font-size: 1.1rem;
  line-height: 1.4;
  color: #fff;
  text-shadow: 2px 2px 2px #091424;
  order: 2;
}
.hero-checkin {
  font-family: var(--font_default);
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  line-height: 1.5;
  text-shadow:2px 2px 2px #091424;
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 16px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  order: 3;
}
.hero-checkin-divider {
  margin: 0 12px;
}

.hero-btn-block {
  display: flex;
  gap: 16px;
  order: 4;
}

.hero-btn {
  color: #fff;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 7px;
  border: none;
  font-size: 1rem;
  transition: opacity .18s, box-shadow .18s;
  box-shadow: 0 3px 15px rgba(38,96,182,0.17);
  text-decoration: none;
}
.hero-btn.main {
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
  background-color: var(--color_primary_default);
}
.hero-btn.btn-book {
  background: var(--color_primary_default, #1e4a83);
}
.hero-btn.btn-call {
  background-color: var(--color_aiRLZQUIgD_default, #3f9ea6);
}
.hero-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-microcopy {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #fff;
  margin-top: 8px;
  color: #fff;
  text-shadow: 2px 2px 2px #091424;
  order: 5;
}

.hero-gallery-nav {
  position: absolute;
  bottom: 30px;
  left: 90%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-gallery-arrow,
.hero-gallery-pause {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  position: relative;
  overflow: visible;
  margin: 0 2px;
  padding: 0 2px;
  /* Set the color to white and remove the button's overall transparency. */
  color: #ffffff !important;
  opacity: 1 !important;
  transition: transform .18s;
}
/* small translucent square inside the button on hover */
.hero-gallery-arrow::before,
.hero-gallery-pause::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: transparent;
  border-radius: 6px;
  transition: background .18s, transform .18s, opacity .18s;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.hero-gallery-arrow:hover::before,
.hero-gallery-pause:hover::before {
  background: rgba(63, 158, 166, 0.8);
  opacity: 1;
}
/* We guarantee that child elements (FontAwesome icon or text) will not change color. */
.hero-gallery-arrow *,
.hero-gallery-pause * {
  color: #ffffff !important;
  opacity: 1 !important;
}
.hero-gallery-arrow {
  margin-bottom: 4px;
}

/* ==========================================================================
   SECTION: HERO GALLERY RESPONSIVE STYLES
   ========================================================================== */

/* --- 1. TABLETS & ALL MOBILE DEVICES (Up to 991px) --- */
@media (max-width: 991px) {
  /* Center the gallery navigation strictly horizontally. */
  .hero-gallery-nav {
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
  }
}

/* --- 2. MOBILE PORTRAIT (Up to 576px) --- */
@media (max-width: 576px) {
  /* Content block: center removed, alignment goes to the bottom (as on desktop) */
  .hero-gallery-content {
    padding: 20px 16px 60px 16px;
  }

  /* Типографика */
  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 16px;
  }

  /* Check-in information block (in two lines) */
  .hero-checkin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    padding: 8px 12px;
    margin-bottom: 16px;
  }

  .hero-checkin-divider {
    display: none; /* Hide the vertical divider */
  }

  /* Action buttons block */
  .hero-btn-block {
    width: 100%;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  /* Buttons: compact padding, equal width, no line breaks */
  .hero-btn {
    font-size: 0.85rem;
    padding: 10px 16px;
    white-space: nowrap;
    text-align: center;
    flex: 1;
    max-width: 160px;
  }

  /* Microcopy */
  .hero-microcopy {
    font-size: 11px;
    margin-top: 4px;
    margin-bottom: 0;
  }
}

/* --- 3. SMALL MOBILE SCREENS (Up to 360px - e.g., iPhone SE) --- */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.3rem;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
  }
  
  .hero-btn {
    font-size: 0.8rem;
    padding: 10px 12px;
  }
}

/* --- 4. MOBILE LANDSCAPE MODE (Fix for low screen height) --- */
@media (max-width: 991px) and (orientation: landscape) {
  /* Unbind the section from the screen height, allowing it to grow with the content */
  .hero-gallery-section,
  .hero-gallery-wrapper {
    height: auto !important;
    min-height: 480px; 
  }

  /* Fix images within the stretching container */
  .hero-gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
  }

  /* Text block: center removed, content is pushed to the bottom thanks to flex-direction: column */
  .hero-gallery-content {
    position: relative;
    padding: 40px 20px 40px 20px;
    min-height: 480px;
  }

  /* Optimize texts for landscape orientation */
  .hero-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 12px;
    max-width: 650px; /* Limit the line width for readability */
  }

  /* In landscape, return the check-in block to a single compact line */
  .hero-checkin {
    display: inline-flex;
    flex-direction: row;
    gap: 0;
    font-size: 13px;
    padding: 6px 12px;
    margin-bottom: 12px;
  }
  
  .hero-checkin-divider {
    display: inline;
    margin: 0 8px;
  }

  /* Center the buttons */
  .hero-btn-block {
    width: auto;
    margin-bottom: 10px;
  }

  .hero-btn {
    font-size: 0.85rem;
    padding: 8px 20px;
  }

  /* Safely offset the navigation to the very bottom of the content padding */
  .hero-gallery-nav {
    bottom: 15px;
  }
}
