:root {
  --primary-color: #0057ff;
  --secondary-color: #9653da;
  --tertiary-color: #100e2c;
  --font-family: "Arial, sans-serif";
  --font-size: 16px;
  --background-color: #f4f4f4;
  --text-color: #333;
  --another: rgb(252, 238, 218);
}
body {
  display: grid;
  place-items: center;
  background-color: var(--background-color);
  margin: 0;
}
.logo a {
  color: var(--secondary-color);
  font-size: 1.2rem;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  gap: 18em;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.667);
  backdrop-filter: blur(10px);
  align-items: center;
  color: white;
  padding: 0.5em;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 2em;
}
.logo {
  color: var(--secondary-color);
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
}
.nav-links a:hover {
  color: var(--secondary-color);
}
section {
  margin-top: 6em;
}
.housing-text {
  text-align: center;
  margin-top: 1em;
}
#search {
  padding: 1em;
  border: 1px solid var(--secondary-color);
  border-radius: 6px;
}
.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}
.housing-text h1 {
  color: var(--secondary-color);
  text-align: center;
}
.btn1 {
  padding: 1em 2em;
  background-color: var(--secondary-color);
  border: none;
  width: auto;
  border-radius: 6px;
}
.card {
  background: var(--background-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}
#search {
  padding: 10px;
  width: 300px;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 16px;
}
#search-input {
  padding: 10px;
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
}
.btn1 {
  padding: 10px 15px;
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin-left: 10px;
  border: none;
  cursor: pointer;
}
.btn1:hover {
  background-color: #100e2c;
}
.card:hover {
  transform: translateY(-5px);
}
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-content {
  padding: 15px;
}
.btn {
  display: inline-block;
  padding: 10px 15px;
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin-top: 10px;
}
.card h2 {
  margin: 0;
  font-size: 20px;
  color: #000;
}
.card p {
  margin: 5px 0;
  color: #555;
}
#price2 {
  font-weight: bold;
  color: #000;
  font-size: 18px;
}
.containerr {
  background-color: var(--another);
  margin-top: 2em;
  text-align: center;
  display: grid;

  justify-content: center;
  align-items: center;
  border-radius: 6px;
}
.btn3 {
  color: var(--background-color);
  background-color: #9653da;
  padding: 1em 2em;
  width: 12em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn:hover {
  background-color: var(--tertiary-color);
}
#houseForm {
  display: grid;
  place-content: center;
  grid-template-columns: repeat(1, 1fr);
  padding: 4em;
  background-color: var(--another);
  gap: 2em;
  border-radius: 6px;
}
#houseForm input {
  width: 19em;
  padding: 1em;
  border: none;
  border: 1px solid var(--secondary-color);
  border-radius: 6px;
}
#cancel {
  cursor: pointer;
  font-weight: bolder;
}
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  background: var(--tertiary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.iconify {
  color: var(--secondary-color);
}
.skeleton-card {
  width: 300px;
  padding: 10px;
  border-radius: 12px;
  background: #f0f0f0;
  overflow: hidden;
  margin: 10px;
}

.skeleton-img {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line {
  height: 15px;
  margin: 12px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
/* Mobile nav behavior */
@media (max-width: 768px) {
  nav {
    display: flex;
    justify-content: space-around;
    gap: 0.5em;
  }
  .btn3 {
    position: relative;
    left: 0em;
  }
  #houseForm input {
    width: 12em;
  }
  body {
    display: grid;
    place-items: center;
    padding: 0 0.7em;
  }
  #containerr {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
  #house-form {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
  .hamburger {
    display: flex;
  }
  #search {
    width: 10em;
  }
  .container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }

  .nav-links {
    position: absolute;
    top: 60px; /* below nav */
    left: -100%;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    padding: 2em 0;
    text-align: center;
    gap: 1.5em;
    transition: left 0.3s ease-in-out;
  }

  .nav-links.active {
    left: 0;
  }

  .auth-buttons {
    display: flex;
    margin-right: 0; /* hide buttons in row layout */
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  /* Animate hamburger into an X */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}
