/**
 * 実績ページ専用CSS
 *
 * @package promost
 */

/* ==========================================================================
   共通
   ========================================================================== */

.works-archive,
.works-single {
    padding-bottom: 4rem;
}

/* ==========================================================================
   カテゴリーフィルター
   ========================================================================== */

.works-filter {
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.works-filter__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.works-filter__item a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid #ffa501;
    border-radius: 30px;
    color: #ffa501;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.works-filter__item a:hover,
.works-filter__item--active a {
    background-color: #ffa501;
    color: #fff;
}

/* ==========================================================================
   カードグリッド（アーカイブ）
   ========================================================================== */

.works-archive {
    padding-top: 2rem;
}

.works-grid {
    margin-bottom: 2rem;
}

.works-card {
    margin-bottom: 2rem;
}

.works-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.works-card__link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.works-card__thumbnail {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2アスペクト比 */
    overflow: hidden;
}

.works-card__thumbnail img,
.works-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.works-card__link:hover .works-card__image {
    transform: scale(1.05);
}

.works-card__no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
}

.works-card__body {
    padding: 1rem 1.25rem;
}

.works-card__title {
    font-size: 1.08rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    color: #333;
}

.works-card__categories {
    margin-bottom: 0.75rem;
}

.works-card__category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.works-card__btn {
    text-align: center;
    margin: 0;
}

.works-card__btn span {
    display: inline-block;
    padding: 0.5rem 2.5rem;
    background: #ffa501;
    color: #fff;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: bold;
    position: relative;
    padding-right: 3rem;
    width: 80%;
    box-sizing: border-box;
}

.works-card__btn span::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url(../img/ico_arrow.png);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

/* 投稿なし */
.works-no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ==========================================================================
   シングルページ
   ========================================================================== */

/* 2カラムレイアウト */
.works-single__layout {
    padding-top: 2rem;
}

.works-single__main {
    padding-right: 2rem;
}

.works-single__sidebar {
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

/* ヘッダー */
.works-header {
    padding: 0 0 2rem;
    text-align: left;
}

.works-header__categories {
    margin-bottom: 1rem;
}

.works-header__category {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #ffa501;
    color: #fff;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: bold;
    text-decoration: none;
    margin: 0 0.25rem 0.5rem;
    transition: background 0.3s ease;
}

.works-header__category:hover {
    background: #e69500;
    color: #fff;
}

.works-header__title {
    font-size: 2.0rem;
    line-height: 1.4;
    margin: 0;
    padding: 0.75rem 0;
    border-top: 3px solid #ffa501;
    border-bottom: 1px solid #ffa501;
}

/* メディア（アイキャッチ/動画） */
.works-media {
    margin-bottom: 1.5rem;
}

.works-media__image {
    text-align: center;
}

.works-media__img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 動画埋め込み */
.works-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    margin-bottom: 1rem;
}

.works-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* 紹介文 */
.works-intro {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.works-intro__inner {
    align-items: center;
}

.works-intro__inner--two-col {
    display: flex;
    flex-wrap: wrap;
}

.works-intro__image {
    text-align: center;
}

.works-intro__img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.works-intro__text {
    font-size: 1.12rem;
    line-height: 2;
}

/* セクション */
.works-sections {
    padding: 2rem 0;
}

.works-section {
    margin-bottom: 3rem;
}

.works-section:last-child {
    margin-bottom: 0;
}

.works-section__title {
    font-size: 1.52rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-top: 3px solid #ffa501;
    border-bottom: 1px solid #ffa501;
    display: block;
    width: 100%;
}

.works-section__content {
    align-items: flex-start;
}

.works-section__image-col {
    margin-bottom: 1.5rem;
}

.works-section__image-col img,
.works-section__image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
}

.works-section__text {
    font-size: 1.0rem;
    line-height: 2;
}

.works-section__text p {
    margin-bottom: 1rem;
}

.works-section__text--full {
    max-width: 100%;
}

/* セクション 2枚目以降の画像 */
.works-section__extra-images {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.works-section__extra-image {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
    position: relative;
    padding-top: calc((50% - 0.5rem) * 0.667); /* 3:2アスペクト比 */
    overflow: hidden;
    border-radius: 8px;
}

.works-section__extra-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ギャラリー */
.works-gallery {
    padding: 2rem 0;
    margin-top: 1rem;
}

.works-gallery__title {
    font-size: 1.52rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-top: 3px solid #ffa501;
    border-bottom: 1px solid #ffa501;
}

.works-gallery__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.works-gallery__item {
    flex: 0 0 calc(25% - 0.75rem);
    max-width: calc(25% - 0.75rem);
}

.works-gallery__item a {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2アスペクト比 */
    overflow: hidden;
    border-radius: 6px;
}

.works-gallery__item img,
.works-gallery__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.works-gallery__item a:hover img {
    opacity: 0.8;
}

/* 戻るボタン */
.works-back {
    padding: 3rem 0;
    text-align: center;
}

.works-back .detail_btn {
    margin: 0;
}

.works-back .detail_btn a {
    width: auto;
    padding: 1% 4%;
    padding-right: calc(4% + 28px);
}

.works-back .detail_btn a::after {
    right: 12px;
}

/* ==========================================================================
   サイドバー（最新の実績紹介）
   ========================================================================== */

.works-sidebar {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
}

.works-sidebar__title {
    font-size: 1.08rem;
    font-weight: bold;
    text-align: center;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ffa501;
}

.works-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.works-sidebar__item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.works-sidebar__item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.works-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    position: relative;
    padding-right: 1.5rem;
}

.works-sidebar__link:hover {
    opacity: 0.7;
}

.works-sidebar__link::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-image: url(../img/ico_arrow_or.png);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.works-sidebar__thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.works-sidebar__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.works-sidebar__no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e5e5;
    color: #999;
    font-size: 0.72rem;
}

.works-sidebar__item-title {
    font-size: 0.88rem;
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
    color: #333;
    flex: 1;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

@media (max-width: 991px) {
    /* 2カラム → 1カラム */
    .works-single__main {
        padding-right: 15px;
    }

    .works-single__sidebar {
        position: static;
        margin-top: 3rem;
    }
}

@media (max-width: 767px) {
    /* フィルター */
    .works-filter__item a {
        padding: 0.4rem 1rem;
        font-size: 0.88rem;
    }

    /* カード */
    .works-card {
        max-width: 100%;
        flex: 0 0 100%;
    }

    /* シングル */
    .works-header__title {
        font-size: 1.52rem;
    }

    .works-intro {
        padding: 1rem 0;
    }

    .works-intro__text {
        font-size: 1.0rem;
        margin-bottom: 1.5rem;
    }

    .works-intro__inner--two-col .works-intro__text {
        order: 1;
    }

    .works-intro__inner--two-col .works-intro__image {
        order: 2;
    }

    .works-section__title {
        font-size: 1.28rem;
    }

    .works-section__image-col,
    .works-section__text-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .works-section__image-col {
        order: -1;
        margin-bottom: 1.5rem;
    }

    /* セクション 2枚目以降の画像 1列 */
    .works-section__extra-image {
        flex: 0 0 100%;
        max-width: 100%;
        padding-top: 66.67%; /* 3:2アスペクト比 */
    }

    /* ギャラリー 2列 */
    .works-gallery__item {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }

    .works-gallery__title {
        font-size: 1.28rem;
    }
}

@media (min-width: 768px) {
    /* 紹介文横並び */
    .works-intro__inner--two-col {
        align-items: center;
    }

    .works-intro__inner--two-col .works-intro__text {
        padding-right: 2rem;
    }

    .works-section__content.row {
        align-items: flex-start;
    }

    .works-section__image-col {
        margin-bottom: 0;
    }

    /* ギャラリー 3列 */
    .works-gallery__item {
        flex: 0 0 calc(33.333% - 0.67rem);
        max-width: calc(33.333% - 0.67rem);
    }
}

@media (min-width: 992px) {
    /* デスクトップ時のサイドバー固定 */
    .works-single__sidebar {
        padding-left: 1rem;
    }

    /* ギャラリー 4列 */
    .works-gallery__item {
        flex: 0 0 calc(25% - 0.75rem);
        max-width: calc(25% - 0.75rem);
    }
}
