/* ═══════════════════════════════════════════════════════════════
   apartmentsvietnam.com — Professional Real Estate Stylesheet
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ── Reset ── */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Design Tokens ── */
:root {
  --teal:       #0d9488;
  --teal-dark:  #0f766e;
  --teal-deep:  #134e4a;
  --teal-light: #f0fdfa;
  --teal-muted: #ccfbf1;
  --navy:       #0d1b2a;
  --navy-mid:   #1e3a4f;
  --orange:     #ea580c;
  --orange-lt:  #fff7ed;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1e293b;
  --gray-900:   #0f172a;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(13,26,42,.08), 0 1px 4px rgba(13,26,42,.04);
  --shadow-md:  0 8px 28px rgba(13,26,42,.10), 0 2px 6px rgba(13,26,42,.06);
  --shadow-lg:  0 20px 48px rgba(13,26,42,.14), 0 4px 12px rgba(13,26,42,.06);
  --shadow-teal:0 6px 20px rgba(13,148,136,.22);
}

/* ── Base ── */
body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ── Top Bar ── */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
}
.topbar .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .links { display: none; gap: 20px; }
@media (min-width: 640px) { .topbar .links { display: flex; } }
.topbar .links a { color: rgba(255,255,255,.55); transition: color .15s; }
.topbar .links a:hover { color: rgba(255,255,255,.9); }

/* ── Site Header ── */
.site-header, .header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--gray-200), 0 2px 12px rgba(0,0,0,.05);
  transition: box-shadow .2s;
}
.header-inner, .header .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.header .logo, .site-header .logo,
.header-inner a.logo img { height: 40px; width: auto; }

/* ── Navigation ── */
.nav {
  display: none;
  gap: 2px;
  align-items: center;
  position: relative;
}
@media (min-width: 768px) { .nav { display: flex; } }
.nav a {
  font-size: 13.5px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-weight: 600;
  position: relative;
  transition: color .15s, background .15s;
  letter-spacing: .01em;
}
.nav a:hover { color: var(--teal); background: var(--teal-light); }
.nav a.active { color: var(--teal); font-weight: 700; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px;
  bottom: -23px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.cta, .btn-cta {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
  transition: opacity .15s, box-shadow .15s, transform .12s;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(234,88,12,.25);
}
.cta:hover, .btn-cta:hover {
  opacity: .92;
  box-shadow: 0 4px 16px rgba(234,88,12,.35);
  transform: translateY(-1px);
}

/* ── Article Container ── */
.article-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}
@media (min-width: 768px) { .article-container { padding: 48px 24px 72px; } }

/* ── Listing Page Header ── */
.home-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 18px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}
.home-head .bar {
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: 2px;
  flex-shrink: 0;
}
.home-head h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.015em;
}
.home-head .count {
  color: var(--gray-400);
  font-size: 14px;
  font-weight: 500;
}

/* ── Property Grid ── */
.grid {
  display: grid;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px)  { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ── Article Cards (blog listing) ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .22s, transform .22s, border-color .22s;
  display: block;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--teal-muted);
}
.card .cover { height: 190px; overflow: hidden; }
.card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .cover img { transform: scale(1.06); }
.card .body { padding: 20px; }
.card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--orange);
  margin-bottom: 8px;
}
.card .meta .date {
  color: var(--gray-400);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.card h2 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.38;
  transition: color .18s;
}
.card:hover h2 { color: var(--teal); }
.card .desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .author {
  margin-top: 14px;
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .author strong { color: var(--gray-600); font-weight: 600; }

/* ── Breadcrumbs ── */
.crumbs {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.crumbs a { transition: color .15s; }
.crumbs a:hover { color: var(--teal); }
.crumbs .last {
  color: var(--gray-700);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}

/* ── Article Page ── */
.article {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.article .cover { width: 100%; height: 280px; overflow: hidden; }
@media (min-width: 768px) { .article .cover { height: 420px; } }
.article .cover img { width: 100%; height: 100%; object-fit: cover; }
.article .body { padding: 36px 24px; }
@media (min-width: 768px) { .article .body { padding: 56px 64px; } }
.article .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--teal);
  margin-bottom: 18px;
}
.article .meta .badge {
  background: var(--teal-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--teal-dark);
}
.article .meta .text {
  color: var(--gray-400);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.article h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
  color: var(--gray-900);
  margin: 0;
}
@media (min-width: 768px) { .article h1 { font-size: 44px; } }
.article .lede {
  margin-top: 18px;
  font-size: 18px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ── Byline ── */
.byline {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--gray-200);
}
.byline .avatar {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-muted));
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.byline .name { font-weight: 700; font-size: 14px; color: var(--gray-900); }
.byline .role { font-size: 12px; color: var(--gray-400); margin-top: 1px; }

/* ── Article Content ── */
.content {
  margin-top: 36px;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.8;
}
.content h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 44px 0 14px;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.content h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 36px 0 10px;
  letter-spacing: -.01em;
}
.content p { margin: 0 0 18px; }
.content ul, .content ol { padding-left: 26px; margin: 0 0 18px; }
.content li { margin: 8px 0; }
.content a { color: var(--teal); font-weight: 500; transition: color .15s; }
.content a:hover { color: var(--teal-dark); text-decoration: underline; }
.content strong { color: var(--gray-900); }
.content blockquote {
  border-left: 4px solid var(--teal);
  background: var(--teal-light);
  padding: 12px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  color: var(--gray-700);
  font-style: normal;
}
.content blockquote p { margin: 8px 0; }
.content figure { margin: 28px 0; }
.content figure img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.content figcaption {
  font-size: 14px;
  color: var(--gray-400);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* ── Article Actions ── */
.actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  transition: gap .15s, color .15s;
}
.back:hover { color: var(--teal-dark); gap: 10px; }
.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: var(--white);
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: background .15s, box-shadow .15s;
}
.share:hover { background: #1da851; box-shadow: 0 4px 14px rgba(37,211,102,.3); }

/* ── Related Articles ── */
.related { margin-top: 64px; }
.related .head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.related h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--gray-900);
  margin: 0;
}
.related .badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--orange);
  background: var(--orange-lt);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

.rcard {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s, transform .22s, border-color .22s;
  display: block;
}
.rcard:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--teal-muted);
}
.rcard .cover { width: 100%; height: 148px; overflow: hidden; background: var(--gray-100); }
.rcard .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.rcard:hover .cover img { transform: scale(1.04); }
.rcard .body { padding: 18px; }
.rcard .read {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--teal);
  margin-bottom: 7px;
}
.rcard h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .18s;
}
.rcard:hover h3 { color: var(--teal); }

/* ── Footer fallback (simple) ── */
.footer {
  background: var(--navy);
  border-top: none;
  margin-top: 0;
}
.footer .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 768px) { .footer .inner { flex-direction: row; } }
.footer img { height: 36px; width: auto; filter: brightness(0) invert(1); }
.footer .copy { font-size: 13px; color: rgba(255,255,255,.4); }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 36px 24px 56px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  transition: all .18s;
  cursor: pointer;
}
.pagination a:hover {
  background: var(--teal-light);
  border-color: var(--teal-muted);
  color: var(--teal);
}
.pagination .active,
.pagination .current {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow-teal);
}
.pagination .disabled { opacity: .35; pointer-events: none; }

/* ── Filter Inputs ── */
.filter-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.filter-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 6px;
}
.filter-select, .filter-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ── Sort Bar ── */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 24px;
  max-width: 1180px;
  margin: 0 auto 20px;
}
.sort-bar label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}
.sort-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-700);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 30px 7px 12px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .15s;
}
.sort-select:focus { border-color: var(--teal); }

/* ── Contact Form ── */
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .submit-btn {
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, box-shadow .15s, transform .12s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.contact-form .submit-btn:hover {
  background: var(--teal-dark);
  box-shadow: var(--shadow-teal);
  transform: translateY(-1px);
}

/* ── Chips / Tags ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}
.chip-teal   { background: var(--teal-light); color: var(--teal-dark); border-color: var(--teal-muted); }
.chip-orange { background: var(--orange-lt);  color: var(--orange);    border-color: #fed7aa; }
.chip-navy   { background: #e2e8f0;           color: var(--navy);      border-color: var(--gray-300); }

/* ── Section Headings ── */
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.section-sub   { font-size: 15px; color: var(--gray-400); margin: 0 0 28px; }
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal);
  margin-bottom: 8px;
}

/* ── No Results ── */
.no-results {
  text-align: center;
  padding: 80px 24px;
  color: var(--gray-400);
}
.no-results h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-700);
  margin: 16px 0 8px;
}
.no-results p { margin: 0; font-size: 15px; }

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Misc ── */
html { scroll-behavior: smooth; }
::selection { background: var(--teal-muted); color: var(--teal-deep); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-teal   { color: var(--teal); }
.text-navy   { color: var(--navy); }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--gray-400); }
.fw-700      { font-weight: 700; }
.fw-800      { font-weight: 800; }
