* {
  box-sizing: border-box;
  margin: 0;
}

:root { /* fonts and stuff */
  font-family: Arial, Helvetica, sans-serif;
  --bg-color: white;
  --main-color: lightblue; /* lightblue */
}

body {
  margin: 0;
  background-color: var(--bg-color, white);
}

/* #region: header */

header {
  height: 7vh;
  border-bottom: 5px solid black;
  background-color: var(--main-color, lightblue);
  padding: 1%;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#logo {
  display: block;
  text-align: left;
  text-indent: 0;
  justify-self: left;
  font-size: 1.4rem;
  font-weight: bold;
}

#nav-bar {
  width: 270px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 2%;
}

#nav-bar a {
  background-color: white;
  display: inline-block;
  padding: 10px;
  color: black;
  display: block;
  border-radius: 15px;
  text-align: center;
  width: fit-content;
  padding: 1%;
  transition: background-color 0.3s;
}

#nav-bar a:hover {
  background-color: aqua;
}

/* #endregion */

.spacer {
  height: 7vh;
}

main {
  width: 100%;
  margin: auto;
}

#introduction {
  width: 100%;
}

/* #region: opening-images */

#starting-images {
  width: 80%;
  margin: 20px auto;
  border-radius:  0.5vw;

  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  gap: 2px;
  
  overflow: hidden;
}

#secondary-imgs {
  width: 100%;
  height: 100%;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  justify-content: center;
  align-items: center;
  gap: 5px;
  overflow: hidden;

  opacity: 0;
  transition: opacity 0.8s ease-in;
}

.img-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 4%;

  overflow: hidden;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease-in;
}

.img-wrapper img:hover {
  transform: scale(1.1);
}

#main-img {
  opacity: 0;
  transition: all 0.8s ease-in;
  width: 100%;
}

h1:not(#dialog-title) {
  text-align: center;
  position: absolute;
  top: 50vw;
  left: 10vw;
  right: 10vw;

  border-radius: 2vw;
  background-color: #ffffffb3;
  font-style: italic;
  font-size: clamp(16px, 5vw, 35px);

  opacity: 0;
  transition: opacity 0.8s ease-in;

}

/* #endregion */

p, strong, ul {
  font-size: clamp(20px, 3vw, 25px);
  text-indent: 25px;
  margin: 10px;
}

strong {
  display: inline-block;
}

ul {
  list-style-position: inside;
}

ul li::marker {
  content: "✔";
  color: green;
}


img {
  display: block;
  border-radius: 4%;
  margin: auto;
}

button {
  padding: 10px;
  background-color: white;
  color: black;
  font-size: 1.2rem;
  border-radius: 15px;
  transition: color 0.3s, background-color 0.3s;
}

button:hover {
  background-color: black;
  color: white;
  border-color: gray;
  cursor: pointer;
}

/* #region: rating */

#rating-section {
  justify-self: center;
  background-color: white;
  border: green 5px solid;
  border-radius: 10px;
  margin: 10px;
  padding: 1%;
  min-width: 65%;
  
  display: grid;
  grid-template-columns: 2;
  grid-template-rows: 2;
  grid-template-areas: 
  "rating title"
  "rating details";
  align-items: center;
  gap: 10px;
}

#rating-container {
  grid-area: rating;
  border: 3px solid lightgreen;
  border-radius: 50%;
  width: 10vw;
  height: 10vw;
  color: green;
  display: flex;
  justify-content: center;
  align-items: center;
}

#rating-container p {
  font-weight: bold;
}

#rating-section h4 {
  grid-area: title;
  align-self: end;
  padding: 0;
  margin: 0;
  font-size: clamp(20px, 5vw, 30px);
  color: green;
  font-weight: bold;
}

#rating-section p {
  grid-area: details;
  text-indent: 0;
  padding: 0;
  margin: 2px 0 0 0;
  font-size: clamp(20px, 3vw, 20px);
}

/* #endregion */

/* #region: prezentare-generala */

#presentation, #extra-info {
  background-color: var(--main-color, lightblue); /* brown it was before */
  display: flow-root;
  width: 95%;
  margin: 10px auto 0 auto;
  padding: 3%;
  border-radius: 20px 10px 20px 10px;
  color: black;
}

.float-left, .float-right {
  width: clamp(40px, 50%, 400px);
}

.float-left {
  float: left;
  margin: 10px 20px 10px 0;
  box-shadow: 5px 5px 5px grey;
  border-radius: 0px 5px 5px 0;    /* values should be relative */
}
.float-right {
  float: right;
  margin: 10px 0 10px 20px;
  box-shadow: -5px 5px 5px grey;
  border-radius: 5px 0 0 5px;    /* values should be relative */
}

/* #endregion */

/* #region: footer */

footer {
  background-color: var(--main-color, lightblue);
  padding: 5vh;
}

address {
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px;
  grid-template-rows: repeat(3, auto);
  justify-items: center;
}

address span {
  align-self: center;
  text-align: center;
  font-size: clamp(8px, 5vw, 20px);
}

address h4 {
  grid-column: 1/-1;
  font-size: clamp(20px, 6vw, 30px);
}

/* #endregion */

/* #region: image-selector */

#apartment-images {
  margin: 5%;
}

#images-selector img {
  display: none;
  height: clamp(40px, 80vw, 450px);
  width: clamp(40px, 80vw, 450px);
  object-fit: cover;
}

#controls {
  display: block;
  margin: 0 auto;
  width: fit-content;

  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 3vw;
  justify-content: center;
  align-items: center; 
}

#dots {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  width: fit-content;
  gap: 0.5vw;
  margin: auto;  
}

#dots div {
  display: inline-block;
  border-radius: 90%;
  width: 3vw;
  height: 3vw;
  max-width: 20px;
  max-height: 20px;
  background-color: grey;
  transition: background-color 0.3s ease-in;  
}

#dots div:hover {
  cursor: pointer;
}

/* #endregion */

/* #region: rezervare */

#rezerva-acum {
  display: block;
  margin: 0 auto;
  width: clamp(1px, 30vw, 300px);
  margin: 5% auto;
}

#request-modal {
  margin: auto;
  width: fit-content;
  max-width: 600px;
  padding: 2%;
  transition: all 0.5s  ease-in;
}

#close-btn {
  position: absolute;
  right: 0;
  top: 0;
  border: 0;
  border-radius: 0 0 0 15px;
}

#dialog-title {
  text-align: center;
  margin: 20px 0;    
}

#request-modal p {
  margin: 10px auto;
  text-align: center;
}

#detalii-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2vw;
  justify-content: center;
}

/* #endregion */

section:not(#introduction), p:not(section:not(#introduction) p, #request-modal p) {
  animation: show-up 1.2s linear;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

/* #region: keyframes-and-media */

@keyframes show-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.75);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  * {
  scroll-behavior: smooth;
  }
}

@media (min-width: 900px) {
  main {
    width: 90%;
  }

  
  #starting-images {
    grid-template-columns: 1fr 0.8fr;
    
    overflow: hidden;
  }



  h1:not(#dialog-title) {
    top: 22vw;
    left: 15vw;
    right: 46.5vw;
  }
  #detalii-contact {
    grid-template-columns: 1fr 1fr;
  }
}

/* #endregion */