html {
  scroll-behavior: smooth;
}

.rch-primary-content a {
  text-decoration: none;
}

ul.rch-archive-agents,
.rch-archive-regions-offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  padding: 0 !important;
  list-style: none !important;
  margin: 0;
}

.rch-archive-regions-offices {
  margin-block-start: 15px;
}

ul.rch-archive-agents li,
.rch-archive-regions-offices li {
  background-color: #edf1f5;
  padding: 16px;
  border-radius: 5px;
}

ul.rch-archive-agents li {
  display: flex;
  flex-direction: column;
  height: 100%;
}

ul.rch-archive-agents li picture {
  display: block;
  max-height: 270px;
  min-height: 270px;
  overflow: hidden;
  border-radius: 5px;
}

ul.rch-archive-agents li picture {
  height: 230px;
}

ul.rch-archive-agents li .rch-archive-name a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  margin-block-start: 12px;
}

ul.rch-archive-agents li .rch-archive-name span {
  color: #000;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  display: block;
  margin-block-start: 6px;
}

ul.rch-archive-agents li .rch-archive-end-line {
  display: flex;
  justify-content: space-between;
  margin-block-start: auto;
}

ul.rch-archive-agents li .rch-archive-end-line a {
  background-color: inherit;
  width: 48%;
  display: block;
  text-align: center;
  margin-block-start: 23px;
  background: var(--rch-primary-color);
  color: white;
  border-radius: 5px;
  padding-block: 7px;
  font-size: 13px;
  text-decoration: none;
}

ul.rch-archive-agents li .rch-archive-end-line a:first-child {
  background-color: white;
  border: solid 1px var(--rch-primary-color);
  color: var(--rch-primary-color);
}

.rch-top-filter {
  margin-block-end: 30px;
}

.rch-top-filter form#rch-agent-search-form {
  width: 40%;
  position: relative;
}

.rch-top-filter form#rch-agent-search-form input {
  width: 100%;
  background-color: #edf1f5;
  padding-inline-start: 10%;
}

.rch-top-filter form#rch-agent-search-form > img {
  position: absolute;
  top: 32%;
  left: 2%;
}

.rch-top-filter form#rch-agent-search-form div#rch-agent-search-results {
  position: absolute;
  z-index: 10;
  background: #edf1f5;
  width: 100%;
  padding: 5px;
  max-height: 400px;
  overflow-y: auto;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results::-webkit-scrollbar {
  width: 5px;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results::-webkit-scrollbar-thumb {
  background: var(--rch-primary-color);
  border-radius: 10px;
}

.rch-top-filter form#rch-agent-search-form div#rch-agent-search-results ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results
  ul
  li:not(:last-child) {
  margin-block-end: 10px;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results
  ul
  li
  a {
  color: #000;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results
  ul
  li
  a
  img {
  width: 50px;
  height: 50px;
  margin-inline-end: 10px;
  border-radius: 5px;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results
  ul
  li
  > a {
  display: flex;
  align-items: center;
}

.rch-top-filter
  form#rch-agent-search-form
  div#rch-agent-search-results
  ul
  li
  > a
  span:last-of-type {
  font-size: 12px;
  color: #666;
  margin-inline-start: 5px;
}

.rch-profile-image {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Hide the loader when the image is fully loaded */
.rch-image-container img.loaded {
  opacity: 1;
}

.rch-loader {
  display: block;
}

.rch-image-container img.loaded + .rch-loader {
  display: none;
}

/* single page style */
.rch-main-layout-single-agent {
  display: flex;
  flex-wrap: wrap;
  margin-block: 2rem 5rem;
}

.rch-main-layout-single-agent .rch-right-main-layout-single-agent {
  flex-basis: 25%;
  margin-left: 20px;
  flex-grow: 1;
  box-sizing: border-box;
}

.rch-inner-right-agents {
  position: -webkit-sticky;
  position: sticky;
  top: 20px;
}

.rch-main-layout-single-agent .rch-right-main-layout-single-agent form,
.rch-leads-form-block form {
  border: 1px solid var(--global-gray-400);
  border-radius: 10px;
  background-color: #9cbcdb42;
  padding: 20px 30px;
}

.rch-main-layout-single-agent .rch-right-main-layout-single-agent form h2,
.rch-leads-form-block form h2 {
  font-size: 20px;
  margin-block-end: 20px;
  text-align: center;
}

.rch-main-layout-single-agent .rch-right-main-layout-single-agent form label,
.rch-leads-form-block form label {
  display: block;
  margin-inline-end: 5px;
  font-size: 16px;
}

.rch-main-layout-single-agent
  .rch-right-main-layout-single-agent
  form
  .form-group,
.rch-leads-form-block form .form-group {
  margin-block: 10px;
}

.rch-main-layout-single-agent
  .rch-right-main-layout-single-agent
  form
  .form-group
  input,
.rch-main-layout-single-agent
  .rch-right-main-layout-single-agent
  form
  .form-group
  textarea,
.rch-leads-form-block form .form-group input,
.rch-leads-form-block form .form-group textarea {
  border-radius: 10px;
  padding: 10px;
  font-size: 16px;
  width: 100%;
}

.rch-main-layout-single-agent .rch-right-main-layout-single-agent form button,
.rch-leads-form-block form button {
  width: 100%;
  border-radius: 10px;
  font-size: 16px;
}

.rch-success-box-listing {
  text-align: center;
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
  padding: 15px 10px;
  margin-block-start: 5px;
  display: none;
}

.rch-error-box-listing {
  text-align: center;
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
  padding: 15px 10px;
  margin-block-start: 5px;
  display: none;
}

.rch-loading-spinner-form {
  width: 15px;
  height: 15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

/* Keyframes for spinning effect */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.rch-main-layout-single-agent .rch-left-main-layout-single-agent {
  flex-basis: 70%;
  flex-grow: 2;
  height: auto;
}

.rch-top-single-agent {
  display: flex;
  justify-content: space-between;
}

.rch-top-single-agent .rch-left-top-single-agent {
  width: 65%;
  display: flex;
}

.rch-top-single-agent .rch-left-top-single-agent picture {
  /* position: relative; */
  width: 340px;
  height: 360px;
  display: block;
  overflow: hidden;
  border-radius: 5px;
}

.rch-top-single-agent .rch-left-top-single-agent h1 {
  color: #000;
  font-size: 30px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-block-end: 14px;
}

.rch-top-single-agent .rch-left-top-single-agent span {
  color: #000;
  display: block;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-block-end: 10px;
}

.rch-top-single-agent .rch-left-top-single-agent span:first-of-type {
  margin-block-end: 20px;
}

.rch-top-single-agent .rch-left-top-single-agent .rch-data-agent {
  margin-inline-start: 40px;
}

.rch-right-top-single-agent {
  width: 30%;
}

ul.rch-single-agents-social {
  display: flex;
  list-style: none;
  margin: 0;
}

ul.rch-single-agents-social li {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: #dfe5eb;

  margin-inline-end: 6px;
}

ul.rch-single-agents-social li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

ul.rch-single-agents-social li a img {
  aspect-ratio: 1 / 1;
  width: 23px;
}

.rch-main-content {
  margin-block-start: 40px;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 150%;
}

.rch-single-call {
  display: flex;
  flex-direction: row-reverse;
  margin-block-start: 40px;
}

.rch-single-call a {
  color: white;
  background-color: var(--rch-primary-color);
  border-radius: 5px;
  padding: 10px 20px;
}

.rch-pagination-agent {
  display: flex;
  flex-direction: row-reverse;
  margin-block-start: 40px;
}

.rch-pagination-agent .rch-pagination-container {
  display: flex;
}

.rch-pagination-agent .rch-pagination-container > *:not(:last-child) {
  margin-inline-end: 5px;
}

.rch-pagination-agent .rch-pagination-container > * {
  border-radius: 2px;
  border: solid 1px #b1b1b1;
  background: #fff;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b1b1b1;
}

.rch-pagination-agent .rch-pagination-container .current {
  color: var(--rch-primary-color);
}

/* CSS for the loader */
.rch-image-container {
  position: relative;
}

.rch-loader {
  position: absolute;
  display: inline-block;
  width: 50px;
  height: 50px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinLoader 1s ease-in-out infinite;
  -webkit-animation: spinLoader 1s ease-in-out infinite;
}

@keyframes spinLoader {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@-webkit-keyframes spinLoader {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.rch-no-listings-message {
  padding: 20px;
  text-align: center;
  font-size: 16px;
  color: #666;
  width: 100%;
}

.rch-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 5px;
  width: 100%;
}

/* Ensure grid items display properly */
.rch-grid-container .swiper-slide {
  width: 100% !important;
  margin-right: 0 !important;
}

/* Loading indicator styles */
.rch-loading-container {
  position: relative;
  min-height: 200px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes rch-spin {
  to {
    transform: rotate(360deg);
  }
}

.rch-loader-text {
  position: absolute;
  bottom: -30px;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.rch-no-listings-message {
  text-align: center;
  margin: 0 auto;
  width: 50%;
  border-radius: 2px;
  background: #e9ecef;
  padding: 1rem;
}

/*********************
START: Neighborhoods page
*********************/

ul.rch-neighborhoods-archive {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

ul.rch-neighborhoods-archive li {
  position: relative;
  width: calc(100% / 3);
  overflow: hidden;
}

ul.rch-neighborhoods-archive li .overlay {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

ul.rch-neighborhoods-archive li .item-wrapper {
  padding-bottom: 70%;
  position: relative;
  display: block;
}

ul.rch-neighborhoods-archive li .image-holder {
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: center no-repeat;
  -webkit-background-size: cover;
  background-size: cover;
  background-color: #eeeeee;
}

ul.rch-neighborhoods-archive li:hover .image-holder {
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
}

ul.rch-neighborhoods-archive li .image-holder img {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: cover;
}

ul.rch-neighborhoods-archive li .content-container {
  color: white;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  max-width: 600px;
  width: 95%;
}

ul.rch-neighborhoods-archive li .content-container h3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  /*   overflow: hidden;
  text-overflow: ellipsis; */
  margin-bottom: 1.666rem;
  color: white;
  width: 100%;
  text-align: center;
}

@media screen and (max-width: 992px) {
  ul.rch-neighborhoods-archive li {
    width: calc(100% / 2);
  }
}

@media screen and (max-width: 768px) {
  ul.rch-neighborhoods-archive li .content-container h3 {
    font-size: var(--text-2xl);
  }
}

@media screen and (max-width: 576px) {
  ul.rch-neighborhoods-archive li {
    width: calc(100% / 1);
  }
}

ul.rch-neighborhoods-archive li.item .content-container .button-wrapper {
  -webkit-transition: all linear 0.4s;
  transition: all linear 0.4s;
  max-height: 0;
  opacity: 0;
}

ul.rch-neighborhoods-archive li.item:hover .content-container .button-wrapper {
  max-height: 90px;
  opacity: 1;
}

ul.rch-neighborhoods-archive li.item .content-container .button-wrapper .btn {
  font-weight: 400;
  border: 1px solid;
  padding: 20px 46px;
  background: transparent;
  background-image: none;
  color: white;
  cursor: pointer;
  display: inline-block;
  font-family: var(--font-family-Lato);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  touch-action: manipulation;
  transition: all 0.2s;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
  -webkit-font-smoothing: unset;
}

ul.rch-neighborhoods-archive
  li.item
  .content-container
  .button-wrapper
  .btn:hover {
  background-color: var(--baseLight-color);
  color: var(--text-color-1);
}

.rch-neighborhood-local-logic {
  margin-block: 40px;
}

#neighborhood-map-widget,
#neighborhood-highlights-widget,
#neighborhood-characteristics-widget,
#neighborhood-demographics-widget,
#neighborhood-property-value-drivers-widget,
#neighborhood-market-trends-widget,
#neighborhood-match-widget {
  width: 100%;
  margin-block: 20px;
}

/* Specific styles for height */
#neighborhood-map-widget,
#neighborhood-schools-widget {
  height: 700px;
}

/*********************
END: Neighborhoods page
*********************/

/*********************
START: CSS FOR BLOCKS IN GUTENBURG
*********************/
.rch-rechat-clock-group {
  position: relative;
}

ul.rch-rechat-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  list-style: none !important;
  padding-left: 0 !important;
}

ul.rch-rechat-block li a {
  padding: 12px 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

ul.rch-rechat-block h2 {
  margin: 0 !important;
  font-size: 20px;
}

ul.rch-rechat-block img {
  width: 20px;
}

/* Medium screens */
@media (max-width: 1200px) {
}

/* Small screens */
@media (max-width: 768px) {
  .rch-top-filter form#rch-agent-search-form {
    width: 70%;
  }

  .rch-top-single-agent {
    flex-wrap: wrap;
  }

  .rch-top-single-agent .rch-left-top-single-agent,
  .rch-right-top-single-agent {
    width: 100%;
  }

  .rch-top-single-agent .rch-left-top-single-agent picture {
    width: 230px;
    height: 280px;
  }

  .rch-right-top-single-agent {
    margin-block-start: 40px;
  }

  .rch-main-layout-single-agent .rch-left-main-layout-single-agent {
    flex-basis: 100%;
  }

  .rch-main-layout-single-agent .rch-right-main-layout-single-agent {
    flex-basis: 100%;
    margin-left: 0;
    margin-block-start: 40px;
  }
}

/* Extra small screens */
@media (max-width: 530px) {
  .rch-agents-rechat ul.rch-archive-agents li picture {
    max-height: none;
  }

  .rch-top-filter form#rch-agent-search-form {
    width: 100%;
  }

  .rch-top-single-agent {
    flex-wrap: wrap;
  }

  .rch-top-single-agent .rch-left-top-single-agent,
  .rch-right-top-single-agent,
  .rch-top-single-agent .rch-left-top-single-agent .rch-data-agent,
  .rch-top-single-agent .rch-left-top-single-agent .rch-image-container {
    width: 100%;
  }

  .rch-top-single-agent .rch-left-top-single-agent {
    flex-wrap: wrap;
  }

  .rch-top-single-agent .rch-left-top-single-agent picture {
    width: 100%;
  }

  .rch-top-single-agent .rch-left-top-single-agent .rch-data-agent {
    margin-block-start: 30px;
    margin-inline-start: 0;
  }

  .rch-right-top-single-agent {
    margin-block-start: 30px;
  }

  .rch-single-call {
    flex-direction: row;
  }
}

/* 
 * Agent Properties Grid Layout 
 * This section provides styling for displaying an agent's properties in a responsive grid layout
 * The grid adjusts automatically based on screen size, with appropriate spacing and formatting
 */
.rch-agents-list {
  position: relative;
}

.rch-agents-list-items {
  margin-block-start: 30px;
  display: grid;
  --columns: 4;
  --gap: 15px;
  grid-row-gap: 20px;
  grid-column-gap: var(--gap);
  grid-template-columns: repeat(
    var(--columns),
    calc(
      100% / var(--columns) - var(--gap) * (var(--columns) - 1) / var(--columns)
    )
  );
  min-height: 200px;
  position: relative;
}

.rch-agents-list-items .house-item {
  border-radius: 10px;
  border: 1px solid rgba(126, 139, 150, 0.5);
  background: #fff;
  padding: 16px;
}

.rch-agents-list-items .house-item a {
  text-decoration: none;
}

.rch-agents-list-items .house-item picture {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-block-end: 20px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: rch-skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

.rch-agents-list-items .house-item picture.rch-fallback-logo-listing {
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rch-agents-list-items .house-item picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rch-agents-list-items .house-item picture.rch-fallback-logo-listing img {
  width: 50%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: difference;
}

.rch-agents-list-items .house-item p {
  color: #000;
}

.rch-agents-list-items .house-item ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  width: 100%;
  flex-wrap: wrap;
}

.rch-agents-list-items .house-item ul li {
  border-radius: 10px;
  border: 1px solid var(--rch-primary-color);
  display: flex;
  align-items: center;
  background: #fff;
  font-size: 11px;
  color: #555;
  padding: 5px 6px;
  margin-block: 3px;
}

.rch-agents-list-items .house-item ul li:not(:last-child) {
  margin-inline-end: 8px;
}

.rch-agents-list-items .house-item ul li b {
  color: #000;
  margin-inline-end: 2px;
}

.rch-agents-list-items .house-item ul li img {
  margin-inline-end: 5px;
}

.rch-header-properties {
  display: flex;
  justify-content: space-between;
}

/* Pagination styling for listing and agent properties */
.rch-listing-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 8px;
}

.rch-listing-pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-size: 14px;
}

.rch-listing-pagination button:hover {
  background-color: #e9e9e9;
  border-color: #ccc;
}

.rch-listing-pagination button.active {
  background-color: var(--rch-primary-color, #0066cc);
  color: white;
  border-color: var(--rch-primary-color, #0066cc);
}

.rch-listing-pagination span {
  margin: 0 5px;
  color: #777;
}

.rch-listing-pagination .pagination-icon {
  width: 16px;
  height: 16px;
}

.rch-pagination-loading {
  font-size: 14px;
  color: #777;
  padding: 10px;
}

/* Make sure the agent properties grid looks good */
.rch-agents-list-items.rch-listing-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .rch-listing-pagination {
    flex-wrap: wrap;
  }

  .rch-agents-list-items.rch-listing-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}
