/* =========================================
   Changzhou JEFF Real Estate - Website Styles
   ========================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --gold: #c9a84c;
  --gold-light: #f5deb3;
  --red: #e53e3e;
  --red-dark: #c53030;
  --dark: #1a1a1a;
  --dark-alt: #2d2d2d;
  --text: #333;
  --text-light: #666;
  --bg: #fff;
  --bg-warm: #fdf8f0;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--gold) 0%, #d4a84b 100%);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}

.logo-text h1 {
  font-size: 18px; margin: 0; color: var(--dark); font-weight: 700;
}

.logo-text span {
  font-size: 11px; color: var(--gold); letter-spacing: 1px; text-transform: uppercase;
}

.nav {
  display: flex; gap: 28px; align-items: center;
}

.nav a {
  font-size: 14px; color: var(--text); font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: all .2s;
}

.nav a:hover, .nav a.active {
  color: var(--red); border-bottom-color: var(--red);
}

.admin-link {
  background: var(--red); color: #fff !important;
  padding: 6px 16px !important; border-radius: 4px;
  font-size: 13px !important; border-bottom: none !important;
}

.admin-link:hover { background: var(--red-dark); }

/* Hero Banner */
.hero {
  background: linear-gradient(135deg, var(--gold-light) 0%, #f0e6d3 100%);
  padding: 20px 0; text-align: center;
  border-bottom: 3px solid var(--gold);
}

.hero h2 {
  font-size: 24px; color: var(--dark); margin: 0 0 6px;
  font-weight: 700; letter-spacing: 2px;
}

.hero p {
  font-size: 14px; color: var(--text-light); margin: 0;
}

/* Sections */
.section { padding: 50px 0; }
.section-alt { background: var(--bg-warm); }

.section-title {
  text-align: center; font-size: 26px; color: var(--dark);
  margin: 0 0 40px; position: relative; padding-bottom: 12px;
}

.section-title::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px; background: var(--gold);
}

/* Property Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .property-grid { grid-template-columns: repeat(2, 1fr); }
}

.property-card {
  background: var(--bg); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.property-img {
  width: 100%; height: 200px; object-fit: cover;
  background: #eee;
}

.property-info { padding: 16px; }

.property-price {
  font-size: 20px; color: var(--red); font-weight: 700;
  margin: 0 0 6px;
}

.property-name {
  font-size: 15px; color: var(--dark); font-weight: 600;
  margin: 0 0 6px;
}

.property-desc {
  font-size: 13px; color: var(--text-light); margin: 0;
}

/* Pagination */
.pagination {
  display: flex; justify-content: center; gap: 8px; margin-top: 30px;
}

.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 4px;
  font-size: 14px; color: var(--text); border: 1px solid var(--border);
}

.pagination a:hover { background: var(--gold-light); }

.pagination .current {
  background: var(--red); color: #fff; border-color: var(--red);
}

/* About Page */
.about-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center;
}

.about-img {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img img { width: 100%; height: auto; }

.about-text h3 {
  font-size: 22px; color: var(--dark); margin: 0 0 16px;
}

.about-text p {
  font-size: 15px; color: var(--text-light); margin: 0 0 12px;
  line-height: 1.8;
}

/* Contact Page */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}

.contact-info h3 {
  font-size: 20px; color: var(--dark); margin: 0 0 20px;
}

.contact-item {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px;
}

.contact-icon {
  width: 36px; height: 36px; background: var(--gold-light);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.contact-item div { font-size: 14px; color: var(--text); }

.contact-item div strong { display: block; color: var(--dark); margin-bottom: 2px; }

.contact-qr {
  text-align: center; background: var(--bg-warm);
  padding: 30px; border-radius: var(--radius);
}

.contact-qr h4 { margin: 0 0 16px; color: var(--dark); }

.qr-placeholder {
  width: 180px; height: 180px; background: #fff;
  border: 2px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; color: var(--text-light); font-size: 13px;
}

/* Footer */
.footer {
  background: var(--dark); color: #aaa;
  padding: 40px 0 20px; margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.footer-info h4 {
  color: var(--gold); font-size: 16px; margin: 0 0 16px;
}

.footer-info p {
  font-size: 14px; margin: 0 0 8px; line-height: 1.8;
}

.footer-info a { color: var(--gold-light); }

.footer-qr {
  text-align: right;
}

.footer-qr h4 {
  color: var(--gold); font-size: 16px; margin: 0 0 12px;
}

.footer-qr .qr-placeholder {
  width: 140px; height: 140px;
  background: #333; border-color: #444;
  margin-left: auto; color: #888;
}

.copyright {
  text-align: center; padding-top: 20px; margin-top: 20px;
  border-top: 1px solid #333; font-size: 13px; color: #666;
}

/* Property Detail */
.property-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  padding: 30px 0;
}

.detail-main-img {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-main-img img { width: 100%; height: auto; }

.detail-info h2 { font-size: 24px; color: var(--dark); margin: 0 0 12px; }

.detail-info .detail-desc {
  font-size: 15px; color: var(--text-light); margin: 0 0 24px;
}

.detail-price {
  font-size: 28px; color: var(--red); font-weight: 700; margin-bottom: 20px;
}

.detail-section {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 20px;
}

.detail-section-title {
  background: var(--bg-warm); padding: 12px 16px;
  font-size: 14px; font-weight: 600; color: var(--dark);
  border-bottom: 1px solid var(--border);
}

.detail-section-body { padding: 16px; }

.detail-section-body p {
  margin: 0 0 8px; font-size: 14px; color: var(--text);
}

.detail-section-body p:last-child { margin-bottom: 0; }

/* Mobile */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; text-align: center; }
  .nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .property-grid { grid-template-columns: 1fr; }
  .about-hero, .contact-grid, .property-detail, .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-qr { text-align: left; }
  .footer-qr .qr-placeholder { margin-left: 0; }
}

/* =========================================
   V2 additions: hero actions, services, featured cards
   ========================================= */

.hero { padding: 20px 0; }

.btn {
  display: inline-block; padding: 12px 28px; border-radius: 4px;
  font-size: 14px; font-weight: 600; letter-spacing: .5px;
  transition: all .2s;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b8953f; }
.btn-ghost { background: transparent; color: var(--dark); border: 1.5px solid var(--gold); }
.btn-ghost:hover { background: var(--gold); color: #fff; }

.section-sub {
  text-align: center; color: var(--text-light); font-size: 14px;
  margin: -24px 0 32px;
}

/* Featured property cards (V2) */
.property-card { cursor: default; }
.property-img-link { position: relative; display: block; }
.property-img-link .property-img { transition: transform .3s; }
.property-card:hover .property-img { transform: scale(1.03); }
.property-img-link:hover .property-img { opacity: .92; }

.property-badge {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(26,26,26,.82); color: var(--gold-light);
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 3px;
}

.property-price { font-size: 18px; }
.property-price .price-cny { font-size: 13px; color: var(--text-light); font-weight: 500; }
.property-desc { margin: 6px 0 12px; }

.property-enquire {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--red); border-bottom: 2px solid var(--red);
  padding-bottom: 2px; transition: all .2s;
}
.property-enquire:hover { color: var(--dark); border-bottom-color: var(--dark); }

/* Services section */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--bg); border-radius: var(--radius);
  padding: 28px 22px; box-shadow: var(--shadow);
  text-align: center; transition: transform .2s, box-shadow .2s;
  border-top: 3px solid var(--gold);
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.service-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  background: var(--bg-warm); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--red);
}
.service-card h3 { font-size: 16px; color: var(--dark); margin: 0 0 10px; }
.service-card p { font-size: 13px; color: var(--text-light); margin: 0; line-height: 1.7; }

/* Footer V2 */
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; margin-top: 20px; border-top: 1px solid #333;
  gap: 12px; flex-wrap: wrap;
}
.footer-bottom .copyright { border: none; margin: 0; padding: 0; }
.footer-bottom .beian a { font-size: 12px; color: #999; text-decoration: none; }
.footer-bottom .beian a:hover { color: var(--gold-light); }
.footer-admin-link {
  font-size: 13px; color: var(--gold-light);
  border: 1px solid #555; padding: 5px 14px; border-radius: 3px;
  transition: all .2s;
}
.footer-admin-link:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* =========================================
   V3 additions: property detail page (gallery, meta, contact)
   ========================================= */

.detail-back { padding-top: 26px; }
.detail-back a { font-size: 14px; color: var(--red); font-weight: 600; }
.detail-back a:hover { color: var(--dark); }

.detail-gallery .gallery-main {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #eee;
  aspect-ratio: 4 / 3;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
.thumb {
  width: 92px; height: 70px; padding: 0; border: 2px solid transparent;
  border-radius: 4px; overflow: hidden; cursor: pointer; background: none;
  transition: border-color .2s, opacity .2s; opacity: .75;
}
.thumb:hover { opacity: 1; }
.thumb-active { border-color: var(--gold); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.p-status {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: .5px; padding: 3px 10px; border-radius: 3px;
  margin: 0 0 12px;
}
.p-status-vacant { background: #e6f4ea; color: #1e7e34; }
.p-status-occupied { background: #fdecea; color: var(--red-dark); }

.detail-contact {
  background: var(--bg-warm); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px;
}
.detail-contact h3 { font-size: 16px; color: var(--dark); margin: 0 0 8px; }
.detail-contact p { font-size: 14px; margin: 0 0 6px; color: var(--text); }
.detail-contact a { color: var(--red); }
.detail-contact a:hover { text-decoration: underline; }

.btn-block { display: block; text-align: center; width: 100%; }

@media (max-width: 768px) {
  .thumb { width: 76px; height: 58px; }
}

