/* =========================================
   Внутренняя страница книги библиотеки (html.bundle-library)
   ========================================= */
html.bundle-library .article-content {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 24px;
  margin-bottom: 32px;
  background-color: #faf9f6; /* Единый теплый фон с остальными блоками */
  border: 1px solid #e6e2d8;
  border-radius: 8px;
}

/* Левая колонка: обложка и PDF-файл */
html.bundle-library .section-left {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

html.bundle-library .field_covers img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e6e2d8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

html.bundle-library .field_covers a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Блок скачивания PDF-файла */
html.bundle-library .field_files_books .items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html.bundle-library .field_files_books .item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 12px 14px;
  background-color: #ffffff;
  border: 1px solid #d5cfc2;
  border-radius: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Иконка PDF слева внутри карточки скачивания */
html.bundle-library .field_files_books .item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' viewBox='0 0 24 24' fill='none' stroke='%238c4a27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cpath d='M12 18v-6'/%3E%3Cpath d='m9 15 3 3 3-3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

html.bundle-library .field_files_books .item:hover {
  border-color: #8c4a27;
  background-color: #fdfcfb;
  box-shadow: 0 3px 10px rgba(140, 74, 39, 0.08);
}

/* Убираем стандартную иконку файла Drupal, если она добавляется темой */
html.bundle-library .field_files_books .file {
  background: none !important;
  padding-left: 0 !important;
}

html.bundle-library .field_files_books a {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #8c4a27;
  text-decoration: none;
  word-break: break-word; /* Перенос длинных имен файлов без пробелов */
}

/* Растягиваем клик на всю плашку файла */
html.bundle-library .field_files_books a::after {
  content: "";
  position: absolute;
  inset: 0;
}

html.bundle-library .field_files_books .item > span:last-child {
  font-size: 12px;
  color: #7a756d;
}

/* =========================================
   Правая колонка: описание и характеристики
   ========================================= */
html.bundle-library .section-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Подзаголовок издания */
html.bundle-library .item-field_subtitle {
  margin: 0 0 8px 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: #2b2927;
}

/* Ответственный редактор / составители */
html.bundle-library .field_area_responsibility {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6e2d8;
  font-size: 15px;
  color: #4a4640;
}

html.bundle-library .field_area_responsibility p {
  margin: 0;
}

/* Строки характеристик (Гриф, Место, Издательство, Год, Страницы) */
html.bundle-library .section-right > div[class^="field_"]:not(.field_area_responsibility) {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid #ece9e0;
  font-size: 14.5px;
  line-height: 1.45;
}

/* Переопределяем конфликтующие стили Bulma для .label */
html.bundle-library .section-right .label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #5c5852;
}

html.bundle-library .section-right .item {
  color: #222222;
}

/* Блок аннотации и содержания (.body) */
html.bundle-library .section-right .body {
  margin-top: 20px;
  padding-top: 4px;
  font-size: 15px;
  line-height: 1.6;
  color: #2b2927;
}

html.bundle-library .section-right .body p {
  margin: 0 0 14px 0;
}

html.bundle-library .section-right .body p:last-child {
  margin-bottom: 0;
}

/* Выделяем первый абзац с библиографической справкой */
html.bundle-library .section-right .body p:first-child {
  padding: 12px 16px;
  background-color: #ffffff;
  border-left: 3px solid #8c4a27;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: #4a4640;
}

/* =========================================
   Планшеты и мобильные (экраны меньше 768px)
   ========================================= */
@media (max-width: 768px) {
  html.bundle-library .article-content {
    flex-direction: column;
    align-items: center;
    padding: 18px 16px;
    gap: 22px;
  }

  html.bundle-library .section-left {
    flex: none;
    width: 100%;
    max-width: 280px;
    align-items: center;
  }

  html.bundle-library .field_covers {
    width: 190px;
  }

  html.bundle-library .field_files_books {
    width: 100%;
  }

  html.bundle-library .section-right {
    width: 100%;
  }

  html.bundle-library .item-field_subtitle {
    font-size: 17px;
  }

  html.bundle-library .section-right > div[class^="field_"]:not(.field_area_responsibility) {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
  }

  html.bundle-library .section-right .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #7a756d;
  }
}
