: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 {
  font-family: var(--font-family);
  font-size: var(--font-size);
  background-color: var(--background-color);
  color: var(--text-color);
  display: grid;
  place-items: center;
  padding: 0 1em;
}
body {
  background-color: var(--background-color);
}
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  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 a {
  color: var(--secondary-color);
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  font-weight: bolder;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
}
.nav-links a:hover {
  color: var(--secondary-color);
}
.login-btn {
  background-color: var(--secondary-color);
  color: var(--background-color);
  padding: 0.5em 1em;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
.signup-btn {
  background-color: var(--background-color);
  padding: 0.5em 1em;
  border-radius: 16px;
  color: var(--tertiary-color);
  border: 1px solid var(--secondary-color);
  cursor: pointer;
  font-weight: bold;
}
.signup-btn:hover {
  background-color: var(--secondary-color);
}
.hero {
  position: relative;
  top: 4.8em;
  display: flex;
  border-radius: 20px;
  height: 88vh;
  width: 100%;
  justify-content: center;
  align-items: center;
  background: url("../images/point3d-commercial-imaging-ltd-kx-gbP7lMak-unsplash.jpg");
  background-position: center;
  background-size: cover;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
}

.hero h1 {
  font-size: 50px;
  color: var(--secondary-color);
}
.hero p {
  color: white;
  font-size: 1.2rem;
  text-align: center;
}
.hero main {
  position: relative;
  text-align: center;
  z-index: 2;
}
.housing {
  margin-top: 4.8em;
  width: 90%;
  align-items: center;
  justify-content: center;
}
.housing-text {
  text-align: center;
  margin-top: 1em;
}
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.housing h1 {
  color: var(--secondary-color);
  text-align: center;
}
.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: 10em;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 16px;
}
#search-input {
  padding: 10px;
  width: 10em;
  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: none;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
}
.card h2 {
  margin: 0;
  font-size: 20px;
  color: #000;
}
.card p {
  margin: 5px 0;
  color: #555;
}
#price {
  font-weight: bold;
  color: #000;
  font-size: 18px;
}
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  background: var(--background-color);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
form input {
  flex: 1 1 200px;
}
.iconify {
  vertical-align: middle;
  margin-right: 5px;
  font-size: 20px;
  color: var(--secondary-color);
}
.location {
  font-weight: bold;
  color: #000;
}
.installment {
  color: #000;
  display: flex;
  gap: 3em;
  margin-left: 6em;
  align-content: center;
  align-items: center;
  padding: 4em;
}
.instal {
  display: flex;
  margin-top: 2em;
  background-color: var(--background-color);
  width: 100%;
  height: 60vh;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#dollar {
  width: 400px;
  height: 300px;
}
.btn2 {
  padding: 2em;
  border: none;
  border-radius: 5px;
  background-color: var(--secondary-color);
}
.commercial {
  display: flex;
  flex-direction: row;
  gap: 3em;
  margin-top: 3em;
}
.lower-card {
  width: 10em;
  height: 10em;
  padding: 4em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  align-items: center;
  border-radius: 16px;
  background-color: var(--background-color);
}
#iconify1 {
  color: var(--secondary-color);
  font-size: 50px;
}
.contactt {
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 5em;
}
#form {
  background-color: var(--tertiary-color);
  display: grid;
  padding: 2em 1em;
}
#form input {
  padding: 0.5em;
  width: 15em;
  border-radius: 5px;
}
.contact-form input:hover {
  border: 1px solid var(--secondary-color);
}
#form p {
  color: var(--background-color);
}
.down-side {
  margin-top: 3em;
  width: 100%;
  height: auto;
  padding: 1em;
  background-color: var(--background-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
#h1 {
  color: var(--secondary-color);
  text-align: center;
  font-weight: bold;
  font-size: xx-large;
}
.icon {
  color: var(--background-color);
}
.skeleton-card {
  width: 95%;
  padding: 10px;
  border-radius: 12px;
  background: #f0f0f0;
  overflow: hidden;
  margin: 10px;
}

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

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ====== CITY SECTION ====== */
.city-section {
  text-align: center;
  padding: 60px 10% 40px;
}

.city-section h2 {
  text-decoration: none;
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: bold;
}

.city-section p {
  text-decoration: none;
  font-size: 16px;
  color: #000;
  margin-bottom: 50px;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 200px 200px;
  gap: 20px;
}

.city-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ccc;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 6em;
}
.city-card p h3 {
  z-index: 2;
  color: #9653da;
}
.city-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.city-card h3,
.city-card p {
  position: relative;
  margin: 0;
  z-index: 2;
}

.city-card h3 {
  font-size: 18px;
  font-weight: bold;
}

.city-card p {
  font-size: 14px;
  color: #ddd;
}

/* Chicago (tall card) */
.chicago {
  grid-row: span 2;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .city-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .chicago {
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .city-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== FOOTER ====== */
footer {
  background-color: #0d0b28;
  padding: 1em 10% 40px;
  color: #fff;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
}

.footer-col h4 {
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: bold;
}

.footer-col p,
.footer-col li,
.footer-col a {
  font-size: 14px;
  line-height: 1.8;
  color: #ccc;
  text-decoration: none;
  display: block;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col a:hover {
  color: #fff;
}

/* Newsletter */
.newsletter input {
  padding: 10px;
  width: 70%;
  border: none;
  border-radius: 5px 0 0 5px;
  outline: none;
}

.newsletter button {
  padding: 10px 20px;
  border: none;
  background: #0057ff;
  color: #fff;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

.newsletter button:hover {
  background: #003bb3;
}

/* Footer bottom */
.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: #aaa;
}

.social-icons a {
  margin-left: 15px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}

.social-icons a:hover {
  color: #0057ff;
}
.city-section a {
  text-decoration: none;
  color: var(--another);
}
/* Footer responsive */
@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
}
/* 📱 Small devices (mobiles: up to 600px) */
@media (max-width: 600px) {
  #email {
    padding: 1em;
    height: 1em;
  }
  .body {
    display: grid;
    place-content: center;
    padding: 0 1em;
  }
  body {
    margin: 0;
  }
  nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 0.5em;
    align-items: center;
    padding: 0.7em;
    align-items: center;
    align-content: center;
  }
  .auth-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    margin-left: 3em;
  }
  .login-btn,
  .signup-btn {
    width: fit-content;
    padding: 0.2em 0.8em;
  }

  .hero {
    height: 70vh;
    padding: 1em;
    width: 95%;
    margin-top: 0.2em;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 0.5em;
  }

  .housing {
    width: 100%;
    margin-top: 5em;
  }

  .container {
    grid-template-columns: repeat(1, 1fr);
  }
  form {
    flex-direction: column;
    padding: 1em;
  }

  form input,
  #search,
  #search-input {
    width: 10em;
  }

  .commercial {
    flex-direction: column;
    gap: 2em;
    align-items: center;
  }

  .installment {
    flex-direction: column;
    margin-left: 0;
    padding: 2em 1em;
  }

  .instal {
    flex-direction: column;
    height: auto;
  }

  #dollar {
    width: 100%;
    height: auto;
  }

  .contactt {
    flex-direction: column;
    gap: 2em;
    text-align: center;
  }

  #form {
    width: 100%;
    padding: 1em;
  }

  .down-side {
    padding: 1em;
  }

  .skeleton-card {
    width: 100%;
  }
  .hamburger {
    margin-right: 1.3em;
  }
  .city-card {
    padding: 15px;
  }
}
#iconify5 {
  color: var(--background-color);
}
/* 📲 Medium devices (tablets: 601px – 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  nav {
    gap: 3em;
    display: flex;
    justify-content: space-around;
    padding: 0.8em 1em;
  }

  .hero {
    height: 80vh;
    padding: 1.5em;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

  .commercial {
    flex-direction: column;
    align-items: center;
  }

  .installment {
    flex-direction: column;
    margin-left: 0;
  }

  .instal {
    flex-direction: column;
    height: auto;
  }

  #dollar {
    width: 80%;
    height: auto;
  }

  .contactt {
    flex-direction: column;
  }

  #form {
    width: 80%;
  }
}

/* 💻 Large devices (desktops: 901px and above) */
@media (min-width: 901px) {
  nav {
    gap: 18em;
  }

  .container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .commercial {
    flex-direction: row;
  }

  .installment {
    flex-direction: row;
  }

  .instal {
    flex-direction: row;
    height: 60vh;
  }

  .contactt {
    flex-direction: row;
  }
}

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

.hamburger span {
  display: block;
  height: 3px;
  background: var(--tertiary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile nav behavior */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    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);
  }
}

/* ======== LARGE DEVICES (desktops 1200px and up) ======== */
@media (min-width: 1200px) {
  .hero h1 {
    font-size: 60px;
  }

  .hero p {
    font-size: 1.5rem;
  }

  .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .commercial {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ======== EXTRA LARGE DEVICES (big TVs 1600px and up) ======== */
@media (min-width: 1600px) {
  body {
    font-size: 20px;
  }

  nav {
    gap: 25em;
    padding: 1em;
  }

  .hero {
    height: 80vh;
    margin-top: 3em;
  }

  .hero h1 {
    font-size: 80px;
  }
  .card {
    width: 100%;
  }

  .hero p {
    font-size: 2rem;
  }

  .container {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .commercial {
    grid-template-columns: repeat(3, 1fr);
  }

  .city-grid {
    width: 100%;
    height: fit-content;
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(6, 1fr);
  }
}
