@use 'global/_index' as g;

/* news */
/* ============================================ */
.news {
}

.news-wrapper {
  margin-top: 48px;
  @media (width <= 896px) {
    margin-top: 32px;
  }
}
.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  @media (width <= 896px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  @media (width <= 480px) {
    grid-template-columns: repeat(1, 1fr);
  }
}
.news-item {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  gap: 15px;
  >a {
    display: inherit;
    grid-template-rows: inherit;
    grid-row: inherit;
  }
}
.news-date {
  color: var(--main_c);
}
.news-ttl {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 10px;
  @media (width <= 896px) {
    font-size: 1.6rem;
  }
}
.news-txt {
  overflow: hidden;
  display: -webkit-box;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; 
  line-clamp: 2;
  margin-top: 10px;
}


.camel_paging_sp {
  margin-top: 64px;
  @media (width <= 896px) {
    margin-top: 40px;
  }
  ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    @media (width <= 896px) {
      gap: 8px;
      font-size: 1.3rem;
    }
    >li {
      box-sizing: border-box;
      display: grid;
      place-content: center;
      width: 28px;
      height: 42px;
      @media (width <= 896px) {
        width: 25px;
        height: 38px;
      }
      >a, >span {
        box-sizing: border-box;
        display: grid;
        place-content: center;
        width: 28px;
        height: 42px;
        border: 1px solid #898989;
        color: #898989;
        background: #fff;
        @media (width <= 896px) {
          width: 25px;
          height: 38px;
        }
      }
      &.active {
        border: 1px solid var(--main_c);
        background: var(--main_c);
        color: #fff;
      }
      &.nolink {
        border: 1px solid #898989;
        background: #ebebeb;
        color: #898989;
      }
    }
  }
}

.detail {
}
.detail-date {
  color: var(--main_c);
}
.detail-ttl {
  font-size: 2.4rem;
  line-height: 1.4;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
  margin-top: 20px;
  @media (width <= 896px) {
    font-size: 2rem;
  }
}
.detail-contents {
  @include g.font_normal;
  line-height: 1.8;
  margin-top: 40px;
  @media (width <= 896px) {
    margin-top: 24px;
  }
  >* {
    margin-top: 40px;
    @media (width <= 896px) {
      margin-top: 24px;
    }
    &:first-child {
      margin-top: 0;
    }
  }
  a {
    color: var(--main_c);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  p {
    +p {
      margin-top: 20px;
      @media (width <= 896px) {
        margin-top: 12px;
      }
    }
  }
  img {
    display: inline-block;
    +img {
      margin-top: 24px;
      @media (width <= 896px) {
        margin-top: 16px;
      }
    }
  }
  figure {
    text-align: center;
    figcaption {
      margin-top: 12px;
      margin-inline: auto;
      inline-size: fit-content;
      text-align: left;
      @media (width <= 896px) {
        margin-top: 8px;
      }
    }
  }
  table {
    display: block;
    width: 100%;
    overflow: auto;
    padding-bottom: 10px;
    th, td {
      box-sizing: border-box;
      padding: 4px 16px;
      white-space: nowrap;
      border: 1px solid #ccc;
    }
    th {
      background: var(--main_c);
      color: #fff;
      font-weight: 500;
    }
    td {
      background: #fff;
    }
  }
  iframe {
    display: block;
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
  }
  ul {
    li {
      padding-left: 1.2em;
      position: relative;
      &::before {
        content: '';
        display: block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--main_c);
        position: absolute;
        top: .65em;
        left: 0;
      }
    }
  }
  ol {
    counter-reset: item;
    list-style-type: none;
    li {
      text-indent: -1.5em;
      padding-left: 1.5em;
      &:before {
        counter-increment: item;
        content: counter(item)'.';
        padding-right: .5em;
        font-weight: 700;
        color: var(--main_c);
      }
    }
  }
  blockquote {
    padding: 20px 20px 20px 56px;
    background: #ddd;
    position: relative;
    @media (width <= 896px){
      padding: 16px 16px 16px 46px;
    }
    &::before{
      content: "“";
      font-size: 8rem;
      line-height: 1;
      color: #f5f5f5;
      position: absolute;
      top: 12px;
      left: 12px;
      @media (width <= 896px){
        font-size: 6.4rem;
        top: 10px;
        left: 10px;
      }
    }
  }
}
.detail-block {
  >* {
    margin-top: 20px;
    @media (width <= 896px) {
      margin-top: 12px;
    }
    &:first-child {
      margin-top: 0;
    }
  }
}
.detail-flex {
  display: flex;
  gap: 20px;
  @media (width <= 480px) {
    flex-direction: column;
    gap: 10px;
  }
  img {
    width: 100%;
    max-width: none;
  }
  .detail-block {
    flex-grow: 1;
    @media (width <= 896px) {
      width: 100%;
    }
  }
  .detail-img {
    width: 400px;
    flex-shrink: 0;
    @media (width <= 896px) {
      width: 250px;
    }
    @media (width <= 480px) {
      width: 100%;
    }
  }
  &.col2 {
    flex-direction: row;
    flex-wrap: wrap;
    >* {
      width: calc((100% - 20px) / 2);
      @media (width <= 896px) {
        width: 100%;
      }
    }
    &.reverse {
      flex-direction: row-reverse;
      @media (width <= 480px) {
        flex-direction: column;
      }
    }
  }
  &.col3 {
    flex-direction: row;
    flex-wrap: wrap;
    >* {
      width: calc((100% - 40px) / 3);
      @media (width <= 896px) {
        width: calc((100% - 20px) / 2);
      }
      @media (width <= 480px) {
        width: 100%;
      }
    }
  }
}