

/* 施工事例ページのスタイル - shirakawa-inc.comスタイル */

/* ページタイトルセクション */
.page-title {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 80px 0;
    margin-top: 150px; /* ヘッダーとの重なりを防ぐためマージンをさらに増加 */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.page-title h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.page-title p {
    font-size: 1.2rem;
    color: #666;
    position: relative;
    z-index: 1;
}

.header-works {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: headerFadeIn 0.5s ease-out forwards;
}
/* カテゴリナビゲーション */
.works-categories {
    margin-bottom: 60px;
    background-color: #fff;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 20px;
}

.category-nav a {
    display: inline-block;
    padding: 12px 24px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    font-family: 'Shippori Mincho', serif;
    letter-spacing: 0.02em;
}

.category-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.6s ease;
}

.category-nav a:hover::before {
    left: 100%;
}

.category-nav a:hover,
.category-nav a.active {
    background: linear-gradient(45deg, #000000, #333333);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 施工事例カテゴリ */
.work-category {
    scroll-margin-top: 120px;
    margin-bottom: 80px;
    display: block !important; /* 初期表示を強制的に表示 */
}

.work-category h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid #000000;
    color: #333;
    position: relative;
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.work-category h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #000000, #333333);
}

/* 施工事例グリッド - shirakawa-inc.comスタイル */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

/* 事例カード - shirakawa-inc.comスタイル */
.work-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

/* 画像コンテナ - shirakawa-inc.comに合わせた縦配置 */
.work-images-container {
    display: flex;
    flex-direction: column;
    height: auto;
    position: relative;
}

.work-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background-color: #f5f5f5;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    background-color: #f5f5f5;
}

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

/* 画像のレスポンシブ最適化（無効化） */
/* .work-image img { */
    /* loading: lazy; 無効化 */
    /* decoding: async; 無効化 */
/* } */

/* 画像の読み込み中のプレースホルダー（無効化） */
.work-image::before {
    display: none; /* プレースホルダーを無効化 */
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 画像のアスペクト比を保持 */
.work-image {
    aspect-ratio: 4 / 3;
}

/* レスポンシブ画像の最適化 */
@media screen and (max-width: 768px) {
    .work-image {
        aspect-ratio: 3 / 2;
        height: 180px;
    }
}

@media screen and (min-width: 768px) {
    .work-image {
        aspect-ratio: 4 / 3;
        height: 220px;
    }
}

@media screen and (min-width: 1024px) {
    .work-image {
        aspect-ratio: 16 / 9;
        height: 250px;
    }
}

.work-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(45deg, #000000, #333333);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-family: 'Shippori Mincho', serif;
    letter-spacing: 0.05em;
}

.work-tag.after {
    background: linear-gradient(45deg, #28a745, #20c997);
    top: 15px;
    left: auto;
    right: 15px;
}

/* 施工詳細 */
.work-details {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.work-details h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.work-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.work-location::before {
    content: '\f3c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
    color: #000000;
}

.work-description {
    color: #444;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.work-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.work-meta span {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 500;
}

.work-meta i {
    margin-right: 6px;
    color: #000000;
    font-size: 0.9rem;
}

/* 依頼までの流れセクション */
.process {
    background: linear-gradient(135deg, #f9f9f9 0%, #f1f1f1 100%);
    padding: 80px 0;
    margin-top: 60px;
    position: relative;
}

.process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23000" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.process-step {
    flex: 1;
    min-width: 220px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: #000000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Shippori Mincho', serif;
}

.step-icon {
    margin: 15px 0 25px;
    font-size: 2rem;
    color: #000000;
    transition: all 0.4s ease;
}

.process-step:hover .step-icon {
    transform: scale(1.1);
    color: #333333;
}

.process-step h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.process-step p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.process-cta {
    text-align: center;
    margin-top: 50px;
}

/* ========================================
   レスポンシブデザイン - モバイルファーストアプローチ
   ======================================== */

/* モバイルファースト - ベーススタイル（320px以上） */
@media screen and (min-width: 320px) {
    .page-title {
        padding: 60px 0;
        margin-top: 130px; /* モバイルでのヘッダー高さをさらに考慮 */
    }
    
    .page-title h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .page-title p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* カテゴリナビゲーション */
    .works-categories {
        margin-bottom: 40px;
        padding: 20px 0;
    }
    
    .category-nav ul {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .category-nav a {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    /* 施工事例グリッド */
    .works-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .work-item {
        margin-bottom: 20px;
    }
    
    .work-image {
        height: 180px;
    }
    
    .work-tag {
        top: 8px;
        left: 8px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .work-tag.after {
        right: 8px;
        left: auto;
    }
    
    .work-details {
        padding: 15px;
    }
    
    .work-details h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .work-location {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .work-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .work-meta {
        flex-direction: column;
        gap: 6px;
        font-size: 0.75rem;
        padding-top: 12px;
    }
    
    .work-meta span {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    /* 依頼までの流れ */
    .process {
        padding: 60px 0;
        margin-top: 40px;
    }
    
    .process-steps {
        flex-direction: column;
        gap: 20px;
        margin-top: 30px;
    }
    
    .process-step {
        width: 100%;
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: -17px;
    }
    
    .step-icon {
        font-size: 1.5rem;
        margin: 12px 0 20px;
    }
    
    .process-step h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .process-step p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .process-cta {
        margin-top: 30px;
    }
    
    .process-cta .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

/* タブレット - 768px以上 */
@media screen and (min-width: 768px) {
    .page-title {
        padding: 70px 0;
        margin-top: 140px; /* タブレットでのヘッダー高さをさらに考慮 */
    }
    
    .page-title h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .page-title p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* カテゴリナビゲーション */
    .works-categories {
        margin-bottom: 50px;
        padding: 25px 0;
    }
    
    .category-nav ul {
        gap: 15px;
    }
    
    .category-nav a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 施工事例グリッド */
    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .work-item {
        margin-bottom: 25px;
    }
    
    .work-image {
        height: 220px;
    }
    
    .work-tag {
        top: 12px;
        left: 12px;
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .work-tag.after {
        right: 12px;
        left: auto;
    }
    
    .work-details {
        padding: 20px;
    }
    
    .work-details h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .work-location {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .work-description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .work-meta {
        flex-direction: row;
        gap: 10px;
        font-size: 0.8rem;
        padding-top: 15px;
    }
    
    .work-meta span {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    /* 依頼までの流れ */
    .process {
        padding: 70px 0;
        margin-top: 50px;
    }
    
    .process-steps {
        flex-direction: row;
        gap: 20px;
        margin-top: 40px;
    }
    
    .process-step {
        flex: 1;
        min-width: 200px;
        padding: 30px 20px;
        margin-bottom: 0;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        top: -20px;
    }
    
    .step-icon {
        font-size: 1.8rem;
        margin: 15px 0 25px;
    }
    
    .process-step h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .process-step p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .process-cta {
        margin-top: 40px;
    }
    
    .process-cta .btn {
        width: auto;
        max-width: none;
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* デスクトップ - 1024px以上 */
@media screen and (min-width: 1024px) {
    .page-title {
        padding: 80px 0;
        margin-top: 150px; /* デスクトップでのヘッダー高さをさらに考慮 */
    }
    
    .page-title h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .page-title p {
        font-size: 1.2rem;
        line-height: 1.6;
    }
    
    /* カテゴリナビゲーション */
    .works-categories {
        margin-bottom: 60px;
        padding: 30px 0;
    }
    
    .category-nav ul {
        gap: 20px;
    }
    
    .category-nav a {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* 施工事例グリッド */
    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 40px;
    }
    
    .work-item {
        margin-bottom: 30px;
    }
    
    .work-image {
        height: 250px;
    }
    
    .work-tag {
        top: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .work-tag.after {
        right: 15px;
        left: auto;
    }
    
    .work-details {
        padding: 25px;
    }
    
    .work-details h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .work-location {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .work-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 18px;
    }
    
    .work-meta {
        gap: 15px;
        font-size: 0.85rem;
        padding-top: 18px;
    }
    
    .work-meta span {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    /* 依頼までの流れ */
    .process {
        padding: 80px 0;
        margin-top: 60px;
    }
    
    .process-steps {
        gap: 30px;
        margin-top: 50px;
    }
    
    .process-step {
        min-width: 220px;
        padding: 35px 25px;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        top: -22px;
    }
    
    .step-icon {
        font-size: 2rem;
        margin: 18px 0 30px;
    }
    
    .process-step h3 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
    
    .process-step p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .process-cta {
        margin-top: 50px;
    }
    
    .process-cta .btn {
        padding: 15px 30px;
        font-size: 1.05rem;
    }
}

/* 大画面デスクトップ - 1200px以上 */
@media screen and (min-width: 1200px) {
    .page-title {
        margin-top: 160px; /* 大画面でのヘッダー高さを考慮 */
    }
    
    .page-title h1 {
        font-size: 2.8rem;
    }
    
    .page-title p {
        font-size: 1.3rem;
    }
    
    .category-nav a {
        padding: 14px 28px;
        font-size: 1.05rem;
    }
    
    .work-details h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .work-location {
        font-size: 0.95rem;
        margin-bottom: 18px;
    }
    
    .work-description {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    
    .work-meta {
        font-size: 0.9rem;
        padding-top: 20px;
    }
    
    .work-meta span {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .process-step {
        padding: 40px 30px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        top: -25px;
    }
    
    .step-icon {
        font-size: 2.2rem;
        margin: 20px 0 35px;
    }
    
    .process-step h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .process-step p {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .process-cta .btn {
        padding: 16px 32px;
        font-size: 1.1rem;
    }
}

/* 超大画面 - 1400px以上 */
@media screen and (min-width: 1400px) {
    .page-title {
        margin-top: 170px; /* 超大画面でのヘッダー高さを考慮 */
    }
    
    .page-title h1 {
        font-size: 3rem;
    }
    
    .page-title p {
        font-size: 1.4rem;
    }
    
    .category-nav a {
        padding: 16px 32px;
        font-size: 1.1rem;
    }
    
    .work-details h3 {
        font-size: 1.5rem;
        margin-bottom: 18px;
    }
    
    .work-location {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .work-description {
        font-size: 1.05rem;
        line-height: 1.8;
        margin-bottom: 25px;
    }
    
    .work-meta {
        font-size: 0.95rem;
        padding-top: 25px;
    }
    
    .work-meta span {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    .process-step {
        padding: 45px 35px;
    }
    
    .step-number {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        top: -27px;
    }
    
    .step-icon {
        font-size: 2.5rem;
        margin: 25px 0 40px;
    }
    
    .process-step h3 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .process-step p {
        font-size: 1.05rem;
        line-height: 1.9;
    }
    
    .process-cta .btn {
        padding: 18px 36px;
        font-size: 1.15rem;
    }
}

/* ナビゲーションのアクティブ状態 */
.nav ul li a.active {
    color: #000000;
    font-weight: bold;
}

/* スクロールアニメーション用の初期状態 */
.animate-on-scroll {
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 段階的なアニメーション遅延 */

