@charset 'UTF-8';

/* 施工実績ページのスタイル
================================================ */
.p-works {
    background-color: #f8f8f8;
    padding-top: 80px;
}

/* ヒーローセクション */
.p-works-hero {
    position: relative;
    height: 800px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.6) 100%
    ),
    url('../../images/works/works_hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.p-works-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 40px;
}

.p-works-hero__title {
    font-size: 4.5rem;
    font-weight: normal;
    margin-bottom: 30px;
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

.p-works-hero__subtitle {
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    font-family: "Crimson Text", serif;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease 0.3s forwards;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

.p-works-hero__divider {
    width: 80px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 30px auto;
    opacity: 0;
    transform: scaleX(0);
    animation: scaleIn 0.8s ease 0.6s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@media screen and (max-width: 768px) {
    .p-works-hero {
        height: 400px;
    }

    .p-works-hero__content {
        padding: 0 20px;
    }

    .p-works-hero__title {
        font-size: 2.8rem;
    }

    .p-works-hero__subtitle {
        font-size: 1.2rem;
    }

    .p-works-hero__divider {
        width: 60px;
        margin: 20px auto;
    }
}

/* コンテンツセクション */
.p-works-content {
    padding: 100px 0;
}

.p-works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* フィルター */
.p-works-filter {
    margin-bottom: 60px;
    text-align: center;
}

.p-works-filter__container {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.p-works-filter__button {
    padding: 10px 25px;
    border: 2px solid #2a5d1f;
    background: transparent;
    color: #2a5d1f;
    border-radius: 30px;
    cursor: pointer;
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.p-works-filter__button:hover,
.p-works-filter__button.active {
    background: #2a5d1f;
    color: #fff;
}

/* グリッドレイアウト */
.p-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
    grid-auto-flow: dense;
}

/* カード */
.p-works-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    aspect-ratio: 3/4;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.p-works-card.hidden {
    display: none;
}

.p-works-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.p-works-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.p-works-card__image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.p-works-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.p-works-card:hover .p-works-card__image img {
    transform: scale(1.05);
}

.p-works-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: #fff;
    opacity: 0;
    transition: all 0.4s ease;
}

.p-works-card:hover .p-works-card__overlay {
    opacity: 1;
}

.p-works-card__info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.p-works-card__location,
.p-works-card__date {
    display: inline-block;
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.p-works-card__title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.p-works-card__category {
    font-size: 1.1rem;
    opacity: 0.9;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.p-works-card:hover .p-works-card__title,
.p-works-card:hover .p-works-card__category {
    transform: translateY(0);
}

/* ページネーション */
.p-works-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.p-works-pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #555;
    font-size: 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.p-works-pagination .page-numbers.current {
    background-color: #2a5d1f;
    color: #fff;
    border-color: #2a5d1f;
}

.p-works-pagination .page-numbers:hover {
    background-color: #f5f5f5;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .p-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .p-works-hero {
        height: 300px;
    }

    .p-works-hero__title {
        font-size: 2.5rem;
    }

    .p-works-content {
        padding: 60px 0;
    }

    .p-works-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .p-works-filter__container {
        gap: 10px;
    }

    .p-works-filter__button {
        padding: 8px 20px;
        font-size: 1rem;
    }

    .p-works-card__overlay {
        padding: 20px;
    }

    .p-works-card__title {
        font-size: 1.6rem;
    }

    .p-works-card__category {
        font-size: 1rem;
    }
}

/* 施工実績詳細ページのスタイル */
.p-work-hero {
    height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/works/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.p-work-hero__content {
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.p-work-hero__title {
    font-family: 'Mincho', serif;
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.p-work-hero__divider {
    width: 60px;
    height: 2px;
    background-color: #fff;
    margin: 0 auto 30px;
    opacity: 0;
    animation: scaleIn 0.8s ease forwards 0.3s;
}

.p-work-hero__meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.6s;
}

.p-work-hero__category,
.p-work-hero__location,
.p-work-hero__date {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.p-work-section {
    padding: 100px 0;
    background-color: #f8f8f8;
}

.p-work-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.p-work-description {
    margin-bottom: 80px;
}

.p-work-description__title,
.p-work-features__title,
.p-work-gallery__title {
    font-family: 'Mincho', serif;
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.p-work-description__title::after,
.p-work-features__title::after,
.p-work-gallery__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: #333;
    margin: 20px auto 0;
}

.p-work-description__text {
    font-size: 1.1rem;
    line-height: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.p-work-features {
    margin-bottom: 80px;
}

.p-work-features__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.p-work-features__item {
    position: relative;
    padding-left: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.p-work-features__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    background-color: #333;
    border-radius: 50%;
}

.p-work-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.p-work-gallery__item {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.p-work-gallery__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.p-work-gallery__item:hover .p-work-gallery__image {
    transform: scale(1.05);
}

.p-work-navigation {
    text-align: center;
}

.p-work-navigation__button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.p-work-navigation__button:hover {
    background-color: #555;
}

@media (max-width: 1024px) {
    .p-work-hero__title {
        font-size: 3rem;
    }

    .p-work-features__list {
        grid-template-columns: 1fr;
    }

    .p-work-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .p-work-hero {
        height: 500px;
    }

    .p-work-hero__title {
        font-size: 2.5rem;
    }

    .p-work-hero__meta {
        flex-direction: column;
        gap: 15px;
    }

    .p-work-section {
        padding: 60px 0;
    }

    .p-work-description__title,
    .p-work-features__title,
    .p-work-gallery__title {
        font-size: 1.8rem;
    }

    .p-work-gallery__grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}