@charset "UTF-8";
@import url(./global/_variable.css);

/* 応募作品一覧ページ */
/* ============================================ */

/* ヒーロー（second-mainを流用。部門カラーのみここで指定） */
/* ============================================ */

.works-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
.second-main {
  background: var(--grad_main);
}
.second-main.works-ai {
  background: var(--grad_point);
}

/* タブ */
/* ============================================ */

.works-outer {
  background: url("../images/bg_pattern_color.png") top center/ 100% auto repeat-y;
  flex: 1 0 auto;
  padding: 80px 0;
  overflow: hidden;
  position: relative;
  @media (width <= 896px) {
    background-size: 150% auto;
    padding: 56px 0;
  }
  @media (width <= 480px) {
    background-size: 200% auto;
  }
}
.works-options {
  position: relative;
}
.works-options__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  @media (width <= 896px) {
    gap: 10px;
  }
}
.works-options__item {
  word-break: keep-all;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 9999px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--navy_c) 24%, transparent);
  color: var(--main_c);
  font-size: clamp(0.9375rem, 0.3849rem + 0.9868vw, 1.125rem); /* 18~15(1200~896) */
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  @media (width <= 896px) {
    padding: 10px 18px;
    gap: 6px;
  }
}
.works-options__icon {
  flex-shrink: 0;
  width: 1.5em;
  height: 1.5em;
}
.works-options__item.--lower {
  color: #259fe0;
}
.works-options__item.--upper {
  color: #00a29a;
}
.works-options__item.--jhs {
  color: #e95a9a;
}
.works-options__item.--hs {
  color: #ff6c00;
}
.works-options__item.--vs {
  color: #7a5ac2;
}
.works-options__item.--us {
  color: var(--main_c);
}
.works-options__item.--active {
  background: var(--main_c);
  border-color: transparent;
  color: #fff;
}
.works-options__item.--active.--lower {
  background: #259fe0;
}
.works-options__item.--active.--upper {
  background: #00a29a;
}
.works-options__item.--active.--jhs {
  background: #e95a9a;
}
.works-options__item.--active.--hs {
  background: #ff6c00;
}
.works-options__item.--active.--vs {
  background: #7a5ac2;
}
.works-options__item.--active.--us {
  background: var(--main_c);
}
/* AI部門ページ（.second-main.works-ai）ではタブの環境色・「すべて」のみpoint_cに切り替える */
/* （--lower/--upper/--jhs/--hs/--vs/--usは学年区分の固有色のためページに関わらず固定） */
.second-main.works-ai ~ .works-outer .works-options__item.--all {
  color: var(--point_c);
}
.second-main.works-ai ~ .works-outer .works-options__item.--all.--active {
  background: var(--point_c);
  color: #fff;
}

/* 作品一覧 */
/* ============================================ */

.works-container {
  position: relative;
}
.works-contents {
  display: none;
}
.works-contents.--open {
  display: block;
  margin-top: 60px;
  @media (width <= 896px) {
    margin-top: 40px;
  }
}
.works-kind {
  position: relative;
  margin: 60px 0 25px;
  padding-left: 30px;
  color: var(--navy_c);
  font-size: clamp(1.375rem, 0.2697rem + 1.9737vw, 1.75rem); /* 28~22(1200~896) */
  font-weight: 800;
  @media (width <= 896px) {
    margin: 40px 0 20px;
    padding-left: 25px;
  }
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background: var(--main_c);
    @media (width <= 896px) {
      width: 8px;
    }
  }
}
.second-main.works-ai ~ .works-outer .works-kind::before {
  background: var(--point_c);
}
.works-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 30px 20px;
  @media (width <= 480px) {
    gap: 20px 15px;
  }
}
.works-item {
  width: calc((100% - 40px) / 3);
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--navy_c) 24%, transparent);
  @media (width <= 896px) {
    width: calc((100% - 20px) / 2);
    padding: 15px;
    border-radius: 8px;
  }
  @media (width <= 480px) {
    width: calc((100% - 15px) / 2);
  }
}
.works-item.--lower .works-category__item {
  background: #259fe0;
}
.works-item.--upper .works-category__item {
  background: #00a29a;
}
.works-item.--jhs .works-category__item {
  background: #e95a9a;
}
.works-item.--hs .works-category__item {
  background: #ff6c00;
}
.works-item.--vs .works-category__item {
  background: #7a5ac2;
}
.works-item.--us .works-category__item {
  background: var(--main_c);
}
.works-movie {
  position: relative;
}
.works-movie > a {
  position: relative;
  display: block;
  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background: url(../images/btn_movie.svg) no-repeat center / contain;
    transform: translate(-50%, -50%);
    @media (width <= 896px) {
      width: 40px;
      height: 40px;
    }
    @media (width <= 480px) {
      width: 30px;
      height: 30px;
    }
  }
}
.works-movie img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.works-category {
  margin-top: 15px;
  @media (width <= 896px) {
    margin-top: 10px;
  }
}
.works-category__item {
  padding: 4px 8px;
  background: var(--main_c);
  color: #fff;
  font-size: clamp(0.8125rem, 0.6283rem + 0.3289vw, 0.875rem); /* 14~13(1200~896) */
  font-weight: 700;
  text-align: center;
}
.works-ttl {
  margin-top: 10px;
  color: var(--navy_c);
  font-size: clamp(1rem, 0.6316rem + 0.6579vw, 1.125rem); /* 18~16(1200~896) */
  font-weight: 700;
  @media (width <= 896px) {
    margin-top: 8px;
  }
}
.works-hidden {
  margin-top: 10px;
  @media (width <= 896px) {
    margin-top: 8px;
  }
}
.works-hidden.--open .works-txt {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.works-txt {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  font-size: clamp(0.8125rem, 0.6283rem + 0.3289vw, 0.875rem); /* 14~13(1200~896) */
  line-height: 1.8;
  transition: all 0.3s ease-out;
}
.works-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 15px;
  @media (width <= 896px) {
    margin-top: 10px;
  }
}
.works-acc {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy_c);
  font-size: clamp(0.8125rem, 0.6283rem + 0.3289vw, 0.875rem); /* 14~13(1200~896) */
  cursor: pointer;
  @media (width <= 896px) {
    gap: 5px;
  }
}
.works-acc.--active > span::before {
  top: calc(50% - 1px);
  rotate: 180deg;
}
.works-acc > span {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  background: var(--navy_c);
  border-radius: 50%;
  @media (width <= 896px) {
    width: 28px;
    height: 28px;
  }
  &::before {
    content: "";
    position: absolute;
    top: calc(50% + 1px);
    left: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 7px 0 7px;
    border-color: #fff transparent transparent transparent;
    translate: -50% -50%;
    transition: all 0.3s ease-out;
    @media (width <= 896px) {
      border-width: 9px 6px 0 6px;
    }
  }
}
