/* ============================================================
   services.css — блок «Направления»
   ============================================================ */

.services-section {
  background: var(--bg-cream);
  padding: var(--section-v) var(--section-h) clamp(24px, 4vw, 60px);
  overflow: visible;
}

/* ---- Внешний layout: карточки слева, фото справа ---- */
.services-layout {
  display: grid;
  grid-template-columns: 1fr clamp(280px, 30%, 400px);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

/* ---- Левая колонка ---- */
.services-cards-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Сетка карточек: 2 столбца × 4 строки ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
}

/* ---- Правая колонка — фото ---- */
.services-photo-col {
  position: sticky;
  top: 100px;
}

.services-photo-col img {
  aspect-ratio: 2/3;
  border-radius: var(--radius-card);
  object-fit: cover;
  box-shadow: 0 8px 40px rgba(27, 37, 56, 0.12);
}

/* Мобильный layout скрыт на десктопе */
.services-mobile-layout {
  display: none;
}

/* ---- Средние экраны ---- */
@media (max-width: 1200px) {
  .services-layout {
    grid-template-columns: 1fr clamp(240px, 28%, 360px);
  }
}

/* ---- Планшет ---- */
@media (max-width: 900px) {
  .services-layout {
    grid-template-columns: 1fr;
  }

  .services-photo-col {
    position: static;
    max-width: 480px;
    margin: 0 auto;
  }

  .services-photo-col img {
    aspect-ratio: 3/2;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Мобиль: большое фото + слайдер ---- */
@media (max-width: 580px) {
  .services-section {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
  }

  .services-section .section-header {
    padding: 0 var(--section-h);
  }

  /* Скрываем десктопный layout */
  .services-layout {
    display: none !important;
  }

  /* Показываем мобильный */
  .services-mobile-layout {
    display: block;
  }

  /* Фото с отступами по бокам для видимости скруглений */
  .services-mobile-photo {
    margin-bottom: 24px;
  }

  .services-mobile-photo img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 20px;
  }

  /* ---- Слайдер ---- */
  .services-slider-wrap {
    padding-bottom: 8px;
  }

  .services-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding: 4px var(--section-h) 16px;
  }

  .services-slider::-webkit-scrollbar {
    display: none;
  }

  /* Карточка занимает ~82% экрана — следующая выглядывает справа */
  .services-slider-card {
    flex-shrink: 0;
    width: 82%;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    border: 1px solid #D8D4CE;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(27, 37, 56, 0.06);
  }

  .ssc-num {
    font-family: 'Golos Text', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #8B7355;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
  }

  .ssc-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: #1B2538;
    line-height: 1.35;
    margin-bottom: 10px;
    flex: 1;
  }

  .ssc-desc {
    font-family: 'Golos Text', sans-serif;
    font-size: 13px;
    color: #6B6B6B;
    line-height: 1.6;
  }

  /* ---- Точки-индикаторы ---- */
  .services-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0 0;
    line-height: 0;
  }

  .services-dot {
    display: block;
    width: 7px;
    height: 7px;
    min-width: 7px;
    min-height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(139, 115, 85, 0.25);
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 0;
    font-size: 0;
    flex-shrink: 0;
    transition: background 0.3s;
  }

  .services-dot--active {
    background: #8B7355;
    transform: scale(1.6);
    transition: background 0.3s, transform 0.3s;
  }
}
