/* хэдэр */

#menu a:nth-child(4) {
  font-weight: 700;
}

.nav_menu.active {
  z-index: 1;
}

/* экраны */

body {
  overflow-x: hidden;
}

#house_project {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 2.4vw;
  padding: 4vw 4.5vw 4vw;
}

.blocks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3vw;
  padding-bottom: 5.2vw;
}

.blocks:nth-child(4) {
  padding-bottom: 0;
}

.blocks:nth-child(1),
.blocks:nth-child(3) {
  width: 70%;
}

/* кликабельный блок со схемой здания и рендерами */

#buttons {
  display: flex;
  flex-direction: row;
  gap: 1vw;
  margin-bottom: -3vw;
}

.floor {
  position: relative;
}

.floor img {
  width: 20vw;
}

.radios {
  position: absolute;
  top: 0;
  left: 0;
}

.radio {
  position: absolute;
  width: 5vw;
  height: 5vw;
  cursor: pointer;
  opacity: 0;
}

#left_bedroom {
  left: 1vw;
  top: 5vw;
}

#altar {
  left: 7vw;
  top: 7.5vw;
}

#right_bedroom {
  left: 13vw;
  top: 5vw;
}

#library {
  left: 3vw;
  top: 12vw;
}

#potionary {
  left: 7vw;
  top: 7vw;
}

#divination {
  left: 7vw;
  top: 0.7vw;
}

#garden {
  left: 1vw;
  top: 1vw;
  width: 17vw;
  height: 17vw;
}

#titles {
  display: flex;
  justify-content: center;
  flex-direction: row;
  font-weight: 700;
  gap: 14.2vw;
  width: 62vw;
}

#images {
  display: flex;
  flex-direction: row;
  gap: 1vw;
}

#images img {
  width: 30vw;
}

/* текстовый блок с цитатой */

#quote {
  font-weight: 700;
  font-size: 1.5em;
  text-align: center;
  line-height: 2.7vw;
  width: 70%;
}

/* книга */

#image_stack {
  position: relative;
  margin: 0 auto;
  width: 76vw;
  height: 54.4vw;
}

#image_stack img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#image1.move {
  animation: image1 1s forwards;
}

#image2.move {
  animation: image2 1s forwards;
}

#image3.move {
  animation: image3 1s forwards;
}

#image4.move {
  animation: image4 1s forwards;
}

#image5.move {
  animation: image5 1s forwards;
}

#image6.move {
  animation: image6 1s forwards;
}

#image7.move {
  animation: image7 1s forwards;
}

#image8.move {
  animation: image8 1s forwards;
}

#image9.move {
  animation: image9 1s forwards;
}

@keyframes image1 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(-60%, -120%, 0);
  }
}

@keyframes image2 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(115%, 10%, 0);
  }
}

@keyframes image3 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(-10%, 140%, 0);
  }
}

@keyframes image4 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(60%, 120%, 0);
  }
}

@keyframes image5 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(35%, -130%, 0);
  }
}

@keyframes image6 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(90%, 120%, 0);
  }
}

@keyframes image7 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(-115%, 20%, 0);
  }
}

@keyframes image8 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(-10%, -130%, 0);
  }
}

@keyframes image9 {
  from {
    transform: none;
  }
  to {
    transform: translate3d(30%, 120%, 0);
  }
}

/* booking pop-up for the first block's button */

.booking_pop_up {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

#booking_pop_up_content {
  background-color: #6b854f;
  margin: 10vw auto;
  padding: 5vw;
  width: 63vw;
  height: 83vw;
}

#booking_pop_up_content input[type='text'],
input[type='tel'],
input[type='email'],
select {
  width: 28.2vw;
  height: 4vw;
  border: solid 0.2vw #1d1d1d;
  padding: 0 1.1vw;
}

#booking_pop_up_content h2 {
  padding-bottom: 4vw;
  margin-top: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 2.8vw;
}

.radio_check {
  display: flex;
  flex-direction: row;
  width: 30.8vw;
  gap: 1.1vw;
  align-items: center;
}

.input_rect,
#submit,
#visit {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.point {
  display: flex;
  flex-direction: column;
  width: 63vw;
  gap: 1.4vw;
}

#booking_pop_up_content input[type='radio'] {
  width: 1.5vw;
  height: 1.5vw;
  border: 0.2vw solid #1d1d1d;
  border-radius: 50%;
  appearance: none;
  margin: 0;
  cursor: pointer;
}

#booking_pop_up_content input[type='radio']:checked {
  background-color: #1d1d1d;
  border: thick double #6b854f;
}

.point > p {
  height: 21.9vw;
  border: 0.2vw solid #1d1d1d;
  padding: 1.1vw;
}

#submit,
.input_rect {
  justify-content: space-between;
}

select {
  width: 30.8vw;
  height: 4.4vw;
  background-color: #6b854f;
}

#submit button {
  width: 30.8vw;
}

#submit button:last-child {
  background-color: #6b854f;
  border: solid 0.2vw #1d1d1d;
  color: #1d1d1d;
}

#submit button:last-child:hover {
  background-color: #1d1d1d;
  border: solid 0.2vw #1d1d1d;
  color: #6b854f;
}

@media only screen and (min-width: 360px) and (max-width: 767px) {
  /* форма брони */

  .booking_pop_up {
    background-color: #6b854f;
  }
  #booking_pop_up_content {
    /* position: fixed; */
    left: 0;
    top: 0;
    width: 84%;
    height: 183vw;
    margin: 0;
    padding: 8vw;
  }

  form {
    gap: 5vw;
  }

  .point {
    width: 100%;
    gap: 3vw;
  }

  #visit {
    width: 100%;
    flex-direction: column;
    text-wrap: nowrap;
  }

  #visit p {
    margin-bottom: 1vw;
  }

  #booking_pop_up_content input[type='radio'] {
    width: 3vw;
    height: 3vw;
    border: solid 0.3vw #1d1d1d;
    margin-bottom: 1vw;
  }

  .radio_check {
    width: auto;
    height: auto;
  }

  #booking_pop_up_content > h2 {
    padding-bottom: 7vw;
    margin-top: 0;
    font-size: 4em;
  }

  #booking_pop_up_content input[type='text'],
  input[type='tel'],
  input[type='email'],
  select {
    width: 95%;
    height: 6.8vw;
    padding: 1vw 2vw;
    border: solid 0.3vw #1d1d1d;
  }

  select {
    width: 100.3%;
    height: 9.5vw;
  }

  .input_rect {
    flex-direction: column;
    gap: 1.5vw;
  }

  .point > p {
    height: 30vw;
    padding: 2vw 2vw;
    border: solid 0.3vw #1d1d1d;
  }

  #submit button {
    width: 40vw;
    height: 7vw;
  }

  #submit button:last-child {
    border: solid 0.3vw #1d1d1d;
  }

  /* 2 блок */

  #house_project {
    padding: 2vw 4vw 0 4vw;
    line-height: inherit;
  }

  #quote {
    font-size: 3em;
    width: 85%;
    line-height: 5.5vw;
    margin: 2vw;
  }

  .floor img {
    width: 28vw;
  }

  #buttons {
    gap: 4vw;
    margin-bottom: -1vw;
  }

  #left_bedroom {
    left: 1.5vw;
    top: 8vw;
  }

  #altar {
    left: 10.5vw;
    top: 11vw;
  }

  #right_bedroom {
    left: 20vw;
    top: 8vw;
  }

  #library {
    left: 6vw;
    top: 18vw;
  }

  #potionary {
    left: 11vw;
    top: 11vw;
  }

  #divination {
    left: 10vw;
    top: 2vw;
  }

  #garden {
    left: 4.5vw;
    top: 4.5vw;
    width: 17vw;
    height: 17vw;
  }

  #titles {
    text-wrap: nowrap;
    gap: 18.2vw;
    width: 92vw;
  }

  #middle_image,
  #right_image,
  #image_stack {
    display: none;
  }

  #images img {
    width: 100%;
  }

  .blocks {
    padding-bottom: 6vw;
  }

  .blocks:nth-child(4) button {
    width: 52vw;
  }

  .blocks:nth-child(1),
  .blocks:nth-child(3) {
    width: 100%;
  }
}

@media only screen and (min-width: 768px) and (max-width: 1023px) {
  #house_project {
    padding: 4vw;
    width: 92%;
  }

  .blocks:nth-child(1),
  .blocks:nth-child(3) {
    width: 80%;
  }

  .blocks {
    gap: 4vw;
  }

  #images img {
    width: 45.5vw;
  }

  #right_image {
    display: none;
  }

  .floor img {
    width: 25vw;
  }

  #left_bedroom {
    left: 1.5vw;
    top: 8vw;
  }

  #altar {
    left: 9.5vw;
    top: 11vw;
  }

  #right_bedroom {
    left: 18vw;
    top: 8vw;
  }

  #library {
    left: 5vw;
    top: 16vw;
  }

  #potionary {
    left: 9vw;
    top: 9vw;
  }

  #divination {
    left: 9vw;
    top: 2vw;
  }

  #garden {
    left: 3.5vw;
    top: 3.5vw;
  }

  #buttons {
    gap: 6vw;
  }

  #titles {
    gap: 23.5vw;
    text-wrap: nowrap;
    margin-top: 1vw;
  }

  #quote {
    width: 70%;
  }

  .blocks:nth-child(4),
  #image_stack {
    width: 100%;
    height: 75vw;
  }
}
