/* ALL BANNERS!!! */
:root {
  --carousel-width: min(100%, 1400px);
  --carousel-height: 600px;
  --bg: #0b0c10;
  --fg: #f8fafc;
  --muted: #a3a3a3;
  --accent: #5b9dfc;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --dot-size: 11px;
  --progress-h: 4px;

  --card-bg: #f9fafb;
  --card-fg: #1f2937; /* светлый текст */
  --brand: #3b82f6;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.banners {
  max-width: 1400px;
  margin: 0 auto;
}

.carousel {
  position: relative;
  width: var(--carousel-width);
  height: var(--carousel-height);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0a0c10;
  isolation: isolate;
  user-select: none;
  touch-action: pan-y;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.5s ease,
    transform 0.6s ease;
  display: grid;
  place-items: end start;
  padding: 28px;
  color: white;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Демо-фоны для баннеров — замените на свои изображения */
.slide[data-theme="one"] {
  background-image: url("/assets/banner-new-site-royal.svg");
}
.slide[data-theme="two"] {
  background-image: url("/assets/banner-new-site-kentatsu.svg");
}
.slide[data-theme="three"] {
  background-image: url("/assets/banner-new-site-rega.svg");
}
.slide[data-theme="four"] {
  background-image: url("/assets/banner-new-site-ozon.svg");
}

.slide .content {
  max-width: 72ch;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 18px;
  border-radius: 14px;
}
.content a {
  color: white;
  font-weight: 600;
  font-size: 24px;
  transition: 0.5s ease-in-out;
}
.content a:hover {
  opacity: 0.8;
}
.slide h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0.2px;
}
.slide p {
  margin: 0;
  color: #e5e7eb;
  font-size: 16px;
}

/* Точки-индикаторы */
.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
  pointer-events: auto;
}
.dot {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.dot:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.7);
}
.dot.is-active {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Прогресс-бар времени */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--progress-h);
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  z-index: 4;
}
.progress .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  transition: width 0.1s linear;
  will-change: width;
}

/* ========= АДАПТИВНОСТЬ: МНОГО МЕДИА-ЗАПРОСОВ ========= */
@media (min-width: 1600px) {
  :root {
    --carousel-height: 560px;
    --dot-size: 12px;
  }
  .slide h2 {
    font-size: 34px;
  }
  .slide p {
    font-size: 18px;
  }
  .nav-btn {
    width: 50px;
    height: 50px;
  }
  .nav-btn svg {
    width: 26px;
    height: 26px;
  }
}
@media (max-width: 1400px) {
  :root {
    --carousel-height: 500px;
  }
}
@media (max-width: 1280px) {
  :root {
    --carousel-height: 460px;
  }
  .slide h2 {
    font-size: 28px;
  }
}
@media (max-width: 1120px) {
  :root {
    --carousel-height: 430px;
  }
  .slide .content {
    max-width: 64ch;
  }
}
@media (max-width: 1024px) {
  :root {
    --carousel-height: 400px;
    --dot-size: 10px;
  }
  .nav-btn {
    width: 44px;
    height: 44px;
  }
  .nav-btn svg {
    width: 22px;
    height: 22px;
  }
  .slide p {
    font-size: 15px;
  }
}
@media (max-width: 900px) {
  :root {
    --carousel-height: 360px;
  }
  .slide .content {
    padding: 14px 16px;
  }
}
@media (max-width: 768px) {
  :root {
    --carousel-height: 320px;
    --dot-size: 9px;
  }
  .slide h2 {
    font-size: 22px;
  }
  .nav-btn {
    width: 40px;
    height: 40px;
  }
  .nav-btn svg {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 640px) {
  :root {
    --carousel-height: 284px;
    --progress-h: 3px;
  }
  .slide {
    padding: 20px;
  }
}
@media (max-width: 540px) {
  :root {
    --carousel-height: 264px;
  }
  .slide h2 {
    font-size: 20px;
  }
  .slide p {
    font-size: 14px;
  }
  .dots {
    bottom: 10px;
  }
}
@media (max-width: 480px) {
  :root {
    --carousel-height: 240px;
    --dot-size: 8px;
  }
  .nav-btn {
    width: 36px;
    height: 36px;
  }
  .nav-btn svg {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 400px) {
  :root {
    --carousel-height: 220px;
  }
}
@media (max-width: 360px) {
  :root {
    --carousel-height: 200px;
  }
}

/* Предпочтение пользователя: уменьшенное движение */
@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: none;
  }
  .progress .bar {
    transition: none;
  }
}

.categories {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(240px, 1fr)
  ); /* уже по ширине */
  gap: 28px;
  max-width: 1400px;
  margin: auto;
  margin-top: 50px;
  margin-bottom: 50px;
}
.category-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 48px 18px;
  width: 300px; /* выше за счёт вертикальных отступов */
  min-height: 350px; /* увеличенная высота */
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-icon {
  margin: 0 auto 16px;
  margin-bottom: 70px;
  transition:
    color 0.35s ease,
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.category-card:hover .category-icon {
  color: var(--brand);
  transform: scale(1.15);
}
.category-icon img {
  width: 84px;
  height: 84px;
}

.category-title {
  font-weight: 750;
  font-size: 22px;
  letter-spacing: 0.2px;
  color: var(--card-fg);
}
.category-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(68, 68, 68, 0.75);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  pointer-events: none;
}

@media (max-width: 720px) {
  .category-icon {
    width: 80px;
    height: 80px;
  }
  .category-title {
    font-size: 18px;
  }
  .category-card {
    min-height: 300px;
    padding: 36px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .category-card,
  .category-icon {
    transition: none;
  }
}
