/* =============================================================
   license-carousel.css — секция «Лицензии» + карусель-coverflow
   Карусель универсальна (.carousel), настройка контента — через
   licenses.json. Активный слайд по центру, соседние затенены.
   ============================================================= */

/* --- Секция --- */

.licenses-section {
    padding: 80px 0;
}

.licenses-section__title {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-dark);
    margin: 0 0 40px;
}

/* --- Карусель --- */

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 80px; /* место под стрелки, чтобы не накладывались на картинки */
}

.carousel__viewport {
    overflow: hidden;
    width: 100%;
}

.carousel__track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 20px 0;
    transition: transform 0.4s ease;
    will-change: transform;
}

.carousel__slide {
    flex: 0 0 auto;
    width: 300px;
    opacity: 0.35;
    transform: scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease;
    cursor: pointer;
}

.carousel__slide.is-active {
    opacity: 1;
    transform: scale(1.08);
    cursor: zoom-in;
    z-index: 2;
}

.carousel__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-card);
    object-fit: contain;
}

.carousel__slide.is-active .carousel__image {
    box-shadow: 0 20px 50px rgba(5, 33, 97, 0.25);
}

/* --- Стрелки --- */

.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--color-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.carousel__arrow:hover {
    background: var(--color-primary);
}

/* Шеврон рисуется границами, чтобы не тянуть отдельный SVG */
.carousel__arrow::before {
    content: "";
    width: 12px;
    height: 12px;
    border-top: 3px solid var(--color-text-inverse);
    border-right: 3px solid var(--color-text-inverse);
}

.carousel__arrow--prev {
    left: 0;
}

.carousel__arrow--prev::before {
    transform: rotate(-135deg);
    margin-left: 5px;
}

.carousel__arrow--next {
    right: 0;
}

.carousel__arrow--next::before {
    transform: rotate(45deg);
    margin-right: 5px;
}

/* --- Точки-пагинация --- */

.carousel__dots {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.carousel__dot.is-active {
    background: var(--color-secondary);
}

/* === Mobile === */
@media (max-width: 767px) {
  .licenses-section {
    padding: 60px 0;
  }

  .licenses-section__title {
    font-size: 2rem; /* 32px */
    margin-bottom: 24px;
  }

  .carousel {
    padding: 0 48px;
  }

  .carousel__track {
    gap: 20px;
  }

  .carousel__slide {
    width: 220px;
    opacity: 0;
  }

  .carousel__slide.is-active {
    opacity: 1;
    transform: scale(1);
  }

  .carousel__arrow {
    width: 40px;
    height: 40px;
  }

  .carousel__dots {
    bottom: -24px;
  }
}
