/* ===== КАРУСЕЛЬ ПРОЕКТОВ ===== */

.projects-section {
  padding: 80px 0;
  text-align: center;
}

/* Отступ только для заголовка секции */
.projects-section > h2 { margin-bottom: 1rem; }
/* Отступ только для описания под заголовком */
.projects-section > p { margin-bottom: 5rem; }

.projects-swiper {
  width: 60%;
  margin: 0 auto;
  overflow: visible;
  padding: 20px 0;
  position: relative; /* Важно для абсолютных стрелок */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Телефон + планшеты */
@media (max-width: 900px) {
  .projects-swiper { width: 90%; }
}

/* СЛАЙДЫ */
.projects-swiper .swiper-slide {
  width: auto;
  display: flex;
  justify-content: center;
  transition: transform .4s ease, opacity .4s ease;
  opacity: 0.6;
  transform: scale(0.9);
}

.projects-swiper .swiper-slide-active {
  opacity: 1 !important;
  transform: scale(1.05);
  z-index: 5;
}

/* ===== КАРТОЧКА ===== */

.project-card {
  width: 400px;
  height: 800px;
  background: #072036;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  transition: transform .35s, box-shadow .35s;
}

/* Hover - синяя подсветка ТОЛЬКО при наведении */
.project-card:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 0 40px rgba(0, 125, 255, 0.75);
  z-index: 10;
}

/* Картинка */
.project-card img {
  width: 100%;
  height: 330px;
  object-fit: cover;
}

/* Текст */
.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  text-align: left;
}

.project-info h3 {
  text-align: center;
  margin-bottom: 10px;
}

.project-info p {
  margin: 4px 0;
  color: var(--text-light);
  line-height: 1.45;
}

/* Кнопка */
.project-card .btn-more {
  display: block;
  width: 45%;
  margin: 14px auto 0;
  text-decoration: none !important;
  background: #FFC629;
  color: #07111a;
  padding: 12px 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: background .25s, transform .25s, box-shadow .25s;
}

.project-card .btn-more:hover {
  background: #ffda6b;
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(255, 200, 60, 0.6);
}

/* Адаптация */
@media (max-width: 600px) {
  .project-card { width: 100%; height: auto; }
  .project-card img { height: 220px; }
}

/* ===== СТРЕЛКИ КАРУСЕЛИ (белые в прозрачном круге) ===== */

.projects-swiper .swiper-button-prev,
.projects-swiper .swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid rgba(255,255,255,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff !important;
  z-index: 50; /* поверх карточек */
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* Расположение влево/вправо (подстроить: положительные значения двигают внутрь) */
.projects-swiper .swiper-button-prev { left: -66px; }
.projects-swiper .swiper-button-next { right: -66px; }

/* Мобильные — ближе к краю слайдера */
@media (max-width: 900px) {
  .projects-swiper .swiper-button-prev { left: 8px; }
  .projects-swiper .swiper-button-next { right: 8px; }
}

/* Hover эффект */
.projects-swiper .swiper-button-prev:hover,
.projects-swiper .swiper-button-next:hover {
  background: rgba(255,255,255,0.45);
  border-color: #fff;
  transform: translateY(-50%) scale(1.08);
}

/* Стиль стрелки (Swiper вставляет контент в ::after) */
.projects-swiper .swiper-button-prev::after,
.projects-swiper .swiper-button-next::after {
  font-size: 20px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

/* В некоторых сборках Swiper иконки могут быть SVG — на всякий случай принудительно делаем белыми */
.projects-swiper .swiper-button-prev svg,
.projects-swiper .swiper-button-next svg {
  fill: #fff !important;
  width: 18px;
  height: 18px;
}

/* Если у тебя остались старые правила .swiper-button-... в других файлах — убедись, что этот блок идет ПОСЛЕ них */


/* краткое описание в карточке (короткий текст, показывается под "Системы") */
.project-info .short-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-height: 6rem; /* примерно 3 строки */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap; /* сохраняет переносы из БД */
  word-wrap: break-word;
}
