:root {
  --nav-padding: 2rem;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-gray: #808080;
  --color-gray-light: #e0e0e0;
  --color-gray-dark: #333333;
  --color-green-dark: #c95410fb;
  --color-green: #cc6d13;
  --header-bg: rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(68, 68, 68, 0.75);
  --font-main: 'Manrope';
  --max-width: 3440;
  --nav-padding: 2rem; 
}

.cards-carousel {
  overflow: hidden;
  width: calc(100% - 34rem);
  padding: 20px 8.2%; 
  margin: 0 auto; 
  box-sizing: border-box; 
}

.cards-carousel-inner {
  display: flex;
  gap: 20px;
  animation: slide 120s linear infinite; /* Увеличил время анимации в 2.5 раза */
  -webkit-animation: slide 120s linear infinite; /* Добавил для Safari/iOS */
  width: max-content;
  will-change: transform;
}

.card {
  flex: 0 0 400px;
  height: 400px;
  background: white;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 10px; 
  transition: 
    transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28),
    box-shadow 0.5s ease-out;
  will-change: transform, box-shadow;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* Убирает синий highlight на iOS */
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: none !important;
  transition: none !important;
}

.card-content::-webkit-scrollbar {
  width: 8px;
}

.card-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.card-content::-webkit-scrollbar-thumb {
  background: var(--color-green);
  border-radius: 4px;
}

.card:hover {
  transform: translateY(-8px); 
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.cards-carousel-inner {
  transition: animation-play-state 0.3s ease;
}

.cards-carousel-inner:hover {
  animation-play-state: paused;
  -webkit-animation-play-state: paused; /* Для Safari/iOS */
}

.cards-carousel-inner.paused {
  animation-play-state: paused;
  -webkit-animation-play-state: paused; /* Для Safari/iOS */
}

.cards-carousel-inner.manual-scroll {
  animation: none;
  -webkit-animation: none; /* Для Safari/iOS */
  transition: transform 0.5s ease;
  -webkit-transition: transform 0.5s ease; /* Для Safari/iOS */
}

/* Обновляем keyframes с вендорными префиксами */
@keyframes slide {
  0% { 
    -webkit-transform: translateX(0);
    transform: translateX(0); 
  }
  100% { 
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%); 
  }
}

.card h2 {
  font-size: 20px;
  margin-bottom: 0.6rem;
  color: var(--color-black);
  font-weight: 600;
}

.card p {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  color: var(--color-gray-dark);
  line-height: 1.45;
  font-size: 16px;
}


.review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--color-gray);
  border-top: 1px solid #ddd;
  padding-top: 0.6rem;
  margin-top: auto;
}

.review-link {
  color: var(--color-green);
  text-decoration: underline;
  font-weight: 500;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 250px));
  width: calc(100% - 4rem); 
  gap: 2vw;
  padding: 3rem 0 0 0;
  margin: 0 auto;
  justify-content: center;
  justify-items: center;
}

.feature-card {
  background: #fffefd;
  justify-self: center; 
  width: 100%;
  max-width: 300px; 
  min-height: 280px; /* Изменил max-height на min-height */
  border-radius: 12px;
  padding: 1.5rem; /* Уменьшил padding для лучшего баланса */
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 2px solid var(--color-green-light); /* Рамка вокруг всей карточки */
  border-left: 4px solid var(--color-green); /* Акцентная линия слева */
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Контейнер для картинки с рамкой */
.feature-image-container {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid var(--color-green); /* Рамка для картинки */
  padding: 5px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.feature-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.feature-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feature-title {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

.feature-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #666;
  margin-bottom: 0;
  text-align: left;
  hyphens: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Выравнивание текста */
.feature-card {
  text-align: left; /* Выравнивание всего текста по левому краю */
}

.shine-effect {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.95) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-25deg);
  transition: left 0.7s ease-out;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.feature-card:hover .shine-effect {
  left: 150%;
  opacity: 1;
  transition: left 0.7s ease-out, opacity 0.2s ease-out;
}

/* Логотип в правом нижнем углу */
.logo-container {
  position: absolute;
  right: 15px;
  bottom: 15px;
  width: auto;
  height: auto;
  display: flex;
  justify-content: flex-end;
}

.logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}



.logo-container {
  position: absolute;
  right: 20px;
  bottom: 20px; /* Изменили top на bottom */
  width: auto;
  height: auto;
  display: flex;
  justify-content: flex-end;
  padding: 0;
  margin: 0;
}

.logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  position: static; /* Убираем absolute для лого, так как контейнер уже абсолютный */
}


.feature-title {
  font-size: 1.0rem;
  margin-bottom: 12px;
  color: #333;
  font-weight: 600;
  max-width: 80%;
}

.feature-text {
  font-size: 1.0rem;
  line-height: 1.4;
  color: #666;
  margin-bottom: 0;
  text-align: justify; 
  text-justify: inter-word; 
  hyphens: auto; 
}


@media (max-width: 768px) {
  :root {
    --nav-padding: 1rem;
  }

  /* Карусель карточек */
  .cards-carousel {
    width: 100%;
    padding: 15px 0;
  }

  .cards-carousel-inner {
    gap: 15px;
    animation: slideMobile 180s linear infinite; /* Еще медленнее на мобильных */
    -webkit-animation: slideMobile 180s linear infinite;
  }

  @keyframes slideMobile {
    0% { 
      -webkit-transform: translateX(0);
      transform: translateX(0); 
    }
    100% { 
      -webkit-transform: translateX(-100%);
      transform: translateX(-100%); 
    }
  }

  .card {
    flex: 0 0 280px;
    height: 320px;
    padding: 8px;
  }
  .card h3 {
    font-size: 10px;
    margin-bottom: 0.5rem;
  }

  .card p {
    font-size: 14px;
    line-height: 1.4;
  }

  .review-meta {
    font-size: 12px;
    padding-top: 0.5rem;
  }
 
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Увеличил расстояние между карточками */
    padding: 1rem;
    width: calc(100% - 2rem);
  }
  
  .feature-card {
    max-width: 100%;
    min-height: 200px; /* Увеличил минимальную высоту карточки */
    padding: 1.5rem; /* Увеличил внутренние отступы */
    height: auto; /* Разрешаем карточке растягиваться по содержимому */
  }
  
  .feature-image-container {
    width: 40px; /* Уменьшил картинку */
    height: 40px;
    margin-bottom: 0.8rem;
    padding: 3px; /* Уменьшил padding для маленькой картинки */
  }
  
  .feature-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .feature-content {
    margin-top: 0.5rem; /* Добавил отступ сверху для текста */
  }
  
  .feature-title {
    font-size: 1rem;
    margin-bottom: 0.8rem; /* Увеличил отступ под заголовком */
    line-height: 1.3;
  }
  
  .feature-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem; /* Добавил отступ снизу */
  }
  
  .logo-container {
    right: 12px;
    bottom: 12px;
  }
  
  .logo {
    width: 40px; /* Уменьшил лого в углу */
    height: 40px;
  }
}

@media (max-width: 480px) {
  .card {
    flex: 0 0 260px;
    height: 300px;
  }

  .cards-carousel-inner {
    gap: 10px;
  }

  .feature-card {
    padding: 1.5rem;
  }
}