.apartment-gallery-root {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
}
.apartment-gallery-root img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.grid {
  display: grid;
  grid-template-rows: 1fr;
}
.grid--single {
  grid-template-columns: 1fr;
}
.grid--duo {
  grid-template-columns: 1fr;
}
.grid--duo img {
  aspect-ratio: 2/1;
}
.grid--trio {
  grid-template-columns: 1fr 1fr;
}
.grid--trio img {
  aspect-ratio: 1;
}
.grid--trio img:last-child {
  aspect-ratio: 2/1;
  grid-column: span 2;
}
.grid--default {
  grid-template-columns: 1fr 1fr;
}
.grid--default img {
  aspect-ratio: 1;
}

.apartment-gallery-image {
  position: relative;
}
.apartment-gallery-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.apartment-gallery-image:hover:before {
  opacity: 1;
}
.apartment-gallery-image--placeholder {
  background-color: #f0f0f0;
  opacity: 1;
  aspect-ratio: 16/9;
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.apartment-gallery-image--placeholder i {
  font-size: 2rem;
  color: #000;
}
.apartment-gallery-image--placeholder::before {
  display: none;
}

.apartment-gallery-modal-open {
  overflow: hidden;
}

.apartment-gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  z-index: 10000;
}

.apartment-gallery-modal[aria-hidden=false] {
  display: flex;
}

.apartment-gallery-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.apartment-gallery-modal__dialog {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: #fff;
  box-shadow: none;
  overflow: auto;
  /* Slide-up enter animation */
  transform: translateY(24px);
  opacity: 0;
  transition: transform 250ms ease, opacity 250ms ease;
}

.apartment-gallery-modal__bar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  -webkit-backdrop-filter: saturate(180%) blur(6px);
          backdrop-filter: saturate(180%) blur(6px);
  padding: 8px;
  text-align: right;
}

.apartment-gallery-modal__close {
  position: static;
  top: auto;
  right: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.apartment-gallery-modal[aria-hidden=false] .apartment-gallery-modal__dialog.is-open {
  transform: translateY(0);
  opacity: 1;
}

/* Image fade-in */
.apartment-gallery-modal__image {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 300ms ease;
}

.apartment-gallery-modal__image.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .apartment-gallery-modal__dialog {
    transition: none;
    transform: none;
    opacity: 1;
  }
  .apartment-gallery-modal__image {
    transition: none;
    opacity: 1;
  }
}
.apartment-gallery-modal__list {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  gap: 12px;
  background: transparent;
}

.apartment-gallery-modal__item {
  margin: 0;
}

.apartment-gallery-modal__image {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

.apartment-gallery-modal__caption {
  margin-top: 0.5rem;
  color: #000;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.apartment-gallery-open-all {
  position: absolute !important;
  bottom: 16px;
  right: 16px;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 24px;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
  z-index: 2;
}

.apartment-gallery-open-all:hover,
.apartment-gallery-open-all:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  border-color: rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
  outline: none;
}

.apartment-gallery-open-all:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rental-select-field .gchoice {
  border: 1px solid #e6e6e6;
  background-color: #fff;
  padding: 1rem 2rem 1rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
}
.rental-select-field .gchoice label {
  padding-left: 0.5rem;
}
.rental-select-field .gchoice label::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
}
.rental-select-field .gchoice .rental-name {
  display: block;
  font-size: 20px;
  line-height: 2;
}
.rental-select-field .gchoice .rental-name {
  display: block;
  font-weight: 500;
  font-size: 18px;
}
.rental-select-field .gchoice input:checked + label::after {
  border: 2px solid #245580;
  border-radius: 0.5rem;
  opacity: 0.5;
}

#gf_progressbar_wrapper_5 {
  display: none;
}

#field_5_18 {
  visibility: hidden;
  position: absolute;
  pointer-events: none;
}

#field_5_1 input,
#field_5_3 input {
  width: 100%;
}

legend {
  border-bottom: none !important;
}

#gform_fields_5,
#gform_fields_5_2 {
  gap: 1.5rem !important;
}
#gform_fields_5 .gfield_label,
#gform_fields_5_2 .gfield_label {
  color: #000;
}
#gform_fields_5 .gform-field-label--type-sub,
#gform_fields_5_2 .gform-field-label--type-sub {
  font-weight: normal !important;
  padding-top: 2px !important;
}

body .gfield_required::before {
  content: "*";
  color: #ff0000;
  opacity: 0.75;
  font-weight: 500;
  margin-right: 0.25rem;
}
body .gfield_required .gfield_required_text {
  display: none !important;
}

input.button {
  background-color: #245580;
  color: #fff;
  border: none !important;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
input.button:hover {
  background-color: rgb(24.8048780488, 58.5670731707, 88.1951219512);
}
input.button#gform_previous_button_5 {
  border: 1px solid #245580 !important;
  padding: calc(1rem - 1px) calc(2rem - 1px);
}

div#field_5_15 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  border-top: 1px solid #d8d5d5;
  padding-top: 1.3rem;
}

input#input_5_15 {
  width: 100%;
  color: #000;
  text-align: right;
  font-weight: bold;
  font-size: 18px !important;
}

div#field_5_15 label.gfield_label.gform-field-label {
  margin: 0;
}

.gform-page-footer {
  display: flex;
  flex-direction: row;
}
.gform-page-footer input {
  flex: 1 1 auto;
}
