/* =========================================================
   Landing System
   Web・システム開発ポートフォリオ
========================================================= */


/* =========================================================
   全体
========================================================= */

#works {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}


/* =========================================================
   クライアント選択
========================================================= */

.portfolio-client-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 auto 25px;
}

.portfolio-client-btn {
    padding: 12px 25px;

    background: #fff;
    border: 2px solid #d9d9d9;
    border-radius: 30px;

    color: #666;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.portfolio-client-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.portfolio-client-btn.active {
    background: #ff6fa5;
    border-color: #ff6fa5;
    color: #fff;

    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.25);
}

.portfolio-client-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.18);
}


/* =========================================================
   カテゴリー
========================================================= */

.portfolio-category-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    max-width: 1100px;
    margin: 0 auto 40px;
}

.portfolio-category-btn {
    padding: 9px 17px;

    background: #fff;
    border: 2px solid #d9d9d9;
    border-radius: 25px;

    color: #666;
    font-size: 14px;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.portfolio-category-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.portfolio-category-btn.active {
    background: #ff6fa5;
    border-color: #ff6fa5;
    color: #fff;
}

.portfolio-category-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.18);
}


/* =========================================================
   実績グリッド
========================================================= */

.portfolio-works-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 30px;

    width: 100%;
}


/* =========================================================
   実績カード
========================================================= */

.portfolio-work-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background: #fff;

    border-radius: 20px;
    overflow: hidden;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.portfolio-work-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   動画・画像
========================================================= */

.portfolio-media {
    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #f7f7f7;
}

.portfolio-media img,
.portfolio-media video {
    display: block;

    width: 100%;
    height: 100%;
}

.portfolio-media img {
    object-fit: contain;
}

.portfolio-media video {
    object-fit: cover;
}

.portfolio-video video {
    background: #111;
}

.portfolio-media[role="button"] {
    cursor: zoom-in;
}

.portfolio-media[role="button"]:focus-visible {
    outline: 3px solid #ff6fa5;
    outline-offset: -3px;
}

.portfolio-media-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 56px 24px 24px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.94);
}

.portfolio-media-viewer[hidden] {
    display: none;
}

.portfolio-media-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    min-height: 0;
}

.portfolio-media-viewer-image,
.portfolio-media-viewer-video {
    display: block;

    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;

    object-fit: contain;
}

.portfolio-media-viewer-close {
    position: absolute;
    top: 14px;
    right: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.4);
    color: #fff;

    font-size: 32px;
    line-height: 1;

    cursor: pointer;
}

body.portfolio-media-viewer-open {
    overflow: hidden;
}


/* 動画を少し見やすくする */

.portfolio-video {
    position: relative;
}

.portfolio-video::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 35%;

    pointer-events: none;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0.08)
    );
}


/* 画像がない場合 */

.portfolio-no-image {
    display: flex;
    align-items: center;
    justify-content: center;

    background: #f8f8f8;

    color: #aaa;
    font-size: 13px;
}


/* =========================================================
   カード本文
========================================================= */

.portfolio-work-content {
    padding: 24px;

    box-sizing: border-box;
}


/* =========================================================
   タイトル
========================================================= */

.portfolio-work-title {
    margin: 0 0 10px;

    color: #333;

    font-size: 21px;
    font-weight: 700;
    line-height: 1.55;
}


/* =========================================================
   料金
========================================================= */

.portfolio-price {
    margin: 0 0 18px;

    color: #666;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   技術・カテゴリータグ
========================================================= */

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 20px;
}

.portfolio-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    background: #fff2f6;
    border: 1px solid #f1ccd9;
    border-radius: 20px;

    color: #666;

    font-size: 12px;
    line-height: 1.3;
}


/* =========================================================
   納期・修正など
========================================================= */

.portfolio-info {
    margin: 0 0 20px;
    padding-top: 15px;

    border-top: 1px solid #eee;
}

.portfolio-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 8px;

    font-size: 13px;
    line-height: 1.5;
}

.portfolio-info-row:last-child {
    margin-bottom: 0;
}

.portfolio-info-row span {
    color: #888;
}

.portfolio-info-row strong {
    color: #333;
    font-weight: 700;
    text-align: right;
}


/* =========================================================
   詳しく見る
========================================================= */

.portfolio-button-area {
    display: flex;
    justify-content: center;

    margin-top: 20px;
}

.portfolio-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 145px;

    padding: 11px 24px;

    background: #333;
    border: 1px solid #333;
    border-radius: 50px;

    color: #fff !important;
    text-decoration: none !important;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.portfolio-detail-btn:hover {
    background: #ff6fa5;
    border-color: #ff6fa5;

    color: #fff !important;

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(255, 107, 157, 0.25);
}


/* =========================================================
   該当なし
========================================================= */

.portfolio-no-results {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    color: #777;

    font-size: 15px;
}


/* =========================================================
   タブレット
========================================================= */

@media screen and (max-width: 1000px) {

    .portfolio-works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

}


/* =========================================================
   スマートフォン
========================================================= */

@media screen and (max-width: 768px) {

    #works {
        padding: 10px 12px;
    }


    /* クライアント */

    .portfolio-client-buttons {
        gap: 8px;
        margin-bottom: 20px;
    }

    .portfolio-client-btn {
        padding: 10px 17px;

        font-size: 13px;
    }


    /* カテゴリー */

    .portfolio-category-buttons {
        justify-content: flex-start;

        flex-wrap: nowrap;

        overflow-x: auto;

        gap: 7px;

        margin-bottom: 28px;
        padding-bottom: 6px;

        -webkit-overflow-scrolling: touch;

        scrollbar-width: none;
    }

    .portfolio-category-buttons::-webkit-scrollbar {
        display: none;
    }

    .portfolio-category-btn {
        flex: 0 0 auto;

        padding: 8px 14px;

        font-size: 12px;
        white-space: nowrap;
    }


    /* グリッド */

    .portfolio-works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 14px;
    }


    /* カード */

    .portfolio-work-card {
        border-radius: 14px;
    }


    /* メディア */

    .portfolio-media {
        aspect-ratio: 4 / 3;
    }


    /* 本文 */

    .portfolio-work-content {
        padding: 12px;
    }


    /* タイトル */

    .portfolio-work-title {
        margin-bottom: 7px;

        font-size: 16px;
        line-height: 1.45;
    }


    /* 料金 */

    .portfolio-price {
        margin-bottom: 10px;

        font-size: 11px;
    }


    /* タグ */

    .portfolio-tags {
        gap: 4px;

        margin-bottom: 12px;
    }

    .portfolio-tag {
        padding: 3px 7px;

        font-size: 10px;
    }


    /* 情報 */

    .portfolio-info {
        margin-bottom: 12px;
        padding-top: 10px;
    }

    .portfolio-info-row {
        gap: 6px;

        margin-bottom: 5px;

        font-size: 10px;
    }


    /* ボタン */

    .portfolio-button-area {
        margin-top: 12px;
    }

    .portfolio-detail-btn {
        width: 100%;
        min-width: 0;

        padding: 9px 10px;

        font-size: 11px;
    }

}


/* =========================================================
   小さいスマホ
========================================================= */

@media screen and (max-width: 450px) {

    .portfolio-works-grid {
        gap: 10px;
    }

    .portfolio-work-content {
        padding: 10px;
    }

    .portfolio-work-title {
        font-size: 15px;
    }

    .portfolio-tag {
        font-size: 9px;
    }

    .portfolio-info-row {
        font-size: 9px;
    }

}


/* =========================================================
   アニメーション
========================================================= */

.portfolio-work-card {
    animation: portfolioFadeUp 0.5s ease both;
}

@keyframes portfolioFadeUp {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.portfolio-detail-page {
    width: 100%;
    padding: 28px 20px 80px;
    box-sizing: border-box;
    background: #faf8f9;
}

.portfolio-detail-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.portfolio-detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: #777;
    font-size: 13px;
}

.portfolio-detail-breadcrumb a {
    color: #c94f7e;
    text-decoration: none;
}

.portfolio-detail-header {
    margin: 0 auto 32px;
    text-align: center;
}

.portfolio-detail-eyebrow {
    margin: 0 0 10px;
    color: #c94f7e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.portfolio-detail-header h1 {
    margin: 0 0 16px;
    color: #28242a;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.4;
}

.portfolio-detail-lead {
    max-width: 760px;
    margin: 0 auto;
    color: #5d5860;
    font-size: 17px;
    line-height: 1.9;
}

.portfolio-detail-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    max-height: 680px;
    margin: 0 0 36px;
    overflow: hidden;
    border-radius: 16px;
    background: #181619;
    box-shadow: 0 14px 38px rgba(38, 26, 34, 0.12);
}

.portfolio-detail-visual img,
.portfolio-detail-visual video {
    display: block;
    width: 100%;
    max-height: 680px;
    object-fit: contain;
}

.portfolio-detail-content {
    max-width: 860px;
    margin: 0 auto;
}

.portfolio-detail-section {
    margin-bottom: 28px;
    padding: 26px 30px;
    border: 1px solid #eee7eb;
    border-radius: 14px;
    background: #fff;
}

.portfolio-detail-section h2 {
    margin: 0 0 14px;
    color: #342b32;
    font-size: 20px;
    line-height: 1.5;
}

.portfolio-detail-section p {
    margin: 0;
    color: #55505a;
    font-size: 15px;
    line-height: 1.9;
    text-align: left;
}

.portfolio-detail-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portfolio-detail-tools li {
    padding: 7px 12px;
    border: 1px solid #f0cbd9;
    border-radius: 20px;
    background: #fff4f8;
    color: #684255;
    font-size: 13px;
    font-weight: 600;
}

.portfolio-detail-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.portfolio-detail-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0 0;
}

.portfolio-detail-back,
.portfolio-detail-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid #c94f7e;
    border-radius: 24px;
    color: #c94f7e;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.portfolio-detail-contact {
    background: #c94f7e;
    color: #fff;
}

.portfolio-detail-back:hover,
.portfolio-detail-contact:hover {
    opacity: 0.82;
    color: inherit;
}

@media screen and (max-width: 640px) {
    .portfolio-detail-page {
        padding: 20px 14px 56px;
    }

    .portfolio-detail-breadcrumb {
        margin-bottom: 22px;
        font-size: 11px;
    }

    .portfolio-detail-header {
        margin-bottom: 24px;
    }

    .portfolio-detail-lead {
        font-size: 15px;
    }

    .portfolio-detail-visual {
        min-height: 180px;
        margin-bottom: 24px;
        border-radius: 10px;
    }

    .portfolio-detail-section {
        margin-bottom: 16px;
        padding: 20px;
    }

    .portfolio-detail-section h2 {
        font-size: 18px;
    }

    .portfolio-detail-section p {
        font-size: 14px;
    }

    .portfolio-detail-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .portfolio-detail-actions {
        flex-direction: column;
    }

    .portfolio-detail-back,
    .portfolio-detail-contact {
        width: 100%;
        box-sizing: border-box;
    }
}