/**
* @file
* common styles
*/
:root {
  --enhance-gray1: #f2f2f2;
}

.chapter-reference {
  padding: 15px;
  background: var(--enhance-gray1);
  margin-top: 25px;
}

.chapter-reference-item {
  display: flex;
  gap: 10px;
  font-size: .75rem;
}

.chapter-reference-item p:last-child {
  margin-bottom: 0;
}

.chapter-reference-item:not(:last-child) {
  margin-bottom: 4px;
}

.chapter-reference-item a:hover {
  background-color: #f26a21;
}

.chapter-group {
  display: flex;
  gap: 10px;
  padding: 20px 0;
  align-items: center;
}

.chapter-group:has(+.field--name-node-title) {
  padding-bottom: 0;
}

.chapter-group .field--name-field-sub-title {
  text-transform: uppercase;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
}

.chapter-group .field--name-field-chapter-number {
  background-color: #1cabe2;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.page-chapter .node--view-mode-media-header .field--name-node-title {
  max-width: 100%;
}

.page-chapter.path-node .page-content {
  margin-top: 0;
}

.chapter-navigation {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 0;
  flex-wrap: wrap;
  gap: 20px;
}

.chapter-navigation>div {
  max-width: 40%;
}

/**related*/
.related-chapter-list {
  padding: 40px 0 20px;
}

.related-chapter-list__items .related-chapter-list__item:not(:last-child) {
  margin-bottom: 20px;
}

.block__content:has(>.chapters-list-wrap) {
  padding: 20px 0;
}

.chapters-list-wrap {
  --cards-gap: 12px;
  --card-count: 5;
  display: grid;
  grid-template-columns: repeat(var(--card-count), minmax(0, 1fr));
  gap: var(--cards-gap);
}

.chapters-list-wrap .chapter-name {
  font-weight: 600;
}

.chapter-name+.chapter-title {
  margin-top: 4px;
}

.chapters-list-wrap a {
  text-decoration: none;
}

.chapter-col a {
  padding: 4px;
  display: block;
  height: 100%;
}

.chapter-col a:hover {
  background: #1cabe2;
}

.chapter-meta-block {
  display: flex;
  gap: 6px;
  flex-direction: column;
}

.chapter-col *:hover {
  color: #fff;
}

.chapter-title {
  line-height: 1.4;
  font-size: .875rem;
}

.related-chapter-list__back {
  padding: 20px 0;
}

.chapters-list-wrap:has(+.related-chapter-list__back) {
  padding-bottom: 0;
}

.chapter-text p:last-child {
  margin-bottom: 0;
}

.chapter-text,
.chapter-image {
  padding: 20px 0;
}

/*back*/
.back-to-page-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 20px 0;
}

/*accordion fix*/
.page-chapter .accordion .accordion-header::after {
  flex-shrink: 0;
}

@media (min-width: 992px) and (max-width: 1199px) {
  .page-chapter .view-video-gallery .view-content {
    padding-bottom: 40px;
  }
}
