/* Общи стилове – оставено за бъдещи допълнения */
/* Profile shortcuts use a neutral card style while preserving the existing link behavior. */
.profile-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 2.9rem;
  font-size: 0.9rem;
}

.profile-quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 3.1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.profile-quick-link:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.profile-quick-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.profile-quick-link__icon svg {
  display: block;
}

.profile-quick-link__label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.profile-quick-link__count {
  color: #22c55e;
  font-weight: 600;
}

/* Larger ad text inputs improve mobile typing and placeholder readability. */
.ad-form__large-text-input {
  font-size: 1.05rem;
  line-height: 1.45;
}

.ad-form__large-text-input::placeholder {
  color: #6b7280;
  font-size: 1.05rem;
  opacity: 1;
}

/* Search page */
.search-page__form {
  margin-bottom: 0.75rem;
  width: 100%;
}

.search-page__control {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.search-page__input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search-page__input {
  width: 100%;
  min-width: 0;
  height: 3rem;
  padding: 0 3rem 0 0.95rem;
  border: 1px solid #d1d5db;
  border-right: 0;
  border-radius: 9999px 0 0 9999px;
  background: #fff;
  color: #111827;
  font-size: 1rem;
  line-height: 1.2;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

/* Hide native controls so the custom control is the only visible clear action. */
.search-page__input::-webkit-search-cancel-button {
  appearance: none;
  -webkit-appearance: none;
}

.search-page__input::-ms-clear {
  display: none;
}

.search-page__clear {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  color: #6b7280;
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.search-page__clear:hover,
.search-page__clear:focus-visible {
  background: #e5e7eb;
  color: #111827;
}

.search-page__clear[hidden] {
  display: none;
}

.search-page__input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.search-page__input:focus {
  border-color: #0c416d;
  outline: none;
  box-shadow: inset 0 0 0 1px #0c416d;
}

.search-page__input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: inset 0 0 0 1px #dc2626;
}

.search-page__submit {
  flex: 0 0 auto;
  min-width: 8.2rem;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 1rem;
  border: 1px solid #0c416d;
  border-radius: 0 9999px 9999px 0;
  background: #0c416d;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.search-page__submit:hover,
.search-page__submit:focus-visible {
  background: #0b174c;
  border-color: #0b174c;
}

.search-page__submit:disabled {
  cursor: wait;
  opacity: 0.84;
}

.search-page__submit-icon,
.search-page__submit-spinner {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-page__submit-icon svg {
  display: block;
}

.search-page__submit-spinner {
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: searchSubmitSpin 0.7s linear infinite;
}

.search-page__submit.is-loading .search-page__submit-icon {
  display: none;
}

.search-page__submit.is-loading .search-page__submit-spinner {
  display: inline-flex;
}

.search-page__error {
  margin-top: 0.45rem;
  color: #b91c1c;
  font-size: 0.9rem;
  line-height: 1.3;
}

.search-page__facets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.6rem;
  font-size: 0.9rem;
}

.search-page__facets-label {
  flex: 0 0 auto;
  font-weight: 600;
}

.search-page__facet-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
  gap: 0.35rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.7rem;
  background: #fff;
  color: #6b7280;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.search-page__facet-link:hover,
.search-page__facet-link:focus-visible {
  border-color: #60a5fa;
  color: #2563eb;
}

.search-page__facet-link.is-active {
  border-color: #60a5fa;
  color: #2563eb;
  font-weight: 600;
}

/* Keep facet counts as plain green text inside the compact category buttons. */
.search-page__facet-link .ad-count-badge {
  min-width: 0;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #22c55e;
  font-weight: 400;
}

.search-page__facet-link .ad-count-badge__num {
  font-weight: 400;
}

@keyframes searchSubmitSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 420px) {
  .search-page__input {
    height: 2.75rem;
    padding: 0 2.6rem 0 0.7rem;
    font-size: 0.95rem;
  }

  .search-page__clear {
    right: 0.45rem;
  }

  .search-page__submit {
    min-width: 6.85rem;
    min-height: 2.75rem;
    gap: 0.35rem;
    padding: 0 0.65rem;
    font-size: 0.92rem;
  }

  .search-page__submit-icon,
  .search-page__submit-spinner {
    width: 1.15rem;
    height: 1.15rem;
  }
}

/* Pagination */
.pagination {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
}

.pagination__list {
  margin: 0;
  padding: 0.35rem 0.5rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.pagination__link {
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.65rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid transparent;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pagination__link:hover {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.pagination__link--nav {
  min-width: auto;
  padding: 0 1rem;
  font-weight: 600;
}

.pagination__link--prev {
  background: #eef2ff;
  color: #1e3a8a;
  border-color: #e0e7ff;
}

.pagination__link--next {
  background: linear-gradient(135deg, #0b3b8f, #0b174c);
  color: #fff;
  border-color: #0b174c;
}

.pagination__link--next:hover {
  color: #fff;
}

.pagination__link.is-active {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.35);
}

.pagination__link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  box-shadow: none;
}

.pagination__ellipsis {
  color: #9ca3af;
  padding: 0 0.2rem;
  font-size: 1.1rem;
}

.pagination__icon {
  display: inline-flex;
  font-size: 1.1rem;
  line-height: 1;
}

.pagination__link--prev .pagination__icon {
  margin-right: 0.3rem;
}

.pagination__link--next .pagination__icon {
  margin-left: 0.3rem;
}

@media (max-width: 480px) {
  .pagination__list {
    padding: 0.3rem 0.4rem;
    gap: 0.3rem;
  }

  .pagination__link {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }

  .pagination__link--nav {
    padding: 0 0.75rem;
  }
}

/* Ad Swiper slider */
.ad-swiper {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.ad-swiper__main {
  width: 100%;
  height: 380px;
  max-width: 100%;
  border-radius: 0.75rem;
  overflow: hidden !important;
  position: relative;
  box-sizing: border-box;
}

.ad-swiper__main .swiper-wrapper,
.ad-swiper__main .swiper-slide {
  height: 100% !important;
  box-sizing: border-box;
}

.ad-swiper__main .swiper-wrapper {
  max-width: 100%;
}

.ad-swiper__main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-swiper__main .swiper-wrapper,
.ad-lightbox__swiper .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  width: 100%;
}

.ad-swiper__main .swiper-slide,
.ad-lightbox__swiper .swiper-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Keep the detail slider height tied to viewport width without changing Swiper behavior. */
@media (min-width: 768px) and (max-width: 1199px) {
  .ad-swiper__main {
    height: 400px;
  }
}

@media (min-width: 1200px) {
  .ad-swiper__main {
    height: 450px;
  }
}

.ad-swiper__slide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  position: relative;
  overflow: hidden;
}

.ad-swiper__image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center;
  display: block;
  background: #0f172a;
}

.ad-swiper__top-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 64px;
  height: auto;
  z-index: 2;
  pointer-events: none;
}

@media (min-width: 768px) {
  .ad-swiper__top-badge {
    width: 72px;
  }
}

.password-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.password-field input {
  flex: 1;
  min-width: 0;
}

.password-toggle {
  padding: 0.35rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
}

.auth-field-error {
  margin-top: 0.18rem;
  color: #dc2626;
  font-size: 0.82rem;
  line-height: 1.3;
}

.auth-field-error--general {
  margin: 0;
}

.social-login {
  max-width: 400px;
}

.social-login__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.social-login__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  text-decoration: none;
  background: #fff;
  color: #111827;
  min-width: 0;
}

.social-login__btn--facebook {
  background: #3b5998;
  border-color: #3b5998;
  color: #fff;
}

.social-login__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.social-login__btn--facebook .social-login__icon {
  color: #fff;
}

.social-login__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 374px) {
  .social-login__row {
    grid-template-columns: 1fr;
  }
}

.ad-swiper__arrow,
.ad-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
}

.ad-swiper__arrow.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: auto;
  cursor: default;
}

.ad-lightbox__arrow.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.ad-swiper .ad-swiper__thumbs {
  opacity: 0;
  visibility: hidden;
}

.ad-swiper.ad-swiper--ready .ad-swiper__thumbs {
  opacity: 1;
  visibility: visible;
}

.ad-swiper__arrow--prev {
  left: 0.5rem;
}

.ad-swiper__arrow--next {
  right: 0.5rem;
}

.ad-swiper__pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(249, 250, 251, 0.5);
  opacity: 1;
}

.ad-swiper__pagination .swiper-pagination-bullet-active {
  background: #f97316;
}

.ad-swiper__pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem !important;
  min-height: 12px;
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.ad-swiper .ad-swiper__pagination {
  opacity: 0;
  visibility: hidden;
}

.ad-swiper.ad-swiper--pagination-ready .ad-swiper__pagination,
.ad-swiper.ad-swiper--ready .ad-swiper__pagination {
  /* Show pagination as soon as Swiper builds bullets, without waiting for lazy images. */
  opacity: 1;
  visibility: visible;
}

.ad-swiper__thumbs {
  margin-top: 0.5rem;
  max-width: 100%;
  overflow: hidden;
}

.ad-swiper__thumbs .swiper-wrapper {
  display: flex;
  flex-wrap: wrap;
  width: 100% !important;
  transform: none !important;
  transition: none !important;
}

.ad-swiper__thumbs .swiper-slide {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ad-swiper__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-swiper__thumbs .swiper-slide-thumb-active {
  border-color: #f97316;
  transform: scale(1.06);
}

.ad-swiper__placeholder {
  width: 100%;
  height: 280px;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .ad-swiper__placeholder {
    height: 400px;
  }
}

@media (min-width: 1200px) {
  .ad-swiper__placeholder {
    height: 450px;
  }
}

/* Lightbox */
.ad-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ad-lightbox.is-open {
  display: flex;
}

.ad-lightbox__content {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-lightbox__inner {
  position: relative;
  width: min(92vw, 1200px);
  height: min(82vh, 800px);
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  pointer-events: none;
  overflow: hidden;
}

.ad-lightbox__swiper {
  width: 100%;
  height: 100%;
  pointer-events: auto;
  overflow: hidden !important;
  background: #0f172a;
}

.ad-lightbox__swiper .swiper-wrapper {
  height: 100%;
}

.ad-lightbox__swiper .swiper-slide {
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ad-lightbox__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.ad-lightbox__image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #0f172a;
}

.ad-lightbox__arrow--prev {
  left: 0.5rem;
  pointer-events: auto;
}

.ad-lightbox__arrow--next {
  right: 0.5rem;
  pointer-events: auto;
}

.ad-lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.85);
  color: #f9fafb;
  border: none;
  border-radius: 9999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.9rem;
  pointer-events: auto;
}

/* Chat lightbox */
.chat-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

.chat-lightbox.is-open {
  display: flex;
}

.chat-lightbox__panel {
  position: relative;
  width: 90vw;
  max-width: 720px;
  max-height: 70vh;
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: 0.9rem;
  background: #0f172a;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-lightbox__image {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.chat-lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Attachment previews */
.image-upload-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.8rem;
  max-width: 100%;
  margin: 0.45rem 0 0.65rem;
}

.image-upload-control__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-upload-control__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.7rem;
  max-width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid #2563eb;
  border-radius: 0.55rem;
  background: #fff;
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}

.image-upload-control__button:hover,
.image-upload-control__button:focus-within {
  background: #eff6ff;
}

.image-upload-control__input:focus-visible + .image-upload-control__status,
.image-upload-control:focus-within .image-upload-control__button {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.image-upload-control__icon {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
}

.image-upload-control__status {
  min-width: 0;
  max-width: 100%;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 380px) {
  .image-upload-control {
    align-items: flex-start;
    flex-direction: column;
  }
}

.attachment-preview {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.attachment-preview__item {
  width: 64px;
  height: 64px;
  border-radius: 0.45rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
}

.attachment-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attachment-preview__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: none;
  background: #111827;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* City select modal */
.ad-form__native-select,
.city-select__trigger {
  width: 100%;
  padding: 0.45rem 2rem 0.45rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.9rem;
  color: #111827;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.75rem 0.45rem;
}

.location-address-textarea {
  display: block;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
}

.location-address-textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.ad-form__native-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.ad-form__native-select:required:invalid {
  color: #9ca3af;
}

.ad-form__native-select option {
  color: #111827;
}

.city-select__source {
  display: none;
}

.city-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.city-select__value.is-empty {
  color: #9ca3af;
}

.city-select__arrow {
  display: none;
}

.ad-form__location-block {
  margin: 0.25rem 0 1.4rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fafafa;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ad-form__location-block-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.ad-form__location-block-icon {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
}

.ad-form__location-block-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-form__location-block-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.ad-form__location-block-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.ad-form__location-block-subtitle,
.ad-form__field-help {
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.45;
}

.ad-form__location-fields {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ad-form__location-fields .ad-form__field {
  margin-bottom: 0;
}

/* Company profile form helpers keep long inputs readable on mobile and desktop. */
.company-profile-form__geo-group {
  margin-bottom: 2rem;
}

.company-profile-form__label {
  display: inline-block;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.35;
}

.company-profile-form__field--spaced {
  margin-bottom: 2rem;
}

.company-profile-form__field--phone {
  margin-bottom: 1.2rem;
}

.company-profile-form__phone-visibility {
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

.company-profile-form__field--description {
  margin-top: 0.9rem;
}

.company-profile-form__help {
  margin: 0 0 0.6rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #6b7280;
}

.company-profile-form__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
}

.company-profile-form__contact-field {
  width: 100%;
  min-width: 0;
}

.company-profile-form__contact-field input,
.company-profile-form__contact-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .company-profile-form__label {
    font-size: 0.96rem;
  }

  .company-profile-form__help {
    font-size: 0.92rem;
  }
}

.city-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  z-index: 50;
}

.city-modal.is-open {
  display: flex;
}

.city-modal__panel {
  width: min(640px, calc(100% - 2rem));
  max-height: 85vh;
  background: #fff;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.15);
}

.city-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.city-modal__close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}


.city-modal__search-wrap {
  display: flex;
  justify-content: center;
  padding: 0.7rem 1rem 0.3rem;
  border-bottom: 1px solid #eef2f6;
}

/* Keep search and selected chips visible while the list scrolls. */
.city-modal__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid #eef2f6;
}

.city-modal__sticky .city-modal__search-wrap {
  border-bottom: none;
  padding-bottom: 0.55rem;
}

.city-modal__selected {
  padding: 0 1rem 0.75rem;
}

.city-modal__selected[hidden] {
  display: none;
}

.city-modal__selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.city-modal__selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  border: none;
  border-radius: 9999px;
  padding: 0.4rem 0.7rem;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.83rem;
  line-height: 1.2;
}

.city-modal__selected-chip:not(.is-locked) {
  cursor: pointer;
}

.city-modal__selected-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-modal__selected-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  line-height: 1;
}

.city-modal__selected-chip:not(.is-locked):hover,
.city-modal__selected-chip:not(.is-locked):focus-visible {
  background: #dbeafe;
}

.city-modal__selected-chip.is-locked {
  background: #eef2ff;
  color: #4338ca;
}

.city-modal__search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 0.7rem;
  padding: 0.7rem 0.9rem;
  background: #fff;
  color: #111827;
  font-size: 0.98rem;
}

.city-modal__list {
  flex: 1;
  overflow: auto;
  padding: 0.6rem 0.85rem;
}

.city-modal__group-title {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
}

.city-modal__province {
  border-bottom: 1px solid #f1f5f9;
}

.city-modal__province-row {
  position: relative;
}

.city-modal__province-row .city-modal__item {
  width: 100%;
  min-width: 0;
  border-bottom: none;
}

.city-modal__province-toggle {
  position: absolute;
  top: 50%;
  right: 0.2rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  transition: background-color 0.2s ease;
}

.city-modal__province-toggle::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  transition: transform 0.2s ease;
}

.city-modal__province-toggle:hover,
.city-modal__province-toggle:focus-visible {
  background: #f1f5f9;
}

.city-modal__province-toggle.is-expanded::before {
  transform: rotate(225deg);
  margin-top: 0.15rem;
}

.city-modal__province-children {
  padding-left: 1.1rem;
}

.city-modal__province-children .city-modal__item:last-child {
  border-bottom: none;
}

.city-modal__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.city-modal__item input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
}

/* Category modal hierarchy: standalone roots stay flush, children are indented. */
.city-modal__item--root {
  padding-left: 0;
}

.city-modal__item--root .city-modal__text {
  font-weight: 600;
}

/* Province labels stay regular; only the regional capital is emphasized in normal mode. */
.city-modal__item[data-location-kind="province"] .city-modal__text {
  font-weight: 400;
}

.city-modal__item--child {
  padding-left: 1rem;
}

.city-modal__item--child + .city-modal__item--root {
  margin-top: 0.45rem;
}

.city-modal__item.is-disabled {
  opacity: 0.48;
}

.city-modal__item.is-disabled input {
  cursor: not-allowed;
}

.city-modal__item.is-locked input {
  cursor: not-allowed;
}

.city-modal__item.is-primary-city .city-modal__text {
  font-weight: 600;
}

.city-modal__item.is-selected .city-modal__text {
  font-weight: 600;
}

.city-modal__item[data-location-kind="settlement"].is-selected .city-modal__text,
.city-modal__item[data-location-kind="settlement"].is-primary-city .city-modal__text {
  font-weight: 400;
}

.city-modal__item--regional-capital .city-modal__text,
.city-modal__item[data-location-kind="settlement"].is-search-match .city-modal__text {
  font-weight: 600;
}

/* Search mode gives priority to the matching fragment instead of the whole city label. */
.city-modal__item[data-location-kind="settlement"].is-search-match .city-modal__text {
  font-weight: 400;
}

.city-modal__match {
  font-weight: 600;
}

.city-modal__item.is-primary-city.is-locked {
  opacity: 1;
}

.city-modal__content {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.city-modal__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.45rem;
  border-radius: 9999px;
  background: #eef2ff;
  color: #4c5c8a;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}

.city-modal__footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.city-modal__confirm {
  width: 100%;
  border: none;
  border-radius: 9999px;
  background: #f97316;
  color: #fff;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.home-intro {
  margin: 0 auto 0.8rem;
  padding: 0.15rem 0 0.1rem;
  text-align: center;
}

.home-intro__title {
  margin: 0;
  color: #1f2937;
  font-size: clamp(0.1rem, 5.6vw, 2.3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.home-intro__subtitle {
  margin: 0.55rem auto 0;
  max-width: 25rem;
  color: #4b5563;
  font-size: clamp(1rem, 3.7vw, 1.12rem);
  font-weight: 500;
  line-height: 1.42;
}

.home-cta-row {
  margin: 0 auto 2.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.home-cta-row__link {
  flex: 1 1 150px;
  max-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #111827;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.home-cta-row__link--secondary {
  background: #fff;
  box-shadow: 0 0 0 2px #f97316;
}

.home-cta-row__link--primary {
  border-color: #f97316;
  background: #f97316;
  color: #fff;
  font-weight: 600;
}

.home-promo {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dbe7f5;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.home-promo__eyebrow {
  margin: 0 0 0.65rem;
  color: #03aaeb;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.home-promo__top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-promo__content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.home-promo__title {
  margin: 0;
  color: #0c416d;
  font-size: clamp(1.5rem, 6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.home-promo__description {
  margin: 0;
  color: #334155;
  font-size: clamp(0.98rem, 3.8vw, 1.06rem);
  line-height: 1.55;
}

.home-promo__slogan {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.02rem, 4vw, 1.12rem);
  font-weight: 700;
  line-height: 1.35;
}

.home-promo__features {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.home-promo__feature {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.85rem;
  border: 1px solid #dbe7f5;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.home-promo__feature-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: block;
}

.home-promo__feature-copy {
  min-width: 0;
}

.home-promo__feature-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.home-promo__feature-text {
  margin: 0.2rem 0 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.45;
}

.home-promo__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-promo__media-image {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
  object-fit: contain;
}

.home-promo__actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.home-promo__button {
  display: inline-flex;
  width: fit-content;
  max-width: 70%;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.15rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #1565c0 0%, #0c416d 100%);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 24px rgba(12, 65, 109, 0.24);
}

.home-promo__button:hover {
  color: #fff;
  background: linear-gradient(
    180deg,
    #1d74db 0%,
    #1f7bcfa6 100%
  );
}

.home-categories__title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.home-category-total {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  color: #111827;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.home-category-total__num {
  color: #22c55e;
  font-weight: 700;
  font-size: 1.3rem;
}

.home-category-total__label {
  color: #111827;
  font-weight: 600;
}

/* Home SEO information block keeps long Bulgarian copy readable on all viewports. */
.home-about {
  margin: 1rem auto 0;
  padding: 1rem;
  max-width: 68rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  color: #374151;
  box-sizing: border-box;
  text-align: left;
  overflow-wrap: anywhere;
}

.home-about__inner {
  margin: 0 auto;
  max-width: 58rem;
}

.home-about__title {
  margin: 0 0 0.8rem;
  color: #0c416d;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.home-about__subtitle {
  margin: 1.25rem 0 0.55rem;
  color: #0c416d;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
}

.home-about p {
  margin: 0 0 0.85rem;
  color: #374151;
  font-size: 0.98rem;
  line-height: 1.62;
}

.home-about strong {
  color: #1f2937;
  font-weight: 700;
}

.home-about__list,
.home-about__steps {
  margin: 0 0 1rem 1.15rem;
  padding-left: 0.45rem;
  color: #374151;
  font-size: 0.98rem;
  line-height: 1.6;
}

.home-about__list li,
.home-about__steps li {
  margin-bottom: 0.7rem;
  padding-left: 0.15rem;
}

.home-about__list li:last-child,
.home-about__steps li:last-child {
  margin-bottom: 0;
}

.home-about__list li::marker,
.home-about__steps li::marker {
  color: #03aaeb;
  font-weight: 700;
}

.home-about__steps {
  margin-left: 0;
  padding: 0.85rem 0.9rem 0.85rem 2rem;
  border-left: 3px solid #0c416d;
  border-radius: 8px;
  background: #f8fafc;
  box-sizing: border-box;
}

.home-about__steps p {
  margin: 0.45rem 0 0;
}

.home-about__closing {
  margin-bottom: 0 !important;
}

.home-category-subitems {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(0.22rem, 1.4vw, 0.34rem);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.28;
  text-align: center;
}

.home-category-subitem {
  display: block;
}

.home-category-subitem__name {
  overflow-wrap: anywhere;
}

.home-category-subitem__count {
  margin-left: 0.12rem;
  font-size: 0.94em;
}

.category-seo-card {
  max-width: 100%;
  margin: 0.9rem 0 1.05rem;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  border: 1px solid #dbe7f3;
  border-left: 4px solid #0c416d;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  color: #334155;
}

.category-seo-card__icon {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1d8ed8;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.category-seo-card__text {
  min-width: 0;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .category-seo-card {
    margin: 0.75rem 0 0.95rem;
    padding: 0.78rem 0.82rem;
    gap: 0.65rem;
  }

  .category-seo-card__icon {
    flex-basis: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.95rem;
  }

  .category-seo-card__text {
    font-size: 0.92rem;
    line-height: 1.55;
  }
}

.subcategory-panel {
  margin: 1rem 0 1.15rem;
  padding: 0.9rem;
  border-radius: 1.05rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.subcategory-card {
  min-width: 0;
  min-height: 2.35rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.4rem;
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.subcategory-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.subcategory-card__label {
  min-width: 0;
  display: inline;
  /* Keep subcategory labels compact enough for two-column mobile cards. */
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.subcategory-card__name,
.subcategory-card__count {
  display: inline;
}

.subcategory-card__count {
  margin-left: 0.18rem;
  color: #16a34a;
  white-space: nowrap;
}

.subcategory-card__arrow {
  flex: 0 0 auto;
  color: #334155;
  font-size: 1.45rem;
  line-height: 1;
}

.thread-chat {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.thread-message {
  display: flex;
  flex-direction: column;
  max-width: 84%;
}

.thread-message--other {
  margin-right: auto;
  align-items: flex-start;
}

.thread-message--own {
  margin-left: auto;
  align-items: flex-end;
}

.thread-message__meta {
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.thread-message--own .thread-message__meta {
  text-align: right;
}

.thread-message__bubble {
  width: fit-content;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.thread-message--own .thread-message__bubble {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.thread-message__text {
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #111827;
}

.thread-message__attachments {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.thread-message__attachment-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid #e5e7eb;
}

.thread-message__attachment-file {
  color: #2563eb;
  font-size: 0.85rem;
}

/* Blog */
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-category {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid #cbd5f5;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.85rem;
}

.blog-category.is-active {
  background: #0b174c;
  border-color: #0b174c;
  color: #fff;
}

.blog-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-card {
  display: block;
  background: #fff;
  border-radius: 0.9rem;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: #0f172a;
}

.blog-card__meta {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card__dot {
  font-size: 0.7rem;
  line-height: 1;
}

.blog-card__body {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.blog-card__media {
  flex: 0 0 42%;
  max-width: 42%;
}

.blog-card__media img,
.blog-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.6rem;
  display: block;
  object-fit: cover;
  background: #e2e8f0;
}

.blog-card__placeholder {
  color: #64748b;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.blog-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__more {
  margin-top: auto;
  align-self: flex-end;
  color: #f59e0b;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Ad preview card */
.ad-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ad-card.is-inactive {
  opacity: 1;
  filter: none;
}

.ad-card.is-inactive > :not(.pagination) {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.ad-card.is-inactive .pagination,
.ad-card.is-inactive .pagination * {
  opacity: 1 !important;
  filter: none !important;
}

.ad-card__title-link {
  display: block;
  padding: 0.15rem 0;
  text-decoration: none;
  color: #111827;
}

.ad-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ad-event-date {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.35;
}

.ad-event-date__icon {
  flex: 0 0 auto;
}

.ad-card.is-event-finished > :not(.ad-swiper),
.ad-detail-card.is-event-finished > :not(.ad-swiper) {
  opacity: 0.62;
}

.ad-swiper__slide--event-finished .ad-swiper__image {
  opacity: 0.62;
  filter: grayscale(0.35);
}

.ad-swiper__event-finished-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.65rem 1rem;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.ad-card__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  column-gap: 0.6rem;
  row-gap: 0.25rem;
  align-items: start;
}

.ad-card__info--compact {
  grid-template-rows: auto auto auto auto;
}

.ad-card__info[data-ad-url] {
  cursor: pointer;
}

.ad-card__preview-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ad-card__preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
}

.ad-card__preview-category {
  width: 100%;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Keep attribution compact, readable, and safely contained on every card width. */
.ad-card__source-note {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
  max-width: calc(100% - 2rem);
}

.ad-card__category-link,
.ad-card__category-link:visited {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-decoration-color: rgba(107, 114, 128, 0.68);
  text-underline-offset: 0.16em;
}

.ad-card__category-link:hover,
.ad-card__category-link:focus-visible {
  color: #4b5563;
  text-decoration-color: #4b5563;
}

.ad-card__category-separator {
  color: inherit;
}

.ad-card__preview-date {
  min-width: 0;
  white-space: nowrap;
}

.ad-card__preview-views {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
  min-width: 0;
}

.ad-card__company-row {
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  gap: 0.6rem;
}

.ad-card__company-link,
.ad-card__category,
.ad-card__meta-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #6b7280;
  text-decoration: none;
  min-width: 0;
  padding: 0.1rem 0;
}

/* Keep every availability row shrinkable inside narrow mobile cards. */
.ad-card__meta-row--city,
.ad-card__meta-item--city,
.ad-card__meta-copy {
  min-width: 0;
  max-width: 100%;
}

.ad-card__company-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.ad-card__company-link {
  color: #298bcd;
}

.company-detail-card__back-link {
  display: inline-block;
  color: #298bcd;
  text-decoration: none;
}

.ad-card__company-link .ad-card__meta-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card__meta-text--nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card__meta-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ad-card__icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.ad-card__meta-row--city {
  grid-column: 1;
  grid-row: 2;
}

.ad-card__meta-row--category {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start;
  text-align: left;
}

.ad-card__meta-row--primary-city {
  grid-column: 1 / -1;
}

.ad-card__meta-row[data-ad-info-static="true"] {
  cursor: default;
}

.ad-card__info--compact .ad-card__meta-row--category {
  grid-column: 1;
  grid-row: 2;
}

.ad-card__info--compact .ad-card__meta-row--city {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
}

.ad-card__info--compact .ad-card__meta-row--primary-city {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100%;
}

.ad-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.ad-card__meta-item--category {
  justify-content: flex-start;
  text-align: left;
}

.ad-card__meta-item--city {
  align-items: flex-start;
}

.ad-card__meta-item--city-stacked {
  display: flex;
  align-items: flex-start;
}

.ad-card__meta-item--primary-city {
  align-items: flex-start;
}

.ad-card__meta-label {
  flex: 0 0 auto;
  font-weight: 500;
}

.ad-card__meta-item--city .ad-card__meta-label {
  font-weight: 700;
}

.ad-card__meta-item--primary-city .ad-card__meta-label {
  font-weight: 700;
}

.ad-card__meta-item--city .ad-card__icon,
.ad-card__meta-item--primary-city .ad-card__icon {
  margin-top: 0.1rem;
}

.ad-card__meta-copy {
  flex: 1 1 auto;
  line-height: inherit;
}

.ad-card__meta-text--city-full {
  display: inline;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  white-space: normal;
}

.ad-card__meta-text--city-clamp {
  display: inline;
  min-width: 0;
  max-width: 100%;
}

.ad-card__city-text {
  position: relative;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Full list cards collapse long availability text only after JS confirms that it needs 4+ lines. */
.ad-card__city-text--collapsible {
  display: block;
  position: relative;
  max-width: 100%;
}

.ad-card__city-preview {
  display: block;
  max-width: 100%;
  /* The preview is exactly three text lines; the toggle is outside this box. */
  max-height: var(--city-locations-collapsed-height, 4.05em);
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.ad-card__city-text--collapsible.is-expanded .ad-card__city-preview {
  max-height: var(--city-locations-full-height, none);
  overflow: visible;
}

.ad-card__city-text--collapsible.is-not-collapsible .ad-card__city-preview {
  max-height: none;
  overflow: visible;
}

.ad-card__city-text--collapsible.is-not-collapsible .ad-card__city-toggle {
  display: none;
}

.ad-card__city-toggle {
  position: static;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 0.18rem;
  width: max-content;
  max-width: 100%;
  margin: 0.12rem 0 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 500;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
  white-space: nowrap;
  cursor: pointer;
}

.ad-card__city-toggle:hover,
.ad-card__city-toggle:focus-visible {
  color: #374151;
}

.ad-card__city-toggle-arrow {
  display: inline-block;
  color: currentColor;
  font-size: 1em;
  line-height: 1;
  transform: translateY(0.02em);
  transition: transform 0.18s ease;
}

.ad-card__city-text--collapsible.is-expanded .ad-card__city-toggle {
  position: static;
  margin-top: 0.12rem;
}

.ad-card__city-text--collapsible.is-expanded .ad-card__city-toggle-arrow {
  transform: rotate(180deg) translateY(-0.02em);
}

.ad-card__meta-item--category .ad-card__meta-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ad-card__meta-row--views {
  grid-column: 1;
  grid-row: 3;
}

.ad-card__meta-date {
  grid-column: 1;
  grid-row: 4;
  font-size: 0.85rem;
  color: #6b7280;
}

.ad-card__view-btn {
  grid-column: 2;
  grid-row: 3 / span 1;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  color: #298bcd;
  text-align: left;
}

.ad-card__info--compact .ad-card__view-btn {
  grid-column: 1;
  grid-row: 4;
  justify-self: start;
}

.ad-card__view-btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 0.95rem;
  display: block;
  fill: currentColor;
  stroke: currentColor;
}

.ad-card__view-btn--disabled {
  color: #9ca3af;
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

.ad-card__price {
  grid-column: 2;
  grid-row: 4;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}

.ad-card__price-line {
  display: block;
  white-space: nowrap;
}

.ad-card__price-label {
  display: block;
}

.ad-card__price--negotiable {
  justify-content: center;
}

.ad-card__info--compact .ad-card__price {
  grid-column: 2;
  grid-row: 4;
  justify-self: end;
  text-align: right;
}

.ad-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.ad-card__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: none;
  text-decoration: none;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  text-align: center;
}

.ad-card__action-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.ad-card__action-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.ad-card__action-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.ad-card__action-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.ad-card__action-sub {
  font-size: 0.7rem;
  font-weight: 500;
}

/* Keep the primary message action distinct from the secondary call action. */
.ad-card__action-btn--message {
  background: #16a34a;
}

.ad-card__action-btn--call {
  background: #fff;
  border: 2px solid #0c416d;
  color: #0c416d;
}

.ad-card__action-btn--delete {
  background: #fff;
  border: 2px solid red;
  color: red;
}

.ad-card__action-btn--delete .ad-card__action-title,
.ad-card__action-btn--delete .ad-card__action-sub {
  color: red;
}

.ad-card__action-btn--call .ad-card__action-icon {
  color: #0c416d;
  fill: #0c416d;
}

.ad-card__action-btn--call .ad-card__action-icon path {
  fill: #0c416d !important;
}

.ad-card__action-btn--disabled {
  opacity: 0.6;
  pointer-events: none;
}

.ad-card__utilities {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin-top: 0.35rem;
  align-items: center;
}

.ad-reaction-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0.25rem;
  border-bottom: 1px solid #eef2f7;
}

.ad-reaction__button {
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.24rem;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.18;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ad-reaction__button:disabled {
  cursor: default;
  opacity: 0.55;
}

.ad-reaction__icon {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: block;
}

.ad-reaction__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ad-reaction__button--like {
  color: #6b7280;
}

.ad-reaction__button--like.is-active {
  color: #1d4ed8;
}

.ad-reaction__button--like.is-active .ad-reaction__icon path {
  fill: #1d4ed8;
  stroke: #1d4ed8;
}

.ad-reaction__count {
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1;
}

.ad-reaction__button--favorite .favorite-toggle__wrapper {
  width: 100%;
  justify-content: center;
}

.ad-reaction__button--favorite .favorite-toggle {
  width: 100%;
  min-height: 48px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.24rem;
  padding: 0;
  color: #6b7280;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: center;
}

.ad-reaction__button--favorite .favorite-toggle__icon {
  width: 25px;
  height: 25px;
}

.ad-reaction__button--favorite .favorite-toggle span,
.ad-reaction__label {
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.ad-reaction__button--comments {
  color: #6b7280;
}

.ad-reaction__button--comments .ad-reaction__icon path {
  fill: #6b7280;
  stroke: #6b7280;
}

.ad-reaction__comment-icon-wrap {
  position: relative;
  display: inline-flex;
}

.ad-reaction__label [data-ad-comments-count] {
  color: #6b7280;
  font-weight: 600;
}

.ad-reaction__button--share {
  color: #6b7280;
}

.ad-reaction__button--share .ad-reaction__icon path {
  fill: #6b7280;
  stroke: #6b7280;
}

.ad-reaction__button:hover,
.ad-reaction__button:focus-visible {
  color: #374151;
}

.favorite-toggle__wrapper {
  margin: 0;
  display: flex;
  align-items: center;
}

.favorite-toggle {
  --favorite-color: #f97316;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
}

.favorite-toggle__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.favorite-toggle__icon path {
  stroke: var(--favorite-color);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.favorite-toggle.is-active .favorite-toggle__icon path {
  fill: var(--favorite-color);
}

.ad-card__share-btn {
  display: inline-flex;
  grid-column: 2;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  padding: 0.2rem 0;
  color: #6b7280;
  font-size: 0.8rem;
  cursor: pointer;
  width: auto;
  margin-left: auto;
  text-align: right;
}

.ad-card__share-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
  opacity: 0.7;
}

body.has-open-comments-modal {
  overflow: hidden;
}

.ad-comments-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: none;
}

.ad-comments-modal.is-open {
  display: block;
}

.ad-comments-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.ad-comments-modal__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* Keep the mobile bottom sheet close to full-screen while leaving page context visible. */
  height: min(92vh, 920px);
  height: min(92dvh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.ad-comments-modal.is-open .ad-comments-modal__sheet {
  transform: translateY(0);
}

.ad-comments-modal__close {
  position: absolute;
  top: 0.78rem;
  right: 0.78rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
}

.ad-comments-modal__close svg {
  width: 18px;
  height: 18px;
}

.ad-comments-modal__close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.ad-comments-modal__content {
  min-height: 0;
  height: 100%;
}

.ad-comments-modal__loading,
.ad-comments-modal__error {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #6b7280;
  font-size: 0.95rem;
  text-align: center;
}

.ad-comments-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ad-comments-panel__header {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  padding: 1.05rem 3.25rem 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.ad-comments-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.ad-comments-panel__title-icon {
  width: 24px;
  height: 24px;
  color: #4b5563;
}

.ad-comments-panel__title-icon path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.ad-comments-panel__count {
  color: #9ca3af;
}

.ad-comments-panel__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.9rem 1rem calc(1.15rem + env(safe-area-inset-bottom));
}

.ad-comments-login-note,
.ad-comment__reply-login {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  background: #f7f2f7;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ad-comments-login-note a,
.ad-comment__reply-login a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.13em;
}

.ad-comments-form,
.ad-comment__reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.ad-comments-form textarea,
.ad-comment__reply-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 9.5rem;
  resize: none;
  overflow-y: hidden;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  padding: 0.55rem 0.75rem;
  color: #111827;
  font: inherit;
  line-height: 1.35;
}

.ad-comments-form__footer,
.ad-comment__reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.ad-comments-form__error,
.ad-comment__reply-error {
  color: #b91c1c;
  font-size: 0.83rem;
}

.ad-comments-form__submit,
.ad-comment__reply-submit,
.ad-comment__reply-cancel {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 9999px;
  padding: 0.42rem 0.9rem;
  background: #0c416d;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.ad-comment__reply-cancel {
  background: #f3f4f6;
  color: #111827;
}

.ad-comments-form__spinner {
  width: 1rem;
  height: 1rem;
  display: none;
  border-radius: 9999px;
  background: #0c416d;
  box-shadow: 0 0 0 0 rgba(12, 65, 109, 0.32);
  animation: formSubmitPulse 1s ease-in-out infinite;
}

.ad-comments-form.is-loading .ad-comments-form__submit-text {
  display: none;
}

.ad-comments-form.is-loading .ad-comments-form__spinner {
  display: inline-block;
}

.ad-comment__reply-form.is-loading .ad-comment__reply-submit-text {
  display: none;
}

.ad-comment__reply-spinner {
  width: 1rem;
  height: 1rem;
  display: none;
  border-radius: 9999px;
  background: #0c416d;
  box-shadow: 0 0 0 0 rgba(12, 65, 109, 0.32);
  animation: formSubmitPulse 1s ease-in-out infinite;
}

.ad-comment__reply-form.is-loading .ad-comment__reply-spinner {
  display: inline-block;
}

.ad-comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ad-comments-empty {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.ad-comment {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.45rem 0.7rem;
}

.ad-comment--pending {
  opacity: 0.64;
}

.ad-comment__pending-notice {
  grid-column: 1 / -1;
  margin-top: 0.1rem;
  color: #ea580c;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
}

.ad-comment--reply {
  grid-template-columns: 36px minmax(0, 1fr);
  margin-left: 2.75rem;
  padding-left: 0.65rem;
  border-left: 2px solid #e5e7eb;
}

.ad-comment__avatar {
  width: 42px;
  height: 42px;
  border-radius: 0.45rem;
  background: #dbeafe;
  color: #0c416d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
}

.ad-comment--reply .ad-comment__avatar {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
}

.ad-comment__content {
  min-width: 0;
  /* Let text, actions, and reply blocks span the full comment width after the author row. */
  display: contents;
}

.ad-comment__header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "author delete"
    "time delete";
  align-items: start;
  gap: 0.1rem 0.38rem;
  color: #111827;
  line-height: 1.25;
}

.ad-comment__author {
  grid-area: author;
  min-width: 0;
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ad-comment__time {
  grid-area: time;
  color: #9ca3af;
  font-size: 0.88rem;
}

.ad-comment__delete {
  grid-area: delete;
  align-self: start;
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.ad-comment__delete svg {
  width: 18px;
  height: 18px;
}

.ad-comment__delete path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ad-comment__text {
  grid-column: 1 / -1;
  margin: 0.08rem 0 0;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ad-comment__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.1rem;
}

.ad-comment__like,
.ad-comment__reply {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: #9ca3af;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.ad-comment__like {
  color: #0c416d;
}

.ad-comment__like-icon {
  width: 19px;
  height: 19px;
}

.ad-comment__like-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ad-comment__like.is-active .ad-comment__like-icon path {
  fill: #0c416d;
  stroke: #0c416d;
}

.ad-comment__reply-slot {
  grid-column: 1 / -1;
  margin-top: 0.65rem;
}

.ad-comment__reply-login {
  grid-column: 1 / -1;
  margin-top: 0.65rem;
}

.ad-comment__replies {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

@media (min-width: 768px) {
  .ad-comments-modal__sheet {
    left: 50%;
    right: auto;
    width: min(720px, calc(100vw - 2rem));
    border-radius: 18px 18px 0 0;
    transform: translate(-50%, 100%);
  }

  .ad-comments-modal.is-open .ad-comments-modal__sheet {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 420px) {
  .ad-reaction-bar {
    gap: 0.1rem;
  }

  .ad-reaction__button,
  .ad-reaction__button--favorite .favorite-toggle {
    font-size: 12.8px;
    font-weight: 400;
    line-height: 1.18;
  }

  .ad-reaction__icon,
  .ad-reaction__button--favorite .favorite-toggle__icon {
    width: 25px;
    height: 25px;
  }

  .ad-comments-panel__body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .ad-comment {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.55rem;
  }

  .ad-comment--reply {
    margin-left: 2.75rem;
    padding-left: 0.5rem;
  }
}

/* Related ad blocks are server-rendered for crawlable internal links. */
.ad-related {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ad-related-section {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ad-related-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.55rem;
}

.ad-related-section__title {
  margin: 0;
  min-width: 0;
  color: #111827;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ad-related-section__all {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #298bcd;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.ad-related-section__all:hover {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.ad-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
}

.ad-related-card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  background: #fff;
}

.ad-related-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: #eef2f7;
  color: #0c416d;
  text-decoration: none;
}

.ad-related-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-related-card__placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9999px;
  background: #fff;
  color: #0c416d;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.ad-related-card__body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding: 0.55rem;
}

.ad-related-card__title {
  min-height: 2.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ad-related-card__title:hover {
  color: #298bcd;
}

/* Related cards reuse availability text styling while clamping long locations. */
.ad-related-card__location {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ad-related-card__price {
  min-height: 2.15rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.05rem;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.ad-related-card__price span {
  overflow-wrap: anywhere;
}

.ad-related-card__price--negotiable {
  justify-content: center;
}

.ad-related-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #298bcd;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

@media (max-width: 767px) {
  .ad-related-card:nth-child(n + 3) {
    display: none;
  }
}

.ad-share-toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 1200;
}

.ad-share-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-link {
  color: #2563eb;
  text-decoration: none;
  display: inline-block;
  padding: 0.1rem 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .blog-card__body {
    flex-direction: column;
  }

  .blog-card__media {
    max-width: 100%;
  }

  .blog-card__more {
    align-self: flex-start;
  }
}

@media (min-width: 1024px) {
  main.page-content {
    padding: 1rem 1.15rem 1.4rem;
  }

  /* Desktop home intro spacing. */
  .home-intro {
    margin: 0 auto 0.8rem;
    padding: 0.15rem 0 0.1rem;
    text-align: center;
  }

  .home-intro__subtitle {
    margin: 1.55rem auto 1.55rem;
    max-width: 25rem;
    color: #4b5563;
    font-size: clamp(1rem, 3.7vw, 1.12rem);
    font-weight: 500;
    line-height: 1.42;
  }

  .home-cta-row {
    margin: 0 auto 2.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8.75rem;
    align-items: center;
    justify-content: center;
  }

  .ad-list-stack {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.35rem !important;
  }

  .ad-list-stack--two-column {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.35rem !important;
  }

  .ad-card {
    padding: 1rem 1.05rem;
    gap: 0.55rem;
  }

  .ad-card__preview-head {
    gap: 0.2rem;
  }

  .ad-card__preview-category {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
  }

  .ad-card__title {
    font-size: 1.08rem;
  }

  .ad-card__info {
    column-gap: 0.75rem;
    row-gap: 0.35rem;
  }

  .ad-card__actions,
  .ad-card__utilities {
    margin-top: 0.5rem;
    gap: 0.65rem;
  }

  .ad-card__action-btn {
    padding: 0.55rem 0.75rem;
  }

  .ad-card__action-title {
    font-size: 0.9rem;
  }

  .ad-card__action-sub {
    font-size: 0.74rem;
  }

  .ad-detail-card {
    padding: 1.15rem !important;
  }

  .ad-detail-card__description {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .ad-detail-panel {
    padding: 1rem 1.1rem !important;
  }

  .ad-detail-panel h2 {
    font-size: 1.06rem !important;
  }

  .ad-related-section {
    padding: 0.95rem;
  }

  .ad-related-section__header {
    margin-bottom: 1.55rem;
  }

  .ad-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .ad-related-card__body {
    padding: 0.65rem;
  }

  .home-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.9rem !important;
  }

  .home-category-grid > a {
    padding: 0.85rem !important;
  }

  .home-category-grid .home-category-card__icon {
    height: 56px !important;
  }

  .home-category-grid .home-category-card__image {
    width: 40px !important;
    height: 40px !important;
  }

  .home-category-grid .home-category-card__fallback {
    width: 56px !important;
    height: 56px !important;
  }

  .home-category-grid .home-category-card__title {
    font-size: 0.9rem !important;
  }

  .home-promo {
    padding: 1.1rem;
    border-radius: 1.6rem;
  }

  .home-promo__top {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(290px, 0.84fr);
    gap: 1rem 1.4rem;
    align-items: center;
  }

  .home-promo__content {
    gap: 0.9rem;
  }

  .home-promo__title {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  }

  .home-promo__description {
    max-width: 45rem;
    font-size: 1.02rem;
  }

  .home-promo__slogan {
    font-size: 1.08rem;
  }

  .home-promo__features {
    gap: 0.8rem;
  }

  .home-promo__feature {
    padding: 0.9rem 1rem;
  }

  .home-promo__feature-title {
    font-size: 1.02rem;
  }

  .home-promo__feature-text {
    font-size: 0.94rem;
  }

  .home-promo__media {
    justify-content: flex-end;
    align-self: stretch;
  }

  .home-promo__media-image {
    max-width: 100%;
  }

  .home-promo__actions {
    margin-top: 1.2rem;
    text-align: center;
  }

  .home-promo__button {
    padding: 1rem 1.4rem;
    font-size: 1.04rem;
  }

  .home-about {
    margin-top: 1.25rem;
    padding: 1.25rem 1.35rem;
  }

  .home-about__title {
    font-size: 1.75rem;
  }

  .home-about__subtitle {
    font-size: 1.25rem;
  }

  .home-about p,
  .home-about__list,
  .home-about__steps {
    font-size: 1rem;
  }

  .home-category-subitems {
    gap: 0.28rem;
    font-size: 0.8rem !important;
  }

  .plan-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    align-items: stretch;
  }

  .plan-card {
    padding: 0.95rem 1rem;
  }

  .plan-card__title {
    font-size: 1.08rem;
  }

  .plan-card__description,
  .plan-card__feature-line {
    font-size: 0.95rem;
  }

  .company-detail-card {
    padding: 1rem;
  }

  .company-detail-card__top {
    column-gap: 0.95rem;
    row-gap: 0.45rem;
  }

  .company-detail-card__meta {
    gap: 0.34rem;
  }

  .company-detail-card__name {
    font-size: 1.35rem;
  }

  .company-detail-card__cities,
  .company-detail-card__meta-line,
  .company-detail-card__description,
  .company-detail-card__date {
    font-size: 0.93rem;
  }

  .company-detail-card__categories {
    padding: 0.75rem 0.9rem;
  }

  .company-detail-card__owner-button {
    font-size: 0.95rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .home-promo__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .home-promo__feature:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .pagination__link {
    font-size: 0.92rem;
  }

  .pagination__ellipsis,
  .pagination__icon {
    font-size: 0.98rem;
  }

  .social-login__btn,
  .password-toggle,
  .ad-form__native-select,
  .city-select__trigger,
  .global-filters select,
  .global-filter-button,
  .public-location-row__label,
  .auth-modal__close,
  .city-modal__search,
  .city-modal__item,
  .city-modal__confirm,
  .city-modal__close,
  .city-modal__group-title,
  .company-profile-form__label,
  .company-detail-card__owner-button {
    font-size: 0.92rem !important;
  }

  .company-profile-form__phone-visibility,
  .company-profile-form__help,
  .city-modal__selected-chip,
  .city-modal__group-title,
  .city-modal__tag,
  .thread-message__meta,
  .thread-message__attachment-file,
  .blog-card__meta,
  .blog-card__placeholder,
  .blog-card__more,
  .company-list-card__status,
  .company-list-card__description,
  .company-list-card__date,
  .company-detail-card__status,
  .company-detail-card__description,
  .company-detail-card__date,
  .company-detail-card__back-link {
    font-size: 0.90rem !important;
  }

  /* Match the mobile reaction labels exactly, including the HTMX favorite button. */
  .ad-reaction__button--favorite .favorite-toggle {
    font-size: 12.8px !important;
  }

  .ad-form__location-block {
    padding: 0.85rem;
    margin-bottom: 1.1rem;
  }

  .ad-form__location-block-header {
    gap: 0.75rem;
  }

  .ad-form__location-block-icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .ad-form__location-block-title {
    font-size: 1rem;
  }

  .ad-card__preview-category,
  .ad-card__company-link,
  .ad-card__category,
  .ad-card__meta-row,
  .ad-card__view-btn,
  .ad-card__price,
  .ad-card__action-btn,
  .ad-card__action-title,
  .thread-message__text,
  .blog-card__excerpt,
  .company-list-card__cities,
  .company-list-card__meta-line,
  .company-detail-card__cities,
  .company-detail-card__meta-line {
    font-size: 0.92rem !important;
  }

  .ad-card__view-btn-label {
    font-size: 0.98rem !important;
  }

  .city-modal__close,
  .city-modal__confirm,
  .city-modal__group-title,
  .city-modal__item {
    font-size: 0.9rem !important;
  }

  .city-modal__selected-chip-remove {
    font-size: inherit !important;
  }

  .city-modal__close,
  .city-modal__confirm,
  .city-modal__group-title,
  .city-modal__item,
  .city-modal__text {
    font-size: 0.9rem !important;
  }

}

.site-footer {
  border-top: 1px solid #e2e8f0;
  background: #4d87b6;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.site-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
  font-size: 0.85rem;
  color: #fff;
  box-sizing: border-box;
}

.site-footer__column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.site-footer__brand {
  font-weight: 700;
  line-height: 1.3;
}

.site-footer__copy {
  line-height: 1.45;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.site-footer__link {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

@media (max-width: 767px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-footer__column--brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-footer__column--legal {
    grid-column: 1;
    grid-row: 2;
  }

  .site-footer__column--links {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .site-footer__links {
    gap: 0.45rem;
  }

  .site-footer__link--contacts {
    order: 2;
  }

  .site-footer__link--plans {
    order: 3;
  }
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
  }

  .site-footer__column--brand {
    grid-column: 1;
  }

  .site-footer__column--legal {
    grid-column: 2;
  }

  .site-footer__column--links {
    grid-column: 3;
  }

  .site-footer__links {
    gap: 0.32rem;
  }

  .site-footer__link--contacts {
    order: 4;
  }

  .site-footer__link--plans {
    order: 3;
  }
}
