/* プロジェクトページのスタイル */
:root {
    --c-primary: #62A490;
    --c-primary-dark: #29594F;
    --c-secondary: #9DC4B9;
    --c-light: #E5F1EE;
    --c-accent: #D4A574;
    --c-bg: #FFFFFF;
    --c-text: #333333;
}

/* シンプルなページヘッダー - 他ページと統一 */
.simple-page-header {
    position: relative;
    padding: 160px 0 80px; /* About us・Servicesと統一 */
    background-color: var(--c-bg);
    text-align: center;
    overflow: hidden;
    margin-top: 0;
    border-bottom: 1px solid var(--c-light);
    z-index: 5;
}

.simple-page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.6));
    z-index: -1;
}

.page-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--c-primary); /* 色を--c-primaryに変更 */
    margin-bottom: 15px; /* 下マージンを少し縮小 */
    position: relative;
    display: inline-block;
    letter-spacing: 0.05em;
    transition: transform 0.5s ease;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--c-accent), var(--c-primary));
}

.header-description {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--c-primary);
    margin-top: 5px; /* 上マージンを追加して間隔を調整 */
    letter-spacing: 2px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* セクション共通スタイル */
section {
    margin: 80px 0;
    position: relative;
}

/* プロジェクト概要セクション */
.projects-overview {
    margin: 30px 0 40px; /* 上下マージンを縮小 */
}

/* カテゴリフィルター */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-button {
    padding: 8px 20px;
    background: none;
    border: 1px solid var(--c-primary);
    color: var(--c-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
}

.filter-button:hover {
    background-color: rgba(98, 164, 144, 0.1);
}

.filter-button.active {
    background-color: var(--c-primary);
    color: white;
}

/* プロジェクトギャラリー */
.projects-gallery {
    margin-bottom: 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.project-item {
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer; /* 画像をクリックできることを示す */
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-category {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--c-primary);
    color: white;
    font-size: 12px;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.project-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.project-location {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.project-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.project-link i,
.project-link svg {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.project-link:hover {
    border-bottom-color: var(--c-primary);
    color: var(--c-primary);
}

.project-link:hover i,
.project-link:hover svg {
    transform: translateX(5px);
}

/* CTA セクション */
.cta-section {
    margin: 100px 0;
}

.cta-container {
    background-color: var(--c-primary);
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,20 L40,20 M20,0 L20,40' stroke='rgba(255,255,255,0.1)' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 0;
}

.cta-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: white;
    color: var(--c-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.cta-button i,
.cta-button svg {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    background-color: var(--c-light);
    transform: translateY(-3px);
}

.cta-button:hover i,
.cta-button:hover svg {
    transform: translateX(5px);
}

/* アニメーションクラス */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* レスポンシブデザイン */
@media screen and (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .cta-container {
        padding: 50px 30px;
    }
    
    .cta-title {
        font-size: 26px;
    }
}

@media screen and (max-width: 768px) {
    .simple-page-header {
        padding: 130px 0 60px; /* About us・Servicesと統一 */
    }
    
    .page-title {
        font-size: 38px; /* About usと統一 */
    }
    
    .header-description {
        font-size: 13px !important; /* 16px → 13px */
        line-height: 1.4 !important;
        letter-spacing: -0.2px !important;
    }
    
    /* CTA テキストの文字サイズ調整 */
    .cta-text {
        font-size: 13px !important; /* 16px → 13px */
        line-height: 1.4 !important; /* 1.8 → 1.4 */
        letter-spacing: -0.2px !important;
    }
    
    /* プロジェクト詳細ページの文字サイズ調整 */
    .project-simple-info .project-location {
        font-size: 13px !important; /* 16px → 13px */
        line-height: 1.4 !important;
        letter-spacing: -0.2px !important;
    }
    
    .no-gallery-message p {
        font-size: 13px !important; /* 16px → 13px */
        line-height: 1.4 !important;
        letter-spacing: -0.2px !important;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .filter-button {
        font-size: 12px;
        padding: 6px 15px;
    }
    
    .project-overlay {
        opacity: 1;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    }
    
    .back-to-home-container {
        margin: 60px 0 80px;
    }
}

@media screen and (max-width: 576px) {
    .simple-page-header {
        padding: 120px 0 50px; /* About us・Servicesと統一 */
    }
    
    .page-title {
        font-size: 32px; /* About us・Servicesと統一 */
    }
    
    .header-description {
        font-size: 14px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-filter {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .filter-button {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .cta-container {
        padding: 40px 20px;
    }
    
    .cta-title {
        font-size: 22px;
    }
    
    .back-to-home-container {
        margin: 40px 0 60px;
    }
    
    .back-to-home-button {
        font-size: 14px;
    }
}

/* 表示/非表示アニメーション - JavaScriptで使用 */
.hidden {
    display: none;
}

/* ===== プロジェクト個別ページスタイル（元デザイン準拠） ===== */

/* SVG背景パターン */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* メインコンテンツスタイル */
main {
    position: relative;
    z-index: 1;
    padding-top: 120px;
}

section {
    margin: 60px 0;
    position: relative;
}

/* プロジェクトギャラリーセクション */
.project-gallery-section {
    padding: 60px 0;
    background-color: transparent;
}

/* シンプルな情報表示 */
.project-simple-info {
    text-align: center;
    margin-bottom: 40px;
}

.project-simple-info .project-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 15px;
    position: relative;
}

.project-simple-info .project-location {
    font-size: 16px;
    color: var(--c-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-simple-info .project-location i {
    color: var(--c-accent);
}

/* ギャラリーグリッドスタイル */
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-gap: 20px;
    margin-bottom: 50px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    grid-column: span 4;
    height: 350px; /* 高さを250pxから350pxに増加 */
}

.gallery-item-large {
    grid-column: span 8;
    height: 500px; /* メイン画像も400pxから500pxに増加 */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* プロジェクト一覧に戻るボタン - archive-project.cssと統一デザイン */
.back-to-projects-button {
    display: inline-flex;
    align-items: center;
    color: var(--c-text);
    text-decoration: none;
    font-size: 16px;
    position: relative;
    padding-bottom: 3px;
    transition: all 0.3s ease;
}

.back-to-projects-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 100%;
    width: 0;
    height: 1px;
    background-color: var(--c-primary);
    transition: all 0.3s ease;
}

.back-to-projects-button:hover {
    color: var(--c-primary) !important;
}

.back-to-projects-button:hover::after {
    width: 100%;
    left: 0;
}

/* 矢印の左移動アニメーション */
.back-to-projects-button i,
.back-to-projects-button svg {
    margin-right: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.back-to-projects-button:hover i,
.back-to-projects-button:hover svg {
    transform: translateX(-5px);
    color: var(--c-primary) !important;
}

/* 戻るボタン */
.back-to-projects {
    text-align: center;
    margin-top: 40px;
}

.back-to-projects .back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--c-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.back-to-projects .back-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--c-primary);
    transition: width 0.3s ease;
}

.back-to-projects .back-button i {
    transition: transform 0.3s ease;
}

.back-to-projects .back-button:hover {
    color: var(--c-primary);
}

.back-to-projects .back-button:hover::after {
    width: 100%;
}

.back-to-projects .back-button:hover i {
    transform: translateX(-5px);
}

/* アニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible,
.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* レスポンシブデザイン - プロジェクト個別ページ */
@media screen and (max-width: 992px) {
    .project-gallery-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .gallery-item {
        grid-column: span 3;
        height: 280px; /* 200pxから280pxに増加 */
    }
    
    .gallery-item-large {
        grid-column: span 6;
        height: 400px; /* 300pxから400pxに増加 */
    }
}

@media screen and (max-width: 768px) {
    .project-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .gallery-item {
        grid-column: span 2;
        height: 240px; /* 180pxから240pxに増加 */
    }
    
    .gallery-item-large {
        grid-column: span 4;
        height: 350px; /* 250pxから350pxに増加 */
    }
    
    .project-simple-info .project-title {
        font-size: 30px;
    }
    
    main {
        padding-top: 100px;
    }
}

@media screen and (max-width: 576px) {
    .project-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item,
    .gallery-item-large {
        grid-column: span 2;
        height: 280px; /* 200pxから280pxに増加 */
    }
    
    .project-simple-info .project-title {
        font-size: 26px;
    }
    
    main {
        padding-top: 90px;
    }
}

/* ホームに戻るボタン */
.back-to-home-container {
    text-align: center;
    margin: 80px 0 100px;
}

.back-to-home-button {
    display: inline-flex;
    align-items: center;
    color: var(--c-text);
    text-decoration: none;
    font-size: 16px;
    position: relative;
    padding-bottom: 3px;
    transition: all 0.3s ease;
}

.back-to-home-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 100%;
    width: 0;
    height: 1px;
    background-color: var(--c-primary);
    transition: all 0.3s ease;
}

.back-to-home-button:hover {
    color: var(--c-primary-dark);
}

.back-to-home-button:hover::after {
    width: 100%;
    left: 0;
}

.back-to-home-button i,
.back-to-home-button svg {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-to-home-button:hover i,
.back-to-home-button:hover svg {
    transform: translateX(-5px);
}

/* 画像がない場合のメッセージ */
.no-gallery-message {
    grid-column: 1 / -1; /* グリッド全幅に表示 */
    text-align: center;
    padding: 60px 40px;
    background-color: var(--c-light);
    border-radius: 8px;
    margin: 40px 0;
}

.no-gallery-message p {
    color: var(--c-text);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    font-family: 'M PLUS 1p', sans-serif;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .no-gallery-message {
        padding: 40px 20px;
        margin: 30px 0;
    }
    
    .no-gallery-message p {
        font-size: 14px;
    }
}

/* プレースホルダー画像 */
.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: var(--c-light);
    color: var(--c-text);
    opacity: 0.6;
}

.placeholder-image i {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--c-primary);
    opacity: 0.7;
}

.placeholder-image p {
    font-size: 14px;
    margin: 0;
    font-family: 'M PLUS 1p', sans-serif;
    text-align: center;
}

@media (max-width: 768px) {
    .placeholder-image i {
        font-size: 36px;
        margin-bottom: 8px;
    }
    
    .placeholder-image p {
        font-size: 12px;
    }
}
