	/* ===== REALTY CATEGORIES ===== */

.realty-categories {
  padding: 120px 20px;
  background: #fff;
}

.realty-categories__inner {
  max-width: 1280px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 0.85fr 1.15fr; /* слева контент, справа картинка */
  gap: 80px;
  align-items: center;
}

/* ===== CONTENT ===== */

.realty-categories__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.realty-categories__title {
  font-size: 56px;
  font-weight: 700;
  margin: 0 0 18px;
  text-align: center;
}

/* ===== BADGE ===== */

.realty-categories__badge {
  display: inline-block;
  margin: 0 auto 48px;

  background: #000;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;

  font-size: 18px;
  font-weight: 600;
  text-decoration: none;

  transition: background .2s ease;
}

.realty-categories__badge:hover {
  background: #e34b4b;
}

/* ===== GRID ===== */

.realty-categories__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;

  /* 🔒 чтобы карточки всегда были одинаковой ширины */
  justify-items: stretch;
  align-items: stretch;
}

/* ===== ITEM ===== */

.realty-item {
  /* 🔒 всегда растягиваем карточку на ширину grid-ячейки */
  width: 100%;
  box-sizing: border-box;

  background: #fff;
  border-radius: 22px;
  padding: 28px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  text-decoration: none;
  color: #000;

  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.realty-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.realty-item span {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  max-width: 100%;
}

/* ===== ICONS (NORMALIZED) ===== */

.realty-item__icon {
  width: 56px;
  height: 56px;

  background-repeat: no-repeat;
  background-position: center;
  background-size: 80%; /* нормализуем визуальный размер */
  flex-shrink: 0;
}

/* пути НЕ МЕНЯЕМ */
.realty-item__icon.sale       { background-image: url('../images/realty-categories/icon-sale.svg'); }
.realty-item__icon.rent       { background-image: url('../images/realty-categories/icon-rent.svg'); }
.realty-item__icon.booking    { background-image: url('../images/realty-categories/icon-booking.svg'); }
.realty-item__icon.commercial { background-image: url('../images/realty-categories/icon-commercial.svg'); }

/* ===== VISUAL ===== */

.realty-categories__visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== TABLET ===== */

@media (max-width: 900px) {

  .realty-categories__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* картинка сверху */
  .realty-categories__visual {
    order: -1;
  }

  .realty-categories__title {
    font-size: 40px;
  }

  .realty-categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;

    justify-items: stretch;
    align-items: stretch;
  }
}

/* ===== MOBILE — КАК AUTO (ИДЕАЛ) ===== */

@media (max-width: 480px) {

  .realty-categories {
    padding: 72px 8px; /* почти на всю ширину экрана */
  }

  .realty-categories__title {
    font-size: 32px;
  }

  /* ВСЕГДА 2 КОЛОНКИ */
  .realty-categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;

    justify-items: stretch;
    align-items: stretch;
  }

  .realty-item {
    width: 100%;
    box-sizing: border-box;

    padding: 30px 38px;   /* увеличены */
    min-height: 190px;    /* выше */
    border-radius: 30px;
  }

  .realty-item__icon {
    width: 72px;
    height: 72px;
    background-size: 80%;
  }

  .realty-item span {
    font-size: 17px;
  }
}