/* rn- means "Research Note", the previous name of "What We Do" */

.rn-queryloop-item {
  .wp-block-group:not(:first-child) {
    margin-block-start: 1rem;
  }

  img {
    aspect-ratio: auto 1024 / 684;
    object-fit: cover !important;
  }

  figure,
  figure>a {
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  figure:not(:first-child) {
    margin-block-start: 1rem;
  }

  .wp-block-group>* {
    margin-block-start: 1rem;
  }

  .wp-block-group a {
    text-decoration: none;
  }
}

.wp-block-lazyblock-ccbt-research-note-latest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.rn-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  padding: 0;
  justify-content: space-evenly;
}

.rn-menu__item {
  margin: 0;
  border-bottom: 1px solid #c7c7c7;
  font-weight: 700;
  padding-bottom: 1rem;
  width: 100%;
  position: relative;
}

.rn-menu__item--active {
  border-bottom: 2px solid #000;
}

.rn-menu__item::after {
  position: absolute;
  content: "";
  background-image: url(/wp-content/themes/ccbt/assets/arrow_right.svg);
  background-repeat: no-repeat;
  width: 9px;
  height: 14px;
  top: 8px;
  right: 0;
}

.rn-menu__item a {
  color: #000;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
}

.post-type-archive-research-note .rn-menu__item::after {
  background-image: none;
}

.rn-item {
  position: relative;
  padding: 0;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rn-item:hover {
  opacity: 0.9;
}

.rn-item__taxonomy {
  display: flex;
  gap: 0.5rem;
}

.wp-block-lazyblock-ccbt-research-note-latest .rn-item__taxonomy {
  flex-wrap: wrap;
}

.rn-item__category {
  border: 1px solid #7f7f7f;
  color: #7f7f7f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0;
  font-weight: 700;
  padding: 0 0.4rem;
}

.wp-block-lazyblock-ccbt-research-note-latest .rn-item__category {
  display: inline-block;
  width: fit-content;
  padding: 0 0.2rem;
}

.rn-item__tag {
  color: #7f7f7f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
  font-weight: 700;
}

.wp-block-lazyblock-ccbt-research-note-latest .rn-item__tag {
  justify-content: flex-start;
}

.rn-item__date {
  margin-top: auto;
  color: #7f7f7f;
  font-size: 0.875rem;
}

.rn-item__figure {
  display: block;
  position: relative;
  margin: 0;
}

.rn-item__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rn-item__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rn-item__appendix {
  display: flex;
  gap: 0.25rem;
  color: #7f7f7f;
  flex-wrap: wrap;
  font-size: 0.875rem;
  line-height: 1.5;
}

.rn-item__title {
  font-size: 1rem;
  line-height: 1.5;
  overflow: hidden;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: pre-wrap;
  color: #000;
}

.rn-item__icon {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  margin: 0;
}

.rn-item__icon>img {
  vertical-align: middle;
}

.rn-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rn-meta-date {
  color: #7f7f7f;
}

.rn-meta-author {
  font-feature-settings: 'palt' 1;
  display: inline-block;
  line-height: 1.5;
  display: flex;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: 0.5rem;
}

.rn-meta-author li {
  margin: 0;
}

.rn-meta-author-name {
  margin-right: 0.75rem;
}

.rn-meta-author-name a {
  color: #000;
  text-underline-offset: 0.3em;
}

.rn-meta-author-name a:hover {
  text-decoration: underline dotted;
}

.rn-meta-author-title {
  font-size: 0.875rem;
}

.rn-series {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 2rem;
}

.rn-series__figure {
  margin: 0 0 1rem;
}

.rn-series__item--nav {
  text-decoration: none;
}

.rn-series__item--nav .rn-item__appendix,
.rn-series__item--nav .rn-item__date {
  font-size: 0.875rem;
}

.rn-series__item--nav .rn-item__date {
  margin-top: 0.5rem;
}

.rn-series__item__image {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rn-series__item__text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rn-series__item__title {
  margin: 0;
  font-weight: 700;
  color: #000;
  line-height: 1.5;
}

.rn-kv {
  width: 100%;
  height: auto;
  position: relative;
  aspect-ratio: 1/1;
}

.rn-kv__container {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  position: relative;
}

.rn-kv__slides {
  display: flex;
  flex-wrap: nowrap;
  width: inherit;
  height: inherit;
  transition: transform 0.5s ease-out;
}

.rn-kv__slide {
  position: relative;
  display: block;
  width: inherit;
  height: inherit;
}

.rn-kv__figure {
  display: block;
  margin: 0;
  width: 100%;
  height: 100%;
}

.rn-kv__image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rn-kv__text {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.8));
  color: #fff;
}

.rn-kv__text .rn-item__appendix {
  padding-right: 8rem;
}

.rn-kv .rn-item__category {
  border-color: #fff;
}

.rn-kv .rn-item__category,
.rn-kv .rn-item__tag,
.rn-kv .rn-item__title,
.rn-kv .rn-item__date,
.rn-kv .rn-item__author {
  color: #fff;
}

.rn-kv__buttons {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 1px;
}

.rn-kv__button {
  background-color: #000;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.rn-kv__button:hover {
  opacity: 0.5;
}

.rn-kv__button--left {
  transform: scale(-1, 1);
}

.rn-kv__button--disabled {
  opacity: 0.5;
}

@media (min-width: 768px) {
  .wp-block-lazyblock-ccbt-research-note-latest {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .rn-menu {
    display: flex;
    flex-direction: row;
    gap: 2rem;
  }

  .rn-menu__item {
    padding-bottom: 0.5rem;
  }

  .rn-item {
    gap: 1rem;
  }

  .wp-block-lazyblock-ccbt-research-note-taxonomy>.rn-item__taxonomy {
    margin-top: 2rem;
    font-size: 0.875rem;
  }

  .rn-item__figure {
    width: 100%;
    height: auto;
  }

  .rn-item__tag,
  .rn-item__category {
    font-size: 0.75rem;
  }

  .rn-item__image {
    aspect-ratio: 16 / 9;
  }

  .rn-item__title {
    font-size: 1.25rem;
  }

  .rn-item__title a {
    -webkit-line-clamp: unset;
  }

  .rn-series {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }

  .rn-series__item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .rn-series__figure {
    margin: 0;
  }

  .rn-kv {
    width: 100%;
    margin: 0;
    aspect-ratio: 21 / 9;
  }

  .single-research-note .rn-series {
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .rn-kv__text {
    padding: 1.5rem;
  }
}