.home-page {
  background: #f7f3ec;
  color: #223a2d;
}

.home-hero {
  position: relative;
  width: 100%;
}

.home-hero--full {
  min-height: 640px;
  background:
    linear-gradient(90deg, rgba(34, 58, 45, 0.84), rgba(34, 58, 45, 0.46)),
    url("../images/home/home-hero-real-estate.jpg")
      center/cover no-repeat;
  display: flex;
  align-items: stretch;
}

.home-hero__overlay {
  width: 100%;
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: 72px 0;
}

.home-hero__content {
  display: grid;
  grid-template-columns: minmax(0, 650px) minmax(220px, 320px);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  width: 100%;
}

.home-hero__text h1 {
  margin: 0 0 20px;
  max-width: 650px;
  color: #ffffff;
  font-size: clamp(34px, 4.3vw, 52px);
  line-height: 1.1;
}

.home-hero__slogan-card {
  justify-self: end;
  align-self: center;
  width: min(220px, 18vw);
  margin-right: clamp(18px, 3vw, 56px);
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.18));
}

.home-hero__slogan-image {
  display: block;
  width: 100%;
  height: auto;
}

.home-hero__lead {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 24px;
  line-height: 1.55;
}

.home-hero__support {
  margin: 18px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.7;
}

.home-hero__actions,
.home-contact-box__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.home-button,
.home-trust__link,
.home-contact-box__link,
.home-offer-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #223a2d;
  background: #223a2d;
  color: #ffffff;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.home-button--primary {
  background: #223a2d;
  color: #ffffff;
}

.home-button--secondary {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.92);
  color: #223a2d;
}

.home-button:hover,
.home-button:focus-visible,
.home-trust__link:hover,
.home-trust__link:focus-visible,
.home-contact-box__link:hover,
.home-contact-box__link:focus-visible,
.home-offer-card__link:hover,
.home-offer-card__link:focus-visible {
  border-color: #d3b385;
  background: #d3b385;
  color: #223a2d;
}

.home-shortcuts {
  position: relative;
  z-index: 2;
  margin-top: -42px;
  padding: 0 0 48px;
  background: #f7f3ec;
}

.home-shortcuts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid rgba(34, 58, 45, 0.1);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 18px 40px rgba(34, 58, 45, 0.08);
}

.home-shortcut-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 205px;
  padding: 24px;
  border-right: 1px solid rgba(34, 58, 45, 0.1);
  color: #223a2d;
  transition: background 0.2s ease, transform 0.2s ease;
}

.home-shortcut-card:last-child {
  border-right: none;
}

.home-shortcut-card:hover,
.home-shortcut-card:focus-visible {
  background: rgba(211, 179, 133, 0.13);
  transform: translateY(-2px);
}

.home-shortcut-card h2 {
  margin: 0 0 10px;
  color: #223a2d;
  font-size: 22px;
}

.home-shortcut-card p {
  margin: 0;
  color: rgba(34, 58, 45, 0.76);
  font-size: 15px;
  line-height: 1.7;
}

.home-shortcut-card__link {
  display: inline-flex;
  margin-top: auto;
  padding-top: 18px;
  color: #223a2d;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: #d3b385;
  text-underline-offset: 5px;
}

.home-offers,
.home-latest-offers,
.home-trust {
  background: #f7f3ec;
}

.home-offers {
  padding: 48px 0 74px;
}

.home-latest-offers {
  padding: 0 0 78px;
}

.home-section-heading {
  margin-bottom: 28px;
}

.home-section-heading--split {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}

.home-section-heading p {
  margin: 0 0 8px;
  color: #d3b385;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-section-heading h2 {
  margin: 0;
  color: #223a2d;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.1;
}

.home-section-heading span {
  display: block;
  max-width: 820px;
  margin-top: 12px;
  color: rgba(34, 58, 45, 0.78);
  font-size: 18px;
  line-height: 1.7;
}

.home-section-heading > a {
  flex: 0 0 auto;
  color: #223a2d;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: #d3b385;
  text-underline-offset: 5px;
}

.home-offers__filter-box {
  margin-bottom: 34px;
  padding: 26px;
  border-radius: 18px;
  background: #223a2d;
  box-shadow: 0 18px 40px rgba(34, 58, 45, 0.12);
}

.home-offers__filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.home-offers__field label {
  display: block;
  margin-bottom: 8px;
  color: #f7f3ec;
  font-size: 13px;
  font-weight: 800;
}

.home-offers__field input,
.home-offers__field select,
.home-offers__actions button {
  width: 100%;
  min-height: 50px;
  border-radius: 10px;
  font-size: 16px;
}

.home-offers__field input,
.home-offers__field select {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #ffffff;
  color: #223a2d;
  padding: 0 15px;
}

.home-offers__field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #223a2d 50%),
    linear-gradient(135deg, #223a2d 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.home-offers__field input::placeholder {
  color: rgba(34, 58, 45, 0.48);
}

.home-offers__actions button {
  border: 1px solid #d3b385;
  background: #d3b385;
  color: #223a2d;
  font-weight: 900;
  cursor: pointer;
}

.home-offers__actions button:hover,
.home-offers__actions button:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
}

.home-offers__field input:focus,
.home-offers__field select:focus,
.home-offers__actions button:focus-visible,
.home-offers__category-card:focus-visible,
.home-shortcut-card:focus-visible {
  outline: 3px solid rgba(211, 179, 133, 0.55);
  outline-offset: 3px;
}

.home-offers__category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.home-offers__category-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(34, 58, 45, 0.1);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 18px 40px rgba(34, 58, 45, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-offers__category-card:hover,
.home-offers__category-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(34, 58, 45, 0.1);
}

.home-offers__category-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.home-offers__category-content {
  padding: 20px;
}

.home-offers__category-content h3 {
  margin: 0 0 8px;
  color: #223a2d;
  font-size: 26px;
}

.home-offers__category-content p {
  margin: 0;
  color: rgba(34, 58, 45, 0.72);
  font-weight: 800;
}

.home-latest-offers__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-offer-card,
.home-latest-offers__empty {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(34, 58, 45, 0.1);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 18px 40px rgba(34, 58, 45, 0.06);
}

.home-offer-card__image {
  display: block;
  flex: 0 0 auto;
  min-height: 168px;
  background: rgba(34, 58, 45, 0.08);
}

.home-offer-card__image img,
.home-offer-card__image span {
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.home-offer-card__image span {
  display: grid;
  place-items: center;
  color: rgba(34, 58, 45, 0.62);
  font-weight: 900;
}

.home-offer-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.home-offer-card__link {
  margin-top: auto;
}

.home-offer-card__badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px;
  padding: 6px 9px;
  background: rgba(211, 179, 133, 0.22);
  color: #223a2d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-offer-card h3 {
  margin: 0 0 9px;
  color: #223a2d;
  font-size: 21px;
  line-height: 1.18;
}

.home-offer-card__price {
  margin: 0 0 10px;
  color: #223a2d;
  font-size: 23px;
  font-weight: 900;
}

.home-offer-card__summary,
.home-offer-card__location {
  margin: 0;
  color: rgba(34, 58, 45, 0.78);
  line-height: 1.55;
}

.home-offer-card__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 15px;
}

.home-offer-card__summary span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: #d3b385;
  font-weight: 900;
}

.home-offer-card__location {
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 800;
}

.home-latest-offers__empty {
  padding: 34px;
}

.home-trust {
  padding: 0 0 96px;
}

.home-trust__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: stretch;
}

.home-trust__card {
  display: flex;
  flex-direction: column;
  padding: 38px 40px;
  border-radius: 18px;
  background: #223a2d;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(34, 58, 45, 0.08);
}

.home-contact-box {
  background: #fffdf8;
  border: 1px solid rgba(34, 58, 45, 0.08);
  color: #223a2d;
}

.home-trust__eyebrow {
  margin: 0 0 14px;
  color: #d3b385;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-trust__card h2 {
  margin: 0 0 22px;
  color: inherit;
  font-size: 34px;
  line-height: 1.14;
}

.home-trust__lead {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.home-trust__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.home-trust__link {
  border-color: #d3b385;
  background: #d3b385;
  color: #223a2d;
}

.home-trust__link--secondary {
  background: transparent;
  color: #ffffff;
}

.home-contact-box p {
  color: rgba(34, 58, 45, 0.84);
}

.home-contact-box__list {
  display: grid;
  gap: 18px;
  margin-bottom: 4px;
}

.home-contact-box__list p {
  margin: 0;
}

.home-contact-box__list span {
  display: block;
  margin-bottom: 5px;
  color: #d3b385;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-contact-box__list a {
  color: #223a2d;
  font-size: 21px;
  font-weight: 900;
}

.home-contact-box__link {
  flex: 1 1 180px;
  margin-top: 0;
}

.home-contact-box__link--secondary {
  background: transparent;
  color: #223a2d;
}

@media (max-width: 1200px) {
  .home-offers__filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-offers__category-grid,
  .home-latest-offers__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (max-width: 992px) {
  .home-hero--full,
  .home-hero__overlay {
    min-height: 560px;
  }

  .home-hero__content {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .home-hero__slogan-card {
    justify-self: start;
    width: 180px;
    margin-right: 0;
  }

  .home-shortcuts__grid,
  .home-trust__grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-shortcut-card:nth-child(2) {
    border-right: none;
  }

  .home-shortcut-card:nth-child(1),
  .home-shortcut-card:nth-child(2) {
    border-bottom: 1px solid rgba(34, 58, 45, 0.1);
  }

  .home-trust__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .home-hero--full,
  .home-hero__overlay {
    min-height: 520px;
  }

  .home-hero__overlay {
    padding: 54px 0;
  }

  .home-hero__text h1 {
    max-width: 520px;
    margin-bottom: 18px;
    font-size: clamp(32px, 9vw, 42px);
  }

  .home-hero__slogan-card {
    display: none;
  }

  .home-hero__lead {
    font-size: 20px;
  }

  .home-shortcuts__grid,
  .home-offers__filter-form,
  .home-offers__category-grid,
  .home-latest-offers__grid {
    grid-template-columns: 1fr;
  }

  .home-shortcut-card,
  .home-shortcut-card:nth-child(2) {
    border-right: none;
  }

  .home-shortcut-card:nth-child(3) {
    border-bottom: 1px solid rgba(34, 58, 45, 0.1);
  }

  .home-section-heading--split {
    display: grid;
  }

  .home-trust__card {
    padding: 28px 24px;
  }
}
