/* ---------- PROJECTS ---------- */
.projects-section {
  background: radial-gradient(circle at top left, #141414, #0a0a0a);
  padding: 6rem 0;
  position:relative;
  overflow: visible !important;
  padding-top: 20px !important;
  padding-bottom:10px;
}

/* Заголовок с линией */
.section-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem !important; /* Уменьшаем отступ */
  padding-bottom: 10px !important;
  z-index:10;
}

.projects-section .section-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 60px !important;
  color: #fff;
  margin-bottom: 0;
  white-space: nowrap;
}

.projects-section .title-line {
  flex-grow: 1;
  height: 2px;
  background: #fff;
  margin-top: 0.5rem;
}

/* Карточки проектов */
.project-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
    position: relative;

  z-index:1;


}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.02);
  z-index: 100; 
}

.project-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.project-name {
  font-family: "Rothek", sans-serif;
  font-weight: 250;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}

.project-description {
  font-family: "Akt", sans-serif;
  font-weight: 250;
  font-size: 20px;
  line-height: 1.5;
  color: #d0d0d0;
  margin-bottom: 0;
}

/* Кастомные стрелки слайдера */
.carousel-control {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  top: 300px;
  transform: translateY(-50%);
  opacity: 0.7;
  transition: all 0.3s ease;
  margin: 0 -5rem;
  position:absolute;
  z-index: 1001 !important;
}

.carousel-control:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) scale(1.05);
}

.carousel-control-prev {
  left: 0;
}

.carousel-control-next {
  right: 0;
}

.carousel-control-arrow {
  width: 20px;
  height: 20px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
}

.carousel-control-prev-arrow {
  transform: rotate(135deg);
  margin-left: 4px;
}

.carousel-control-next-arrow {
  transform: rotate(-45deg);
  margin-right: 4px;
}

#projectsCarousel {
  position: relative;
  min-height: 500px; /* Фиксированная минимальная высота */
  align-items: center;
  overflow: visible !important;
}

.carousel-inner {
  position: relative;
  overflow: hidden !important;
  padding-top:10px;
}

.carousel-item {
  overflow: visible !important; /* Добавляем */
}
/* ---------- PROJECTS MOBILE ADAPTATION ---------- */

/* На десктопе - скрываем мобильные индикаторы и показываем 3 карточки */
@media (min-width: 769px) {
  .mobile-indicators {
    display: none !important;
  }
  
  .mobile-slide {
    display: block !important;
  }
  
  .carousel-item .col-md-4 {
    display: block;
  }
}

/* Общие стили для мобильных */
@media (max-width: 768px) {
  .projects-section .section-title {
    font-size: 36px !important;
    text-align: center !important;
  }

  .projects-section {
    padding-bottom: 20px !important;
  }

  
  .section-header {
    justify-content: center !important;
    gap: 0 !important;
    margin-bottom: 20px !important;
  }
  
  .title-line {
    display: none !important;
  }
  
  .mobile-indicators {
    display: flex;
    position: absolute;
    bottom: -1.5rem;
    margin: 0;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
  }
  
  .mobile-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    transition: all 0.3s ease;
  }
  
  /* Скрываем все карточки кроме первой в каждом слайде */
  .mobile-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
  }
  
  /* Скрываем все карточки кроме первой в каждом слайде */
  .mobile-slide {
    display: none !important;
  }
  
  .carousel-item .col-md-4:not(:first-child) {
    display: none;
  }
  
  .carousel-item .col-md-4:first-child {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  /* КВАДРАТНАЯ КАРТОЧКА БОЛЬШЕ */
  .project-card {
    margin: 0 auto;
    padding: 1.5rem !important;
    background: rgba(255, 255, 255, 0.03);
    height: auto;
    min-height: 400px !important;
    max-width: 85% !important;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index:1000;
    transition: none !important;
    transform: none !important;
  }

  .project-card:hover {
    transform: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.03) !important;
  }
  
  .project-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Квадратное изображение */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem !important;
  }
  
  .project-name {
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
    font-family: "Rothek", sans-serif;
    font-weight: 250;
    line-height: 1.2;
  }
  
  .project-description {
    font-size: 0.9rem !important;
    line-height: 1.4;
    font-family: "Akt", sans-serif;
    font-weight: 250;
    color: #d0d0d0;
    margin-bottom: 0 !important;
  }
  
  /* БОЛЬШИЕ ЖИРНЫЕ СТРЕЛКИ */
  .carousel-control {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    border: none;
    top: 250px !important;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    opacity: 1;
    margin: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease !important;
    z-index: 1001 !important;
  }
  
  .carousel-control:hover {
    background: rgba(255, 255, 255, 0.15) !important; /* Оставляем тот же цвет */
    transform: translateY(-50%) !important; /* Убираем scale */
  }

  /* Стили для активного нажатия */
  .carousel-control:active {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-50%) scale(0.95) !important;
    transition: all 0.1s ease !important;
  }
  
  /* Автоматическое возвращение к нормальному состоянию */
  .carousel-control:not(:active) {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-50%) !important;
  }
  
  
  .carousel-control-prev {
    left: 0.5rem !important;
    backdrop-filter: blur(10px);
  }
  
  .carousel-control-next {
    right: 0.5rem !important;
    backdrop-filter: blur(10px);
  }
  
  /* Большие жирные иконки стрелок */
  .carousel-control-prev-icon {
    background-image: url("/images/arrows/arrow-left.svg") !important;
    width: 24px !important;
    height: 24px !important;
    background-size: 24px 24px !important;
    margin-left:-1px;
    filter: brightness(0) invert(1);
  }
  
  .carousel-control-next-icon {
    background-image: url("/images/arrows/arrow-right.svg") !important;
    width: 24px !important;
    height: 24px !important;
    background-size: 24px 24px !important;
    margin-right:-1px;
    filter: brightness(0) invert(1); 
  }
}

/* iPhone 12/13 (390px) */
@media (max-width: 390px) {
  .projects-section .section-title {
    font-size: 1.8rem !important;
    
  }
  
  .project-card {
    padding: 1.3rem !important;
    min-height: 380px !important;
    max-width: 92% !important;
  }
  
  .project-image {
    margin-bottom: 1.3rem !important;
  }
  
  .project-name {
    font-size: 1.2rem !important;
  }
  
  .project-description {
    font-size: 0.85rem !important;
  }
}

/* iPhone 14/15 (393px-430px) */
@media (min-width: 391px) and (max-width: 430px) {
  .project-card {
    min-height: 420px !important;
  }
  .projects-section .section-title {
    font-size: 1.7rem !important;

  }
}

/* Мелкие iPhone (до 375px) */
@media (max-width: 375px) {
  .projects-section .section-title {
    font-size: 1.7rem !important;
  }
  
  .project-card {
    padding: 1.2rem !important;
    min-height: 370px !important;
    max-width: 90% !important;
  }
  
  .project-name {
    font-size: 1.15rem !important;
  }
  
  .project-description {
    font-size: 0.82rem !important;
  }
  
  .carousel-control {
    width: 45px !important;
    height: 45px !important;
  }
  
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 20px !important;
    height: 20px !important;
    background-size: 20px 20px !important;
  }
}