/* Контейнер гармошки */
.custom-accordion {
  max-width: 800px;
  margin: 20px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- 1. ОСНОВНОЙ БЛОК (Всегда с вашим градиентом) --- */
.accordion-item {
  border: 1px solid rgba(241, 122, 11, 0.3);
  border-radius: 12px;
  background: linear-gradient(293deg, rgb(36, 0, 0) 0%, rgb(145, 88, 10) 56%, rgb(241, 122, 11) 100%);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- 2. ПРИ НАВЕДЕНИИ (Яркий оранжевый акцент, БЕЗ СИНЕГО) --- */
.accordion-item:hover {
  border-color: #ff7700 !important; /* Яркий оранжевый */
  box-shadow: 0 6px 20px rgba(255, 119, 0, 0.4) !important; /* Оранжевое свечение */
}

.accordion-item:hover .accordion-title {
  color: #ffedd5 !important; /* Нежно-персиковый подсвет заголовка */
}

/* --- КНОПКА ЗАГОЛОВКА (Убираем синие обводки браузера) --- */
.accordion-header {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  
  /* Убираем синюю рамку фокуса и клика */
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* При фокусе (когда нажимаем или переходим табуляцией) */
.accordion-header:focus,
.accordion-header:active,
.accordion-header:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Заголовок (всегда белый) */
.accordion-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff !important;
  line-height: 1.4;
  transition: color 0.2s ease;
}

/* Иконка плюс / минус */
.accordion-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background-color: #ffffff !important;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.accordion-icon::before {
  top: 7px;
  left: 0;
  width: 100%;
  height: 2px;
}

.accordion-icon::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 100%;
}

/* --- 3. ОТКРЫТОЕ СОСТОЯНИЕ (Иконка) --- */
.accordion-item.active .accordion-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

/* --- 4. БЛОК С КОНТЕНТОМ (Белый фон, черный текст) --- */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  background-color: #ffffff !important; /* БЕЛЫЙ ФОН */
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-inner {
  padding: 20px 24px;
  border-top: 1px solid rgba(241, 122, 11, 0.2);
}

/* Текст внутри открытого блока */
.accordion-inner p {
  margin: 0;
  color: #1a1a1a !important; /* ЧЕРНЫЙ ТЕКСТ */
  font-size: 0.95rem;
  line-height: 1.6;
}
/* Стилизация оглавления внутри белого блока */
.custom-toc-nav ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.custom-toc-nav ul.ez-toc-list-level-2 {
  padding-left: 18px;
  margin-top: 6px;
}

.custom-toc-nav ul.ez-toc-list-level-3 {
  padding-left: 18px;
  margin-top: 4px;
}

.custom-toc-nav li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.custom-toc-nav a.ez-toc-link {
  color: #240000 !important;
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

/* Ховер для ссылок оглавления — окрашивание в оранжевый */
.custom-toc-nav a.ez-toc-link:hover {
  color: #f17a0b !important;
  padding-left: 4px;
}
/* --- СТИЛИ ДЛЯ SITE-FOOTER (Уменьшенная высота) --- */
.site-footer {
    /* Градиентный фон и границы */
    background: linear-gradient(293deg, rgb(36, 0, 0) 0%, rgb(145, 88, 10) 56%, rgb(241, 122, 11) 100%) !important;
    border-top: 1px solid rgba(241, 122, 11, 0.4) !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);

    /* Текст и уменьшенные вертикальные отступы (20px вместо 40px) */
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 10px 10px !important;

    /* Убираем синюю обводку браузера */
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Компактные заголовки */
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6,
.site-footer .footer-title {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 8px !important;
    /* Уменьшен отступ снизу */
    font-size: 1.05rem !important;
}

/* Компактный текст и параграфы */
.site-footer p,
.site-footer span,
.site-footer li {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
    margin-bottom: 4px !important;
}

/* Ссылки в футере */
.site-footer a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* При наведении на ссылки — оранжевый персиковый цвет (БЕЗ СИНЕГО) */
.site-footer a:hover {
    color: #ffedd5 !important;
    text-shadow: 0 0 8px rgba(255, 237, 213, 0.4);
}

/* Отключение синей обводки для интерактивных элементов */
.site-footer a:focus,
.site-footer a:active,
.site-footer button:focus,
.site-footer button:active,
.site-footer input:focus {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Тонкие компактные разделители */
.site-footer hr,
.site-footer .footer-divider {
    border: none;
    border-top: 1px solid rgba(241, 122, 11, 0.3) !important;
    margin: 12px 0 !important;
}
/* Разрешаем клики и касания по шапке аккордеона */
.accordion-header {
  touch-action: manipulation; /* Убирает задержку в 300ms на мобильных */
  -webkit-user-select: none;
  user-select: none;
}

/* Гарантируем, что клик по дочерним элементам (иконке или тексту) передается на header */
.accordion-header * {
  pointer-events: none;
}

/* Убираем ограничения мобильных браузеров на скрытые блоки */
.accordion-content {
  -webkit-overflow-scrolling: touch;
}