/* Works詳細リスト専用CSS - アニメーション削除版 */
.works-page {
    padding: 60px 0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.category-tabs {
    display: flex;
    flex-wrap: nowrap;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 15px;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    min-width: 0;
}

/* スクロールバーのスタイル */
.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #9B7B4F;
    border-radius: 2px;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
    background: #7a6041;
}

.category-tab {
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #7C9880;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab:hover {
    color: #628468;
    text-decoration: none;
}

.category-tab.active {
    color: #2D5233;
    border-bottom: 5px solid #2D5233;
}

/* デスクトップのみ表示するクラス */
.desktop-only {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.mobile-only {
    display: none;
}

/* 検索＋表示切替エリア */
.results-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 検索バー */
.search-bar {
    flex: 1;
    min-width: 280px;
}

.search-form {
    margin: 0;
}

.search-row {
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #2D5233;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #10b981;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.search-btn:hover {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

/* 表示切替ボタン */
.view-toggle {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.view-btn {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 5px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.view-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #2D5233;
    border-color: #2D5233;
    text-decoration: none;
}

.view-btn.active {
    background: #2D5233;
    color: white;
    border-color: #2D5233;
    font-weight: 600;
}

/* 検索結果情報 */
.results-info {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    padding: 0 20px;
}

/* 新レイアウトの詳細リスト表示 */
.list-view {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 35px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin-top: 10px;
    border-radius: 5px;
}

.project-item {
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 30px 0;
    transition: all 0.3s ease;
}

.project-item:last-child {
    border-bottom: none;
}

.project-item:hover {
    background: rgba(248, 250, 252, 0.8);
    padding: 30px 20px;
    margin: 0 -20px;
}

/* 新しいレイアウトコンテナ */
.new-layout-container {
    display: grid;
    grid-template-columns: 1.4fr 1.1fr;
    gap: 40px;
    align-items: start;
}

/* 左側：画像＋施設名＋カテゴリタグ */
.left-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 画像エリア */
.project-image-container {
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    max-width: 635px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 5px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image .no-image {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

.project-image:hover {
    transform: scale(1.015);
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.project-image[style*="cursor: pointer"]:hover::before {
    content: '🔍 クリックで拡大';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e3b2c;
    margin: 0;
    transition: color 0.3s ease;
    line-height: 1.3;
}

/* 画像上のカテゴリタグ */
.project-category-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #D4C5A0, #874e00);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    z-index: 2;
    white-space: nowrap;
    letter-spacing: 1px;
}

/* 画像下中央のシンプルカウンター */
.image-counter-simple {
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 右側：概要＋説明文＋アクションボタン */
.right-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* 概要情報 */
.project-overview {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-item .label {
    font-weight: 600;
    color: #2D5233;
}

.spec-item .value {
    color: #1f2937;
    text-align: right;
}

/* 説明文エリア */
.project-description {
    background: linear-gradient(135deg, #faf9f7, #F3F4F0);
    padding: 20px;
    border-left: 4px solid #9B7B4F;
    border-radius: 0 8px 8px 0;
    flex: 1;
    color: #475569;
    line-height: 1.5;
    font-size: 16px;
}

/* 図面詳細リンク */
.detail-link-container {
    margin-top: 15px;
    text-align: center;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2D5233;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #2D5233;
    border-radius: 25px;
    background: transparent;
    transition: all 0.3s ease;
}

.detail-link:hover {
    background: #2D5233;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(45, 82, 51, 0.3);
}

/* フローティングアクションボタン */
.floating-action-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.fab-main {
    border-radius: 30px;
    background: linear-gradient(135deg, #2D5233, #1e293b);
    box-shadow: 0 8px 24px rgba(45, 82, 51, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
    width: 165px;
    height: 50px;
    gap: 8px;
}

.fab-main:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(45, 82, 51, 0.5);
}

.fab-main.active {
    background: linear-gradient(135deg, #D4C5A0, #874e00);
}

.fab-icon {
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.fab-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fab-text {
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fab-close-text {
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0;
    position: absolute;
}

.fab-main.active .fab-icon,
.fab-main.active .fab-text {
    opacity: 0;
}

.fab-main.active .fab-close-text {
    opacity: 1;
}

/* FABメニュー */
.fab-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.fab-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.fab-item {
    background: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid rgba(45, 82, 51, 0.1);
    color: #2D5233;
    font-weight: bold;
    font-size: 14px;
    width: 160px;
    height: 50px;
    border-radius: 25px;
    padding: 0 16px;
    gap: 10px;
}

.fab-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: #2D5233;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.fab-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.fab-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fab-item-text {
    white-space: nowrap;
}

/* ライトボックス */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: #10b981;
    transform: scale(1.2);
}

/* 前次ボタン */
.lightbox-prev, .lightbox-next {
    position: absolute;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 50px;
}

.lightbox-next {
    right: 25px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: scale(1.2);
}

.lightbox-prev:hover .arrow-left,
.lightbox-next:hover .arrow-right {
    border-color: #10b981;
    transform: scale(1.3);
    border-width: 4px;
}

.lightbox-prev:hover .arrow-left {
    transform: scale(1.3) rotate(45deg);
}

.lightbox-next:hover .arrow-right {
    transform: scale(1.3) rotate(-135deg);
}

/* 矢印アイコン */
.arrow-left, .arrow-right {
    display: block;
    width: 20px;
    height: 20px;
    border: solid 3px rgba(255, 255, 255, 0.8);
    border-right: none;
    border-top: none;
    transition: all 0.3s ease;
}

.arrow-left {
    transform: rotate(45deg);
    margin-left: 3px;
}

.arrow-right {
    transform: rotate(-135deg);
    margin-right: 3px;
}

.lightbox-counter {
    margin-top: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results p {
    font-size: 16px;
    margin: 25px 0;
}

/* Works Gallery */
.works-gallery-page {
    padding: 60px 0;
    min-height: 100vh;
}

/* ギャラリー表示 */
.gallery-view {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    justify-items: center;
}

.gallery-item {
    background: #ffffff;
    padding: 15px 15px 20px 15px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.1),
        0 8px 16px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    width: 100%;
    max-width: 280px;
    border-radius: 5px;
}

.gallery-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 5px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #D4C5A0, #874e00);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 400;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    letter-spacing: 1px;
}

.gallery-info {
    text-align: center;
}

.gallery-title {
    font-weight: 500;
    color: #2D5233;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
    font-size:16px;
}

.gallery-location {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.gallery-business-type {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 10px;
}

.btn-reset {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    text-decoration: none;
    color: white;
}

/* ===== レスポンシブデザイン ===== */

/* タブレット */
@media (max-width: 1024px) {
    .category-tab {
        min-width: 100px;
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .search-input-wrapper {
        max-width: 250px;
        min-width: 200px;
    }
    
    .project-image {
        max-width: 415px;
        height: 240px;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 25px;
    }
}

/* スマホ（768px以下） */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .works-page {
        padding: 40px 0 0;
    }
       
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .category-all-container,
    .category-others-container {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        gap: 15px;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 5px;
        margin-bottom: 8px;
    }
    
    .category-tab.all-category,
    .category-tab.other-category {
        padding: 0 8px;
        border-bottom: 2px solid transparent;
        display: inline-block !important;
        text-align: center;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 16px;
    }
    
    .category-tab.all-category.active,
    .category-tab.other-category.active {
        color: #2D5233;
        border-bottom: 3px solid #2D5233;
    }
    
    .results-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .search-bar {
        min-width: auto;
        order: 2;
    }
    
    .view-toggle {
        display: none !important;
    }

    .fab-main {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        gap: 0;
    }
    
    .fab-text,
    .fab-close-text {
        display: none;
    }
    
    .fab-icon {
        width: 24px;
        height: 24px;
    }
    
    .fab-main.active::before {
        content: '×';
        position: absolute;
        color: white;
        font-size: 28px;
        font-weight: bold;
        opacity: 1;
    }
    
    .fab-item {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        gap: 0;
        justify-content: center;
    }
    
    .fab-item-text {
        display: none;
    }
    
    .fab-item-icon {
        width: 24px;
        height: 24px;
    }

    .fab-menu {
        bottom: 75px;
    }
    
    .results-info {
        text-align: center;
        order: 1;
    }
    
    .search-input-wrapper {
        max-width: 100%;
        min-width: auto;
    }
    
    .list-view {
        padding: 20px;
    }
    
    .project-item {
        padding: 20px 0;
    }
    
    .project-item:hover {
        padding: 20px 15px;
        margin: 0 -15px;
    }
    
    .new-layout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-image {
        height: 250px;
        max-width: 100%;
    }
    
    .project-overview {
        padding: 15px;
    }
    
    .project-description {
        padding: 15px;
        font-size: 14px;
    }
      
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        padding-top: 50px;
    }
    
    .lightbox-prev, .lightbox-next {
        width: 45px;
        height: 45px;
        bottom: 60px;
        background: transparent;
        border: none;
    }
    
    .lightbox-prev {
        left: 20px;
    }
    
    .lightbox-next {
        right: 5px;
    }
    
    .arrow-left, .arrow-right {
        width: 18px;
        height: 18px;
        border-width: 3px;
        border-color: rgba(255, 255, 255, 0.9);
    }
    
    .lightbox-close {
        top: 30px; 
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 22px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.9);
        z-index: 10001;
    }
}

/* スマホ（480px以下） */
@media (max-width: 480px) {
    .floating-action-button {
        bottom: 15px;
        right: 15px;
    }

    .works-page {
        padding: 30px 0 0;
    }
    
    .fab-main {
        width: 52px;
        height: 52px;
    }
    
    .fab-icon {
        font-size: 20px;
    }
    
    .fab-item {
        width: 44px;
        height: 44px;
    }
    
    .fab-item-icon {
        font-size: 16px;
    }

    .search-input {
        padding: 6px 32px 6px 12px;
        font-size: 13px;
    }
    
    .search-btn {
        font-size: 16px;
        right: 8px;
    }
    
    .list-view {
        padding: 15px;
    }
    
    .project-item {
        padding: 20px 0;
    }
    
    .project-image {
        height: 220px;
        max-width: 100%;
    }
    
    .project-title {
        font-size: 18px;
    }
   
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        bottom: 50px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: -5px;
    }
    
    .arrow-left, .arrow-right {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }
}

/* ユーティリティクラス */
.sp-only {
    display: none;
}

@media (max-width: 530px) {
    .sp-only {
        display: inline;
    }
}

.title-sp {
    display: none;
}

.title-pc {
    display: inline;
}

@media (max-width: 768px) {
    .title-pc {
        display: none;
    }
    
    .title-sp {
        display: inline;
        line-height: 1.4;
    }
}



/* FOUC（チラつき）防止 - Works詳細リスト専用 */
.works-page .project-item:not(.visible) {
    opacity: 0 !important;
    visibility: hidden;
}

.works-page .project-item.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ギャラリーアイテムも同様に */
.works-gallery-page .gallery-item:not(.visible) {
    opacity: 0 !important;
    visibility: hidden;
}

.works-gallery-page .gallery-item.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, transform 0.5s ease;
}