/* ================================
   Секция «Ведение бухгалтерского учёта» - Улучшенная версия
================================ */

/* 1) Семантическая обёртка */
.accounting-section {
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  position: relative;
}

/* 2) Улучшенная фоновая карточка с эффектами */
.accounting-section .container {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 25%, #a855f7 50%, #5a019a 100%);
  border-radius: 2rem;
  padding: 80px 20px;
  max-width: 1150px;
  margin: 60px auto;
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  box-shadow: 0 25px 50px rgba(109, 40, 217, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Добавляем декоративные элементы */
.accounting-section .container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

.accounting-section .container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

/* 3) Улучшенные заголовки */
.accounting-title {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s both, glow 3s ease-in-out infinite alternate;
  position: relative;
  z-index: 2;
}

.accounting-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 40px;
  opacity: 0.95;
  animation: fadeInUp 0.8s both;
  animation-delay: 0.2s;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 4) Улучшенная иллюстрация */
.accounting-illustration {
  max-width: 320px;
  margin: 0 auto 60px;
  animation: zoomIn 0.8s both, float 6s ease-in-out infinite;
  animation-delay: 0.4s;
  position: relative;
  z-index: 2;
}

.accounting-illustration img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* ================================
   5) Улучшенные основные преимущества
================================ */
.accounting-features {
  list-style: none;
  padding: 0;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 24px;
  max-width: 1100px;
  justify-items: center;
  position: relative;
  z-index: 2;
}

/* Улучшенные карточки преимуществ */
.accounting-features li {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: fadeInLeft 0.6s both;
  position: relative;
  overflow: hidden;
}

.accounting-features li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.accounting-features li:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(109, 40, 217, 0.3);
}

.accounting-features li:hover::before {
  opacity: 1;
}

.accounting-features li:nth-child(1) { animation-delay: 0.6s; }
.accounting-features li:nth-child(2) { animation-delay: 0.8s; }
.accounting-features li:nth-child(3) { animation-delay: 1s; }
.accounting-features li:nth-child(4) { animation-delay: 1.2s; }
.accounting-features li:nth-child(5) { animation-delay: 1.4s; }

/* Улучшенные иконки */
.accounting-features li img {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  width: 52px;
  height: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.accounting-features li:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* ================================
   6) Улучшенные дополнительные карточки
================================ */
.accounting-extras {
  list-style: none;
  padding: 0;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 32px;
  max-width: 1000px;
  position: relative;
  z-index: 2;
}

/* Улучшенные карточки доп. фич */
.extra-card {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  color: #1e3a8a;
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(109, 40, 217, 0.1);
  animation: zoomIn 0.6s both;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.extra-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(109, 40, 217, 0.1), transparent);
  transition: left 0.5s ease;
}

.extra-card:hover::before {
  left: 100%;
}

.extra-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(109, 40, 217, 0.15);
}

.extra-card:nth-child(1) { animation-delay: 1.6s; }
.extra-card:nth-child(2) { animation-delay: 1.8s; }
.extra-card:nth-child(3) { animation-delay: 2s; }

/* Улучшенные иконки карточек */
.extra-card img {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  width: 64px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(30, 58, 138, 0.2));
  transition: transform 0.3s ease;
}

.extra-card:hover img {
  transform: scale(1.1) rotate(-5deg);
}

/* Улучшенные заголовок и текст */
.extra-card h3 { 
  font-size: 1.25rem; 
  margin-bottom: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #1e3a8a 0%, #6d28d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.extra-card p { 
  font-size: 0.95rem; 
  line-height: 1.6;
  opacity: 0.8;
}

/* ================================
   7) Улучшенная кнопка действия
================================ */
.accounting-action {
  margin-top: 40px;
  animation: fadeInUp 0.8s both;
  animation-delay: 2.2s;
  position: relative;
  z-index: 2;
}

.accounting-action .btn-order {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 18px 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.accounting-action .btn-order::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;
}

.accounting-action .btn-order:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
}

.accounting-action .btn-order:hover::before {
  left: 100%;
}

.accounting-action .btn-order:active {
  transform: translateY(-2px) scale(1.02);
}

/* ================================
   8) Улучшенные анимации
================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glow {
  from { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
  to   { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 255, 255, 0.3); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================================
   9) Улучшенный адаптив
================================ */
@media (max-width: 1024px) {
  .accounting-section .container { 
    padding: 60px 20px; 
    margin: 40px 16px; 
  }
  .accounting-title { font-size: 2.25rem; }
  .accounting-illustration { max-width: 280px; margin-bottom: 40px; }
}

@media (max-width: 768px) {
  .accounting-features { gap: 20px; }
  .accounting-extras   { gap: 28px; }
  .accounting-section .container {
    border-radius: 1.5rem;
  }
  .accounting-features li {
    padding: 24px 16px;
  }
  .extra-card {
    padding: 28px 20px;
  }
}

@media (max-width: 576px) {
  .accounting-section .container { 
    padding: 40px 16px; 
    margin: 20px 8px; 
    border-radius: 1.25rem;
  }
  .accounting-title { 
    font-size: 1.875rem;
    line-height: 1.2;
  }
  .accounting-subtitle {
    font-size: 1rem;
    margin-bottom: 32px;
  }
  .accounting-illustration {
    max-width: 220px;
    margin-bottom: 40px;
  }
  .accounting-features,
  .accounting-extras {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .accounting-features li {
    padding: 20px 16px;
  }
  .extra-card {
    padding: 24px 16px;
  }
  .accounting-action .btn-order {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
  }
}

/* ================================
   10) Дополнительные улучшения для производительности
================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Оптимизация для touch устройств */
@media (hover: none) and (pointer: coarse) {
  .accounting-features li:hover,
  .extra-card:hover,
  .accounting-action .btn-order:hover {
    transform: none;
  }
}