/* ===================================================
   ГЛАВНАЯ СТРАНИЦА
   =================================================== */

/* ===================================================
   КАРУСЕЛЬ БАННЕРОВ
   =================================================== */

.banner-carousel {
  position: relative;
  padding: 24px 0;
  background: var(--bg);
}

.banner-carousel .container {
  position: relative;
}

.banner-carousel__track {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 400;
  max-height: 480px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #E8590C 0%, #C94A08 100%);
}

/* Слайд */
.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 40px;
  text-align: center;
}

.banner-slide.is-active {
  opacity: 1;
  visibility: visible;
}

/* Слайд без картинки — градиент */
.banner-slide--no-image {
  background: linear-gradient(135deg, #E8590C 0%, #C94A08 100%);
}

.banner-slide__content {
  max-width: 720px;
  color: #fff;
}

.banner-slide__title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
  letter-spacing: -.5px;
}

.banner-slide__subtitle {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 26px;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 6px rgba(0,0,0,.2);
}

.banner-slide__btn {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  padding: 14px 32px;
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.banner-slide__btn:hover {
  background: #FFF1E8;
  color: var(--accent-hover);
}

/* Стрелки */
.banner-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  transition: background .15s, color .15s, transform .15s;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  backdrop-filter: blur(6px);
}
.banner-carousel__arrow:hover {
  background: var(--accent);
  color: #fff;
}
.banner-carousel__arrow--left { left: 36px; }
.banner-carousel__arrow--right { right: 36px; }

/* Точки */
.banner-carousel__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .15s, width .2s;
}
.banner-dot:hover { background: rgba(255,255,255,.8); }
.banner-dot.is-active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

/* ===================================================
   СЧЁТЧИКИ
   =================================================== */

.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.stats-bar__inner {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stats-bar__item { text-align: center; }

.stats-bar__value {
  font-family: Consolas, "Courier New", monospace;
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stats-bar__label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ===================================================
   КАТЕГОРИИ — ЛЕНТА
   =================================================== */

.cats-strip { position: relative; }

.cats-strip__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  scroll-snap-type: x proximity;
}

.cats-strip__scroll::-webkit-scrollbar { height: 6px; }
.cats-strip__scroll::-webkit-scrollbar-track { background: transparent; }
.cats-strip__scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.cats-strip__scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.cat-chip__icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.cat-chip__body {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cat-chip__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cat-chip__count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cats-strip__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--text);
  font-size: 16px;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 0;
  line-height: 1;
}
.cats-strip__arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cats-strip__arrow--left { left: -8px; }
.cats-strip__arrow--right { right: -8px; }
.cats-strip__arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}

.cats-strip__all {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
  scroll-snap-align: end;
}
.cats-strip__all:hover {
  background: #FFF1E8;
  border-color: var(--accent);
}

/* ===== ЗАГОЛОВКИ СЕКЦИЙ ===== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.section-link {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

/* ===================================================
   ОСНОВНАЯ СЕТКА
   =================================================== */

.home-main { padding: 40px 0; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.home-main-content { min-width: 0; }

.home-block { margin-bottom: 40px; }
.home-block:last-child { margin-bottom: 0; }

/* ===================================================
   БЛОГ НА ГЛАВНОЙ
   =================================================== */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.blog-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

.blog-item__cover {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: #F0F1F3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-item__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.blog-item__placeholder {
  font-size: 36px;
  opacity: .5;
}

.blog-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-item__date {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.blog-item__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.blog-item:hover .blog-item__title { color: var(--accent); }

.blog-item__excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-item__arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
}
.blog-item:hover .blog-item__arrow {
  background: var(--accent-hover);
  transform: translateX(3px);
}

/* ===================================================
   САЙДБАР
   =================================================== */

.home-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

.side-block__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.side-block--hero {
  background: linear-gradient(135deg, #FFF7F2 0%, #FFFFFF 100%);
  border-color: #FFD8BF;
}
.side-block--hero .side-block__label { color: var(--accent); }

.side-block--top {
  background: linear-gradient(135deg, #FFFAEB 0%, #FFFFFF 100%);
  border-color: #FFE066;
}
.side-block--top .side-block__label { color: #B8860B; }

.side-block__more {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F0F1F3;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.side-block__more:hover { text-decoration: underline; }

.side-tool {
  display: block;
  color: inherit;
}

.side-tool__photo {
  width: 100%;
  aspect-ratio: 4/3;
  background: #F0F1F3;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.side-tool__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.side-tool__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.side-tool:hover .side-tool__name { color: var(--accent); }

.side-tool__meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-tool__price {
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.side-tool__price small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.side-companies {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-company {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  transition: background .15s;
}
.side-company:hover { background: #F5F6F7; }

.side-company__logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #F0F1F3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 800;
  color: var(--accent);
  font-size: 16px;
}
.side-company__logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.side-company__body { flex: 1; min-width: 0; }

.side-company__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-company__count {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===================================================
   CTA-БАННЕР
   =================================================== */

.cta-banner {
  background: linear-gradient(135deg, #E8590C 0%, #C94A08 100%);
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner__content { flex: 1; min-width: 240px; }

.cta-banner__title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.cta-banner__text {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
  max-width: 560px;
}

.cta-banner__btn {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  padding: 14px 28px;
  font-size: 15px;
  white-space: nowrap;
}
.cta-banner__btn:hover {
  background: #FFF1E8;
  color: var(--accent-hover);
}

/* ===== ПУСТОЙ ГОРОД ===== */
.empty-city {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.empty-city h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.empty-city p { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; }

/* ===================================================
   АДАПТИВ
   =================================================== */

@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .home-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 960px) {
  .banner-slide__title { font-size: 32px; }
  .banner-slide__subtitle { font-size: 16px; }
  .banner-carousel__arrow { width: 40px; height: 40px; font-size: 18px; }
  .banner-carousel__arrow--left { left: 20px; }
  .banner-carousel__arrow--right { right: 20px; }

  .stats-bar__inner { gap: 40px; }

  .cta-banner { padding: 32px; }
  .cta-banner__title { font-size: 22px; }
  .cats-strip__arrow { display: none; }
}

@media (max-width: 720px) {
  .banner-carousel { padding: 12px 0; }
  .banner-carousel__track {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }
  .banner-slide { padding: 24px; }
  .banner-slide__title { font-size: 24px; }
  .banner-slide__subtitle { font-size: 14px; margin-bottom: 18px; }
  .banner-slide__btn { padding: 11px 22px; font-size: 14px; }

  .banner-carousel__arrow { display: none; }

  .stats-bar { padding: 16px 0; }
  .stats-bar__inner { gap: 24px; }
  .stats-bar__value { font-size: 24px; }
  .stats-bar__label { font-size: 11px; }

  .section-title { font-size: 20px; }
  .home-main { padding: 24px 0; }

  .home-sidebar { grid-template-columns: 1fr; }

  .cat-chip { padding: 10px 14px; }
  .cat-chip__icon { font-size: 20px; }
  .cat-chip__name { font-size: 13px; }
  .cat-chip__count { font-size: 11px; }

  .cta-banner {
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .cta-banner__btn { width: 100%; }

  .blog-item__cover { width: 72px; height: 72px; }
  .blog-item__title { font-size: 14px; }
  .blog-item__arrow { width: 32px; height: 32px; }
}

@media (max-width: 560px) {
  .banner-carousel__track {
    aspect-ratio: 4 / 3;
  }
  .banner-slide { padding: 18px; }
  .banner-slide__title { font-size: 20px; }
  .banner-slide__subtitle { font-size: 13px; }
  .banner-slide__btn { padding: 10px 18px; font-size: 13px; }

  .side-block { padding: 16px; }
  .side-tool__price { font-size: 18px; }

  .cats-strip__scroll {
    padding-bottom: 8px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .blog-item { padding: 12px; gap: 12px; }
  .blog-item__cover { width: 64px; height: 64px; }
  .blog-item__excerpt { display: none; }
}

@media (max-width: 380px) {
  .blog-item__cover { width: 56px; height: 56px; }
  .blog-item__title { font-size: 13px; }
}