.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
    margin-bottom: 160px;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    color: #444;
    /* Montserrat */
    font-family: Montserrat;
    font-size: 18px;
    font-style: normal;
    line-height: 110%;
    font-weight: 700;
}

.page-number.active {
    background: #333;
    color: white;
}

.prev-page,
.next-page {
    padding: 8px 16px;
    border-radius: 25px;
    border: 1.5px solid var(--txt, #444);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: none;
    cursor: pointer;
    color: #444;
    font-family: Montserrat;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 34px */
    letter-spacing: 2px;
}
.prev-page::before{
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #444;
    border-left: 2px solid #444;
    transform: rotate(-45deg);
}
.next-page::after{
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #444;
    border-right: 2px solid #444;
    transform: rotate(45deg);
}
.prev-page:disabled,
.next-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media screen and (max-width: 768px) {
    .pagination {
        margin-bottom: 80px;
    }
    .page-number{
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .prev-page,
    .next-page {
        padding: 4px 8px;
        font-size: 14px;
    }
    .ellipsis{
        padding: 4px 8px;
    }
}

#case .title{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 120px;
}
#case .title::before{
    content: '';
    display: block;
    width: 56px;
    aspect-ratio: 1/1;
    background-image: url(../images/case/title-star.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
#case .title h2{
    color: #444;
    /* Noto Sans_H1 */
    font-family: "Noto Sans";
    font-size: clamp(1.5rem, 1.227rem + 1.17vw, 2.625rem);
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 71.4px */
    letter-spacing: 4.2px;
}
#case .title span{
    color:#E0B90B;
    text-align: center;
    /* Montserrat */
    font-family: Montserrat;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 34px */
    letter-spacing: 2px;
}
.category-list{
    width: 80%;
    max-width: 1080px;
    margin: 0 auto 40px;
}
.category-list h3{
    color: #444;
    /* Noto Sans_H3 */
    font-family: "Noto Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 40.8px */
    letter-spacing: 2.4px;
    margin-bottom: 16px;
}
.category-list-flex{
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: center;
    gap: 16px;
}
.category-list a{
    color: #444;
    /* Noto Sans_p */
    font-family: "Noto Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 27.2px */
    letter-spacing: 1.6px;
    
    width: fit-content;
    display: flex;
    padding: 4px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 21.5px;
    border: 1.5px solid #444;
}
@media screen and (max-width: 768px) {
    .category-list-flex{
        gap: 8px;
    }
    .category-list{
        margin-top: 32px;
        margin-bottom: 40px;
    }
    .category-list h3{
        font-size: 20px;
        margin: 0 0 16px;
    }
    .category-list a{
        padding: 0 10px;
    }
}

.case-list{
    width: 80%;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}
.case-item{
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}
.case-item img{
    width: 100%;
    aspect-ratio: 580/280;
    object-fit: cover;
}
.case-facility{
    display: none;
}
.case-facility p{
    color: #F4F7F8;
    font-family: "Noto Sans";
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 24.684px */
    letter-spacing: 1.452px;
}
.case-text{
    padding:16px 24px;
}
.case-title{
    color: #444;
    /* Noto Sans_H3 */
    font-family: "Noto Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 40.8px */
    letter-spacing: 2.4px;
}
.case-category{
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: left;
    flex-wrap: wrap;
}
.case-category:has(.case-category-item){
    margin: 16px 0 8px;
}
.case-category-item{
    display: flex;
    justify-content: center;
    align-items: center;
    padding:4px 16px;
    border-radius: 13px;
    background: #444;
    color: #F4F7F8;
    font-family: "Noto Sans";
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 16.456px */
    letter-spacing: 0.968px;
    white-space: nowrap;
}
.case-text > p{
    display: flex;
    justify-content: right;
    align-items: center;
    color: #D06135;
    /* Noto Sans_p */
    font-family: "Noto Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 27.2px */
    letter-spacing: 1.6px;
}
.case-text > p::after{
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #D06135;
    border-right: 2px solid #D06135;
    transform: rotate(45deg);
}
@media screen and (max-width: 768px) {
    .case-list{
        grid-template-columns: repeat(1, 1fr);
    }
}
/* 既存のCSSに追加 */
.ellipsis {
    padding: 8px 12px;
    color: #444;
    font-weight: bold;
}

/* エディタ用のスタイル */
.dialogue-block-editor .dialogue-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.dialogue-block-editor .dialogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dialogue-block-editor .dialogue-content {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
}

.dialogue-block-editor .dialogue-image {
    grid-column: 1;
}

.dialogue-block-editor .dialogue-details {
    grid-column: 2;
}

/* single-case.php用のスタイル */
main.single-case{
    padding-top: 36px;
    width: 80%;
    max-width: 1080px;
    margin: 0 auto;
}
main.single-case > span{
    color:#E0B90B;
    text-align: center;
    /* Noto Sans_H3 */
    font-family: "Noto Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 40.8px */
    letter-spacing: 2.4px;
    display: block;
    margin: 0 auto;
}
main.single-case > h1{
    color: #444;
    text-align: center;
    /* Noto Sans_H2 */
    font-family: "Noto Sans";
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 54.4px */
    letter-spacing: 3.2px;
    margin-bottom:32px ;
}
.single-case-thumbnail{
    width: 100%;
}
main.single-case h2{
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 32px;
    color: #444;
    text-align: center;
    /* Noto Sans_H3 */
    font-family: "Noto Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 40.8px */
    letter-spacing: 2.4px;
    background: #EAEAEA;
    margin: 64px 0 24px;

}
main.single-case h2::before{
    content: '';
    display: block;
    width: 10px;
    height: 74px;
    background: #E0B90B;
}
main.single-case h3{
    width: fit-content;
    white-space: nowrap;
    color: #F4F7F8;
    /* Noto Sans_H3 */
    font-family: "Noto Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 40.8px */
    letter-spacing: 2.4px;
    padding: 8px 24px;
    border-radius: 28px;
    background: #444;
    margin-bottom: 24px;
}
.case-dialogues {
    width: 100%;
}

.dialogue-item {
    display: flex;
    align-items: start;
    gap: 28px;
    margin-bottom: 32px;
    border-radius: 10px;
}

.dialogue-icon {
    width: 100px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dialogue-icon img{
    width: 100%;
    object-fit: cover;
    object-position: center;
}
.dialogue-icon.speaker-1{
    border: 4px solid #D06135;
}
.dialogue-icon.speaker-2{
    border: 4px solid #E0B90B;
}

.dialogue-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}


.dialogue-name {
    display: block;
    width: fit-content;
    color: #F4F7F8;
    /* Noto Sans_p */
    font-family: "Noto Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 27.2px */
    letter-spacing: 1.6px;
    padding: 0 4px;
}
.dialogue-name.speaker-1{
    background-color: #D06135;
    letter-spacing: 0;
}
.dialogue-name.speaker-2{
    background-color: #E0B90B;
    letter-spacing: 0;
}

.dialogue-text {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
}


.breadcrumbs {
    padding: 100px 0 15px;
}

.breadcrumbs .inner {
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumbs ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    color: #444;
    font-size: 16px;
    font-family: "Noto Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 27.2px */
    letter-spacing: 1.6px;
}
.breadcrumbs li:last-of-type{
    color: #E0B90B;
}

.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: #666;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}
.back-to-case{
    width: fit-content;
    height: 50px;
    padding: 8px 32px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 25px;
    border: 1.5px solid #444;
    margin: 120px auto ;
}
.back-to-case p{
    color:  #444;
    font-family: Montserrat;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 34px */
    letter-spacing: 2px;
}
.back-to-case::before{
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid #444;
    border-left: 2px solid #444;
    transform: rotate(-45deg);
}
@media screen and (max-width: 768px) {
    .back-to-case{
        margin: 80px auto ;
    }
    .breadcrumbs .inner{
        width: 90%;
    }
    main.single-case{
        width: 90%;
    }

    .dialogue-item{
        gap: 8px;
    }
    .dialogue-icon{
        width: 60px;
    }
    .dialogue-icon img {
        width: 100%;
        height: 100%;
        margin-bottom: 0;
    }
}

/* ========================================
   単一記事ページ（single-casestudy）のスタイル
======================================== */

.casestudy-container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ヘッダー部分 */
.casestudy-header {
    text-align: center;
    margin-bottom: 40px;
}

.casestudy-title {
    text-align: left;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.casestudy-subtitle {
    text-align: left;
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* 企業情報 */
.company-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.company-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    padding-left: 12px;
}

.company-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item .label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.info-item .value {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.info-item .value a {
    color: #007bff;
    text-decoration: none;
}

.info-item .value a:hover {
    text-decoration: underline;
}

/* メイン画像 */
.casestudy-main-image {
    margin-bottom: 40px;
    text-align: center;
}

.main-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Before/After セクション */
.before-after-section {
    margin-bottom: 40px;
}

.before-after-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: start;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
}

.before-section {
    background: #D9D9D9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.after-section {
    background: #DCEAF7;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.before-section h3 {
    color: #515161;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
}

.after-section h3 {
    color: #3C8FE3;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
}

.before-items,
.after-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.before-item,
.after-item {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.before-item {
    color: #515161;
}

.after-item {
    color: #3C8FE3;
}

.arrow-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.arrow {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    width: 50px;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ポイントセクション */
.points-section {
    margin-bottom: 40px;
}

.points-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.point-item {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: transform 0.2s ease;
}

.point-item:hover {
    transform: translateY(-2px);
}

/* 詳細セクション */
.detail-section {
    margin-bottom: 30px;
    overflow: hidden;
}

.detail-section h3 {
    background: #3C8FE3;
    width: fit-content;
    color: #fff;
    font-size: 16px;
    display: flex;
    padding: 5px 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}
.detail-section h4 {
    color: var(--, #515161);
    /* H2 */
    font-family: "Noto Sans JP";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 1.44px;
    border-bottom: 1px solid #515161;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.detail-content {
    color: var(--, #515161);
    /* P */
    font-family: "Noto Sans JP";
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.96px;
}

/* コンテンツ */
.casestudy-content {
    margin-bottom: 40px;
    line-height: 1.8;
    color: #333;
}

.casestudy-content p {
    margin-bottom: 16px;
}

.casestudy-content h2,
.casestudy-content h3,
.casestudy-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}
/* ナビゲーション - 水平タブスタイル */
.casestudy-nav {
    margin-bottom: 40px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.casestudy-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #dee2e6;
}

.casestudy-nav li {
    margin: 0;
    flex: 1;
}

.casestudy-nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #3C8FE3;
    padding: 15px 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    background: #DCEAF7;
    margin-bottom: -1px;
    transition: all 0.3s ease;
    position: relative;
}
.casestudy-nav a::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #3C8FE3;
    border-right: 2px solid #3C8FE3;
    transform: rotate(135deg);
}


.casestudy-nav a:hover {
    background: #e9ecef;
    color: #495057;
    border-bottom-color: #fff;
    z-index: 1;
}

.casestudy-nav a:focus,
.casestudy-nav a:active,
.casestudy-nav a.active {
    background: #ffffff;
    color: #007bff;
    border-bottom-color: #fff;
    z-index: 1;
    font-weight: 600;
}

/* 詳細セクション追加スタイル */
.detail-section {
    scroll-margin-top: 20px; /* アンカーリンク時の上部余白 */
}

/* 戻るリンク */
.back-to-list {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.back-to-casestudy {
    display: inline-block;
    background: #007bff;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.back-to-casestudy:hover {
    background: #0056b3;
    color: #ffffff;
}

.back-to-casestudy p {
    margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .casestudy-container{
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .single-casestudy {
        padding: 20px 15px;
    }
    
    .casestudy-title {
        font-size: 24px;
    }
    
    .before-after-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .company-info-grid {
        grid-template-columns: 1fr;
    }
    
    .casestudy-nav ul {
        flex-direction: column;
    }
    
    .casestudy-nav li {
        flex: none;
    }
    
    .casestudy-nav a {
        border-left: 1px solid #dee2e6 !important;
        border-right: 1px solid #dee2e6;
        margin-bottom: 0;
    }
    
    .casestudy-nav li:not(:last-child) a {
        border-bottom: none;
    }
}