/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300&display=swap');

/* Reset + Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f9f9f9; /* Optional background color for contrast */
}

/* Container + Heading */
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 40px 20px;
}

.container .heading {
  width: 60%;
  padding-bottom: 30px;
}

.container .heading h3 {
  font-size: 2.5em;
  font-weight: bolder;
  padding-bottom: 10px;
  border-bottom: 3px solid #222;
}

.container .heading h3 span {
  font-weight: 100;
  color: #555;
}

/* Gallery Grid */
.container .box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px; /* Adds spacing between images */
  width: 100%;
}

.container .box .dream {
  display: flex;
  flex-direction: column;
  width: 32%;
}

/* Gallery images with bounce-back hover */
.container .box .dream img {
  width: 100%;
  max-height: 250px; /* Prevents overly tall images */
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
  transition: transform 0.3s cubic-bezier(0.25, 1.25, 0.5, 1),
              box-shadow 0.3s ease;
  cursor: pointer;
}

.container .box .dream img:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

/* More Button */
.container .btn {
  margin: 40px 0 70px;
  background: #222;
  padding: 15px 40px;
  border-radius: 5px;
}

.container .btn a {
  color: #fff;
  font-size: 1.2em;
  text-decoration: none;
  font-weight: bolder;
  letter-spacing: 3px;
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* Black with opacity */
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 85%;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

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

/* Prev/Next buttons */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%;
  padding: 10px 15px;
}

.prev { left: 20px; }
.next { right: 20px; }

/* Responsive adjustments */
@media only screen and (max-width: 769px) {
  .container .box {
    flex-direction: column;
    align-items: center;
  }

  .container .box .dream {
    width: 100%;
  }
}

@media only screen and (max-width: 643px) {
  .container .heading {
    width: 90%;
  }

  .container .heading h3 {
    font-size: 1.5em;
  }

  .container .btn {
    padding: 10px 20px;
  }

  .container .btn a {
    font-size: 1em;
  }
}

/* Gallery images with smooth pop-out on hover */
.gallery-img {
  transition: transform 0.3s cubic-bezier(0.25, 1.25, 0.5, 1),
              box-shadow 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
