/* general styling applied to all pages */
body {
  background-color: #404e63;
  color: #0d0d0d;
  position: relative;
  display: flex;
  font-size: 1.6rem;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  font-family: "anago", sans-serif;
  font-weight: 1000;
  font-style: normal;
}
#wrapper {
  width: 100%;
}

/* adds white background for devProjects and rental Properties pages */
.rentbody {
  background-color: #f2efe9;
  padding-bottom: 2%;
}
/* sets background color for form page and avoids gaps */
.formbody {
  background-color: #b3bcc4;
  padding-top: 0px;
  margin-top: 0px;
}
.formbody h1 {
  text-align: center;
  padding-top: 2%;
  margin-top: 0px;
}

/* Navbar Styles */
.logo {
  width: 18vh;
}
.logo img {
  width: 100%;
  display: flex;
}
.navHolder {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.33); /* shadow effect */
  background-color: #404e63;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 3px;
  color: white;
  height: 60px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.navLinks {
  display: flex;
  list-style: none;
  margin-top: 20px;
}

.navLinks li {
  margin: 0 18px;
}

.navLinks a {
  text-decoration: none;
  color: white;
  opacity: 0.6;
  font-size: 1.4rem;
  transition: color 0.3s;
  white-space: nowrap;
}
.activeLink a {
  opacity: 0.85;
}

.navLinks a:hover {
  opacity: 1;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: rgb(211, 211, 211);
  margin: 3px 0;
  transition: 0.3s;
}

/* responsive navbar*/
@media (max-width: 768px) {
  .logo {
    width: 14vh;
  }
  .navHolder {
    position: relative;
  }
  .navLinks {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; /* places it just below the hamburger */
    right: 0; /* aligns to the right edge of hamburger */
    width: max-content; /* so it matches content size, or set px/rem if you want */
    padding: 10px;
    background-color: #404e63;
    z-index: 2;
    margin: 0px;
  }

  /* Show nav menu when active */
  .navLinks.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* ensures all images respond to container size */
.responsiveImg {
  width: 100%;
  height: 100%;
  display: flex;
}

/* images, text overlays, appearing on scroll on index.html */
.imgContainer1 {
  width: 100%;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  display: flex;
  position: relative; /* Needed for the overlay */
}

.imgContainer1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Black with 50% opacity */
  z-index: 1;
}

.textOverlay {
  position: absolute;
  z-index: 2;
  color: white;
  font-size: 1.8rem;
  transition: opacity 0.8s ease;
  width: 80%;
  text-align: center;
  text-decoration: none;
}

.one {
  top: 22%;
  width: 60%;
  opacity: 0; /* start hidden */
  /* remove any animation: fadeIn ... */
}

/* when we want it visible */
.one.show {
  opacity: 1;
}

.two {
  bottom: 36%;
  opacity: 0; /* Hidden initially */
  width: 60%;
}
.three,
.four {
  opacity: 0; /* Hidden initially */
}

.section1,
.section2 {
  display: flex;
  justify-content: center;
  align-items: center;
}

.section1 .imgContainer1 {
  width: 62.5%;
}

.textBox {
  color: white;
  width: 50%;
  display: flex;
  font-size: 1.7rem;
  align-items: center;
  margin-left: 5%;
  margin-right: 5%;
  transition: opacity 0.8s ease;
  text-align: center;
}

.overlayBtn {
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border: solid white 1px;
  padding: 2%;
  width: 45%;
  cursor: pointer;
}
.overlayBtn:hover {
  opacity: 78%;
  cursor: pointer;
  /* background-color: rgba(0, 0, 0, 0.6); */
}

/* mobile responsiveness for index.html */
@media (max-width: 768px) {
  .textOverlay {
    font-size: 1rem;
    transition: opacity 0.8s ease;
    width: 80%;
    text-align: center;
  }

  .one {
    width: 80%;
    opacity: 0;
  }

  .section1 .imgContainer1 {
    width: 100%;
  }
  .textBox {
    color: white;
    width: 80%;
    display: flex;
    font-size: 0.8rem;
    margin-left: auto;
    margin-right: auto;
    transition: opacity 0.8s ease;
    margin-top: 0;
    margin-bottom: 8%;
    padding-bottom: 0;
    padding-top: 0;
  }
  .section1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 0;
  }

  .overlayBtn {
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    border: solid white 1px;
    padding: 2%;
    width: 45%;
  }
  .overlayBtn:hover {
    opacity: 80%;
  }
}

/* card layour with expand reaction on rental and dev pages */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  justify-content: center;
  margin-top: 3%;
}
.flipContainer {
  width: 500px;
  height: 400px;
  /* perspective: 1000px; */
  cursor: pointer;
  position: relative;
  border-radius: 5px;
}

.imgContainerFlip {
  object-fit: contain;
  object-position: center;
  border-radius: 5px;
}

.flipCard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: all 0.5s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 1;
  overflow: hidden;
  border-radius: 5px;
}
.formCard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: all 0.5s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 1;
  overflow: hidden;
  border-radius: 5px;
}

.front,
.back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background-color: #b3bcc4;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.front {
  opacity: 1;
  z-index: 2;
}
.back {
  opacity: 0;
  z-index: 1;
}

.flipCard.active .front {
  opacity: 0;
  transform: scale(0.98); /* slight shrink */
  z-index: 1;
}

.flipCard.active .back {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.flipCard.active {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 85vw;
  height: 75vh;
  z-index: 9999 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: all 1s ease;
}

.front h4 {
  font-size: 1.8rem;
  padding-top: 0px;
  margin-bottom: 0px;
  text-align: center;
  justify-content: center;
  color: black;
}
.back {
  transform: rotateY(180deg);
  font-size: 1.5rem;
}
.back h1 {
  padding: 0;
  margin: 0;
  text-align: center;
  font-size: 2.5rem;
}

/* image carousel */
.propertyContent {
  margin: 3%;
  display: flex;
  gap: 5%;
}
.propertyContent p {
  width: 46%;
}

.carousel {
  width: 35vw;
  height: 50vh;
  position: relative;
}
.carousel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: 200ms opacity ease-in-out;
  transition-delay: 200ms;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* same as 'center center' */
  border-radius: 10px;
}

.slide[data-active] {
  opacity: 1;
  z-index: 1;
  transition-delay: 0ms;
}

.previous,
.next {
  position: absolute;
  z-index: 2;
  background: none;
  border: none;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 100%;
}

.previous svg,
.next svg {
  width: 2.5rem; /* size */
  height: 2.5rem;
  fill: #333; /* arrow color */
  transition: fill 0.3s;
  background-color: white;
  opacity: 50%;
  border-radius: 50px;
}

.previous:hover svg,
.next:hover svg {
  /* fill: #0077cc;  */
  opacity: 80%;
}

.previous {
  left: 0rem;
}
.next {
  right: 0rem;
}

/* need to review some code may be redundant */
@media (max-width: 768px) {
  .carousel {
    width: 80vw;
    height: 30vh;
    margin-left: auto;
    margin-right: auto;
  }

  .flipCard.active {
    width: 80vw;
    height: 75vh;
    justify-content: center;
    padding-top: 15%;
  }
  .propertyContent {
    display: block;
  }
  .previous,
  .next {
    font-size: 1rem;
    opacity: 1;
  }
  .text {
    width: 100%;
  }
  .text h1 {
    font-size: 34px;
  }

  .section1 {
    display: block;
    padding-top: 10%;
  }
  .section2 {
    display: block;
    padding-top: 0;
    padding-bottom: 10%;
  }

  .imgContainer2 {
    width: 60%;
    margin-right: auto;
    margin-left: auto;
  }

  .textbox {
    width: 80%;
    margin-right: auto;
    margin-left: auto;
  }
  .propertyContent {
    margin-bottom: 20%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

/* additional styling for card-info expanders */
.flipContainer:hover .flipCard:not(.active) {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transform: scale(1.03);
}
.flipCard.active:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* overlay */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
  z-index: 1000; /* below active card */
}

/* show overlay */
#overlay.active {
  opacity: 1;
  visibility: visible;
}

/* form layout and styling for contactUs.html */
.inquiryForm,
.inquiryFormDev {
  max-width: 850px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.inquiryForm input {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.2rem;
}
.inquiryForm {
  padding: 5px;
  /* border: 1px solid #ccc; */
  border-radius: 6px;
  font-size: 1.4rem;
}

.inquiryForm button {
  padding: 10px;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.6rem;
}

.inquiryForm button:hover {
  background: #1a242f;
}

@media (max-width: 768px) {
  .flipContainer {
    width: 90vw;
    height: 35vh;
  }

  .propertyContent p {
    width: 90%;
    font-size: 1rem;
    margin-left: auto;
    margin-right: auto;
  }

  .back h1 {
    display: none;
  }

  .inquiryForm,
  .inquiryFormDev {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .inquiryForm input {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.2rem;
  }
  .inquiryForm {
    padding: 5px;
    /* border: 1px solid #ccc; */
    border-radius: 6px;
    font-size: 1.2rem;
  }

  .inquiryForm button {
    padding: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.4rem;
  }
}
#overlay {
  display: none;
  opacity: 0;
  pointer-events: none; /* 🔑 don’t block taps when hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* dim background */
  transition: opacity 0.3s ease;
  z-index: 1000;
}

#overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto; /* clickable only when active */
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  color: black;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000; /* make sure it stays on top */
  opacity: 0.5;
}

.popup-close:hover {
  opacity: 0.8;
}

.formMessage {
  text-align: center;
  margin-top: 10%;
}
