/* =========================================
   MFDCO 提供作品ページ
========================================= */


/* =========================================
   ページ
========================================= */

.works-page {
    min-height: 100vh;
    padding: 110px 20px 100px;
    background: #ffffff;
}

.works-page > section {
    width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
}


/* =========================================
   ヒーロー
========================================= */

.works-hero {
    margin-bottom: 55px;
}

.page-number {
    margin: 0 0 10px;

    color: #315c5b;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.14em;
}

.works-hero h1 {
    margin: 0 0 18px;

    color: #111111;

    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.1;
}

.works-introduction {
    margin: 0;

    color: #666666;

    font-size: 15px;
    line-height: 1.9;
}


/* =========================================
   検索・絞り込み
========================================= */

.works-controls {
    margin-bottom: 35px;

    padding: 28px;

    border: 1px solid #dddddd;
    border-radius: 12px;

    background: #ffffff;
}


/* =========================================
   上段
========================================= */

.controls-top {
    display: grid;

    grid-template-columns: 1fr 220px;

    gap: 20px;

    margin-bottom: 28px;
}


/* =========================================
   ラベル
========================================= */

.search-box label,
.sort-box label,
.filter-heading label {
    display: block;

    margin-bottom: 9px;

    color: #222222;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================
   検索
========================================= */

.search-input-wrap {
    position: relative;
}

.search-icon {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 15px;

    pointer-events: none;
}

.search-input-wrap input {
    width: 100%;

    box-sizing: border-box;

    padding: 14px 15px 14px 42px;

    border: 1px solid #cccccc;
    border-radius: 7px;

    background: #ffffff;

    color: #111111;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.search-input-wrap input:focus {
    border-color: #315c5b;

    box-shadow:
        0 0 0 3px rgba(49, 92, 91, 0.1);
}


/* =========================================
   並べ替え
========================================= */

.sort-box select {
    width: 100%;

    box-sizing: border-box;

    padding: 14px 12px;

    border: 1px solid #cccccc;
    border-radius: 7px;

    background: #ffffff;

    color: #333333;

    font-family: inherit;
    font-size: 14px;

    cursor: pointer;

    outline: none;
}

.sort-box select:focus {
    border-color: #315c5b;
}


/* =========================================
   タグ
========================================= */

.filter-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
}

.filter-heading label {
    margin-bottom: 0;
}

.clear-button {
    padding: 0;

    border: none;

    background: transparent;

    color: #315c5b;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.clear-button:hover {
    opacity: 0.65;
}


.tag-filters {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.filter-tag {
    padding: 7px 12px;

    border: 1px solid #cccccc;
    border-radius: 999px;

    background: #ffffff;

    color: #444444;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;

    transition:
        background-color 0.2s,
        border-color 0.2s,
        color 0.2s;
}

.filter-tag:hover {
    border-color: #315c5b;
}

.filter-tag.active {
    border-color: #315c5b;

    background: #315c5b;

    color: #ffffff;
}


/* =========================================
   選択中フィルター
========================================= */

.active-filters {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid #eeeeee;
}

.active-label {
    color: #777777;

    font-size: 12px;
}

.active-filter-list {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}

.active-filter {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 5px 9px;

    border-radius: 5px;

    background: #eef3f2;

    color: #315c5b;

    font-size: 12px;
}

.active-filter button {
    width: 17px;
    height: 17px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: transparent;

    color: #315c5b;

    font-size: 14px;

    line-height: 1;

    cursor: pointer;
}


/* =========================================
   提供バナー
========================================= */

.submit-work-banner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 70px;

    padding: 32px 35px;

    border-radius: 12px;

    background: #315c5b;

    color: #ffffff;
}

.submit-work-text {
    min-width: 0;
}

.submit-work-label {
    margin: 0 0 8px;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.14em;

    opacity: 0.75;
}

.submit-work-banner h2 {
    margin: 0 0 8px;

    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.4;
}

.submit-work-banner p:last-child {
    margin: 0;

    font-size: 13px;
    line-height: 1.7;

    opacity: 0.85;
}


/* =========================================
   提供ボタン
========================================= */

.submit-work-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    gap: 18px;

    min-height: 56px;

    padding: 0 25px;

    border-radius: 7px;

    background: #ffffff;

    color: #315c5b;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    transition:
        transform 0.2s,
        opacity 0.2s;
}

.submit-work-button:hover {
    transform: translateY(-2px);

    opacity: 0.9;
}

.button-arrow {
    font-size: 20px;

    line-height: 1;
}


/* =========================================
   作品セクション
========================================= */

.works-section {
    margin-top: 0;
}

.works-section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 25px;
}

.section-number {
    margin: 0 0 7px;

    color: #315c5b;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.13em;
}

.works-section-heading h2 {
    margin: 0;

    color: #111111;

    font-size: 32px;
}

.works-count {
    margin: 0;

    color: #777777;

    font-size: 13px;
}


/* =========================================
   グリッド
========================================= */

.works-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;
}


/* =========================================
   作品カード
========================================= */

.work-card {
    overflow: hidden;

    border: 1px solid #dddddd;
    border-radius: 12px;

    background: #ffffff;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.work-card:hover {
    transform: translateY(-5px);

    border-color: #c5d2d1;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================
   画像
========================================= */

.work-card-image {
    position: relative;

    width: 100%;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #eeeeee;
}

.work-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.4s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.035);
}


/* =========================================
   カード本文
========================================= */

.work-card-body {
    padding: 22px;
}

.work-card-title {
    margin: 0 0 9px;

    color: #111111;

    font-size: 20px;
    line-height: 1.4;
}

.work-card-author {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 14px;

    color: #315c5b;

    font-size: 13px;
    font-weight: 700;
}

.work-card-author-icon {
    display: block;

    width: 28px !important;
    height: 28px !important;

    min-width: 28px;
    max-width: 28px;

    min-height: 28px;
    max-height: 28px;

    flex: 0 0 28px;

    border-radius: 50%;

    object-fit: cover;

    background: #eeeeee;
}

.work-card-description {
    display: -webkit-box;

    overflow: hidden;

    margin: 0 0 16px;

    color: #666666;

    font-size: 13px;
    line-height: 1.75;

    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* =========================================
   タグ
========================================= */

.work-card-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 5px;
}

.work-card-tag {
    padding: 4px 8px;

    border-radius: 4px;

    background: #eef3f2;

    color: #315c5b;

    font-size: 10px;
    font-weight: 700;
}

.work-card-tag-more {
    padding: 4px 8px;

    color: #888888;

    font-size: 10px;
}


/* =========================================
   カード下部
========================================= */

.work-card-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 18px;
    padding-top: 15px;

    border-top: 1px solid #eeeeee;
}

.work-card-date {
    color: #999999;

    font-size: 11px;
}

.work-card-detail {
    color: #315c5b;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================
   メッセージ
========================================= */

.works-message {
    padding: 60px 20px;

    border: 1px solid #eeeeee;
    border-radius: 12px;

    background: #fafafa;

    text-align: center;
}

.works-message h3 {
    margin: 0 0 10px;

    color: #222222;

    font-size: 19px;
}

.works-message p {
    margin: 0;

    color: #777777;

    font-size: 13px;
    line-height: 1.7;
}

.works-message.error {
    border-color: #ead0d0;

    background: #fff8f8;
}

.works-message.error h3 {
    color: #8d3030;
}


/* =========================================
   ローディング
========================================= */

.loading-spinner {
    width: 30px;
    height: 30px;

    margin: 0 auto 15px;

    border: 3px solid #dddddd;

    border-top-color: #315c5b;

    border-radius: 50%;

    animation:
        works-spin 0.8s linear infinite;
}

@keyframes works-spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================
   非表示
========================================= */

.hidden {
    display: none !important;
}


/* =========================================
   タブレット
========================================= */

@media (max-width: 950px) {

    .works-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 22px;
    }

}


/* =========================================
   スマートフォン
========================================= */

@media (max-width: 700px) {

    .works-page {
        padding: 85px 15px 70px;
    }


    .works-hero {
        margin-bottom: 35px;
    }


    .works-controls {
        padding: 20px;
    }


    .controls-top {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .submit-work-banner {
        flex-direction: column;

        align-items: stretch;

        margin-bottom: 50px;

        padding: 25px 22px;
    }


    .submit-work-button {
        width: 100%;
    }


    .works-section-heading {
        align-items: flex-start;

        gap: 15px;
    }


    .works-section-heading h2 {
        font-size: 26px;
    }


    .works-grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }


    .work-card-body {
        padding: 20px;
    }

}