/* main/static/css/rules_block.css */
/* Стили для блока правил эксплуатации */

/* Контейнер блока правил */
.rules-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.rules-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(40, 167, 69, 0.1) 0%, transparent 50%);
  z-index: 1;
}

.rules-section > .container {
  position: relative;
  z-index: 2;
}

/* Заголовок блока правил */
.rules-section h1 {
  color: #212529 !important;
  font-weight: 700;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #007bff, #28a745);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Карточки правил */
.rules-section .card {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.rules-section .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rules-section .card:hover::before {
  opacity: 1;
}

.rules-section .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

.rules-section .card-body {
  padding: 1.5rem;
}

.rules-section .card-title {
  color: #212529 !important;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.rules-section .card-text {
  color: #495057 !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
  .rules-section h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .rules-section .card-body {
    padding: 1.25rem;
  }
  
  .rules-section .card-title {
    font-size: 1rem;
  }
  
  .rules-section .card-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .rules-section h1 {
    font-size: 1.75rem;
  }
  
  .rules-section .card-body {
    padding: 1rem;
  }
}

/* Анимация появления */
.rules-section .card {
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.6s ease forwards;
}

.rules-section .card:nth-child(1) { animation-delay: 0.1s; }
.rules-section .card:nth-child(2) { animation-delay: 0.2s; }
.rules-section .card:nth-child(3) { animation-delay: 0.3s; }
.rules-section .card:nth-child(4) { animation-delay: 0.4s; }
.rules-section .card:nth-child(5) { animation-delay: 0.5s; }
.rules-section .card:nth-child(6) { animation-delay: 0.6s; }
.rules-section .card:nth-child(7) { animation-delay: 0.7s; }
.rules-section .card:nth-child(8) { animation-delay: 0.8s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Принудительное исправление контрастности */
.rules-section h1,
.rules-section .card-title,
.rules-section .card-text {
  color: #212529 !important;
}

.rules-section .card-text {
  color: #495057 !important;
}

/* Дополнительные стили для улучшения читаемости */
.rules-section .card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.rules-section .card-body {
  background: #ffffff !important;
}
