/* ShahaR.Uz — design layer. SiteBill core and SEO remain untouched. */

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

html,
body {
  font-family: "Inter", Arial, sans-serif;
}

/* Agents catalog heading */
.agents-page-heading { margin: 0 0 22px; }
.agents-page-heading h1 {
  margin: 0 0 8px;
  color: #172b4d;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}
.agents-page-subtitle { color: #64748b; font-size: 14px; line-height: 1.6; }

/* Search and sorting */
.agents-search-row { width: 100%; margin: 20px 0 14px; }
.agents-search-row .agents-search__form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 52px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #fff;
}
.agents-search__field {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}
.agents-search__icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-left: 15px;
  color: #64748b;
  pointer-events: none;
}
.agents-search__field input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 38px 0 11px;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172b4d;
  font: inherit;
  font-size: 15px;
}
.agents-search__field input:focus { box-shadow: inset 0 0 0 2px #dbeafe; }
.agents-search__clear {
  display: none;
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  padding: 4px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.agents-search__form > button[type="submit"] {
  flex: 0 0 auto;
  margin: 4px;
  padding: 0 22px;
  border: 0;
  border-radius: 9px;
  background: #c82021;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
.agents-search__form > button[type="submit"]:hover { background: #a91b1c; }
.agents-results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0 0 20px;
}
.agents-results-row .agents-toolbar__count {
  flex: 1 1 auto;
  min-width: 0;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}
.agents-results-row .agents-sort { flex: 0 1 260px; min-width: 180px; }
.agents-results-row .agents-sort select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

/* Agent catalog cards: horizontal on desktop, stacked on narrow mobile */
.agents-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 20px 0 30px;
}
.agents-grid .agents-grid__card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  height: auto;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #e5eaf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.agents-grid .agents-grid__card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.agents-grid .agents-grid__card > a:first-child {
  display: block;
  flex: 0 0 210px;
  width: 210px;
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
  background: #f1f5f9;
}
.agents-grid .agents-grid__photo {
  width: 100%;
  height: 100%;
  min-height: 220px;
  aspect-ratio: auto;
  overflow: hidden;
  background: #f1f5f9;
}
.agents-grid .agents-grid__photo img,
.agents-grid .agents-grid__photo .no-foto-user {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}
.agents-grid .agents-grid__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  padding: 20px 24px;
  box-sizing: border-box;
  text-align: left;
}
.agents-grid .agents-grid__name {
  margin: 0 0 7px;
  color: #172b4d;
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
}
.agents-grid .agents-grid__name a { color: inherit; text-decoration: none; }
.agents-grid .agents-grid__name a:hover { color: #c82021; }
.agents-grid .agents-grid__type {
  margin: 0 0 7px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.agents-grid .agents-grid__company {
  margin: 0 0 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.agents-grid .agents-grid__rating {
  min-height: 0;
  margin: 0 0 9px;
  color: #d99a00;
  font-size: 15px;
  font-weight: 600;
}
.agents-grid .agents-grid__count {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}
.agents-grid .agents-grid__phone {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
  font-size: 14px;
}
.agents-grid .agents-grid__phone a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-height: 42px;
  padding: 0 20px;
  box-sizing: border-box;
  border: 0;
  border-radius: 9px;
  background: #c82021;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: normal;
  transition: background .2s ease;
}
.agents-grid .agents-grid__phone a:hover,
.agents-grid .agents-grid__phone a:focus { background: #a91b1c; color: #fff; }
.agents-grid .agents-grid__phone a:focus-visible { outline: 2px solid #172b4d; outline-offset: 3px; }

/* Existing online indicator markup */
.agents-grid .agents-grid__body > div[style*="display:flex"] { line-height: 1.4; }

/* Infinite-scroll cards and fallback button */
.agents-grid .agents-grid__card[hidden] { display: none !important; }
.agents-load-more-wrap { display: flex; justify-content: center; margin: 8px 0 32px; }
#agents-load-more {
  min-width: 190px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  background: #fff;
  color: #172b4d;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#agents-load-more:hover { border-color: #cbd5e1; background: #f8fafc; }
#agents-load-more:disabled { opacity: .65; cursor: wait; }
.agents-pager-fallback { display: none !important; }

@media (max-width: 767px) {
  .agents-grid { gap: 12px; }
  .agents-grid .agents-grid__card { min-height: 190px; border-radius: 13px; }
  .agents-grid .agents-grid__card > a:first-child {
    flex: 0 0 155px;
    width: 155px;
  }
  .agents-grid .agents-grid__photo,
  .agents-grid .agents-grid__photo img,
  .agents-grid .agents-grid__photo .no-foto-user { min-height: 190px; }
  .agents-grid .agents-grid__body { padding: 15px 16px; }
  .agents-grid .agents-grid__name { font-size: 18px; }
}

@media (max-width: 520px) {
  .agents-search-row .agents-search__form { min-height: 48px; }
  .agents-search__form > button[type="submit"] { margin: 3px; padding: 0 13px; }
  .agents-results-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .agents-results-row .agents-sort { flex: 1 1 auto; width: 100%; min-width: 0; }
  .agents-grid .agents-grid__card { flex-direction: column; min-height: 0; }
  .agents-grid .agents-grid__card > a:first-child {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
  }
  .agents-grid .agents-grid__photo {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .agents-grid .agents-grid__photo img,
  .agents-grid .agents-grid__photo .no-foto-user {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .agents-grid .agents-grid__body { padding: 16px; }
  .agents-grid .agents-grid__name { font-size: 19px; }
  .agents-grid .agents-grid__phone a { width: 100%; }
}
