/* ==========================================================================
   certs/index.html 専用スタイル（ネイティブCSSネスト）
   Tailwindビルド対象：@reference で style.css のテーマ・ユーティリティを参照し、
   @apply / theme変数（--color-* 等）/ バリアントを使用可能にする。
   ※@reference は参照のみでCSSを出力しないため、Tailwind本体の重複読み込みは発生しない。
   ※専用スタイルは @layer に入れず従来どおりの優先度を維持している。
   ========================================================================== */
@reference "../src/assets/css/style.css";

@font-face {
  font-family: "Poppins";
  src: url("/certs/Poppins-SemiBold.woff") format("truetype");
}
@font-face {
  font-family: "LINE Seed JP";
  src: url("/certs/LINESeedJP-Regular.woff") format("truetype"),
    url("/certs/LINESeedJP-Bold.woff") format("truetype");
}

.certs {
  font-family: "LINE Seed JP";

  h1 {
    margin: 0;
    display: block;
  }

  h2,
  h3,
  blockquote {
    padding: 0;
    margin: 0;
    display: block;
  }

  img {
    width: 100%;
    height: auto;
  }

  /* PC/SPナビ切替（JS一体のため現状維持） */
  .certsNav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px 10px;
    margin-top: 60px;
    margin-bottom: 60px;

    li {
      width: auto;
    }
  }

  .certsNavBtn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #171616;
    border: solid 1px #171616;
    border-radius: 50px;
    padding-left: 14px;
    padding-right: 14px;

    &::after {
      content: url(/certs/img/certs-arrow.svg);
      display: block;
      width: 10px;
      height: auto;
      margin-top: -3px;
    }
  }

  .certsSelectWrap {
    display: none;
  }

  .certsSelect {
    width: 100%;
    height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: #171616;
    background: #fff url(/certs/img/certs-arrow.svg) no-repeat right 14px center;
    background-size: 10px auto;
    border: 1px solid #bbb;
    border-radius: 5px;
    appearance: none;
    padding: 0 40px 0 14px;
  }

  @media screen and (max-width: 768px) {
    .certsNav {
      gap: 10px;
      margin-top: 30px;
      margin-bottom: 30px;
    }
    .certsNavBtn {
      font-size: 11px;
      height: 25px;
    }
  }

  @media screen and (max-width: 576px) {
    .certsNav {
      display: none;
    }
    .certsSelectWrap {
      display: block;
      margin-top: 50px;
      margin-bottom: 20px;
    }
  }

  /* カテゴリ別セクション（背景色・タイトル・資格一覧）*/
  .certsSection {
    .sectionHomeBuilding { background: #0098E0; }
    .sectionFinanceFp { background: #00487F; }
    .sectionLegalBusiness { background: #0FAEA3; }
    .sectionBuildSafety { background: #007C5C; }
    .sectionSafetyCare { background: #FE7479; }
    .sectionLegacyPlanning { background: #887EE5; }
    .sectionItOffice { background: #2B64E4; }
    .sectionLifeSupport { background: #FC773D; }
    .sectionStudyCertification { background: #78BC48; }
    .sectionEducationLicensing { background: #188BB2; }
    .sectionBusinessAccounting { background: #FE6B5A; }
    .sectionTransportLicensing { background: #6772E1; }

    .certsSectionTitle {
      color: #fff;
      border-top-left-radius: 50px;
      border-top-right-radius: 50px;
      position: relative;
      padding: 50px 15px 120px;
      z-index: -2;

      @media screen and (max-width: 768px) {
        border-top-left-radius: 25px;
        border-top-right-radius: 25px;
        position: relative;
        padding: 40px 10px 60px;
      }

      .sectionTitleInner {
        width: 95%;
        max-width: 1080px;
        margin-left: auto;
        margin-right: auto;

        .sectionTitleJp {
          font-family: "LINE Seed JP";
          font-size: 18px;
          font-weight: 600;
          letter-spacing: 2px;
        }

        .sectionTitleEn {
          display: block;
          font-family: "Poppins";
          font-size: 52px;
          line-height: 1.2;
        }

        @media screen and (max-width: 992px) {
          .sectionTitleJp {
            font-size: 16px;
          }
          .sectionTitleEn {
            font-size: 45px;
          }
        }

        @media screen and (max-width: 768px) {
          width: 100%;
          padding-left: 10px;
          padding-right: 10px;
        }

        @media screen and (max-width: 576px) {
          .sectionTitleJp {
            font-size: 14px;
          }
          .sectionTitleEn {
            font-size: 32px;
          }
        }
      }
    }

    .certsListWrap {
      width: 95%;
      max-width: 1080px;
      position: relative;
      padding: 60px 35px 0;
      margin-top: -100px;
      margin-left: auto;
      margin-right: auto;

      @media screen and (max-width: 768px) {
        width: 100%;
        padding: 30px 10px 0;
        margin-top: -30px;
      }

      &::before {
        content: url(/certs/img/certs-bg.svg);
        display: block;
        width: 100%;
        height: auto;
        position: absolute;
        left: 0;
        top: 0;
        z-index: -1;
      }

      .certsList {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 35px;

        @media screen and (max-width: 992px) {
          grid-template-columns: repeat(5, 1fr);
        }
        @media screen and (max-width: 768px) {
          grid-template-columns: repeat(4, 1fr);
          gap: 20px;
        }
        @media screen and (max-width: 576px) {
          grid-template-columns: repeat(3, 1fr);
        }

        li {
          position: relative;

          img {
            aspect-ratio: 1 / 1;
          }

          .certName {
            font-size: 12px;
            font-weight: 600;
            text-align: center;
            color: #171616;
            margin-top: 5px;

            @media screen and (max-width: 576px) {
              font-size: 11px;

              br {
                display: none;
              }
            }
          }
        }
      }
    }
  }
}
