:root {
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  color: #24282b;
  background: #f7f8f6;
  font-synthesis: none;
  --primary: #176749;
  --primary-hover: #104e37;
  --green: #176749;
  --muted: #5c6468;
  --border: #dce1dd;
  --shadow: 0 4px 24px rgb(27 37 31 / 4%);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.7; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 5; padding: 12px 20px; background: #fff; border: 2px solid var(--green); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 16px; background: #fff; border-bottom: 1px solid var(--border); }
.site-brand { color: var(--primary); font-weight: 800; font-size: 1.7rem; text-decoration: none; line-height: 1.3; }
.site-header nav { order: 3; display: flex; gap: 8px; width: 100%; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; text-decoration: none; border-radius: 9px; font-weight: 600; }
.site-header nav a:hover { background: #f4f5f3; }
.site-header nav [aria-current="page"] { color: var(--primary); background: #edf7f0; }
.language-switcher { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; direction: ltr; font-size: .9rem; }
.language-switcher button, .language-switcher a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); cursor: pointer; text-decoration: none; }
.language-switcher [aria-current="true"] { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
main { width: min(100% - 32px, 1120px); margin: 32px auto 64px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.45; margin: 12px 0 20px; font-weight: 750; }
h2 { font-size: 1.25rem; line-height: 1.7; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 4px; }
.primary-link, .form-actions button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 52px; padding: 12px 28px; border: 1px solid transparent; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary-link:hover, .form-actions button:hover { background: var(--primary-hover); }
.site-footer { padding: 24px 16px; border-top: 1px solid var(--border); color: var(--muted); text-align: center; font-size: .85rem; }
.site-footer span { padding-inline: 8px; }
.property-form-page { max-width: 880px; }
.property-form-page h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); margin: 8px 0 12px; }
.form-hint { color: var(--muted); font-size: .88rem; font-weight: 400; line-height: 1.8; }
.form-hint { margin: 0 0 18px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.property-form-page label { display: block; margin-bottom: 9px; font-size: .95rem; font-weight: 600; }
.property-form-page input:not([type="checkbox"]):not([type="hidden"]), .property-form-page textarea, .property-form-page select { width: 100%; max-width: 100%; min-height: 52px; padding: 12px 14px; color: #24282b; background: #fff; border: 1px solid #7e8b83; border-radius: 9px; }
.property-form-page input[type="tel"], .property-form-page input[type="number"] { direction: ltr; text-align: start; }
.property-form-page textarea { resize: vertical; line-height: 1.9; min-height: 140px; }
.property-form-page .checkbox-label { display: flex; align-items: center; gap: 12px; margin: 0; min-height: 44px; }
.property-form-page input[type="checkbox"] { width: 22px; height: 22px; margin: 0; accent-color: var(--green); }
.property-form-page [aria-invalid="true"] { border-color: #b4232d !important; }
.field-error { margin: 8px 0 0; color: #a3212a; font-size: .9rem; }
.form-error-summary, .form-success { padding: 18px; border-radius: 10px; }
.form-error-summary { background: #fff0f0; color: #92212a; border: 1px solid #d88b90; }
.form-success { background: #edf7f0; color: #175137; border: 1px solid #85b798; }
.form-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.form-actions button { width: 100%; }
.properties-page h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 28px; }
.properties-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.property-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.property-card-content { padding: 24px 22px 18px; flex: 1; }
.property-card-location { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.property-card h2 { font-size: 1.3rem; line-height: 1.5; margin: 0 0 4px; }
.property-card-type { color: var(--muted); margin: 0 0 18px; }
.property-card-price { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.property-card-price-label { color: var(--muted); font-size: .85rem; }
.property-card-price strong { align-self: flex-start; color: var(--primary); font-size: 1.55rem; line-height: 1.4; font-weight: 750; }
.property-card-availability { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 5px 11px; border-radius: 8px; background: #edf7f0; color: #175137; font-size: .9rem; font-weight: 700; }
.availability-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.property-card-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding-top: 16px; border-top: 1px solid var(--border); }
.property-card-facts div { min-width: 0; }
.property-card-facts dt { color: var(--muted); font-size: .82rem; }
.property-card-facts dd { margin: 0; font-weight: 700; }
.property-card-action { display: flex; align-items: center; justify-content: center; width: calc(100% - 44px); min-height: 52px; margin: 0 22px 22px; padding: 12px 20px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; text-align: center; text-decoration: none; }
.property-card-action:hover { background: var(--primary-hover); }
.properties-empty { display: grid; place-items: center; min-height: 260px; padding: 36px 24px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); text-align: center; }
.properties-empty p { margin: 0; color: var(--muted); font-size: 1.1rem; }
.property-detail-page { max-width: 1120px; }
.detail-back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 18px; color: var(--primary); font-weight: 700; text-decoration: none; }
.detail-back-link:hover { text-decoration: underline; }
.detail-hero, .detail-panel, .detail-contact { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.detail-hero { margin-bottom: -8px; padding: 14px 20px 12px; }
.detail-hero h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; font-size: 22px; line-height: 1.3; }
.detail-location { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.detail-price { margin: 4px 0 0; line-height: 1.3; }
.detail-price strong { color: var(--primary); font-size: 22px; font-weight: 700; }
.detail-layout { display: grid; gap: 20px; }
.detail-main, .detail-sidebar { display: grid; align-content: start; gap: 20px; min-width: 0; }
.detail-panel, .detail-contact { padding: 24px 20px; }
.detail-panel h2, .detail-contact h2 { margin: 0 0 18px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; }
.detail-facts div, .detail-contact-numbers div { min-width: 0; }
.detail-facts dt, .detail-contact-numbers dt { color: var(--muted); font-size: .88rem; }
.detail-facts dd, .detail-contact-numbers dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.detail-sidebar-facts .detail-facts { display: block; }
.detail-sidebar-facts .detail-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.detail-sidebar-facts .detail-facts dd { margin: 0; text-align: end; }
.detail-description { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.detail-amenities { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.detail-amenities li { max-width: 100%; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: #f7f8f6; overflow-wrap: anywhere; }
.detail-contact-name { margin: 0; font-size: 1.15rem; font-weight: 700; }
.detail-contact-role { margin: 2px 0 20px; color: var(--muted); }
.detail-contact-numbers { display: grid; gap: 14px; margin: 0 0 24px; }
.detail-contact-numbers a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.detail-contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.detail-contact-action { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; padding: 12px 20px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; text-align: center; text-decoration: none; }
.detail-contact-action:hover { background: var(--primary-hover); }
.detail-contact-action:disabled { opacity: .65; cursor: not-allowed; }
.detail-secondary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-secondary-actions button { flex: 1 1 120px; min-height: 42px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #f7f8f6; color: var(--muted); }
.detail-secondary-actions button:disabled { cursor: not-allowed; }
@media (min-width: 640px) {
  .detail-hero h1 { font-size: 26px; }
  .detail-location { font-size: 15px; }
  .detail-price strong { font-size: 24px; }
  .site-header { padding: 20px max(24px, calc((100% - 1120px) / 2)); gap: 28px; }
  .site-header nav { width: auto; order: initial; }
  main { width: min(100% - 48px, 1120px); margin-top: 48px; }
  .property-form-page fieldset { padding: 24px 28px 30px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions { flex-direction: row; justify-content: flex-end; }
  .form-actions button { width: auto; min-width: 180px; }
  .properties-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .properties-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-hero { padding: 18px 24px 16px; }
  .detail-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; gap: 24px; }
  .detail-panel, .detail-contact { padding: 28px 32px; }
}
.photo-upload-box { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: #fafbf9; }
.photo-upload-box input[type="file"] { width: 100%; min-width: 0; padding: 10px; }
.photo-upload-button { min-height: 44px; margin-top: 10px; padding: 8px 18px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.photo-thumbnails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 16px 0 0; }
.photo-thumbnails li { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.photo-thumbnails img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-management .photo-upload-box { margin-block-start: 16px; }
.posting-page .photo-management .photo-thumbnails { grid-template-columns: repeat(auto-fill, minmax(160px, 180px)); }
.photo-management .photo-thumbnails img { max-height: 180px; }
.photo-management .photo-thumb-actions { align-items: center; min-height: 44px; }
.photo-management .photo-thumb-actions button { min-height: 44px; }
.photo-management .photo-thumb-actions button[value^="delete_"] { color: #a52a35; }
.photo-management .selected-photo-previews[hidden] { display: none; }
@media (max-width: 600px) { .posting-page .photo-management .photo-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .posting-page .photo-management .photo-thumbnails { grid-template-columns: minmax(0, 1fr); } }
.photo-thumb-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; }
.photo-thumb-actions button { min-height: 36px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--green); font-size: .78rem; cursor: pointer; }
.primary-photo-label { color: var(--green); font-size: .8rem; font-weight: 700; }
.property-card-media { position: relative; flex: none; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-start-start-radius: 8px; border-start-end-radius: 8px; border-bottom: 1px solid var(--border); background: #f5f5f5; }
.property-card-image, .property-card-image-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.property-card-image { display: block; object-fit: cover; }
.property-card-image[hidden] { display: none; }
.property-card-image-placeholder { display: grid; place-items: center; color: #74827a; }
.property-card-image-placeholder svg { width: clamp(56px, 18%, 72px); height: auto; }
.property-card-photo-count { position: absolute; inset-inline-end: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; background: rgb(36 40 43 / 72%); color: #fff; font-size: .8rem; font-weight: 700; line-height: 1.3; }
.photo-gallery { display: grid; gap: 20px; min-width: 0; margin: 20px 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.property-detail-page .photo-gallery { margin: 0; }
.detail-gallery-media { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #f5f5f5; }
.detail-gallery-image, .detail-gallery-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail-gallery-image { display: block; object-fit: cover; }
.detail-gallery-placeholder { display: grid; place-items: center; color: #74827a; }
.detail-gallery-placeholder[hidden] { display: none; }
.detail-gallery-control { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgb(36 40 43 / 72%); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.detail-gallery-previous { left: 12px; }
.detail-gallery-next { right: 12px; }
.detail-gallery-counter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 7px; background: rgb(36 40 43 / 72%); color: #fff; font-size: .85rem; font-weight: 700; }
.posting-page { max-width: 760px; }
.posting-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.posting-section h2 { margin: 0 0 14px; font-size: 1.25rem; }
.posting-section h3 { margin: 20px 0 10px; font-size: 1rem; }
.posting-section .form-grid { gap: 14px; }
.choice-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.choice-button { position: relative; cursor: pointer; }
.choice-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-button span { display: grid; min-height: 52px; place-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-weight: 700; text-align: center; }
.choice-button input:checked + span { border-color: var(--green); color: var(--green); background: #eff7f1; }
.choice-button input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.posting-page .photo-thumbnails { grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); }
.posting-page .form-actions { margin-top: 24px; }
.posting-page .form-actions button { width: 100%; }
@media (max-width: 600px) { .posting-page .form-grid { grid-template-columns: minmax(0,1fr); } .posting-section { padding: 18px 0; } }

/* Compact authentication cards; all rules stay scoped to auth pages. */
.auth-page { width: min(420px, calc(100% - 32px)); margin: 40px auto; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 2px 10px rgb(27 37 31 / 4%); text-align: start; }
.auth-page h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.4; font-weight: 700; }
.auth-page .auth-support { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-page .auth-choice { margin-block: 20px 0; }
.auth-page .auth-choice-secondary { padding-block-start: 20px; border-block-start: 1px solid var(--border); }
.auth-page label { display: block; margin-block: 14px 6px; font-size: 14px; font-weight: 600; }
.auth-page input:not([type="hidden"]), .auth-page select { display: block; width: 100%; min-width: 0; height: 46px; padding: 10px 12px; color: #24282b; background: #fff; border: 1px solid #aab4ae; border-radius: 6px; font-size: 16px; text-align: start; }
.auth-page input[type="tel"] { direction: ltr; text-align: left; }
html[dir="rtl"] .auth-page input[type="tel"] { text-align: right; }
.auth-page #code { direction: ltr; text-align: center; letter-spacing: .2em; }
.auth-page button, .auth-page .button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-block: 18px 0; padding: 10px 12px; background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 6px; font-size: 15px; font-weight: 600; line-height: 1.5; text-decoration: none; cursor: pointer; }
.auth-page button:hover, .auth-page .button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.auth-page .auth-choice .button { margin-block-start: 10px; }
.auth-page .button-secondary { color: var(--green); background: #fff; border-color: var(--border); }
.auth-page .button-secondary:hover { color: var(--green); background: #f4f8f5; border-color: var(--green); }
.auth-page .auth-facebook { padding-block-end: 14px; margin-block-end: 14px; border-block-end: 1px solid var(--border); }
.auth-page .auth-facebook button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-page .auth-facebook button img { flex: none; }
.auth-page .auth-development-note { margin-block: 8px 0; font-size: 12px; text-align: center; }
.auth-page .auth-footer { margin: 20px 0 0; padding-block-start: 16px; border-block-start: 1px solid var(--border); color: var(--muted); font-size: 14px; text-align: center; }
.auth-page .auth-footer a, .auth-page .auth-change-phone { color: var(--green); font-weight: 600; text-underline-offset: 3px; }
.auth-page .auth-footer a { display: inline-block; padding-block: 6px; }
.auth-page .auth-resend button { margin-block-start: 12px; color: var(--green); background: #fff; border-color: var(--border); }
.auth-page .auth-resend button:hover { background: #f4f8f5; border-color: var(--green); }
.auth-page .auth-change-phone { display: block; width: fit-content; min-height: 44px; margin: 8px auto 0; padding-block: 10px; font-size: 14px; text-align: center; }
.auth-page [role="alert"] { margin: 8px 0; color: #b4232d; font-size: 14px; }
.auth-page [aria-invalid="true"] { border-color: #b4232d; }
@media (max-width: 600px) {
  .auth-page { width: calc(100% - 24px); margin: 16px auto 24px; padding: 20px; }
  .auth-page h1 { font-size: 23px; margin-block-end: 10px; }
}

/* Compact navigation on phones and tablets; desktop links stay inline. */
.mobile-menu-toggle { display: none; }
@media (max-width: 959px) {
  .site-header { position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: 8px; padding: 8px 10px; }
  .site-header .site-brand { grid-column: 1; grid-row: 1; font-size: 22px; white-space: nowrap; }
  .site-header .language-switcher { grid-column: 2; grid-row: 1; justify-self: center; margin: 0; gap: 2px; font-size: 13px; white-space: nowrap; }
  .site-header .language-switcher a, .site-header .language-switcher button { min-height: 44px; padding: 6px 4px; white-space: nowrap; }
  .mobile-menu-toggle { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: #24282b; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: nowrap; cursor: pointer; }
  .mobile-menu-toggle:hover, .mobile-menu-toggle[aria-expanded="true"] { background: #f4f8f5; color: var(--green); }
  .mobile-menu-icon { width: 18px; font-size: 20px; line-height: 1; text-align: center; }
  .site-header nav { position: absolute; inset-inline: 10px; top: calc(100% + 4px); z-index: 20; display: none; width: auto; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 6px 18px rgb(27 37 31 / 8%); }
  .site-header nav.is-open { display: flex; flex-direction: column; gap: 0; }
  .site-header nav a, .site-header nav button { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 10px 12px; font-size: 14px; line-height: 1.5; text-align: start; white-space: nowrap; }
  .site-header nav > :not(:last-child) { border-bottom: 1px solid var(--border); }
  .site-header nav a { border-radius: 5px; }
  .site-header nav form { margin: 0; }
  .site-header nav button { color: inherit; background: transparent; border: 0; border-radius: 5px; font-weight: 600; cursor: pointer; }
  .site-header nav button:hover { background: #f4f5f3; }
}

/* Owner property management cards reuse the public card layout. */
.my-properties-page h1 { font-size: clamp(24px, 4vw, 32px); }
.management-status { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 16px; }
.management-status span { padding: 4px 10px; color: var(--green); background: #edf7f0; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.management-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-block-start: 1px solid var(--border); }
.management-actions a, .management-actions button { display: inline-flex; align-items: center; justify-content: center; flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--green); font-weight: 600; text-decoration: none; }
.management-actions a:hover, .management-actions button:hover { background: #edf7f0; }

.management-actions form { display: flex; flex: 1 1 100%; min-width: 0; margin: 0; }
.management-actions button { width: 100%; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
@media (min-width: 640px) { .management-actions form { flex-basis: auto; } }

/* Save actions integrate into the existing detail panel and property cards. */
.property-save-form { flex: 1 1 160px; min-width: 0; margin: 0; }
.detail-secondary-actions .property-save-form button { width: 100%; min-height: 44px; color: var(--green); cursor: pointer; }
.property-save-link { display: flex; align-items: center; justify-content: center; flex: 1 1 120px; min-height: 44px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--green); background: #f7f8f6; text-decoration: none; font-weight: 600; }
.property-saved-state { display: block; margin-block-end: 6px; color: var(--green); font-weight: 600; }
.saved-properties-page h1 { font-size: clamp(24px, 4vw, 32px); }
.saved-remove-form { margin: 0 22px 22px; }
.saved-remove-form button { width: 100%; min-height: 44px; padding: 8px 12px; color: var(--green); background: #fff; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; cursor: pointer; }
.saved-remove-form button:hover, .property-save-link:hover { background: #edf7f0; }
.saved-unavailable { min-height: 160px; }

/* Public marketplace results; other property-card layouts remain unchanged. */
.market-page { max-width: 1120px; }
.market-heading { margin-block-end: 16px; }
.market-page .market-heading h1 { margin: 0 0 2px; font-size: clamp(24px, 3vw, 30px); line-height: 1.35; }
.market-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.market-filter-panel { margin-block-end: 22px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.market-filter-panel > summary { display: none; }
.market-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.market-filter-field { min-width: 0; }
.market-filter-field label { display: block; margin-block-end: 5px; color: #343c37; font-size: 13px; font-weight: 600; }
.market-filter-field select { width: 100%; min-width: 0; height: 44px; padding: 8px 10px; border: 1px solid #b6c1b9; border-radius: 6px; background: #fff; color: #24282b; font-size: 14px; }
.market-filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.market-filter-actions button, .market-filter-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.market-filter-actions button { border: 1px solid var(--green); background: var(--green); color: #fff; }
.market-filter-actions button:hover { background: var(--primary-hover); }
.market-filter-actions a { border: 1px solid var(--border); color: var(--green); }
.market-filter-actions a:hover { background: #f4f8f5; }
.market-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-block: 0 12px; }
.market-results-heading h2 { margin: 0; font-size: 18px; }
.market-results-heading span { color: var(--muted); font-size: 14px; }
.market-results { display: grid; gap: 12px; }
.market-result { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease; }
.market-result-link { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 205px; color: inherit; text-decoration: none; }
.market-result-link:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.market-result .property-card-media { width: 100%; height: 100%; min-height: 205px; aspect-ratio: auto; border: 0; border-radius: 0; }
.market-result .property-card-photo-count { inset-inline-end: auto; inset-inline-start: 10px; }
.market-carousel { position: absolute; z-index: 2; inset-block: 0; inset-inline-start: 0; display: flex; align-items: center; justify-content: space-between; width: 220px; pointer-events: none; }
.market-carousel button { display: grid; place-items: center; width: 36px; height: 44px; margin-inline: 6px; padding: 0; border: 1px solid rgb(255 255 255 / 70%); border-radius: 6px; background: rgb(24 34 27 / 72%); color: #fff; font-size: 27px; line-height: 1; cursor: pointer; pointer-events: auto; opacity: .68; transition: opacity 180ms ease, background-color 180ms ease; }
.market-carousel button:hover, .market-carousel button:focus-visible { opacity: 1; background: rgb(24 34 27 / 88%); }
.market-result:hover .market-carousel button { opacity: 1; }
.market-result .property-card-media { touch-action: pan-y; }
.market-carousel button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.market-result .property-card-image-placeholder { background: #f2f5f2; }
.market-result-info { min-width: 0; padding: 16px 165px 14px 18px; }
html[dir="rtl"] .market-result-info { padding: 16px 18px 14px 165px; }
.market-result-info h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.45; }
.market-result-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 15px; min-width: 0; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.market-result-fact { display: inline-flex; align-items: center; gap: 5px; min-width: 0; line-height: 1.5; }
.market-result-fact svg { flex: none; color: inherit; }
.market-result-fact-location { flex: 1 1 160px; }
.market-result-fact-location bdi { min-width: 0; overflow-wrap: anywhere; }
.market-result-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 0 0 10px; color: #48544d; font-size: 13px; }
.market-result-meta span + span::before { content: '·'; margin-inline-end: 10px; color: #9ca9a0; }
.market-result .property-card-type { margin: 0; color: inherit; }
.market-result-bottom { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 18px; }
.market-result-price { display: flex; flex-direction: column; gap: 0; min-width: 0; margin: 0; }
.market-result-price > span { color: var(--muted); font-size: 12px; }
.market-result-price strong { color: var(--green); font-size: 23px; line-height: 1.3; overflow-wrap: anywhere; }
.market-result .property-card-availability { margin: 0; padding: 3px 7px; font-size: 12px; }
.market-result-open { display: inline-flex; align-items: center; gap: 4px; margin-block-start: 7px; color: var(--green); font-size: 13px; font-weight: 600; }
html[dir="rtl"] .market-result-open > span { transform: rotate(180deg); }
.market-result-save { position: absolute; z-index: 1; inset-block-start: 12px; inset-inline-end: 12px; }
.market-result-save form { margin: 0; }
.market-result-save a, .market-result-save button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--green); box-shadow: 0 1px 5px rgb(27 37 31 / 9%); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.market-result-save a:hover, .market-result-save button:hover { background: #edf7f0; border-color: var(--green); }
.market-result-save [aria-hidden="true"] { font-size: 19px; line-height: 1; }
.market-page .market-empty { min-height: 180px; gap: 12px; }
.market-empty a { color: var(--green); font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .market-result:hover { border-color: #8ab89b; background: #fbfdfb; box-shadow: 0 4px 14px rgb(27 37 31 / 8%); }
}
.market-result:focus-within { border-color: var(--green); background: #fbfdfb; box-shadow: 0 0 0 2px rgb(23 103 73 / 18%); }
@media (max-width: 767px) {
  .market-page { width: calc(100% - 24px); margin-block: 18px 40px; }
  .market-filter-panel { padding: 0; margin-block-end: 18px; }
  .market-filter-panel > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 14px; color: var(--green); font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
  .market-filter-panel > summary::-webkit-details-marker { display: none; }
  .market-filter-panel > summary::after { content: '⌄'; font-size: 20px; line-height: 1; }
  .market-filter-panel[open] > summary::after { transform: rotate(180deg); }
  .market-filter-count { display: inline-grid; place-items: center; min-width: 21px; margin-inline-start: 8px; padding: 0 5px; border-radius: 5px; background: #edf7f0; font-size: 12px; }
  .market-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 14px 14px; border-block-start: 1px solid var(--border); }
  .market-filter-field { padding-block-start: 10px; }
  .market-filter-actions { justify-content: stretch; }
  .market-filter-actions button, .market-filter-actions a { flex: 1; }
  .market-result-link { grid-template-columns: minmax(0, 1fr); }
  .market-result .property-card-media { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .market-carousel { inset-block-start: 0; inset-block-end: auto; width: 100%; aspect-ratio: 16 / 9; }
  .market-carousel button { opacity: .9; }
  .market-result-info, html[dir="rtl"] .market-result-info { padding: 14px 16px; }
  .market-result-info h2 { font-size: 17px; }
  .market-result-price strong { font-size: 21px; }
  .market-result-save { inset-block-start: 10px; inset-inline-end: 10px; }
}
@media (max-width: 380px) {
  .market-filters { grid-template-columns: minmax(0, 1fr); }
  .market-result-save a, .market-result-save button { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .market-result { transition: none; } }

/* Account dashboard only; marketplace pages and navigation keep their layout. */
.account-page { width: min(960px, calc(100% - 24px)); margin: 20px auto 40px; text-align: start; }
.account-page .account-card { min-width: 0; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 2px 10px rgb(27 37 31 / 3%); }
.account-page .account-header { margin-block-end: 16px; }
.account-header-identity { display: flex; align-items: center; gap: 14px; }
.account-header-identity > div { min-width: 0; }
.account-page h1 { font-size: 23px; line-height: 1.4; margin: 0 0 4px; }
.account-page h2 { font-size: 18px; line-height: 1.5; margin: 0 0 12px; }
.account-page p { margin: 0; }
.account-page .account-name { font-size: 16px; font-weight: 600; }
.account-page .account-muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.account-avatar { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 50%; background: #edf7f0; color: var(--green); font-size: 23px; font-weight: 700; }
.account-avatar-image { display: block; width: 48px; object-fit: cover; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; }
.account-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.account-shortcuts a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--green); font-size: 13px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.account-shortcuts a:hover { background: #f4f8f5; border-color: var(--green); }
.account-page .account-section-note { margin-block: -4px 18px; }
.account-field { margin-block-end: 16px; }
.account-field label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 6px; font-size: 14px; font-weight: 600; }
.account-readonly-label { color: var(--muted); font-size: 12px; font-weight: 400; }
.account-field input, .account-field select { display: block; width: 100%; min-width: 0; height: 46px; padding: 10px 12px; border: 1px solid #aab4ae; border-radius: 6px; background: #fff; color: #24282b; font-size: 16px; text-align: start; }
.account-field input[readonly] { background: #f4f5f3; color: var(--muted); border-color: var(--border); }
.account-field input[type="tel"] { direction: ltr; text-align: left; }
html[dir="rtl"] .account-field input[type="tel"] { text-align: right; }
.account-page .account-field-help { margin-block-start: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-page button { min-height: 46px; padding: 10px 18px; border: 1px solid var(--green); border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; }
.account-save { width: 100%; color: #fff; background: var(--green); }
.account-save:hover { background: var(--primary-hover); }
.account-identity { display: flex; align-items: start; gap: 10px; margin-block-end: 12px; font-size: 14px; }
.account-identity-icon { color: var(--green); }
.account-identity > div { min-width: 0; }
.account-logout-form { margin: 16px 0 0; padding-block-start: 16px; border-block-start: 1px solid var(--border); }
.account-page .account-logout-form button { width: 100%; background: #fff; color: var(--muted); border-color: var(--border); }
.account-logout-form button:hover { background: #f4f5f3; }
.account-page .account-notice { margin-block: 0 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: #edf7f0; color: var(--green); font-size: 14px; }
.account-page [role="alert"] { margin-block-start: 6px; color: #b4232d; font-size: 13px; }
.account-page [aria-invalid="true"] { border-color: #b4232d; }
@media (min-width: 900px) {
  .account-page { margin-block: 28px 48px; }
  .account-page h1 { font-size: 26px; }
  .account-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr); gap: 20px; }
  .account-save { width: auto; min-width: 160px; }
}
@media (max-width: 360px) {
  .account-page .account-card { padding: 16px; }
  .account-header-identity { gap: 10px; }
}

/* Homepage marketplace discovery. All layout changes are scoped to the homepage. */
:root:has(.home-page) { scroll-behavior: smooth; }
.home-page { width: 100%; margin: 0 0 48px; }
.home-content, .home-hero-content { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.home-page .home-hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 410px; padding-block: clamp(22px, 4vw, 44px); overflow: hidden; border: 0; border-radius: 0; background: #173b2b; box-shadow: none; color: #fff; isolation: isolate; }
.home-hero-content { display: flex; flex-direction: column; gap: 22px; }
.home-hero-slides, .home-hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-hero-slides { z-index: -2; }
.home-hero-slide { display: block; object-fit: cover; object-position: center 55%; opacity: 0; transition: opacity 700ms ease-in-out; }
.home-hero-slide.is-active { opacity: 1; }
.home-page .home-hero::before { position: absolute; z-index: -1; inset: 0; content: ''; background: linear-gradient(90deg, rgb(12 37 27 / 83%), rgb(12 37 27 / 50%) 62%, rgb(12 37 27 / 27%)); pointer-events: none; }
html[dir="rtl"] .home-page .home-hero::before { background: linear-gradient(270deg, rgb(12 37 27 / 83%), rgb(12 37 27 / 50%) 62%, rgb(12 37 27 / 27%)); }
.home-hero-copy { min-width: 0; max-width: 680px; }
.home-kicker { margin: 0 0 8px; color: #e7f5eb; font-size: 13px; font-weight: 700; }
.home-hero-copy h1 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 48px); line-height: 1.25; }
.home-hero-copy > p:last-child { margin: 0; font-size: clamp(15px, 1.7vw, 18px); line-height: 1.6; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-hero-action { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; text-align: center; text-decoration: none; }
.home-hero-action-primary { background: var(--green); color: #fff; }
.home-hero-action-primary:hover { background: var(--primary-hover); }
.home-hero-action-secondary { border-color: #fff; background: rgb(12 37 27 / 48%); color: #fff; }
.home-hero-action-secondary:hover { background: rgb(12 37 27 / 76%); }
.home-hero-action:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
#property-search { scroll-margin-top: 16px; }
.home-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(110px, .7fr); align-items: end; gap: 10px; width: 100%; padding: 15px; border-radius: 10px; background: #fff; color: #24282b; box-shadow: 0 4px 14px rgb(16 35 24 / 12%); }
.home-search-field { min-width: 0; }
.home-search-field label { display: block; margin-block-end: 4px; color: #3b4840; font-size: 13px; font-weight: 700; }
.home-search-field select { width: 100%; min-width: 0; height: 46px; padding: 8px 12px; border: 1px solid #aab9ae; border-radius: 6px; background: #fff; color: #24282b; font-size: 15px; }
.home-search button { min-height: 46px; padding: 8px 16px; border: 1px solid var(--green); border-radius: 6px; background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.home-search button:hover { background: var(--primary-hover); }
.home-section { margin-block-start: 36px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-block-end: 14px; }
.home-section-kicker { margin: 0 0 2px; color: var(--green); font-size: 12px; font-weight: 700; }
.home-section-heading h2 { margin: 0; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.35; }
.home-section-heading > a { display: inline-flex; align-items: center; min-height: 40px; color: var(--green); font-size: 14px; font-weight: 700; text-decoration: none; }
.home-section-heading > a:hover { text-decoration: underline; }
.home-latest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home-latest-grid .market-result-link { display: block; min-height: 0; }
.home-latest-grid .market-result .property-card-media { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
.home-latest-grid .market-carousel { inset-block-start: 0; inset-block-end: auto; width: 100%; aspect-ratio: 4 / 3; }
.home-latest-grid .market-result-info, html[dir="rtl"] .home-latest-grid .market-result-info { padding: 14px 14px 65px; }
.home-latest-grid .market-result-info h2 { font-size: 16px; }
.home-latest-grid .market-result-bottom { margin-block: 5px 10px; }
.home-latest-grid .market-result-facts { margin-block-end: 8px; font-size: 12px; }
.home-latest-grid .market-result-fact-location { flex-basis: 140px; }
.home-latest-grid .market-result-meta { margin: 0; font-size: 12px; }
.home-latest-grid .market-result-price strong { font-size: 20px; }
.home-latest-grid .market-result-save { inset-block-start: auto; inset-block-end: 12px; inset-inline-end: 12px; }
.home-latest-grid .market-result-save a, .home-latest-grid .market-result-save button { min-height: 42px; }
.home-empty { padding: 28px; border: 1px solid var(--border); border-radius: 10px; background: #fff; text-align: center; }
.home-empty p { margin: 0 0 8px; color: var(--muted); }
.home-empty a { color: var(--green); font-weight: 700; }
.home-post-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-block-start: 38px; padding: 25px 28px; border-radius: 10px; background: #e8f2e9; border: 1px solid #d1e4d5; }
.home-post-cta h2 { margin: 0 0 3px; font-size: 22px; }
.home-post-cta p { margin: 0; color: #485b4d; font-size: 14px; }
.home-post-cta .primary-link { flex: none; min-height: 46px; padding: 9px 22px; border-radius: 6px; }
.home-footer { text-align: start; background: #fff; }
.home-footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 20px; width: min(1120px, 100%); margin: auto; }
.home-footer-brand { color: var(--green); font-size: 20px; font-weight: 800; text-decoration: none; }
.home-footer p { margin: 2px 0 0; }
.home-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.home-footer nav a { min-height: 40px; padding-block: 7px; color: #354239; font-weight: 600; text-decoration: none; }
.home-footer nav a:hover { color: var(--green); text-decoration: underline; }
@media (max-width: 1020px) {
  .home-latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .home-page { margin-block-end: 36px; }
  .home-content, .home-hero-content { width: calc(100% - 24px); }
  .home-page .home-hero { min-height: 0; padding-block: 48px 18px; }
  .home-hero-content { gap: 18px; }
  .home-hero-copy h1 { font-size: clamp(27px, 6vw, 34px); }
  .home-hero-actions { flex-direction: column; align-items: stretch; }
  .home-search { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .home-search button { width: 100%; }
  .home-section { margin-block-start: 28px; }
  .home-post-cta { flex-direction: column; align-items: stretch; margin-block-start: 30px; padding: 21px; }
  .home-post-cta .primary-link { width: 100%; }
  .home-footer-inner { flex-direction: column; gap: 8px; }
}
@media (max-width: 600px) {
  .home-latest-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { :root:has(.home-page) { scroll-behavior: auto; } .home-hero-slide { transition: none; } }
