@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

* {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  list-style: none;
  text-decoration: none;
}

:root {
  --main-color: #c2a449;
  --second-color: #626a19;
  --text-color: #a3893b;
  --bg-color: #fdf9f9;
  --box-shadow: 2px 2px 18px rgba(14, 52, 54, 0.15);
}

body {
  color: var(--text-color);
  letter-spacing: 0.2px;
}
section {
  padding: 7rem 0 3rem;
}
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg-color);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.container {
  max-width: 90%;
  margin: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  position: relative;
}

.logo img {
  width: 100px;
}

#menu {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 3;
}

.hamburger .bar {
  height: 3px;
  width: 100%;
  background-color: var(--main-color);
  border-radius: 2px;
  transition: 0.4s;
}

#menu:checked + .hamburger .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menu:checked + .hamburger .bar:nth-child(2) {
  opacity: 0;
}

#menu:checked + .hamburger .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.navbar {
  display: flex;
  gap: 1rem;
}

.navbar a {
  padding: 8px 17px;
  color: var(--main-color);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
}

.navbar a:hover {
  color: var(--second-color);
}

p {
  color: black;
  font-family: "Poppins", sans-serif;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  margin-right: 20px;
  padding: 8px 22px;
  background: var(--text-color);
  color: var(--bg-color);
  border-radius: 10px;
}
.btn:hover {
  background: var(--main-color);
}

.bit {
  padding: 10px 0px;
  background: var(--text-color);
  color: var(--bg-color);
}
.bit:hover {
  background: var(--main-color);
}

.house-details {
  margin-top: 30px;
  padding: 100px;
  animation: fadeInUp 0.8s ease-in-out;
}

.house-title h1 {
  color: var(--main-color);
  font-weight: 600;
}

.house-title .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.row p {
  font-weight: 700;
}

.house-title span {
  font-weight: 600;
  color: black;
}

.hidden {
  display: none !important;
}

.gallery {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  cursor: pointer;
}

.sep {
  height: 200px;
  display: grid;
  grid-template-columns: repeat(3, 2fr);
  gap: 15px;
  grid-auto-rows: auto;
}

.gallery div img,
.gallery div video {
  width: 100%;
  height: 200px; /* Fixed height */
  display: block;
  border-radius: 10px;
  object-fit: cover; /* Ensures image covers the box */
}

.gallery-img-1 {
  width: 50%;
}

.gallery-img-1 video {
  height: 48% !important; /* Let image fill the larger container */
}

.des {
  display: flex;
  justify-content: space-between;
}

.des h4 {
  color: var(--main-color);
}

.small-details {
  margin-top: -400px;
}

.small-details h4 {
  text-align: right;
  font-size: 22px;
}

.small-details span {
  color: black;
}

.small-details p {
  max-width: 700px;
}

.small-details p,
h2 {
  color: black;
}

.line {
  border: 0;
  height: 1px;
  background: #ccc;
  width: 100%;
  max-width: 800px;
  margin: 20px 0 50px;
}

.check-form {
  margin: 30px 0;
  background: #fff;
  box-shadow: var(--box-shadow);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 50px;
}

.check-form i {
  display: block;
}

.check-form div {
  padding: 20px;
}

.check-form input {
  background: transparent;
  border: 0;
  outline: none;
}

.check-form button {
  background: var(--text-color);
  border: 0;
  outline: none;
  color: var(--bg-color);
  padding: 18px;
  width: 300px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.check-form button:hover {
  background: var(--main-color);
}

.bath-field {
  flex: 1;
}

.details i {
  color: var(--text-color);
  font-size: 18px;
}

.details-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, auto));
  gap: 2rem;
  margin-top: 15px;
}

.details-list li {
  color: grey;
}

.map {
  margin: 50px 0;
}

.map iframe {
  width: 100%;
  margin-bottom: 30px;
}

.map h2 {
  margin-bottom: 30px;
}

.map b {
  display: block;
  margin-bottom: 16px;
  color: black;
}

.news {
  margin-top: -120px;
  display: flex;
  align-items: right;
  justify-content: right;
}

.news-text span {
  color: black;
}

.news-text h1 {
  color: var(--second-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer {
  background: var(--text-color);
  color: var(--bg-color);
  padding: 3rem 1rem 1rem;
  border-radius: 5rem 0 0 0;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
}

.footer-container h2 {
  text-align: left;
  color: white;
}

.fir {
  display: flex;
  justify-content: space-between;
}

.footer-box h3 {
  margin-bottom: 1rem;
}

.footer-box a {
  display: block;
  font-size: 0.85rem;
  color: var(--bg-color);
  margin-bottom: 0.5rem;
}

.footer-box a:hover {
  color: var(--second-color);
}

.social {
  display: flex;
  justify-content: center;
}

.social a {
  font-size: 20px;
  margin: 0 5px;
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
}

.image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 1s;
}

/* popup */

.popup {
  position: fixed;
  margin-top: 10px;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 95%;
  max-width: 1600px;
  height: 80vh;
  max-height: 800px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 80px 0;
  z-index: 5;
  overflow: hidden;
  transition: 1s;
  opacity: 0;
}

.popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.popup.active .close-btn,
.popup.active .image-name,
.popup.active .index,
.popup.active .large-image,
.popup.active .arrow-btn {
  opacity: 1;
  transition: opacity 0.5s;
  transition-delay: 1s;
}

.top-bar {
  width: 100%;
  color: #fff;
}

.image-name {
  opacity: 0;
}

.close-btn {
  opacity: 0;
  position: absolute;
  top: 15px;
  right: 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f00;
  cursor: pointer;
}

.icon {
  position: absolute;
  top: 2px;
  right: 2px;
  font-weight: 700;
}

.arrow-btn {
  opacity: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
  transform: translateY(-50%) rotate(180deg);
}

.arrow-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

.index {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 80px;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
}

.display {
  padding: 200px;
}

.large-image {
  width: 100%; /* or 100% if you want it to scale with screen */
  height: auto; /* adjust to your desired popup size */
  object-fit: fill; /* this stretches the image */
  opacity: 0;
  display: block;
  margin: 0 auto;
}

.watermarked {
  position: relative;
  display: inline-block;
}

.watermarked img,
.watermarked video {
  max-width: 100%;
  display: block;
  height: auto;
}

.watermark-text {
  position: absolute;
  bottom: 8px;
  right: 12px;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-family: sans-serif;
  pointer-events: none;
}

@media (max-width: 1080px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

    .gallery {
    display: block;
  }

  .sep {
    width: 100%;
    grid-template-columns: repeat(6, auto);
  }

  .gallery-img-1 {
    width: 100%;
    height: 500px;
    margin-bottom: 15px;
  }

  .gallery-img-1 video {
    height: 100% !important; /* Let image fill the larger container */
  }

  .small-details {
    margin-top: 50px;
  }

  .des {
    display: block;
  }
}

@media (max-width: 880px) {
  .hamburger {
    display: flex;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    text-align: center;
    background: var(--text-color);
    clip-path: circle(0% at 100% 0%);
    transition: clip-path 0.5s ease;
    z-index: 1;
  }

  .navbar.active {
    clip-path: circle(150% at 50% 0%);
  }

  .navbar a {
    padding: 1rem;
    color: var(--bg-color);
  }

  .logo img {
    width: 80px;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .sep {
    gap: 10px;
  }

  .gallery-img-1 {
    width: 100%;
    height: 400px;
    margin-bottom: 15px;
  }

  .gallery div img,
  .gallery div video {
    height: 70px;
  }

  .popup {
    padding: 50px 0; /* reduce internal padding so media has room */
    height: 70vh; /* you already set this in one breakpoint; keep it comfortable */
  }

  .footer-container {
    gap: 1rem;
    text-align: left;
    grid-template-columns: 1fr;
  }

  .fir {
    margin-top: 10px;
  }

  .large-image {
    width: 95%;
    height: 70%;
  }

  .arrow-btn {
    position: fixed;
    top: 93%;
    z-index: 100;
  }

  .des p {
    font-size: 13px;
  }

  .display {
    padding: 0; /* was 200px, which can crush the media on small screens */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .large-image {
    width: 100%;
    height: 100%;
    opacity: 0; /* will become 1 when .popup.active is applied */
  }

  /* The actual <img> or <video> that your JS inserts */
  .large-image img,
  .large-image video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
  }
}

@media (max-width: 768px) {
  .house-details {
    margin-top: 80px;
    padding: 30px;
  }

  .house-title h1 {
    font-size: 25px;
  }

  .house-title {
    font-size: 13px;
  }

  .details-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    font-size: 13px;
  }

  .small-details {
    margin-top: -100px;
  }

  .small-details h2 {
    margin-top: 24px;
  }

  .small-details h4 {
    margin: 10px 0;
    font-size: 18px;
  }

  .check-form {
    padding: 10px 30px;
  }

  .check-form div {
    padding: 20px 0;
    width: 100%;
  }

  .check-form button {
    font-size: 14px;
    margin-top: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
  }

  .nav {
    padding: 0 10px;
  }

  #menu-icon {
    display: initial;
  }

  .navbar a {
    display: block;
    margin: 1rem;
    padding: 5px;
    color: var(--bg-color);
  }

  .navbar a:hover {
    background: var(--second-color);
    color: var(--bg-color);
    transition: 0.5s;
  }

  #menu:checked ~ .navbar {
    clip-path: circle(144% at 100% 1%);
  }

  .logo {
    width: 23%;
  }

  .news {
    align-items: center;
    justify-content: center;
    margin-top: -100px;
  }

  .news-text h1 {
    font-size: 20px;
  }
}

@media (max-width: 442px) {
  .logo {
    width: 30%;
  }
}
