/*
 * Theme Name:  Hiếu Đoàn Navy
 * Theme URI:   https://hieudoan.vn
 * Description: Custom child theme for Hiếu Đoàn Real Estate — navy palette, Playfair Display + Montserrat typography, inherits all Houzez property functionality.
 * Author:      Hiếu Đoàn
 * Template:    houzez
 * Version:     1.0.0
 * Text Domain: hieudoan-navy
 */

/* ============================================================
   1. BOOTSTRAP 5 CSS VARIABLE OVERRIDES
   Houzez loads Bootstrap 5. Overriding its CSS custom props
   changes all .btn-primary, .text-primary etc globally.
============================================================ */
:root {
  --bs-primary:            #00113a;
  --bs-primary-rgb:        0, 17, 58;
  --bs-secondary:          #5c5f60;
  --bs-secondary-rgb:      92, 95, 96;
  --bs-link-color:         #00113a;
  --bs-link-color-rgb:     0, 17, 58;
  --bs-link-hover-color:   #002366;
  --bs-body-font-family:   'Montserrat', sans-serif;
  --bs-body-bg:            #f9f9ff;
  --bs-body-color:         #111c2c;
  /* Our design tokens */
  --hd-primary:            #00113a;
  --hd-primary-dark:       #002366;
  --hd-on-primary:         #ffffff;
  --hd-surface:            #f9f9ff;
  --hd-surface-low:        #f0f3ff;
  --hd-surface-container:  #e7eeff;
  --hd-surface-high:       #dee8ff;
  --hd-tertiary:           #121515;
  --hd-on-surface:         #111c2c;
  --hd-secondary-text:     #444650;
  --hd-muted:              #5c5f60;
  --hd-outline:            #c5c6d2;
  --hd-gold:               #b3c5ff;
}

/* ============================================================
   2. GLOBAL TYPOGRAPHY
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=Montserrat:wght@400;500;600;700&family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

* { box-sizing: border-box; }

body {
  font-family: 'Montserrat', sans-serif !important;
  background-color: #f9f9ff;
  color: #111c2c;
}

h1, h2, h3, h4, .hd-serif {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: #00113a;
}

/* ============================================================
   3. BOOTSTRAP UTILITY OVERRIDES
============================================================ */
.text-primary     { color: #00113a !important; }
.bg-primary       { background-color: #00113a !important; }
.border-primary   { border-color: #00113a !important; }
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active { background-color: #00113a !important; border-color: #00113a !important; }
.btn-primary:hover { background-color: #002366 !important; }
a { color: #00113a; }
a:hover { color: #002366; }

/* Houzez typically uses .color-primary for accents */
.color-primary, .color-primary * { color: #00113a !important; }
.background-primary { background-color: #00113a !important; }
.border-color-primary { border-color: #00113a !important; }

/* ============================================================
   4. NAVBAR  (#hd-navbar)
============================================================ */
#hd-navbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: #ffffff;
  border-bottom: 1px solid #c5c6d2;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .3s;
}
#hd-navbar.scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.hd-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hd-logo {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 28px;
  font-weight: 700;
  color: #00113a !important;
  text-decoration: none !important;
  letter-spacing: -0.02em;
}
.hd-logo:hover { color: #002366 !important; text-decoration: none !important; }

.hd-nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}
@media (min-width: 768px) {
  .hd-nav-links { display: flex; }
  .hd-mobile-btn { display: none !important; }
  .hd-nav-cta { display: inline-block !important; }
}

.hd-nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #5c5f60 !important;
  text-decoration: none !important;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.hd-nav-link:hover,
.hd-nav-link.active { color: #00113a !important; border-bottom-color: #00113a; }

.hd-nav-cta {
  display: none;
  background: #002366;
  color: #ffffff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background .2s, transform .15s;
}
.hd-nav-cta:hover { background: #00113a; color: #fff !important; transform: translateY(-1px); }

.hd-mobile-btn {
  background: none;
  border: none;
  color: #00113a;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  padding: 4px;
}

.hd-mobile-menu {
  display: none;
  border-top: 1px solid #c5c6d2;
  background: #ffffff;
}
.hd-mobile-menu.open { display: block; }
.hd-mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}
.hd-mobile-menu .hd-nav-link { font-size: 13px; }
.hd-mobile-cta {
  background: #002366;
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none !important;
  text-transform: uppercase;
  text-align: center;
  margin-top: 4px;
}

/* ============================================================
   5. FOOTER  (#hd-footer)
============================================================ */
#hd-footer {
  background: #121515;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
}
#hd-footer a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
#hd-footer a:hover { color: #ffffff; }
.hd-footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}
@media (min-width: 768px) { .hd-footer-main { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.hd-footer-logo {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none !important;
  display: block;
  margin-bottom: 12px;
}
.hd-footer-desc { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.7; }
.hd-footer-socials { display: flex; gap: 16px; margin-top: 20px; }
.hd-footer-socials a { color: rgba(255,255,255,.6); font-size: 22px; }
.hd-footer-socials a:hover { color: #b3c5ff; }
.hd-footer-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b3c5ff;
  margin-bottom: 20px;
}
.hd-footer-list { list-style: none; padding: 0; margin: 0; }
.hd-footer-list li { margin-bottom: 12px; font-size: 13px; }
.hd-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
@media (min-width: 768px) {
  .hd-footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ============================================================
   6. PAGE & SINGLE POST CONTENT
============================================================ */
.hd-page-hero {
  background: var(--hd-primary);
  color: #fff;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hd-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,17,58,.95) 0%, rgba(0,35,102,.7) 100%);
}
.hd-page-hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
}
.hd-page-label {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b3c5ff;
  margin-bottom: 16px;
}
.hd-page-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: #ffffff !important;
  line-height: 1.2;
  margin: 0 0 20px;
}
.hd-page-meta {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hd-page-meta span { display: flex; align-items: center; gap: 6px; }

/* Post thumbnail hero */
.hd-post-thumb {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}
.hd-post-thumb-wrap {
  position: relative;
  background: #00113a;
}
.hd-post-thumb-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, #f9f9ff, transparent);
}

/* Content area */
.hd-content-area {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.hd-content-area p {
  font-size: 16px;
  line-height: 1.8;
  color: #444650;
  margin-bottom: 24px;
}
.hd-content-area h2 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 28px;
  color: #00113a !important;
  margin: 40px 0 16px;
}
.hd-content-area h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 22px;
  color: #00113a !important;
  margin: 32px 0 12px;
}
.hd-content-area a { color: #002366; border-bottom: 1px solid rgba(0,35,102,.3); }
.hd-content-area a:hover { border-bottom-color: #002366; }
.hd-content-area img { max-width: 100%; height: auto; border-radius: 8px; margin: 24px 0; }
.hd-content-area ul, .hd-content-area ol { padding-left: 24px; margin-bottom: 24px; }
.hd-content-area li { font-size: 16px; line-height: 1.8; color: #444650; margin-bottom: 8px; }
.hd-content-area blockquote {
  border-left: 4px solid #00113a;
  padding: 16px 24px;
  background: #f0f3ff;
  margin: 32px 0;
  font-style: italic;
  color: #00113a;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
}

/* Back / breadcrumb link */
.hd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c5f60 !important;
  text-decoration: none !important;
  margin-bottom: 32px;
  transition: color .2s;
}
.hd-back-link:hover { color: #00113a !important; }

/* ============================================================
   7. HOUZEZ PROPERTY PAGES — apply brand colors
============================================================ */
/* Search bar accent */
.search-area-wrap .search-btn,
.houzez-search-submit { background: #00113a !important; border-color: #00113a !important; }
.houzez-search-submit:hover { background: #002366 !important; }

/* Property card accent */
.listing-card .listing-type,
.property-type-label { background: #002366 !important; }

/* Property detail page */
.single-property .page-title h1,
.single-property h1.page-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: #00113a !important;
}

/* Agent box */
.agent-detail-box { border-top: 3px solid #00113a; }

/* Buttons across Houzez */
.btn-default,
.fw-button.fw-def { background: #00113a !important; border-color: #00113a !important; color: #fff !important; }
.btn-default:hover { background: #002366 !important; }

/* Houzez pagination */
.pagination li.active a,
.pagination li.active span { background: #00113a !important; border-color: #00113a !important; }

/* Contact form submit */
.wpcf7-submit,
#submit,
input[type="submit"] { background: #00113a !important; border-color: #00113a !important; color: #fff !important; }

/* ============================================================
   8. ARCHIVE / BLOG INDEX
============================================================ */
.hd-archive-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.hd-archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 40px;
}
@media (min-width: 640px)  { .hd-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hd-archive-grid { grid-template-columns: repeat(3, 1fr); } }

.hd-post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.hd-post-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.hd-post-card-thumb {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #dee8ff;
}
.hd-post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.hd-post-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c5f60;
  margin-bottom: 8px;
}
.hd-post-card-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 18px;
  font-weight: 700;
  color: #00113a !important;
  line-height: 1.4;
  margin: 0 0 12px;
  text-decoration: none !important;
  display: block;
}
.hd-post-card-title:hover { color: #002366 !important; }
.hd-post-card-excerpt { font-size: 14px; line-height: 1.7; color: #444650; flex: 1; }
.hd-post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00113a !important;
  text-decoration: none !important;
  margin-top: 20px;
  border-bottom: 2px solid #00113a;
  padding-bottom: 2px;
}

/* ============================================================
   9. MATERIAL SYMBOLS
============================================================ */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}
