@charset "UTF-8";


.case-category {
    background-color: var(--bg-secondary);
}

.case-category__inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 40px;
}

.case-category__content {
    margin-top: 53px;
}
.case-category__list {
    /* display: flex;
    flex-wrap: wrap;
    gap: min(24 / 1280 * 100vw, 24px); */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
    gap: 24px;
}


/* .case-category__item {
    flex: 0 1 calc((100% - min(24 / 1280 * 100vw, 24px) * 2) / 3);
} */
.case-category__item-btn {
    max-width: none;
    border-radius: 50px;
    padding: 40px 20px;
    font-size: clamp(14 / 16 * 1rem, 20 / 1280 * 100vw, 20 / 16 * 1rem);
}
@media screen and (max-width: 767px) {
    .case-category__inner {
        padding-bottom: 60px;
    }
    .case-category__content {
        margin-top: 40px;
    }
    .case-category__list {
        grid-template-columns:1fr;
        gap: 12px;
    }
    /* .case-category__item {
      flex: 0 1 calc((100% - 10px * 2) / 3);
    } */
    .case-category__item-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 10px 0;
        font-size: min(12 / 375 * 100vw, 14 / 16 * 1rem);
    }
}

.case__inner{
    padding: 80px 40px;
}

.case__cards {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); */
    grid-template-columns: repeat(4, 1fr); /* 固定で最大4列 */
    gap: 25px;
}

.case__card{
    width: 100%;
}

@media (max-width: 1024px) {
    .case__cards {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  @media (max-width: 768px) {
    .case__cards {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 480px) {
    .case__cards {
      grid-template-columns: repeat(1, 1fr);
    }
  }
  
.ba-label {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.03em;
    padding: 2px 5px;
    display: inline-block;
    top:2px;
    left:2px;
    z-index: 1;
}

.ba-label.ba-label--before {
    background-color: var(--color-white);
    color: var(--text-color);
}

.ba-label.ba-label--after {
    background: var(--color-primary);
    color: var(--color-white);
}

.ba-image {
    position: relative;
    width: 100%;
    aspect-ratio: 276 / 175;
    overflow: hidden;
}

.ba-image.ba-image--before{
    background-color: #EFEFEF;
}

.ba-image.ba-image--after{
    background-color: #D9D9D9;
}

.ba-image img {
    display: block; 
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case__card-category {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--color-primary);
    margin-top: 10px;
}

.case__card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    margin-top: 5px;
}

.case__card-name{
    border-right: 1px solid #B4B4B4;
    min-width: 75px;
}
.case__card-name,
.case__card-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    padding: 0 10px;
}

@media screen and (max-width: 937px) {
    .case__card{
        width: 100%;
    }
}
#case-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.case-modal__container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: visible;
}

.case-modal__content {
    background: var(--bg-secondary);
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
}

.case-modal__close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgba(217, 217, 217, 0.5);
    color: var(--color-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    z-index: 10000;
}

.case-detail {
    color: #333;
}
.case-detail__grid {
    display: flex;
    gap: 30px;
}

.case-detail__left{
    width: 43%;
}

.case-detail__right {
    flex: 1;
}

.case-detail__heading {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
}

.case-detail__text{
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.03em;
    margin-top: 10px;
}

.case-detail__info-table {
    display: flex;
    margin-top: 20px;
}

.case-detail__info-table + .case-detail__info-table{
    margin-top: 10px;
}

.case-detail__info-label {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.1em;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-detail__info-value {
    background: var(--color-white);
    padding: 10px;
    flex: 1;
}

.case-detail__side-effect-title{
    background-color: #EAEED6;
    padding: 5px 10px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.6;
    margin-top: 30px;
}

.case-detail__side-effect{
    background-color: var(--color-white);
    padding: 20px;
}

.case-detail__side-effect h4{
    color: var(--text-color);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    padding-bottom: 5px;
    border-bottom: 1px solid #E6E6E6;
}

.case-detail__side-effect p{
    color: var(--text-color);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    margin-top: 5px;
}

.case-detail__side-effect h4:not(:first-of-type){
    margin-top: 10px;
}

@media screen and (max-width: 767px) {
    .case-detail__left{
        width: 100%;
    }
    .case-detail__grid {
        flex-direction: column-reverse;
    }
}