* {
  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%;
}

#main-img {
  width: 100%;
  max-width: 900px;
  opacity: 0;
  transition: all 0.8s ease-in;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

h1:not(#dialog-title) {
  border-radius: 5vw;
  background-color: #ffffffb3;
  text-align: center;
  position: absolute;
  top: 55vw;
  left: 5vw;
  right: 5vw;
  margin: 0 auto;
  align-self: center;
  max-width: 900px; 
  opacity: 0;
  transition: opacity 0.8s ease-in;

  font-style: italic;
  font-size: clamp(16px, 6vw, 70px);
}

p, strong, ul {
  font-size: clamp(20px, 3vw, 25px);
  text-indent: 25px;
  margin: 10px;
}

ul {
  list-style-position: inside;
}

ul li::marker {
  content: "✔";
  color: green;
}

strong {
  display: inline-block;
}

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 */

#apartment-images {
  margin: 10%;
}

#images-selector img {
  display: none;
  width: clamp(40px, 80%, 450px);
}

#controls {
  display: block;
  margin: 0 auto;
  width: fit-content;

  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2vw;
  justify-content: center;
  align-items: center; 
}

#dots {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  width: fit-content;  
}

#dots div {
  display: inline-block;
  border-radius: 5px;
  width: 1vw;
  height: 1vw;
  background-color: grey;
  transition: background-color 0.3s ease-in;  
}

#rezervare {
  margin: 0 auto;
  width: fit-content;
}

#rezerva-acum {
  width: 30vw;
  height: 10vw;
  margin: 5% auto;
}

#request-modal {
  margin: 5% auto;
  width: 80vw;
  height: 60vh;
  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: 20px 0;
  text-align: center;
}

#detalii-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5%;
  justify-content: center;
}

section:not(#introduction), p:not(section:not(#introduction) 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%;
  }
  h1:not(#dialog-title) {
    top: 400px;
  }
}

/* #endregion */