:root {
  --hi-blue: #193f73;
  --hi-gold: #b88325;
  --hi-white: #ffffff;
}

/* Kadence desktop header: logo left, menu far right */
@media screen and (min-width: 1025px) {
  #main-header .site-main-header-inner-wrap.site-header-row.site-header-row-has-sides.site-header-row-no-center {
    grid-template-columns: auto 1fr !important;
  }
}

/* Page title area */
body.page .entry-hero-container-inner .entry-header {
  min-height: 90px !important;
  padding: 16px 20px !important;
  margin-bottom: 0 !important;
}

body.page h1.entry-title {
  font-size: 25px !important;
  line-height: 34px !important;
}

/* Remove space between page title area and first section */
body.page .entry-hero-container-inner {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.page .entry-hero-container-inner .entry-header,
body.page #primary.content-area,
body.page .entry-content-wrap,
body.page .entry-content.single-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.page .wp-block-cover.alignfull,
body.page .wp-block-image.alignfull,
body.page .wp-block-group.alignfull:first-child {
  margin-top: 0 !important;
}

/* IDX Omnibar */
.idx-omnibar-form.idx-omnibar-original-form {
  min-height: 56px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
}

.idx-omnibar-form.idx-omnibar-original-form .awesomplete,
.idx-omnibar-form.idx-omnibar-original-form input,
.idx-omnibar-form.idx-omnibar-original-form button {
  min-height: 40px !important;
  height: 40px !important;
}

/* IDX Broker pages */
body[class*="idx"] .site,
body[class*="idx"] #wrapper,
body[class*="idx"] #inner-wrap,
body[class*="idx"] .site-container,
body[class*="idx"] .content-area,
body[class*="idx"] .site-main,
body[class*="idx"] .entry-content-wrap {
  width: 100% !important;
  max-width: none !important;
}

#IDX-main,
.IDX-main,
.IDX-pageContainer,
#IDX-detailsWrapper,
.IDX-detailsWrapper,
#IDX-primaryPhoto,
.IDX-detailsContainer {
  max-width: 1200px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#IDX-detailsWrapper img,
.IDX-detailsWrapper img,
#IDX-primaryPhoto img {
  max-width: 100% !important;
  height: auto !important;
}

body[class*="idx"] .site-header-row-container-inner,
body[class*="idx"] .site-main-header-inner-wrap,
body[class*="idx"] .site-footer-row-container-inner {
  max-width: 1200px !important;
}

/* Logo */
img.custom-logo {
  height: 45px;
  width: 220px;
}

/* Menu accent */
#primary-menu,
ul#menu-header-menu,
ul#menu-farsi {
  --color-accent-base: var(--hi-blue) !important;
}

/* Persian / Farsi content */
body.page-id-885 .entry-content,
body.parent-pageid-885 .entry-content,
body.page-id-889 .entry-content,
body:has(ul#menu-farsi) .entry-content,
body.page-id-885 .single-content,
body.parent-pageid-885 .single-content,
body.page-id-889 .single-content,
body:has(ul#menu-farsi) .single-content {
  direction: rtl !important;
  text-align: right !important;
}

body.page-id-885 h1,
body.page-id-885 h2,
body.page-id-885 h3,
body.parent-pageid-885 h1,
body.parent-pageid-885 h2,
body.parent-pageid-885 h3,
body.page-id-889 h1,
body.page-id-889 h2,
body.page-id-889 h3,
body:has(ul#menu-farsi) h1,
body:has(ul#menu-farsi) h2,
body:has(ul#menu-farsi) h3 {
  direction: rtl !important;
  text-align: right !important;
}

body.page-id-885 p,
body.parent-pageid-885 p,
body.page-id-889 p,
body:has(ul#menu-farsi) p,
body.page-id-885 li,
body.parent-pageid-885 li,
body.page-id-889 li,
body:has(ul#menu-farsi) li {
  direction: rtl !important;
  text-align: right !important;
  font-size: 17px !important;
}

body.page-id-885 h1.entry-title,
body.parent-pageid-885 h1.entry-title,
body.page-id-889 h1.entry-title,
body:has(ul#menu-farsi) h1.entry-title {
  display: block !important;
  width: 100% !important;
}

/* Specific Persian post H1 */
body.single-post.postid-15964 .entry-header,
body.single-post.postid-15964 h1.entry-title {
  direction: rtl !important;
  text-align: right !important;
}

body.single-post.postid-15964 h1.entry-title {
  display: block !important;
  width: 100% !important;
}

/* Farsi helper classes */
.post-farsi,
.p-farsi,
.h1-farsi,
.h2-farsi,
.h3-farsi,
.acc-farsi,
.yoast-faq-farsi {
  direction: rtl !important;
  text-align: right !important;
}

/* Base WordPress block button style */
.entry-content .wp-block-button .wp-block-button__link,
.entry-content .wp-block-button .wp-element-button,
.entry-content a.wp-block-button__link.has-background {
  background-color: var(--hi-blue) !important;
  border: 1px solid var(--hi-blue) !important;
  border-radius: 0 !important;
  color: var(--hi-white) !important;
  box-shadow: none !important;
  min-height: 46px !important;
  padding: 8px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.25 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* Homepage Buy / sell / advanced search row */
.entry-content .home-top-buttons {
  display: flex !important;
  justify-content: center !important;
  gap: clamp(28px, 8vw, 160px) !important;
  flex-wrap: wrap !important;
}

.entry-content .home-top-buttons .wp-block-column {
  flex: 0 0 auto !important;
  width: auto !important;
}

.entry-content .home-top-buttons .wp-block-button,
.entry-content .home-top-buttons .wp-block-button .wp-block-button__link,
.entry-content .home-top-buttons .wp-block-button .wp-element-button {
  width: 180px !important;
  max-width: 180px !important;
}

/* Farsi real estate page buttons */
body.page-id-885 .entry-content .wp-block-button .wp-block-button__link,
body.parent-pageid-885 .entry-content .wp-block-button .wp-block-button__link,
body.page-id-885 .entry-content .wp-block-button .wp-element-button,
body.parent-pageid-885 .entry-content .wp-block-button .wp-element-button {
  width: 230px !important;
  min-height: 52px !important;
  padding: 8px 14px !important;
  white-space: nowrap !important;
}

body.page-id-885 .wp-block-button .wp-block-button__link em,
body.parent-pageid-885 .wp-block-button .wp-block-button__link em {
  font-style: normal !important;
  display: inline-block !important;
}

/* Button hover */
.entry-content .wp-block-button .wp-block-button__link:hover,
.entry-content .wp-block-button .wp-element-button:hover,
.entry-content a.wp-block-button__link.has-background:hover {
  background-color: var(--hi-gold) !important;
  border-color: var(--hi-gold) !important;
  color: var(--hi-white) !important;
}

/* Mobile button sizing */
@media screen and (max-width: 767px) {
  .entry-content .home-top-buttons {
    gap: 14px !important;
  }

  .entry-content .home-top-buttons .wp-block-button,
  .entry-content .home-top-buttons .wp-block-button .wp-block-button__link,
  .entry-content .home-top-buttons .wp-block-button .wp-element-button,
  body.page-id-885 .entry-content .wp-block-button .wp-block-button__link,
  body.parent-pageid-885 .entry-content .wp-block-button .wp-block-button__link,
  body.page-id-885 .entry-content .wp-block-button .wp-element-button,
  body.parent-pageid-885 .entry-content .wp-block-button .wp-element-button {
    width: 100% !important;
    max-width: 230px !important;
  }
}

/* Remove underlines from links */
body.link-style-standard a,
body.link-style-standard a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)),
body.link-style-standard .entry-content a,
body.link-style-standard .entry-content a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)),
body.link-style-standard .single-content a,
body.link-style-standard .content-area a,
body.link-style-standard .wp-block-group a,
body.link-style-standard .site-footer a,
body.link-style-standard #colophon a {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Remove underlines on hover/focus */
body.link-style-standard a:hover,
body.link-style-standard a:focus,
body.link-style-standard .entry-content a:hover,
body.link-style-standard .entry-content a:focus,
body.link-style-standard .single-content a:hover,
body.link-style-standard .single-content a:focus,
body.link-style-standard .content-area a:hover,
body.link-style-standard .content-area a:focus,
body.link-style-standard .site-footer a:hover,
body.link-style-standard .site-footer a:focus,
body.link-style-standard #colophon a:hover,
body.link-style-standard #colophon a:focus {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Keep desktop header centered and full width on Farsi posts/pages */
@media screen and (min-width: 1025px) {
  #main-header .site-header-row-container-inner > .site-container {
    width: 100% !important;
    max-width: 1290px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #main-header .site-main-header-inner-wrap.site-header-row.site-header-row-has-sides.site-header-row-no-center {
    width: 100% !important;
    grid-template-columns: auto 1fr !important;
  }

  #main-header .site-header-main-section-right {
    justify-content: flex-end !important;
  }
}

/* Farsi post archive: reduce very large post titles */
body.page-id-3717 h2.entry-title,
body.page-id-3717 h2.entry-title a,
body.parent-pageid-885 h2.entry-title,
body.parent-pageid-885 h2.entry-title a {
  font-size: 24px !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
  text-align: right !important;
  direction: rtl !important;
}

/* Farsi post archive excerpt text */
body.page-id-3717 .entry-summary,
body.page-id-3717 .entry-summary p,
body.parent-pageid-885 .entry-summary,
body.parent-pageid-885 .entry-summary p {
  font-size: 16px !important;
  line-height: 1.8 !important;
  text-align: right !important;
  direction: rtl !important;
}

/* Single Farsi post title: readable size */
body.single-post h1.entry-title {
  font-size: 32px !important;
  line-height: 1.55 !important;
  text-align: right !important;
  direction: rtl !important;
}