@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600&family=Sarabun:wght@400;500;600&display=swap');
/* RayongHouse child theme - fixes for Thai text in OS Property search (module 193) */
#module-193 select,
#module-193 .form-select,
#module-193 input[type="text"],
#module-193 .form-control {
  height: 50px !important;
  min-height: 50px;
  padding: 0 36px 0 16px !important;
  line-height: 50px !important;
  font-size: 15px;
  vertical-align: middle;
}
#module-193 input[type="text"],
#module-193 .form-control:not(select) { padding-right: 16px !important; }
#module-193 select option { line-height: 1.6; padding: 6px 0; }
/* search button in brand green, same height as fields */
#module-193 button[type="submit"],
#module-193 .btn-primary {
  min-height: 50px;
  background: #85bf3e !important;
  border-color: #85bf3e !important;
  color: #fff !important;
  line-height: 1.4;
}
#module-193 button[type="submit"]:hover,
#module-193 .btn-primary:hover { background: #6fa52e !important; border-color: #6fa52e !important; }
#module-193 h3, #module-193 h4, #module-193 label, #module-193 legend { line-height: 1.6; }

/* All OS Property selects/inputs: give Thai vowels/tone marks room */
#osproperty select, .osp-container select, [class*="osp"] select,
#osproperty .form-select, [class*="osp"] .form-select {
  height: auto !important;
  min-height: 44px;
  line-height: 1.7 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
#module-193 select { height: 50px !important; line-height: 50px !important; padding-top: 0 !important; padding-bottom: 0 !important; }

/* Main menu: keep on one row at desktop widths */
.tm-header .uk-navbar-nav > li > a { padding: 0 10px !important; font-size: 15px !important; }
@media (max-width: 1399px) { .tm-header .uk-navbar-nav > li > a { padding: 0 8px !important; font-size: 14px !important; } }

/* Logo breathing room inside the green header */
.tm-header .uk-logo { padding: 12px 0; }

/* =========================================================
   RayongHouse modern refresh — keeps brand colours
   dark green #224335 · green #85bf3e · logo pink/orange
   ========================================================= */
:root { --rh-dark:#224335; --rh-green:#85bf3e; --rh-green-d:#6fa52e; --rh-radius:14px; --rh-shadow:0 10px 30px rgba(20,45,35,.10); --rh-shadow-h:0 18px 40px rgba(20,45,35,.18); }
body { background:#f6f8f5; }

/* Header */
.tm-header { box-shadow:0 2px 18px rgba(0,0,0,.18); position:relative; z-index:10; }
.tm-header .uk-navbar-nav > li > a { position:relative; transition:color .2s; }
.tm-header .uk-navbar-nav > li > a::after { content:""; position:absolute; left:10px; right:10px; bottom:22px; height:2px; background:var(--rh-green); transform:scaleX(0); transition:transform .25s; }
.tm-header .uk-navbar-nav > li > a:hover::after, .tm-header .uk-navbar-nav > li.uk-active > a::after { transform:scaleX(1); }
.tm-header .uk-navbar-dropdown { border-radius:10px; box-shadow:var(--rh-shadow-h); padding:12px 0; }
.tm-header .uk-navbar-dropdown-nav > li > a { padding:8px 20px !important; }

/* Hero */
.uk-section:has(#module-193) { position:relative; padding-top:90px; padding-bottom:110px; }
.uk-section:has(#module-193)::before { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(34,67,53,.55) 0%, rgba(34,67,53,.25) 45%, rgba(34,67,53,.65) 100%); }
.uk-section:has(#module-193) > .uk-container { position:relative; }
.rh-hero { margin-bottom:28px; }
.rh-hero-kicker { display:inline-block; font-size:13px; letter-spacing:3px; background:var(--rh-green); color:#fff; padding:4px 14px; border-radius:999px; margin-bottom:14px; }
.rh-hero-title { font-size:46px; line-height:1.35; font-weight:600; color:#fff !important; margin:0 0 8px; text-shadow:0 2px 16px rgba(0,0,0,.35); }
.rh-hero-sub { font-size:18px; color:rgba(255,255,255,.92); margin:0; text-shadow:0 1px 10px rgba(0,0,0,.35); }
@media (max-width:640px){ .rh-hero-title{font-size:30px} .rh-hero-sub{font-size:15px} .uk-section:has(#module-193){padding-top:50px;padding-bottom:60px} }

/* Search panel: dark-green glass instead of navy */
#module-193 { background:transparent !important; padding:0 !important; }
#module-193 .ospsearch.horizontal_search { background:rgba(34,67,53,.82) !important; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border:1px solid rgba(255,255,255,.18); border-radius:18px !important; box-shadow:0 20px 50px rgba(0,0,0,.30); }
#module-193 input[type="text"], #module-193 select { background-color:rgba(255,255,255,.96) !important; color:#1f2d27 !important; border:1px solid transparent !important; border-radius:10px !important; }
#module-193 input[type="text"]::placeholder { color:#6b7a72; }
#module-193 select option { background:#fff; color:#1f2d27; }
#module-193 input:focus, #module-193 select:focus { border-color:var(--rh-green) !important; box-shadow:0 0 0 3px rgba(133,191,62,.35) !important; outline:none; }
#module-193 button[type="submit"], #module-193 .btn-primary { border-radius:10px !important; font-weight:600; box-shadow:0 6px 18px rgba(133,191,62,.45) !important; }
#module-193, #module-193 a, #module-193 label, #module-193 h3, #module-193 h4 { color:#fff; }

/* Section headings */
main h1.componentheading, .tm-page h1.componentheading { font-size:32px; font-weight:600; color:var(--rh-dark); position:relative; padding-bottom:14px; margin-bottom:28px; }
main h1.componentheading::after { content:""; position:absolute; left:0; bottom:0; width:64px; height:4px; border-radius:4px; background:var(--rh-green); }
#module-900 .uk-card-title, #module-900 > h3, #module-900 h3:first-child { font-size:30px; font-weight:600; color:var(--rh-dark); position:relative; padding-bottom:14px; margin-bottom:30px; }
#module-900 h3:first-child::after { content:""; position:absolute; left:50%; bottom:0; width:64px; height:4px; margin-left:-32px; border-radius:4px; background:var(--rh-green); }

/* Property cards: CSS grid, rounded, shadow, hover lift */
.property-list ul.row-fluid { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px; margin:0 !important; }
.property-list ul.row-fluid::before, .property-list ul.row-fluid::after { display:none !important; }
.property-list ul.row-fluid > li.span4 { width:auto !important; margin:0 !important; float:none !important; background:#fff; border-radius:var(--rh-radius); overflow:hidden; box-shadow:var(--rh-shadow); transition:transform .25s, box-shadow .25s; display:flex; flex-direction:column; }
.property-list ul.row-fluid > li.span4:hover { transform:translateY(-6px); box-shadow:var(--rh-shadow-h); }
.property-list .property-mask figure { margin:0; overflow:hidden; }
.property-list .property-mask img.ospitem-imgborder { width:100%; height:230px; object-fit:cover; border:0 !important; border-radius:0 !important; transition:transform .5s; }
.property-list li.span4:hover .property-mask img.ospitem-imgborder { transform:scale(1.06); }
.property-list .property-desc { padding:16px 18px 20px; }
.property-list .property-desc h4 { font-size:17px; line-height:1.55; font-weight:600; margin:0 0 8px; }
.property-list .property-desc h4 a { color:var(--rh-dark); }
.property-list .property-desc h4 a:hover { color:var(--rh-green-d); text-decoration:none; }
.property-list .property-desc p { font-size:14px; line-height:1.7; color:#5d6b64; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.property-list .property-ref-badge { display:inline-block; background:#eef5e6; color:var(--rh-dark) !important; border-radius:999px; padding:2px 10px; font-size:12px; -webkit-line-clamp:unset !important; }
.property-list .cat-price { border-radius:0 0 0 10px; }
.property-list .os-featured a, .property-list h4.os-featured { border-radius:6px; }
@media (max-width:959px){ .property-list ul.row-fluid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:640px){ .property-list ul.row-fluid{grid-template-columns:1fr} }

/* Pagination */
.pagination__wrapper a, .pagination__wrapper span { border-radius:8px; }

/* District cards */
#module-900 .uk-inline-clip { border-radius:var(--rh-radius); box-shadow:var(--rh-shadow); }
#module-900 .uk-inline-clip img { height:220px !important; }
#module-900 .uk-inline-clip::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(34,67,53,0) 35%, rgba(34,67,53,.75) 100%); transition:opacity .3s; }
#module-900 .uk-inline-clip .uk-position-center { top:auto; bottom:18px; left:0; right:0; transform:none; text-align:center; z-index:1; }
#module-900 .uk-inline-clip .uk-position-center span { background:transparent !important; color:#fff !important; font-size:20px !important; font-weight:600; padding:0 !important; text-shadow:0 2px 10px rgba(0,0,0,.45); }
#module-900 .uk-inline-clip .uk-position-center span::after { content:" →"; color:var(--rh-green); opacity:0; transition:opacity .25s; }
#module-900 .uk-inline-clip:hover .uk-position-center span::after { opacity:1; }

/* Sidebar */
.tm-sidebar .uk-card, .tm-sidebar > div > div { background:#fff; border-radius:var(--rh-radius); box-shadow:var(--rh-shadow); padding:22px; }
.tm-sidebar h3 { font-size:20px; color:var(--rh-dark); }

/* Footer */
.uk-section-secondary { background:linear-gradient(180deg,#224335 0%,#1a3529 100%) !important; }
.uk-section-secondary .uk-icon-link { width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,.08); color:var(--rh-green) !important; transition:background .2s; }
.uk-section-secondary .uk-icon-link:hover { background:var(--rh-green); color:#fff !important; }
.uk-section-secondary iframe { border-radius:var(--rh-radius); }
.uk-section-secondary a:hover { color:var(--rh-green) !important; }
.property-list .property-desc p.property-ref-badge { display:inline-flex !important; align-items:center; gap:4px; width:auto; -webkit-line-clamp:unset; overflow:visible; }
#module-900 .uk-inline-clip { position:relative; display:block; }
#module-900 .uk-inline-clip::after { z-index:1; pointer-events:none; background:linear-gradient(180deg, rgba(34,67,53,0) 40%, rgba(20,40,30,.85) 100%) !important; }
#module-900 .uk-inline-clip .uk-position-center { position:absolute !important; top:auto !important; bottom:16px !important; left:0 !important; right:0 !important; width:100% !important; transform:none !important; text-align:center; z-index:2; }
.tm-sidebar h3 { font-size:19px !important; line-height:1.5; font-weight:600; padding-bottom:10px; border-bottom:3px solid var(--rh-green); display:inline-block; }
.tm-sidebar ul, .tm-sidebar li { list-style:none !important; margin-left:0 !important; padding-left:0 !important; }
.tm-sidebar li a { display:block; padding:7px 0; border-bottom:1px solid #eef1ec; color:#2f3d36; }
.tm-sidebar li a:hover { color:var(--rh-green-d); padding-left:4px; transition:padding .2s; }
#module-901 { margin-bottom:28px !important; }
#module-901 + #module-193, #module-193 { margin-top:0 !important; position:relative; }
@media (max-width:640px){ #module-901 { margin-bottom:22px !important; } .rh-hero { margin-bottom:0; } }

/* Select arrow: one arrow only (OSP dropdowns were tiling the SVG arrow) */
#module-193 select, [class*="osp"] select, #osproperty select {
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 12px !important;
  -webkit-appearance: none; appearance: none;
}
#module-193 select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23224335' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
#module-193 .less-options, #module-193 [class*="toggle"], #module-193 a[href="#"] { color:#fff !important; }

/* ---------- Listing grid spacing (each row is its own <ul>) ---------- */
.property-list ul.row-fluid { margin-bottom:28px !important; }
.property-list ul.row-fluid:last-of-type { margin-bottom:0 !important; }
.property-list li.span4 .property-info:not(:has(li)) { display:none; }
.property-list li.span4 .property-desc { flex:1; display:flex; flex-direction:column; padding:20px 22px 22px !important; }
.property-list li.span4 .property-desc h4 { margin:0 0 12px !important; }
.property-list li.span4 .property-desc .property-ref-badge { margin:0 0 12px !important; align-self:flex-start; }
.property-list li.span4 .property-desc label:empty { display:none; }
.property-list li.span4 .property-desc p:not(.property-ref-badge) { margin:0 !important; }
.property-list li.span4 .property-desc > *:last-child { margin-bottom:0 !important; }

/* ---------- Pagination as real buttons ---------- */
.pagination__wrapper { display:flex; flex-direction:column; align-items:center; gap:14px; margin:44px 0 10px; }
.pagination__wrapper > .text-end { text-align:center !important; margin:0 !important; font-size:14px; color:#6b7a72; }
.pagination__wrapper .pagination { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:0 !important; padding:0; list-style:none; }
.pagination__wrapper .pagination > li { margin:0 !important; padding:0 !important; }
.pagination__wrapper .pagination > li > a,
.pagination__wrapper .pagination > li > span {
  min-width:42px; height:42px; padding:0 14px; box-sizing:border-box;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border:1px solid #dfe6dc; border-radius:10px; background:#fff;
  color:var(--rh-dark); font-size:15px; font-weight:500; line-height:1; text-decoration:none;
  box-shadow:0 2px 6px rgba(20,45,35,.06); transition:all .2s;
}
.pagination__wrapper .pagination > li > a:hover { background:var(--rh-green); border-color:var(--rh-green); color:#fff; transform:translateY(-1px); }
.pagination__wrapper .pagination > li > a:hover svg polyline { stroke:#fff; }
.pagination__wrapper .pagination > li.uk-active > span { background:var(--rh-dark); border-color:var(--rh-dark); color:#fff; box-shadow:0 4px 12px rgba(34,67,53,.3); }
.pagination__wrapper .pagination > li.uk-disabled > span { opacity:.45; box-shadow:none; background:#f3f5f2; }
.pagination__wrapper .pagination svg polyline { stroke:currentColor; }
@media (max-width:640px){ .pagination__wrapper .pagination > li > a, .pagination__wrapper .pagination > li > span { min-width:38px; height:38px; padding:0 10px; font-size:14px; } }

/* ---------- Inner pages: compact hero ---------- */
.uk-section:has(#module-193):not(:has(#module-901)) { padding-top:36px !important; padding-bottom:36px !important; }

/* ---------- Sidebar category menu (OSP mod_oscategorymenu) ---------- */
.tm-sidebar li { display:flex; align-items:center; border-bottom:1px solid #eef1ec; }
.tm-sidebar li:last-child { border-bottom:0; }
.tm-sidebar li .rightarrow { display:none; }
.tm-sidebar li a { display:block; flex:1; padding:9px 4px !important; border:0 !important; font-size:15px; }
.tm-sidebar li a span { white-space:normal; }

/* ---------- Property detail page: full width, no sidebar ---------- */
body:has(#propertydetails) #tm-sidebar { display:none !important; }
#propertydetails { font-size:15px; line-height:1.75; }
#propertydetails .row-fluid { margin-bottom:0; }
#propertydetails > .span12 > .row-fluid + .row-fluid { margin-top:18px; }
#propertydetails .property-header-info-name h1, #propertydetails .property-header-info-name h2 { font-size:28px; line-height:1.45; font-weight:600; color:var(--rh-dark); margin:6px 0 8px; }
#propertydetails .property-header-rating { text-align:right; }
#propertydetails .property-header-rating, #propertydetails .property-header-rating * { color:var(--rh-dark); font-weight:600; }

/* ---------- Sidebar redesign ---------- */
#tm-sidebar > .uk-grid { row-gap:24px; }
#tm-sidebar .uk-panel, #tm-sidebar > .uk-grid > div > div { background:#fff; border-radius:var(--rh-radius); box-shadow:var(--rh-shadow); padding:22px 22px 18px; }
#tm-sidebar h3, #tm-sidebar h2, #tm-sidebar .uk-card-title { font-size:18px !important; line-height:1.4; font-weight:600; color:var(--rh-dark); margin:0 0 14px !important; padding:0 0 12px !important; border:0 !important; border-bottom:2px solid #eef1ec !important; display:block !important; position:relative; }
#tm-sidebar h3::after, #tm-sidebar h2::after { content:""; position:absolute; left:0; bottom:-2px; width:44px; height:2px; background:var(--rh-green); }
.rh-catmenu { list-style:none; margin:0; padding:0; }
.rh-catmenu li { display:block !important; border:0 !important; margin:0; }
.rh-catmenu a { display:flex !important; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px !important; margin:0 -12px; border-radius:10px; color:#2f3d36 !important; font-size:15px; text-decoration:none; transition:background .2s,color .2s; }
.rh-catmenu a:hover { background:#f1f7ea; color:var(--rh-dark) !important; padding-left:12px !important; }
.rh-catmenu li.uk-active > a { background:var(--rh-dark); color:#fff !important; }
.rh-cat-count { min-width:34px; padding:2px 9px; border-radius:999px; background:#eef5e6; color:var(--rh-dark); font-size:12px; font-weight:600; text-align:center; }
.rh-catmenu li.uk-active .rh-cat-count { background:var(--rh-green); color:#fff; }
.rh-catmenu .rh-catmenu { padding-left:14px; }

.rh-loan { display:flex; flex-direction:column; gap:12px; margin:0; }
.rh-loan-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rh-loan-field { display:flex; flex-direction:column; gap:5px; margin:0; }
.rh-loan-field > span { font-size:13px; color:#5d6b64; }
.rh-loan-field input { width:100%; height:44px; padding:0 12px; border:1px solid #dfe6dc; border-radius:10px; background:#fbfcfa; font-size:15px; color:#1f2d27; box-sizing:border-box; }
.rh-loan-field input:focus { outline:none; border-color:var(--rh-green); box-shadow:0 0 0 3px rgba(133,191,62,.25); background:#fff; }
.rh-loan-btn { height:46px; border:0; border-radius:10px; background:var(--rh-green); color:#fff; font-size:16px; font-weight:600; cursor:pointer; box-shadow:0 6px 16px rgba(133,191,62,.35); transition:background .2s, transform .2s; }
.rh-loan-btn:hover { background:var(--rh-green-d); transform:translateY(-1px); }
.rh-loan-result { background:linear-gradient(135deg,#224335,#2f5a47); color:#fff; border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; gap:2px; }
.rh-loan-result span { font-size:13px; opacity:.85; }
.rh-loan-result strong { font-size:24px; line-height:1.4; color:#fff; }
.rh-loan-result small { font-size:12px; opacity:.8; }
@media (min-width:960px){ #tm-sidebar > .uk-grid { position:sticky; top:20px; } }
/* sidebar: only the module panel is a card (not the grid column around it) */
#tm-sidebar > .uk-grid { margin-left:0 !important; }
#tm-sidebar > .uk-grid > div { background:transparent !important; box-shadow:none !important; border-radius:0 !important; padding:0 !important; }
#tm-sidebar > .uk-grid > div + div { margin-top:24px !important; }

/* ================= UI/UX audit fixes ================= */
/* hero image always covers, also when "more options" expands */
.uk-section:has(#module-193) { background-size:cover !important; background-position:center !important; }
/* OS Property css loads after ours: force Thai fonts on its blocks */
.agent-properties, .agent-properties p, .agent-properties .price, .agent-properties h4, .property-ref-badge, #propertydetails, #propertydetails p, .relate_property { font-family:'Sarabun',sans-serif !important; }
.agent-properties .property-desc h4, .agent-properties .property-desc h4 a, #propertydetails h1, #propertydetails h3 { font-family:'Prompt',sans-serif !important; }
/* equal card rows: clamp titles to 3 lines */
.agent-properties .property-desc h4 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; min-height:calc(1.55em * 3); }
/* badges on brand colours */
.agent-properties figure.pimage h4:not(.os-featured), .agent-properties figure.pimage h4:not(.os-featured) a { background:#224335 !important; color:#fff !important; }
.os-featured a { pointer-events:none; cursor:default; }
.g5ere__property-badge.g5ere__featured, #propertydetails .label-important:not(.tagkeyword) { background:#85bf3e !important; border-color:#85bf3e !important; }
.tagkeyword { background:#eef5e6 !important; color:#224335 !important; font-size:13px !important; padding:4px 12px !important; border-radius:12px !important; text-shadow:none !important; }
/* empty section nav bar on detail page */
#listing-sections { display:none !important; }
/* readable link colour (AA) */
main .uk-article a, .relate_property a, #propertydetails a:not(.uk-button):not(.btn) { color:#4a7f1f; }
main .uk-article a:hover, .relate_property a:hover { color:#224335; }
/* article pages */
.uk-article-meta { font-size:14px !important; color:#6b7280 !important; letter-spacing:0 !important; text-transform:none !important; }
.uk-article-title { font-weight:600 !important; color:var(--rh-dark); line-height:1.45; }
/* section heading alignment: left everywhere */
#module-900 h3:first-child { text-align:left !important; }
#module-900 h3:first-child::after { left:0 !important; margin-left:0 !important; }
/* sidebar aligned with main heading */
@media (min-width:960px){ #tm-sidebar { padding-top:6px; } }
/* mobile */
@media (max-width:959px){ #tm-sidebar #module-150 { display:none; } }
@media (max-width:767px){ #propertydetails .property-header-rating { text-align:left !important; } #propertydetails .property-header-info-name h1 { font-size:22px; } }
@media (max-width:639px){ .pagination__wrapper .pagination li:has(.first), .pagination__wrapper .pagination li:has(.last) { display:none; } }
