/*
Theme Name: SAHA LAND
Theme URI: https://sahaland.com/
Author: SAHA GROUP
Author URI: https://sahaland.com/
Description: Giao diện WordPress cho SahaLand với trang chủ, nguồn căn chuyển nhượng, bài hướng dẫn và SEO tích hợp.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: saha-land
*/

:root {
  --ink: #19342a;
  --green: #173f36;
  --deep: #123229;
  --gold: #e3c58d;
  --sand: #f1eadc;
  --paper: #fbf9f3;
  --white: #fffefa;
  --muted: #4e655a;
  --line: #d8dfd2;
  --sans: 'Be Vietnam Pro', system-ui, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.8 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font: 400 clamp(2rem, 3.7vw, 3.2rem)/1.16 var(--serif); letter-spacing: -.025em; }
h3 { font: 600 1.13rem/1.45 var(--sans); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
button, select, input { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #946424; outline-offset: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.section { padding-block: clamp(44px, 5.7vw, 82px); }
.section-tint { background: #eef0e7; }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--deep);
  background: var(--white);
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  z-index: 30;
  top: 0;
}
.admin-bar .site-header { top: 32px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--green); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 33px; height: 40px; }
.brand-image { width: auto; max-width: 170px; max-height: 48px; }
.brand-name { letter-spacing: .16em; font-size: 1.12rem; font-weight: 600; }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 7px clamp(13px, 2.1vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; text-decoration: none; font-size: .87rem; font-weight: 500; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: #784f24; }
.header-phone {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 13px;
  color: var(--green);
  flex-shrink: 0;
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
}
.header-phone:hover { background: var(--sand); }
.menu-toggle { display: none; }

.hero { display: grid; grid-template-columns: 47% 53%; background: var(--deep); color: var(--white); }
.hero-copy {
  display: flex;
  align-items: center;
  padding: clamp(48px, 6.5vw, 94px) clamp(24px, 4.2vw, 68px) clamp(48px, 6.5vw, 94px) max(32px, (100vw - 1200px) / 2);
}
.hero-inner { max-width: 550px; }
.hero-focus { color: var(--gold); font-size: .81rem; font-weight: 600; letter-spacing: .036em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.45rem, 4.55vw, 4.5rem); line-height: 1.07; letter-spacing: -.03em; }
.hero h1 em { color: var(--gold); display: block; font-style: normal; }
.hero-lead { max-width: 460px; color: #e1e9df; margin-top: 22px; font-size: 1rem; }
.hero .actions { margin-top: 28px; }
.hero-figure { position: relative; min-height: 100%; background: #455546; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right bottom; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button {
  display: inline-flex;
  min-height: 46px;
  justify-content: center;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.4;
}
.button-primary { color: white; background: var(--green); border-color: var(--green); }
.button-primary:hover { background: #22574b; }
.button-secondary { color: var(--green); border-color: #94aa9c; background: var(--white); }
.button-secondary:hover { background: #edf2e8; }
.button-gold { color: #182b22; background: var(--gold); border-color: var(--gold); }
.button-gold:hover { background: #f3dba9; }
.button-light { color: var(--white); border-color: #a6b9aa; }
.button-light:hover { background: #ffffff19; }
.hero a:focus-visible, .site-footer a:focus-visible { outline-color: var(--gold); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 36px; margin-bottom: 25px; }
.section-head p, .archive-heading p { margin-top: 10px; color: var(--muted); }
.section-head > .text-link { flex-shrink: 0; }
.section-link { margin-top: 18px; }
.text-link { color: var(--green); text-decoration: underline; text-underline-offset: .26em; font-size: .88rem; font-weight: 600; }
.text-link:hover { color: #784f24; }
.text-link span { margin-inline-start: 4px; }

.tile-grid, .area-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile, .area-tile { border: 1px solid var(--line); border-radius: 6px; background: var(--white); overflow: hidden; min-width: 0; }
.tile { display: flex; flex-direction: column; }
.tile-photo { display: block; }
.tile-photo img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; background: var(--sand); }
.tile-body, .area-tile { padding: 20px; }
.tile-body { display: flex; flex: 1; flex-direction: column; align-items: start; gap: 9px; }
.tile h3 { overflow-wrap: anywhere; }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; text-underline-offset: .23em; }
.tile-kicker { color: var(--muted); font-weight: 600; font-size: .8rem; }
.tile-facts { color: var(--muted); font-size: .86rem; line-height: 1.65; }
.tile-date { color: var(--muted); font-size: .76rem; }
.tile-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; }
.tile-price { font: 400 1.45rem/1.2 var(--serif); }
.note-tile-link { margin-top: auto; padding-top: 7px; }
.existing-listings { margin-block: 20px 0; }
.existing-listings h2 { font-size: clamp(1.45rem, 2.2vw, 2rem); }
.existing-listings > p { margin-block: 5px 12px; color: var(--muted); }
.area-tile { min-height: 166px; display: flex; flex-direction: column; align-items: start; gap: 10px; }
.area-tile h3 { font: 400 1.47rem/1.25 var(--serif); }
.area-tile p { color: var(--muted); font-size: .88rem; line-height: 1.65; }
.area-tile .text-link { margin-top: auto; }
.empty-state {
  background: var(--white);
  padding: 16px 19px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.empty-state p, div.empty-state .text-link { margin-top: 9px; }
.empty-state h1 { margin-bottom: 12px; }
.empty-state a { text-underline-offset: .2em; }
.listings > .empty-state { margin-top: 18px; }
.listing-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 15px;
  border-radius: 4px;
  background: #eef0e7;
}
.listing-filters label { display: grid; gap: 4px; font-size: .81rem; font-weight: 600; }
.listing-filters select, .listing-filters input, .search-field {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding-inline: 10px;
  border: 1px solid #a8b5a7;
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}
.listing-filters button { background: none; border: 0; padding: 7px 4px; }
.filter-status { color: var(--muted); margin-block: 8px 12px; font-size: .84rem; }

.service-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 6vw, 75px); }
.service-photo img { width: 100%; border-radius: 6px; }
.service-lead { color: var(--muted); margin-top: 12px; }
.service-list { margin: 12px 0 0; padding-inline-start: 19px; }
.service-list li { padding-block: 4px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: clamp(18px, 5vw, 65px); }
.faq-list details { border-bottom: 1px solid var(--line); padding-block: 12px; }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { font-weight: 600; }
.faq-list details p { color: var(--muted); margin-top: 7px; }
.home-contact { background: var(--sand); padding-block: 40px; }
.home-contact-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px 35px; }
.home-contact h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
.home-contact p { margin-top: 8px; color: var(--muted); }

.site-footer { background: var(--deep); color: #e4ebe2; padding-block: 34px 42px; font-size: .85rem; }
.site-footer .brand { color: var(--white); margin-bottom: 8px; }
.site-footer .brand-mark { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 24px 50px; }
.footer-grid p { max-width: 320px; color: #cddbd1; }
.footer-grid .footer-title { color: var(--gold); font-weight: 600; margin-bottom: 5px; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a, .footer-bottom a { text-underline-offset: .23em; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 18px; padding-top: 15px; margin-top: 23px; border-top: 1px solid #7996885e; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 7px 15px; }
.footer-policy { margin-top: 7px; color: #cbd9d1; }
.footer-policy p { max-width: 850px; margin-top: 5px; }
.contact-dock { display: none; }

.entry-shell { min-height: 66vh; padding-block: 35px 68px; }
.entry-wrap { max-width: 1110px; }
.breadcrumbs { margin-bottom: 17px; color: var(--muted); font-size: .81rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '/'; color: #586d61; margin-inline-end: 10px; }
.breadcrumbs li[aria-current="page"] { overflow-wrap: anywhere; }
.breadcrumbs a { text-underline-offset: .22em; }
.entry { padding: clamp(22px, 4vw, 50px); background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.entry-header, .post-body { width: min(100%, 780px); margin-inline: auto; }
.entry-header h1, .archive-heading h1 { font-size: clamp(2.05rem, 4vw, 3.35rem); overflow-wrap: anywhere; }
.entry-header .tile-kicker { margin-bottom: 8px; }
.entry-lead { margin-top: 12px; color: var(--muted); font-size: 1rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); margin-top: 12px; font-size: .8rem; }
.entry-cover { max-width: 820px; margin: 24px auto 0; }
.entry-cover img { width: 100%; max-height: 660px; object-fit: cover; border-radius: 4px; }
.post-body { margin-top: 26px; overflow-wrap: anywhere; font-size: 1rem; }
.post-body p { margin-block: 0 16px; }
.post-body h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin: 1em 0 .4em; }
.post-body h3 { margin: 1em 0 .45em; }
.post-body a { color: var(--green); text-underline-offset: .2em; }
.post-body li { margin-block: 0 6px; }
.post-body :where(img, iframe, video, embed) { max-width: 100%; }
.post-body iframe { border: 0; }
.post-body .aligncenter { margin-inline: auto; }
.post-body .alignwide { max-width: 100%; }
.post-body figcaption { color: var(--muted); font-size: .85rem; margin-top: 5px; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.post-body th, .post-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: start; }
.post-body .info-note { background: var(--sand); padding: 13px 16px; border-radius: 4px; }
.entry-wide { margin: 27px auto 0; }
.entry-wide > h2, .entry-cta h2 { font-size: clamp(1.55rem, 2.8vw, 2rem); margin-bottom: 11px; }
.entry-wide .tile-grid { margin-top: 12px; }
.entry-wide .text-link { display: inline-block; margin-top: 4px; }
.entry-links { margin-top: 24px; }
.entry-links ul { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; }
#loai-hinh .entry-links { margin: 0 0 18px; }
.entry-cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 13px 24px; margin-top: 28px; padding: 18px; background: #eef0e7; border-radius: 4px; }
.entry-cta h2 { margin-bottom: 4px; }
.entry-cta p { color: var(--muted); line-height: 1.65; }
.listing-state { margin-top: 12px; display: inline-flex; align-items: center; border-radius: 3px; padding: 3px 9px; background: var(--sand); color: var(--ink); font-size: .84rem; font-weight: 600; }
.listing-state.is-available { background: #e3ede1; color: #204936; }
.listing-summary { padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.listing-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.listing-summary dt { color: var(--muted); font-size: .84rem; }
.listing-summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.archive-heading { margin-bottom: 23px; }
.archive-description { color: var(--muted); margin: 8px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 20px; font-size: .88rem; }
.nav-links .page-numbers { padding: 4px 9px; }
.nav-links .current { border-radius: 3px; background: var(--green); color: white; }
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.search-submit { min-height: 42px; padding-inline: 12px; background: var(--green); color: white; border: 0; border-radius: 3px; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 44px); }
  .hero-copy { padding-left: 22px; }
  .header-row { gap: 14px; }
  .nav-list a { font-size: .81rem; }
  .footer-grid { gap: 23px; }
}
@media (max-width: 850px) {
  .header-row { min-height: 64px; flex-wrap: wrap; position: relative; padding-block: 9px; }
  #saha-navigation { width: 100%; }
  .has-menu-toggle #saha-navigation { display: none; }
  .has-menu-toggle.menu-open #saha-navigation {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 9px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 9px 18px #12322924;
  }
  .menu-toggle { align-items: center; gap: 6px; min-height: 44px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--green); font-size: .85rem; }
  .has-menu-toggle .menu-toggle { display: inline-flex; }
  .menu-open .nav-list { display: grid; gap: 0; }
  .menu-open .nav-list a { padding: 9px 2px; font-size: .95rem; }
  .header-phone { display: none; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 74px; }
  .wrap { width: calc(100% - 32px); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 31px 16px 28px; }
  .hero-focus { margin-bottom: 11px; }
  .hero h1 { font-size: clamp(2.5rem, 9vw, 3.6rem); }
  .hero-lead { margin-top: 15px; }
  .hero .actions { margin-top: 18px; }
  .hero-figure { aspect-ratio: 16 / 9; }
  .section-head, .home-contact-inner { display: grid; align-items: start; }
  .tile-grid, .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid, .faq-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 16px; }
  .service-photo { max-width: 480px; }
  .listing-filters, .listing-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .contact-dock {
    display: flex;
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    background: var(--white);
    border-top: 1px solid var(--line);
  }
  .contact-dock a {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 44px;
    background: var(--green);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: .87rem;
  }
  .contact-dock a + a { background: var(--sand); color: var(--green); }
  .entry-shell { padding-block: 22px 42px; }
}
@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}
@media (max-width: 510px) {
  .tile-grid, .area-grid, .footer-grid { grid-template-columns: 1fr; }
  .area-tile { min-height: auto; }
  .entry { padding-inline: 15px; }
}
