/* Color palette derived from JGD Residency brochure */
:root {
  --accent-color: #B8860B;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #faf9f5;
  color: #222;
}
.nav {
  background: #183153;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 700;
  color: var(--accent-color);
}
.logo a {
  color: var(--accent-color);
  text-decoration: none;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links li a {
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.nav-links li a:hover {
  color: #ffd166;
}
.hero {
  background-image: url('hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.hero-text {
  position: relative;
  text-align: center;
  z-index: 1;
}
.hero-text h1 {
  font-size: 2.8rem;
  margin: 0;
}
.hero-text p {
  font-size: 1.2rem;
  color: #555;
}
.section {
  padding: 4rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}
.alt {
  background: #eaeaea;
}
h2,
h3 {
  color: var(--accent-color);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.grid li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grid li i {
  color: var(--accent-color);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #ccc;
}
.floorplan img {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid #ccc;
}
/* Enhance image clarity */
.gallery img,
.property img {
  filter: brightness(1.05) contrast(1.1);
}
  .footer {
    text-align: center;
    padding: 2rem;
    background: #183153;
    color: #f0f0f0;
  }

  /* Chat box styles */
  .chat-box {
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 1rem;
    background: #f0f9ff;
  }

  .chat-header {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
  }

  .chat-log {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #f1e0c5;
    background: #fff;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .chat-message.bot {
    background: #e0f2fe;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
  }

  .chat-message.client {
    background: #d1fae5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    text-align: right;
  }

  #chat-input,
  #client-email {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
  }

  .chat-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .chat-actions button {
    flex: 1;
    padding: 0.5rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
  }

  .chat-actions button:hover {
    background: #8B6508;
  }

@media (max-width: 600px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }
}

/* Property listings */
.listings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.property {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
}

.property h3 {
  margin: 0.5rem 1rem;
  color: var(--accent-color);
}

.property p {
  margin: 0 1rem 1rem;
}

.brochure-link {
  display: inline-block;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1rem;
}

.brochure-link:hover {
  text-decoration: underline;
}

.brochure-btn {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent-color);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease-in-out;
}

.brochure-btn:hover {
  background: #8B6508;
}

/* Lead capture form */
.lead-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.lead-form input,
.lead-form textarea {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.lead-form button {
  padding: 0.75rem;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.lead-form button:hover {
  background: #8B6508;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
/* === Brochure-style (Listings + Gallery) === */
.img-wrap.brochure,
.gallery-brochure {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 16px;
  overflow: hidden;
}
.img-wrap.brochure img,
.gallery-brochure img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(40%) contrast(1.1) brightness(0.9);
}
.img-brochure-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(184,134,11,0.6), rgba(34,39,49,0.7));
}
.brochure-caption {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255,255,255,0.88);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.brochure-caption h3 {
  margin: 0;
  line-height: 1.25;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-color);
}
.listing-card {
  position: relative;
  z-index: 0;
  margin: 0;
}
.listing-card + .listing-card {
  margin-top: 8px;
}
.submeta { color: #6b7280; font-size: 12px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
  row-gap: 24px;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; row-gap: 28px; }
  .listing-card { padding-bottom: 2px; }
}
.cta-row { display: flex; gap: 10px; margin-top: 6px; }
.btn {
  appearance: none;
  border: 1px solid var(--accent-color);
  background: var(--accent-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease-in-out;
}
.btn:hover {
  filter: brightness(0.9);
}
.btn-primary {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(0.9);
}
.btn-ghost {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}
.btn-ghost:hover {
  background: var(--accent-color);
  color: #fff;
}
.badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--accent-color);
  color: #fff;
}
.badge.good,
.badge.warn {
  background: var(--accent-color);
}
/* === End brochure-style === */
/* === Specs Brochure Style === */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.spec-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  transition: transform .2s ease;
}
.spec-card:hover { transform: translateY(-3px); }
.spec-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.spec-card h3 i {
  font-size: 22px;
  color: var(--accent-color);
}
.spec-card p {
  margin: 0;
  font-size: 14px;
  color: #444;
}

@media (max-width: 640px) {
  .nav-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .specs-grid {
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .spec-card {
    border: 1px solid #ddd;
    padding: 14px;
  }
}
