/* 3D-карусель. Все стили изолированы внутри .cc-section,
   классы с префиксом cc-, чтобы не пересекаться с Bootstrap (.carousel, .slide). */
.cc-section {
  --cc-bg: #ffffff;
  --cc-text: #14171f;
  --cc-muted: #5f6678;
  --cc-accent: #db1436;
  --cc-surface: rgba(20, 23, 31, 0.06);
  --cc-surface-hover: rgba(20, 23, 31, 0.12);
  --cc-bullet: rgba(20, 23, 31, 0.2);
  --cc-bullet-hover: rgba(20, 23, 31, 0.4);
  --cc-shade-color: #ffffff;   /* боковые слайды «выцветают» в фон */
  /* ширина карточки тарифа: как колонка col-lg-4 в сетке страницы */
  --cc-slide-w: clamp(300px, 30vw, 380px);
  --cc-radius: var(--bs-card-border-radius, .5rem);

  position: relative;
  overflow: hidden;
  padding: 64px 0 56px;
  background: var(--cc-bg);
  color: var(--cc-text);
}

.cc-section *,
.cc-section *::before,
.cc-section *::after { box-sizing: border-box; }

.cc-intro {
  text-align: center;
  padding: 0 16px;
  margin-bottom: 32px;
}
.cc-eyebrow {
  margin: 0 0 8px;
  color: var(--cc-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cc-intro h2 {
  margin: 0;
  color: var(--cc-text);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
}
.cc-lead {
  margin: 12px auto 0;
  max-width: 520px;
  color: var(--cc-muted);
  line-height: 1.5;
}

/* ---------- Carousel ---------- */
.cc-carousel { position: relative; }

/* Высоту выставляет carousel.js по самой высокой карточке (слайды absolute).
   Здесь — запас до инициализации скрипта. */
.cc-viewport {
  position: relative;
  height: 640px;
  overflow: hidden;
  outline: none;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.cc-viewport.is-dragging { cursor: grabbing; }
.cc-viewport:focus-visible { box-shadow: inset 0 0 0 2px var(--cc-accent); }

.cc-track {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  position: relative;
}

.cc-slide {
  position: absolute;
  top: 10px;
  left: 50%;
  width: var(--cc-slide-w);
  margin-left: calc(var(--cc-slide-w) / -2);
  border-radius: var(--cc-radius);
  overflow: hidden;
  box-shadow: 0 20px 40px -14px rgba(20, 23, 31, .35);
  will-change: transform, opacity;
  transform-origin: 50% 50%;
}

/* Карточка тарифа внутри слайда */
.cc-slide > .card {
  margin: 0;
  height: 100%;
  border-radius: var(--cc-radius);
}
.cc-slide img { pointer-events: none; }

/* У неактивных карточек кнопки не нажимаются — клик по ним листает карусель */
.cc-slide:not(.is-active) > .card { pointer-events: none; }

/* Затемнение неактивных слайдов */
.cc-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: var(--cc-shade-color);
  opacity: calc(var(--shade, 0) * 0.8);
  pointer-events: none;
}

.cc-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
  opacity: var(--caption, 0);
  transform: translateY(calc((1 - var(--caption, 0)) * 16px));
}
.cc-caption span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--cc-accent);
}
.cc-caption h3 { margin: 4px 0 6px; font-size: 22px; color: #fff; }
.cc-caption p { margin: 0; font-size: 14px; color: #d5dbea; line-height: 1.4; }

/* ---------- Controls ---------- */
.cc-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
  padding: 0 16px;
}

.cc-arrow {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cc-surface);
  color: var(--cc-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.cc-arrow:hover { background: var(--cc-surface-hover); }
.cc-arrow:active { transform: scale(.92); }
.cc-arrow:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
.cc-arrow svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}

.cc-pagination { display: flex; gap: 8px; }
.cc-bullet {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--cc-bullet);
  cursor: pointer;
  transition: width .35s ease, background .35s ease;
}
.cc-bullet:hover { background: var(--cc-bullet-hover); }
.cc-bullet.is-active { width: 28px; background: var(--cc-accent); }
.cc-bullet:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }

.cc-status {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 600px) {
  .cc-section { --cc-slide-w: min(84vw, 340px); padding: 48px 0 40px; }
  .cc-intro { margin-bottom: 24px; }
  .cc-controls { gap: 12px; }
  .cc-arrow { width: 42px; height: 42px; }
  .cc-pagination { gap: 6px; }
  .cc-bullet.is-active { width: 22px; }
  .cc-caption { padding: 40px 14px 14px; }
  .cc-caption h3 { font-size: 18px; }
  .cc-caption p { font-size: 13px; }
}
