body {
    background-color: var(--color-light-brown);
}

.program-section-title-group {
    display: flex;
    gap: 0 0.5rem;
    align-items: baseline;
    padding-bottom: 0.625rem;
    margin-bottom: 0.625rem;
    border-bottom: 1px solid var(--color-dark-brown);

    @media (width >= 768px) {
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .main-title {
        font-size: var(--text-en-32);

        @media (width >= 768px) {
            font-size: var(--text-en-24);
        }
    }

    .sub-title {
        font-size: var(--text-ja-13);
        
        @media (width >= 768px) {
            font-size: var(--text-ja-15);
        }
    }
}

.program-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;

    @media (width >= 768px) {
        margin-bottom: 10rem;
    }
}

.sort-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 2.5rem;

    @media (width >= 768px) {
        gap: 1.25rem;
    }
}

.sort-button {
    padding: 0.375rem 1rem;
    font-size: var(--text-ja-13);
    color: var(--color-dark-brown);
    background-color: transparent;
    border: 1px solid var(--color-dark-brown);
    border-radius: 2rem;

    @media (width >= 768px) {
        padding: 0.5rem 1.25rem;
        font-size: var(--text-ja-16);
    }

    &.active {
        color: var(--color-light-brown);
        background-color: var(--color-dark-brown);
    }
}


.program-card-image {
    height: auto;
}

.program-card {
    display: block;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    cursor: pointer;

    @media (width >= 768px) {
        display: block;
        grid-template:
        'thumbnail' 500px
        'title'
        'description'
        'rate' / 1fr;
    }
}

.program-card-title {
    margin-top: 1rem;
}

.program-card-rate-container {
    margin-top: 0.4375rem;

    .label {
        text-align: left;
    }
}

.modal-section {
    position: fixed;
    inset: 0;
    z-index: -1;
    visibility: hidden;
    opacity: 0;
    transition: backdrop-filter 0.3s ease;

    &.show {
        z-index: 200;
        visibility: visible;
        opacity: 1;
    }
}

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgb(35 24 21 / 50%);
    backdrop-filter: blur(10px);
}

.modal-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1.75rem;
}

.modal-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
    overflow: hidden;
    background-color: var(--color-white);
    border-radius: 20px;

    @media (width >= 768px) {
        max-width: 1000px;
    }

    .program-card-body-container {
        display: flex;
        align-items: end;
        justify-content: space-between;
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
        border-bottom: 1px solid var(--color-dark-brown);

        @media (width >= 768px) {
            padding-bottom: 2.5rem;
            margin-bottom: 2.5rem;
        }
    }

    .program-card-rate-container {
        .label {
            width: 3rem;
            font-size: var(--text-ja-13);

            @media (width >= 768px) {
                width: 4.375rem;
                font-size: var(--text-ja-16);
            }
       }

       .program-card-rate-wrapper {
            gap: 1px;

            img {
                width: 13px;

                @media (width >= 768px) {
                    width: 16px;
                }
            }
       }
    }

    .program-card-rate-item {
        gap: 2px;
    }
}

.modal-group {
    @media (width >= 768px) {
        display: flex;
        width: 1280px;
        max-width: 100%;
    }
}

.modal-image {
    @media (width >= 768px) {
        width: 50%;
    }

    img {
        display: block;
        max-width: 100%;
        height: auto;
        max-height: 400px;

        @media (width >= 768px) {
            width: 100%;
            max-height: none;
        }
    }
}

.modal-information {
    position: relative;
    padding: 2.5rem;

    @media (width >= 768px) {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50%;
    }

}

.modal-information-inner {
    @media (width >= 768px) {
        width: 320px;
        max-width: 100%;
    }
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.5rem;
    cursor: pointer;

    @media (width >= 768px) {
        top: 1.5rem;
        right: 1.5rem;
        width: 2rem;
    }

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

.modal-information-title {
    font-size: var(--text-ja-24);
}

.modal-information-subtitle {
    font-size: var(--text-en-16);

    @media (width >= 768px) {
        margin-bottom: 2.25rem;
        font-size: var(--text-en-13);
    }
}

.modal-information-note {
    margin-bottom: 0.625rem;
    font-size: var(--text-ja-13);

    @media (width >= 768px) {
        margin-bottom: 1.25rem;
        font-size: var(--text-ja-15);
    }
}

.modal-information-cat {
    display: flex;
    gap: 0.3125rem;
    align-items: center;
    font-size: var(--text-ja-13);

    @media (width >= 768px) {
        font-size: var(--text-ja-15);
    }

    .cat-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3125rem;
        align-items: center;
    }

    .cat-item {
        padding: 0.25rem 0.4375rem;
        border: 1px solid var(--color-dark-brown);
        border-radius: 2rem;
    }
}

.program-card-ja-label,.program-card-tag-container,.program-card-modal-image {
    display: none;
}

.pagination{
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 30px 0 80px;

    @media (width >= 768px) {
        gap: 32px;
        margin: 60px 0 160px;
    }

    .page-numbers{
        display: inline-block;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        font-size: var(--text-ja-10);
        color: var(--color-dark-brown);
        letter-spacing: 0.06em;
        border: 1px solid var(--color-dark-brown);
        border-radius: 50%;

        @media (width >= 768px) {
            width: 40px;
            height: 40px;
            font-size: var(--text-ja-13);
        }
    }

    .dots{
        width: auto;
        border: none;
    }

    .current{
        color: var(--color-white);
        background:var(--color-dark-brown) ;
    }

    .next, .prev{
        width: 12px;
        height: 15px;
        font-size: 0;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100% auto;
        border: none;
    }

    .next{
        background-image: url("../img/topic-next.svg");
    }

    .prev{
        background-image: url("../img/topic-prev.svg");
    }
}
