/*---------------*/
/*BASE CSS*/
/*---------------*/
html {
  scroll-behavior: smooth;
}

body {
  background-color: rgb(248, 248, 233);
  margin: 0;
  font-family: "Raleway", sans-serif;
  font-feature-settings: "lnum";
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

h1 {
  font-weight: 400;
  font-size: 4rem;
}

h2 {
  font-weight: 600;
  font-size: 2rem;
}

/*---------------*/
/*BODY CSS*/
/*---------------*/

.section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.hero {
  /* Use 100vh to fill the full height of the screen */
  min-height: 100vh;

  /* Use Flexbox to center the text vertically and horizontally */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background-image: url("../pictures/about.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;

  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  background-blend-mode: overlay;
  color: white;

  /* Remove default margins that might cause scrollbars */
  margin: 0;
  padding: 300px 20px 20px 20px;
  box-sizing: border-box;
  padding-top: 80px;
}

.hero h1 {
  font-weight: 400;
  font-size: 6rem;
}

.hero p {
  font-weight: 300;
  font-size: 2.5rem;
  margin: 0;
}

#about {
  max-width: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    url("../pictures/palma.png");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

#about .text {
  margin-left: auto;
  margin-right: auto;
  width: 80%;
  max-width: 1100px;
}

#about h2 {
  text-align: center;
}

#about .devider {
  width: 12%;
  margin: 0 auto;
  border: solid 1px var(--primary-color);
}

#about p {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 50px;
}

#prices {
  text-align: center;
  background-color: var(--secondary-color);
  max-width: none;
}

#prices .prices-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#prices .devider {
  width: 30%;
  margin-right: auto;
  margin-left: auto;
  border: solid 1px var(--primary-color);
}

.price-card {
  color: var(--header-color);
  padding: 30px;
  border-radius: 12px;
}

.price-header {
  display: flex; /* Align items in a row */
  align-items: baseline; /* Align text at the bottom/baseline */
  width: 100%; /* Ensure it fills the container width */
  gap: 5px; /* Space between text and dots */
}

.price-header .price {
  font-size: 1.8rem;
  font-weight: bold;
  white-space: nowrap; /* Prevents the price or text from breaking into two lines */
  margin: 0; /* Remove default heading margins */
}

.price-header .dotted {
  flex-grow: 1; /* This tells the span to grow and fill the gap */
  border-bottom: 4px dotted var(--primary-color); /* The actual dots */
  height: 1.8em; /* Matches height to align dots with text height */
  margin-bottom: 5px; /* Fine-tune this to align the dots with the text baseline */
}

.price-details p.price-row {
  display: flex; /* Align items in a row */
  align-items: baseline; /* Keeps text and dots aligned at the bottom */
  font-size: 1.1rem;
  width: 100%;
  margin: 8px 0; /* Adjust spacing between rows */
  gap: 5px;
}

.price-details .addition {
  margin-top: 5px;
  text-align: left;
}

/* Ensure labels and prices don't wrap to new lines */
.price-details p.price-row span:first-child,
.price-details p.price-row strong {
  white-space: nowrap;
}

.additional-row {
  display: flex;
  align-items: flex-end;
  width: 100%;
  gap: 5px; /* Adds a tiny bit of space between elements */
}

.additional-row span:first-child {
  flex: 0 1 auto; /* 0 grow, 1 shrink: It fits content but CAN shrink/wrap */
  max-width: 60%; /* Prevents the text from taking up the whole row */
  word-wrap: break-word; /* Allows long words to break */
  overflow-wrap: break-word;
}

.additional-row .price-number {
  text-wrap: nowrap;
}

.dotted-details {
  flex-grow: 1; /* Makes dots fill the remaining space */
  border-bottom: 2px dotted var(--primary-color); /* Use a border instead of characters */
  min-width: 20px; /* Ensures dots don't disappear entirely */
  height: 1em;
  margin: 0;
}

.price-note {
  margin-top: 20px;
  opacity: 0.9;
}

#gallery {
  text-align: center;
}

#gallery .devider {
  width: 30%;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 50px;
  border: solid 1px var(--primary-color);
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto; /* Explicit 8 rows */
  gap: 20px;
  padding: 20px;
}

.gallery-item {
  /* Prevents layout shift */
  aspect-ratio: 4 / 3;
  overflow: hidden;

  /* Hardware acceleration */
  will-change: transform;
  transform: translateZ(0);
}

.lazy-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  border-radius: 10px;
  display: block;

  /* Start invisible for the scroll effect */
  opacity: 0;
  transform: translateY(120px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

/* This class will be added via JavaScript when the image is visible */
.lazy-image.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item img:hover {
  opacity: 0.8;
}

/* Lightbox Styles */
#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#expanded-img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 50px;
  cursor: pointer;
}

#booking {
  background-color: var(--secondary-color);
  max-width: none;
}

.booking-container {
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.booking-container h2 {
  color: var(--header-color);
  margin-top: 0px;
  margin-bottom: 30px;
}

.booking-container .devider {
  width: 30%;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 40px;
  border: solid 1px var(--primary-color);
}

.booking-form input[type="text"],
.booking-form input[type="email"],
.booking-form input[type="phone"],
.booking-form input[type="number"] {
  display: block;
  width: 100%;
  max-width: 540px;
  margin-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
  border-radius: 10px;
  border: solid 1.5px var(--primary-color);
}

#datepicker-booking_calendar {
  margin-top: 30px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 10px;
}

#reviews {
  text-align: center;
}

#reviews .devider {
  width: 30%;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 40px;
  border: solid 1px var(--primary-color);
}

#reviews h2 {
  margin-top: 0px;
  margin-bottom: 30px;
}

.google-source {
  margin-top: 30px;
  font-size: 0.9em;
  color: #555;
}

.google-source a {
  color: #2c3e50;
  text-decoration: underline;
}

.google-maps-embed {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.google-maps-embed iframe {
  display: block; /* Removes the bottom whitespace gap */
}

.map-rate {
  display: inline-block;
  padding: 12px 24px;
  background: var(--secondary-color);
  color: var(--primary-color);
  font-family: "Raleway", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.2rem;
  font-style: normal;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 20px;
}

.content-wrapper {
  max-width: 80%;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
}
.data-management {
  margin: auto;
}
.data-management div {
  max-width: fit-content;
  margin: auto;
}
.data-management p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  width: fit-content;
}

.container-reviews {
  width: 1000px;
  max-width: 90%;
  gap: 20px;
  display: flex;
  flex-direction: column;
  margin: auto;
  overflow: hidden;
}

.review-slide {
  display: flex;
  width: 100%;
  padding: 20px;
  flex-direction: column;
  align-items: center;
  align-content: center;
  gap: 20px;
  text-align: center;
  border-radius: 12px;
  box-sizing: border-box;
}

.review-slide p,
.review-slide h3 {
  margin: 0;
}

@media (max-width: 1024px) {
  h1 {
    font-weight: 400;
    font-size: 3rem;
  }

  h2 {
    font-weight: 600;
    font-size: 1.8rem;
  }
  .hero h1 {
    font-size: 4rem;
  }
  .hero p {
    font-size: 2rem;
  }
  .price-header .price {
    font-size: 1.7rem;
  }

  .price-details p.price-row,
  .price-details .addition {
    font-size: 1rem;
  }
}

/* Responsive Adjustments */

/* For Tablets (Screens smaller than 992px) */
@media (max-width: 992px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 15px;
    padding: 15px;
  }
}

/* For Mobile Phones (Screens smaller than 600px) */
@media (max-width: 600px) {
  .gallery-container {
    grid-template-columns: 1fr; /* 1 column */
    gap: 10px;
    padding: 10px;
  }

  /* Make the divider wider on mobile for better visibility */
  #gallery .devider {
    width: 60%;
  }

  /* Ensure the lightbox image takes up more space on small screens */
  #expanded-img {
    max-width: 95%;
    max-height: 80vh;
  }

  .close-btn {
    top: 10px;
    right: 20px;
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  #about {
    flex-direction: column-reverse;
    max-width: 90%;
    padding: 20px;
  }
  #about .image {
    flex: 0;
  }
  #about .image img {
    display: none;
  }
  .google-maps-embed {
    max-width: 90%;
    margin: 20px auto;
  }
}

@media (max-width: 425px) {
  h1 {
    font-weight: 400;
    font-size: 2rem;
  }

  h2 {
    font-weight: 600;
    font-size: 1.3rem;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .hero p {
    font-size: 1.6rem;
  }

  #about .text {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.4rem;
    line-height: 25px;
  }

  .booking-form input[type="text"],
  .booking-form input[type="email"],
  .booking-form input[type="phone"],
  .booking-form input[type="number"] {
    max-width: 90%;
  }

  .price-header .price {
    font-weight: 400;
    font-size: 1.1rem;
  }

  .price-details p.price-row,
  .price-details .addition,
  .price-details .additional-row {
    font-size: 0.8rem;
  }

  .price-details .additional-row {
    text-align: left;
  }

  .price-card {
    padding: 10px;
  }

  .price-header .dotted {
    flex-grow: 1; /* This tells the span to grow and fill the gap */
    border-bottom: 2px dotted var(--primary-color); /* The actual dots */
    height: 1.8em; /* Matches height to align dots with text height */
    margin-bottom: 5px; /* Fine-tune this to align the dots with the text baseline */
  }
}
