.news-list {
    background: #e6f0fe;
    padding: 20px;
}

.nsj-news-list {
    margin-top: 2em;
    margin-bottom: 2em;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    justify-items: center;
    list-style: none;
    padding: 0;
}

.nsj-news-list > .nsj-news-item {
    display: flex;
    min-width: 0;
    width: 100%;
    justify-content: center;
}

.nsj-news-card {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 500px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    padding: 0 0 24px 0;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.nsj-news-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    color: inherit;
    text-decoration: none;
}

.nsj-news-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.nsj-news-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nsj-news-card-image img {
    height: 100%;
    display: block;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    display: block;
    margin: auto;
}

.nsj-news-card-meta {
    margin: 16px 0 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    padding-left: 16px;
}

.nsj-news-card-category {
    background: #e5e9f7;
    color: #2d3a8c;
    border-radius: 16px;
    padding: 4px 16px;
    font-size: 0.95em;
    border: none;
    display: inline-block;
}

.nsj-news-card-title {
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1.5;
    text-align: left;
    margin: 0 16px;
    margin-bottom: 0;
    margin-top: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    /* タイトルは最大2行・高さ固定 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.1em * 1.5 * 2);
    flex-shrink: 0;
}

.nsj-news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 16px;
}


.nsj-news-card-tags span {
  background: #e5e9f7;
  color: var(--primary-color);
  border-radius: 99px;
  padding: 2px 12px;
  font-size: 0.8em;
  display: inline-block;
  transition: .2s background, .2s color;
}

@media (max-width: 1620px) {
    .nsj-news-list {
        gap: 28px;
        grid-template-columns: repeat(3, 1fr);
    }

    .nsj-news-card {
        width: 400px;
    }

    .nsj-news-card-image {
        height: 180px;
    }
}

@media (max-width: 1330px) {
    .nsj-news-list {
        gap: 24px;
        grid-template-columns: repeat(2, 1fr);
    }

    .nsj-news-card {
        width: 500px;
    }

    .nsj-news-card-image {
        height: 300px;
    }
}

@media (max-width: 1100px) {
    .nsj-news-list {
        gap: 24px;
        grid-template-columns: repeat(2, 1fr);
    }

    .nsj-news-card {
        width: 400px;
    }

    .nsj-news-card-image {
        height: 300px;
    }
}

@media (max-width: 900px) {
    .nsj-news-card {
        width: 100%;
        max-width: 700px;
    }

    .nsj-news-list {
        gap: 16px;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nsj-news-card {
        width: 100%;
        max-width: 350px;
    }

    .nsj-news-list {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    .nsj-news-card-image {
        height: 160px;
    }
}

@media (max-width: 1200px) {
    .nsj-news-list {
        gap: 12px;
        margin-top: 0;
    }

    .nsj-news-card {
        width: 100%;
        max-width: 95vw;
    }

    .nsj-news-card-image {
        height: 300px;
    }

    .news-filter-nav {
        padding: 24px 0;
        height: 200px !important;
    }

    .news-filter-tabs {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        padding: 0 16px !important;
        overflow-x: visible !important;
    }

    .news-filter-tab {
        width: 300px !important;
        text-align: center !important;
        padding: 16px 12px !important;
        font-size: 1em !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: normal !important;
    }

    .company-page-header {
        padding-bottom: 0;
    }

    main {
        margin-bottom: 48px;
    }
}

@media (max-width: 930px) {
    .news-filter-tabs {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 630px) {
    .news-filter-tab {
        width: 170px !important;
    }
}

/* ニュース絞り込みタブ */
.news-filter-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e6f0fe;
    padding: 0.5rem 0;
    position: static;
    top: unset;
    z-index: auto;
    box-shadow: none;
}

.news-filter-tabs {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-filter-tab {
    background: none;
    border: none;
    color: #2d3a8c;
    font-size: 1rem;
    padding: 0.75rem 2.5rem;
    border-radius: 32px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

.news-filter-tab.active {
    background: #2d3a8c;
    color: #fff;
}

@media (max-width: 1311px) {
    .news-filter-tabs {
        gap: 1rem;
        overflow-x: auto;
    }

    .news-filter-tab {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        white-space: nowrap;
    }
}

@media (max-width: 930px) {
    .news-filter-nav {
        height: 300px !important;
    }
}



body {
    min-height: 100vh;
    overflow: visible;
}

.company-page-header-bg::before {
  content: none;
}

/* ニュース詳細の基本スタイル */
.news-detail-container {
    max-width: 1164px;
    margin: 0 auto 40px;
    padding: 0 32px ;
    background: #fff;
    display: flex;
    gap: 40px;
}

.news-detail-container #news-detail-content {
    flex: 1;
}

.news-detail-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.news-detail-sidebar-inner {
  top: 80px;
}

.news-detail-sidebar-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 20px 0;
  color: var(--primary-color);
  line-height: 1.4;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
}

.news-detail-sidebar-request {
  display: grid;
  gap: 10px;
}

.news-detail-sidebar-request li {
  margin: 0;
  line-height: 1;
}

.news-detail-sidebar-request button {
  width: 100%;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.news-detail-sidebar-request button:hover {
  opacity: 0.9;
}

.news-detail-sidebar-request button img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.news-detail-toc {
  background-color: #e6f0fe;
  padding: 20px;
  border-radius: 8px;
  margin-top: 40px;
}

.news-detail-toc h2 {
  margin: 0 0 10px !important;
  font-size: 1.2em !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.news-detail-toc ol {
  margin-top: 10px !important;
}

.news-detail-toc a:hover {
  text-decoration: none;
  color: var(--primary-color) !important;
}

/* 画像とテキストのレイアウトコンテナ */
.news-detail-container.news_image_right,
.news-detail-container.news_image_left {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin: 2em 0;
}

.news-detail-container.news_image_right {
    flex-direction: row;
}

.news-detail-container.news_image_left {
    flex-direction: row-reverse;
}

/* ニュース詳細のヘッダー部分 */
.news-detail-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 20px 0;
    color: var(--primary-color);
    line-height: 1.4;
}

@media (max-width: 767px) {

  .news-detail-container {
    flex-direction: column;
     gap: 20px;
  }

  .news-detail-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 600px) {
  .news-detail-title {
    font-size: 1.5em;
  }
}

.news-detail-date {
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.news-detail-categories {
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.news-detail-category {
    background: #e5e9f7;
    color: var(--primary-color);
    border-radius: 16px;
    padding: 4px 16px;
    font-size: 0.95em;
    display: inline-block;
}

/* ニュース詳細のコンテンツ部分 */
.news-detail-content-html {
    font-size: 17.6px;
    line-height: 2;
    color: var(--text-color);
    margin-bottom: 32px;
}

.news-detail-content-html .casestudy_subtitle {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3em;
    margin: 2em 0 1em 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.news-detail-content-html .casestudy_subtitle::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--btn-color-1);
    border-radius: 2px;
    margin-right: 0.5em;
}

/* テキスト左・画像右レイアウト */
.news_text_left,
.casestudy_text_left {
    flex: 1 1 50%;
    margin-left: 0px;
}

.news_image_right,
.casestudy_image_right {
    flex: 1 1 50%;
    max-width: none;
    width: 100%;
    height: auto;
    object-fit: contain;
    align-self: stretch;
    margin: 0;
    border-radius: 16px;
}

/* 画像左・テキスト右レイアウト */
.news_image_left,
.casestudy_image_left {
    flex: 1 1 50%;
    max-width: none;
    width: 100%;
    height: auto;
    object-fit: contain;
    align-self: stretch;
    margin: 0;
    border-radius: 16px;
}

.news_text_right,
.casestudy_text_right {
    flex: 1 1 50%;
    margin-right: 0px;
}

.news-detail-main {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
}

/* サブタイトル */
.news-detail-content-html .casestudy_subtitle,
.news-detail-content-html .news_subtitle {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3em;
    margin: 2em 0 1em 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.news-detail-content-html .casestudy_subtitle::before,
.news-detail-content-html .news_subtitle::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--btn-color-1);
    border-radius: 2px;
    margin-right: 0.5em;
}

/* 区切り線 */
.news_section_line,
.casestudy_section_line {
    height: 2px;
    width: 100%;
    background-color: #ccc;
    margin: 2em 0;
}

/* 戻るボタン */
.back-to-list-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.back-to-list-btn {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.75rem 2.5rem 0.75rem 2rem;
    background: #FF9F1C;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.back-to-list-btn:hover {
    background: #ffa933;
}

.back-to-list-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #222;
    border-radius: 50%;
    font-size: 1.3rem;
}

/* ローディング表示 */
.spinner {
    display: block !important;
    margin: 40px auto 16px auto;
    width: 48px;
    height: 48px;
    border: 5px solid #e5e9f7;
    border-top: 5px solid #2B30BB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    text-align: center;
    color: #2B30BB;
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.spinner-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {

    .news-detail-container.news_image_right,
    .news-detail-container.news_image_left {
        flex-direction: column;
        gap: 20px;
    }

    .news_text_left,
    .casestudy_text_left {
        padding-right: 0;
    }

    .news_image_right,
    .casestudy_image_right {
        margin: 1.5rem auto;
        max-width: 100%;
    }

    .news_text_right,
    .casestudy_text_right {
        padding-left: 0;
    }

    .news_image_left,
    .casestudy_image_left {
        margin: 1.5rem auto;
        max-width: 100%;
    }
}

.news_video {
    width: 100% !important;
}

/* WYSIWYGエディタコンテンツのスタイル */
.news-detail-content-html {
    font-size: 17.6px;
    line-height: 2;
    color: var(--text-color);
    margin-bottom: 32px;
}

/* 見出しのスタイル */
.news-detail-content-html h2 {
    margin: 2em 0 1em 0;
    font-size: 1.5em;
    line-height: 1.5;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 1px solid currentColor;
    padding-bottom: .3em;
}

@media (max-width: 600px) {
  .news-detail-content-html h2 {
    font-size: 1.3rem;
  }
}


.news-detail-content-html h3 {
    margin: 1.25em 0 0.5em 0;
    font-size: 1.25em;
    line-height: 1.5;
    font-weight: bold;
    color: var(--primary-color);
}

@media (max-width: 600px) {
  .news-detail-content-html h3 {
    font-size: 1.15em;
  }
}

/* 段落のスタイル */
.news-detail-content-html p {
    margin: 0.5em 0;
}

/* リストのスタイル */
.news-detail-content-html ul,
.news-detail-content-html ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

@media (max-width: 600px) {
  .news-detail-content-html ul,
  .news-detail-content-html ol {
    font-size: .85rem;
  }
}

.news-detail-content-html li {
    margin: 0.25em 0;
}

/* 画像のスタイル */
.news-detail-content-html img {
    max-width: 100%;
    width: 100%;
    height: auto;
    margin: 1em 0;
    object-fit: contain;
    border-radius: 8px;
}

/* 動画のスタイル */
.news-detail-content-html video {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 8px;
}

/* リンクのスタイル */
.news-detail-content-html a {
    color: #1976d2;
    text-decoration: underline;
}

.news-detail-content-html a:hover {
    color: #1565c0;
}

/* 区切り線のスタイル */
.news-detail-content-html hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1em 0;
}

/* 2分割レイアウトのスタイル */
.news-detail-content-html .two-column-layout {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
}

.news-detail-content-html .two-column-layout .column-left,
.news-detail-content-html .two-column-layout .column-right {
    flex: 1;
    min-width: 0;
}

.news-detail-content-html .two-column-layout .column-left {
    padding-right: 1rem;
}

.news-detail-content-html .two-column-layout .column-right {
    padding-left: 1rem;
}

.news-detail-content-html .two-column-layout p {
    margin: 0.5em 0;
}

.news-detail-content-html .highlight,
.news-detail-content-html p strong {
  background: linear-gradient(transparent 60%, rgb(255,230,00) 60%);
}

.news-detail-content-html a strong {
  background: none;
}


.news-detail-content-html table {
    margin: 20px 0;
    width: 100%;
    border-collapse: collapse;
    line-height: 1.5;
}

@media (max-width: 600px) {
  .news-detail-content-html table {
      font-size: .85rem;
  }

  .news-detail-content-html table.table-responsive,
  .news-detail-content-html table.table-responsive thead,
  .news-detail-content-html table.table-responsive tbody,
  .news-detail-content-html table.table-responsive th,
  .news-detail-content-html table.table-responsive td,
  .news-detail-content-html table.table-responsive tr {
    display: block;
    width: 100%;
  }
}

.news-detail-content-html table:first-child {
  margin-top: 0;
}

.news-detail-content-html table:last-child {
  margin-bottom: 0;
}


.news-detail-content-html table thead {
  background-color: #042772;
  color: #fff;
}

.news-detail-content-html table thead th {
  background-color: transparent;
}


.news-detail-content-html table th,
.news-detail-content-html table td {
  border: 1px solid #e5e9f7;
  padding: 8px 12px;
  text-align: left;
}

.news-detail-content-html table th {
  background-color: #eff5ff;
}

        
.news-detail-content-html ul,
.news-detail-content-html ol,
.wp-block-list {
  margin: 20px 0;
}

.news-detail-content-html ul:first-child,
.news-detail-content-html ol:first-child {
  margin-top: 0;
}

.news-detail-content-html ul:last-child,
.news-detail-content-html ol:last-child {
  margin-bottom: 0;
}

.news-detail-content-html ul ul, .news-detail-content-html ul ol,
.news-detail-content-html ol ul,
.news-detail-content-html ol ol,
.wp-block-list ul,
.wp-block-list ol {
  margin: 10px 0;
  padding-left: 20px;
}
.news-detail-content-html ul li,
.news-detail-content-html ol li,
.wp-block-list li {
  margin: 5px 0;
  line-height: 1.6;
  position: relative;
}

.news-detail-content-html ol,
ol.wp-block-list {
  counter-reset: list-item;
  list-style: none;
  padding-left: 25px;
}
.news-detail-content-html ol > li,
ol.wp-block-list > li {
  position: relative;
  counter-increment: list-item;
}
.news-detail-content-html ol > li::before,
ol.wp-block-list > li::before {
  position: absolute;
  content: counter(list-item) ".";
  left: -20px;
  text-align: right;
  color: #042772;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-weight: bold;
}

.news-detail-content-html ul,
ul.wp-block-list {
  padding-left: 20px;
}
.news-detail-content-html ul li::before,
ul.wp-block-list li::before {
  content: "•";
  position: absolute;
  color: #042772;
  left: -15px;
  text-align: right;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .news-detail-content-html .two-column-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .news-detail-content-html .two-column-layout .column-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 1rem;
    }

    .news-detail-content-html .two-column-layout .column-right {
        padding-left: 0;
        padding-top: 1rem;
    }
}

.tag-filter {
  background: #e6f0fe;
  border-radius: 8px;
  margin-bottom: 40px;
}

.tag-filter-header {
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1.4;
  color: #fff;
  background-color: var(--primary-color);
  padding: 8px;
}

.tag-filter-body {
  padding: 16px;
  background-color: #fff; 
}

.tag-filter-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.tag-filter-list li {

}

.tag-filter-list li a {
  display: inline-block;
  padding: 3px 16px;
  background: #e5e9f7;
  color: var(--primary-color);
  border-radius: 16px;
  font-size: 0.95em;
  text-decoration: none;
  transition: .2s background, .2s color;
  font-size: 14px;
}

.tag-filter-list li a:hover {
  background: var(--primary-color);
  color: #fff;
}

.tag-filter-title {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 28px;
  margin-bottom: 20px;
}

.tag-filter-title:empty {
  display: none;
}

.news-detail-tag {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.news-detail-tag a {
  background: #e5e9f7;
  color: var(--primary-color);
  border-radius: 16px;
  padding: 4px 16px;
  font-size: 0.95em;
  display: inline-block;
  transition: .2s background, .2s color;
}

.news-detail-tag a:hover {
  background: var(--primary-color);
  color: #fff;
}