/* 
 * Diagonal Showcase Component
 * Стилизованный компонент с диагональным разделением изображений
 */

.diagonal-showcase {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  border: none;
  background-color: #1e1e1e; /* Фоновый цвет всего компонента изменен на #1e1e1e */
}

/* Container */
.diagonal-container {
  position: absolute;
  width: 50%;
  height: 100%;
  left: 0;
  display: flex;
  overflow: hidden;
}

/* Диагональные секции */
.diagonal-section {
  position: absolute;
  height: 100%;
  overflow: hidden;
  transition: all 0.5s ease;
}

/* Удалён декоративный градиентный разделитель */
.diagonal-container .diagonal-section:first-child::before {
  display: none !important;
}

/* Установка размеров и позиций для каждой секции */
.diagonal-section:nth-child(1) {
  width: 40%;
  right: 60%;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
  z-index: 3;
}

.diagonal-section:nth-child(2) {
  width: 40%;
  right: 30%;
  clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
  z-index: 2;
}

.diagonal-section:nth-child(3) {
  width: 40%;
  right: 0%;
  clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
  z-index: 1;
}

/* Изображения внутри секций */
.diagonal-section img {
  position: absolute;
  height: 100%;
  width: auto;
  min-width: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

/* Эффект при наведении только на изображение, не на секцию */
.diagonal-section:hover img {
  transform: scale(1.05);
}

/* Выделение активной секции без изменения ширины */
.diagonal-section.active-section {
  z-index: 3; /* Уменьшаем z-index, но оставляем выше остальных секций */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Эффект наложения для неактивных секций */
.diagonal-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  transition: background-color 0.5s ease;
  pointer-events: none;
}

.diagonal-section.active-section::after {
  background-color: rgba(0, 0, 0, 0);
}

/* Информация о секции */
.section-info {
  position: absolute;
  bottom: 15px;
  left: 10px;
  z-index: 3; /* Уменьшаем z-index */
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.diagonal-section.active-section .section-info {
  opacity: 1;
  transform: translateY(0);
}

/* Тег секции */
.section-tag {
  display: inline-block;
  background-color: rgba(235, 61, 99, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Название и подзаголовок секции из data-атрибутов */
.diagonal-section::before {
  content: attr(data-title);
  position: absolute;
  bottom: 50px;
  right: 20px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  pointer-events: none;
  text-align: right;
  z-index: 3; /* Уменьшаем z-index */
}

.diagonal-section.active-section::before {
  opacity: 1;
  transform: translateY(0);
}

/* Левая часть с контентом */
.diagonal-left {
  position: absolute;
  width: 50%;
  height: 100%;
  right: 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(30, 30, 30, 0.92) 100%);
}

.diagonal-mobile {
  width: 100%;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #1e1e1e; /* Фон блока */
  border-radius: 8px;  
  margin-bottom: 1.5rem;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.diagonal-mobile .hero-title {
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.diagonal-mobile .hero-subtitle {
  margin-bottom: 1.5rem;
  opacity: 1;
}

.diagonal-mobile .d-flex.flex-wrap {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.diagonal-mobile .btn {
  width: 100%;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagonal-mobile .btn i {
  margin-right: 8px;
}

/* Контейнер для текста */
.diagonal-content {
  color: #fff;
}

.diagonal-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.diagonal-subtitle {
  font-size: 16px;
  margin-bottom: 20px;
  opacity: 0.7;
}

/* Кнопки управления секциями */
.diagonal-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.diagonal-nav-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.diagonal-nav-btn:hover,
.diagonal-nav-btn.active {
  background: #EB3D63;
}

/* Diagonal overlay - удален, так как больше не нужен */
.diagonal-right-overlay {
  display: none;
}

/* Мобильный слайдер */
.mobile-slider {
  display: none;
  position: absolute;
  width: 100%;
  height: 55%;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.mobile-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.mobile-slide.active {
  opacity: 1;
}

.mobile-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slider-indicators {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.slider-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-indicator.active {
  background-color: #fff;
  transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-title, .diagonal-title {
    font-size: 28px;
  }
  
  /* Оптимизация отображения кнопок */
  .diagonal-left .d-flex.flex-wrap {
    gap: 8px;
  }
  
  .diagonal-left .d-flex.flex-wrap .btn {
    font-size: 0.9rem;
  }
}

/* Responsive breakpoints - используем стандартный Bootstrap lg (992px) */
@media (max-width: 991.98px) {
  /* Полностью скрываем весь диагональный шоукейс на мобильных устройствах */
  .diagonal-showcase {
    display: none !important;
  }

  /* Показываем мобильный блок на маленьких экранах */
  .diagonal-mobile {
    display: flex !important;
  }
}

@media (min-width: 992px) {
  /* Скрываем мобильный блок на больших экранах */
  .diagonal-mobile {
    display: none !important;
  }
}

/* Светлая тема - для совместимости сохраняем настройки темной темы */
html[data-bs-theme="light"] .diagonal-showcase {
  background-color: #1e1e1e; /* Фон всегда #1e1e1e независимо от темы */
}

html[data-bs-theme="light"] .diagonal-content {
  color: #fff; /* Текст всегда белый независимо от темы */
}

html[data-bs-theme="light"] .diagonal-left {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(30, 30, 30, 0.92) 100%);
}

html[data-bs-theme="light"] .diagonal-right-overlay {
  background: linear-gradient(90deg, rgba(30,30,30,1) 0%, rgba(30,30,30,0) 100%); /* Градиент всегда #1e1e1e независимо от темы */
}

html[data-bs-theme="light"] .diagonal-nav-btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
/* slight overlap: pull sections ~1cm closer */
.diagonal-section:not(:first-child) {
  margin-left: -1cm;
}

/* remove any red outline/border on hero navigation buttons */
.custom-diagonal-showcase .btn-outline-primary {
  border: none !important;
}