/* Стили для секции "Наши форматы" */
.formats-section {
  background-color: var(--section-bg-light);
  padding: var(--section-padding);
}

.format-card {
  cursor: pointer;
  transition: var(--transition-normal);
}

.format-card:hover {
  transform: translateY(-5px);
}

.format-card .card {
  border: none;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
}

.format-card .card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.format-card .card-img-top {
  height: 200px;
  overflow: hidden;
}

.format-card .card-img-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.format-card:hover .card-img-top img {
  transform: scale(1.05);
}

.format-card .card-body {
  padding: 20px;
}

.format-card .card-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0;
}

/* Стили для модальных окон галерей форматов */
.modal-content {
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.modal-dialog {
  margin: 1.75rem auto;
  max-width: 90%;
}

.modal-body {
  overflow: hidden;
  padding: 0;
}

.modal-header {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  border: none;
  padding: 25px 30px 20px;
  position: relative;
  color: white;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.modal-title {
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Центровка основной CTA-кнопки в модалках форматов */
.format-modal-footer {
  display: block !important;
  text-align: center !important;
}

.format-modal-footer .btn {
  display: inline-block !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.format-register-btn {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  min-width: 280px;
  font-weight: 600;
}

.btn-close {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  filter: none;
  opacity: 1;
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
  opacity: 1;
}

.btn-close::before,
.btn-close::after {
  background-color: white;
  height: 2px;
  width: 15px;
}

.modal-body {
  padding: 0;
  background-color: #ffffff;
  color: #333;
}

/* Стили для текста в модальных окнах форматов */
.format-modal-body h4,
.format-modal-body h5,
.format-modal-body h6,
.format-modal-body p,
.format-modal-body .lead,
.format-modal-body .form-label {
  color: #333 !important;
}

.format-modal-body .text-muted {
  color: #6c757d !important;
}

/* Стили для карусели */
.carousel {
  background-color: #ffffff;
  height: 500px; /* Фиксированная высота для десктопа */
  border-radius: 0 0 20px 20px;
}

.carousel-inner {
  height: 100%;
}

.carousel-item {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
}

/* Стили для кнопок навигации карусели */
.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 107, 157, 0.8);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(255, 107, 157, 1);
  transform: translateY(-50%) scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Стили для индикаторов */
.carousel-indicators {
  bottom: 20px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  margin: 0 5px;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  background-color: #ff6b9d;
  transform: scale(1.2);
}

/* Полноэкранный режим для мобильных устройств */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
  }
  
  .modal-content {
    height: 100%;
    width: 100%;
    border-radius: 0;
    margin: 0;
  }
  
  .modal-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .modal-title {
    font-size: 18px;
    color: white;
  }
  
  .modal-body {
    padding: 0;
    height: calc(100% - 70px); /* Вычитаем высоту header */
    overflow: hidden;
  }
  
  .carousel {
    height: 100%;
    overflow: hidden;
    border-radius: 0;
  }
  
  .carousel-inner {
    height: 100%;
    overflow: hidden;
  }
  
  .carousel-item {
    height: 100%;
    overflow: hidden;
  }
  
  .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
  }
  
  /* Увеличиваем кнопки навигации для мобильных */
  .carousel-control-prev,
  .carousel-control-next {
    width: 60px;
    height: 60px;
    margin: 0 15px;
    background-color: rgba(255, 107, 157, 0.8);
  }
  
  /* Увеличиваем индикаторы для мобильных */
  .carousel-indicators button {
    width: 15px;
    height: 15px;
    margin: 0 8px;
  }
}

/* Стили для очень маленьких экранов */
@media (max-width: 480px) {
  .modal-header {
    padding: 10px 15px;
  }
  
  .modal-title {
    font-size: 16px;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 50px;
    height: 50px;
    margin: 0 10px;
  }
  
  .carousel-indicators {
    bottom: 15px;
  }
  
  .carousel-indicators button {
    width: 12px;
    height: 12px;
    margin: 0 5px;
  }
  
  /* Дополнительные стили для очень маленьких экранов */
  .modal-dialog {
    width: 100%;
    height: 100%;
  }
  
  .modal-content {
    width: 100%;
    height: 100%;
  }
  
  .carousel-item {
    width: 100%;
    height: 100%;
  }
  
  .carousel-item img {
    width: 100%;
    height: 100%;
  }
}

/* Стили для модального окна "Специальное предложение" */
.trigger-modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  overflow: hidden;
}

.trigger-modal-header {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  border: none;
  padding: 25px 30px 20px;
  position: relative;
}

.trigger-modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.trigger-modal-header .modal-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trigger-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
}

.trigger-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.trigger-close-btn::before,
.trigger-close-btn::after {
  content: '' !important;
  background-color: rgba(255, 255, 255, 0.6) !important;
  height: 2px !important;
  width: 18px !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 1px;
}

.trigger-close-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.trigger-modal-body {
  padding: 40px 30px;
  background: white;
}

.gift-icon-container {
  display: inline-block;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
  margin: 0 auto;
}

.gift-icon-container i {
  font-size: 2.5rem;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.discount-title {
  color: #333;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.4;
}

.promo-code {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.promo-code strong {
  color: #ff6b9d;
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.motivation-text {
  color: #888;
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 0;
}

.trigger-modal-footer {
  background: #f8f9fa;
  border: none;
  padding: 25px 30px 30px;
  border-top: 1px solid #e9ecef;
}

.trigger-btn {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  border: none;
  border-radius: 25px;
  padding: 12px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
  position: relative;
  overflow: hidden;
}

.trigger-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 107, 157, 0.4);
}

.trigger-btn:hover::before {
  left: 100%;
}

.trigger-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
}

/* Анимация появления модального окна */
.trigger-modal-content {
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767px) {
  .trigger-modal-content {
    border-radius: 15px;
    margin: 20px;
  }
  
  .trigger-modal-header {
    padding: 20px 25px 15px;
  }
  
  .trigger-modal-header .modal-title {
    font-size: 1.3rem;
  }
  
  .trigger-modal-body {
    padding: 30px 25px;
  }
  
  .gift-icon-container {
    width: 70px;
    height: 70px;
  }
  
  .gift-icon-container i {
    font-size: 2rem;
  }
  
  .discount-title {
    font-size: 1.2rem;
  }
  
  .trigger-modal-footer {
    padding: 20px 25px 25px;
  }
  
  .trigger-btn {
    padding: 10px 30px;
    font-size: 1rem;
  }
}

/* ===== СЕТКА-ГАЛЕРЕЯ В МОДАЛКАХ ФОРМАТОВ ===== */
.format-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.format-gallery-grid img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.format-gallery-grid img:hover {
  transform: scale(1.05);
}

/* Адаптивность сетки */
@media (min-width: 576px) {
  .format-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .format-gallery-grid img {
    height: 120px;
  }
}

@media (min-width: 992px) {
  .format-gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .format-gallery-grid img {
    height: 100px;
  }
}

/* ===== ЛАЙТБОКС ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: pointer;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 107, 157, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 107, 157, 1);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 15px;
  border-radius: 20px;
}

/* Мобильная адаптация лайтбокса */
@media (max-width: 768px) {
  .lightbox-close {
    top: 20px;
    right: 20px;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
} 