@charset "UTF-8";

/* 左カラムがタブ等の min-content で押し広げられないようにする */
.cont--2__left:has(.ljm-top) {
  min-width: 0;
  max-width: 100%;
}

/* ==============================
   .ljm-top (トップ「日本での生活」教育動画)
   ============================== */
.ljm-top {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 30px;
  padding: 28px 0 24px;
  background: #006697;
  border-radius: 5px;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
  -webkit-box-shadow: 0px 0px 15px -2px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 0px 15px -2px rgba(0, 0, 0, 0.3);

  @media screen and (max-width: 680px) {
    padding: 20px 0 18px;
    border-radius: 0;
  }
}

.ljm-top__head,
.ljm-top .ljm-tabs,
.ljm-top .ljm-panels,
.ljm-top__more {
  padding-left: 28px;
  padding-right: 28px;
  box-sizing: border-box;

  @media screen and (max-width: 680px) {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.ljm-top__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;

  @media screen and (max-width: 680px) {
    gap: 10px;
    margin-bottom: 18px;
  }
}

.ljm-top__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

img.ljm-top__icon {
  flex-shrink: 0;
  width: 33px;
  max-width: 33px;
  height: 33px;
  display: block;

  @media screen and (max-width: 680px) {
    width: 57px;
    max-width: 57px;
    height: 57px;
  }
}

.ljm-top__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;

  @media screen and (max-width: 680px) {
    font-size: 22px;
  }
}

.ljm-top__lead {
  margin: 0;
  margin-left: calc(33px + 10px);
  font-size: 16px;
  line-height: 1.7;
  color: #fff;

  @media screen and (max-width: 680px) {
    margin-left: 0;
    font-size: 15px;
  }
}

/* ==============================
   言語タブ
   ============================== */
.ljm-top .ljm-tabs {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  gap: 8px;
  margin-bottom: 24px;

  @media screen and (max-width: 680px) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 6px;
    margin-bottom: 30px;
    max-width: 100%;
  }
}

.ljm-top .ljm-tabs__btn {
  appearance: none;
  flex: 1 1 auto;
  border: 3px solid #d3dee6;
  background: #c0d0db;
  color: #86939f;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;

  &:hover {
    background: #e8f1f2;
    border-color: #ff8f00;
  }

  &.is-active {
    background: #c7f1ff;
    border-color: #00c0ff;
    color: #474f58;
    font-weight: 700;
  }

  @media screen and (max-width: 680px) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 6px 4px;
    font-size: 14px;
    white-space: normal;
    line-height: 1.3;
  }

  &[data-lang="id"] {
    @media screen and (max-width: 680px) {
      grid-column: span 2;
      white-space: nowrap;
    }
  }
}

/* ==============================
   パネル
   ============================== */
.ljm-top .ljm-panels__panel {
  &[hidden] {
    display: none;
  }
}

/* ==============================
   動画カード
   ============================== */
.ljm-top .ljm-cat__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;

  @media screen and (max-width: 990px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media screen and (max-width: 680px) {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

.ljm-top .ljm-card {
  list-style: none;
  min-width: 0;
  @media screen and (max-width: 680px) {
    width: 100%;
    max-width: 84%;
    margin: 0 auto;
  }
}

.ljm-top .ljm-card__link {
  display: block;
  position: relative;
  min-width: 0;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.8;
  }
}

.ljm-top .ljm-card__num {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 31px;
  background: #0093cb;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  padding-top: 3px;
  border-radius: 4px 4px 4px 4px;
}

.ljm-top .ljm-card__title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 5px 0 0 0;
  padding: 0 10px 0 0;
  min-height: 34px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  @media screen and (max-width: 680px) {
    font-size: 15px;
  }
}

.ljm-top .ljm-card__label {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 6px;
}

.ljm-top .ljm-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 3px solid #0093cb;
  border-radius: 4px 4px 4px 4px;
  overflow: hidden;

  > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ==============================
   動画リストリンク
   ============================== */
.ljm-top__more {
  margin: 20px 0 0;
  text-align: right;

  @media screen and (max-width: 680px) {
    margin-top: 30px;
  }

  a.arrow_b {
    color: #64d9ff;
    line-height: 1.4;

    @media screen and (max-width: 680px) {
      font-size: 15px;
    }

    &:hover {
      color: #fff;
    }
  }
}
