@use "sass:map";
@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　サイドセクション
------------------------------ */
.section-side-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-side-title {
  margin-block: 0;
  font-size: map.get(global.$font-scales, heading-ss);
  line-height: var(--line-height-lg);
}

/* サイドセクションのエントリー一覧
----------------------------- */
.summary-side-link {
  position: relative;
  display: block;
  width: 100%;
  text-decoration: none;

  &::after {
    position: absolute;
    inset: -0.5rem;
    z-index: 1;
    content: "";
    background-color: transparent;
    border-radius: var(--border-radius-lg);

    @media (hover: hover) {
      transition: background-color 0.3s ease;
    }
  }
}

.summary-side-link-inner {
  position: relative;
  z-index: 2;
}

@media (hover: hover) {
  .summary-side-link:any-link:hover {
    &::after {
      background-color: var(--color-hover-bg-2nd);
    }

    .summary-side-img {
      transform: scale(1.2);
    }
  }
}

.summary-side {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 6rem 1fr;
  grid-column-gap: 0.5rem;
}

.summary-side-img-wrap {
  grid-area: 1 / 1 / 2 / 2;
  width: 6rem;
  aspect-ratio: var(--summary-side-img-aspect-ratio, 1 / 1);
  overflow: hidden;
  border-radius: var(--border-radius-md);
}

.summary-side-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s 0.2s ease-out;
  will-change: transform;
}

.summary-side-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  line-height: var(--line-height-base);
  color: var(--color-text);
  -webkit-box-orient: vertical;
}

.summary-side-labels-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.summary-side-date-layout {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.summary-side-date {
  display: inline-block;
  margin: 0;
  font-size: map.get(global.$font-scales, body-s);
  line-height: var(--line-height-base);
  color: var(--color-text-2nd);
}
