/* ===== 実績詳細ページ専用スタイル ===== */

/* ===================================================
   ページ全体
   ================================================ */
.works-detail-page {
    padding: 60px 0;
}

/* ===================================================
   プロジェクトヘッダー
   ================================================ */
.project-header {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.project-title {
    margin-bottom: 25px;
    padding: 30px 0;
    border-left: 6px solid #4a7c59;
    padding-left: 24px;
}

.project-title .subtitle {
    font-size: 14px;
    color: #7fb069;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.project-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: #334636;
    margin: 0;
    line-height: 1.2;
}

/* ===================================================
   プロジェクトコンテンツ
   ================================================ */
.project-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.main-image {
    width: 100%;
    height: 500px;
    background: #e0e6ed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 16px;
    overflow: hidden;
    border-radius: 5px;
}

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

/* ===================================================
   プロジェクト情報
   ================================================ */
.project-info {
    background: #F8F9F6;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: start;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-weight: 600;
    color: #9B7B4F;
    border-bottom: 1px dotted #999;
    padding-bottom: 4px;
    font-size: 16px;
}

.info-value {
    font-weight: 500;
    color: #666;
    padding-top: 2px;
}

/* ===================================================
   プロジェクト説明
   ================================================ */
.project-description h3 {
    margin-bottom: 15px;
    color: #334636;
    font-size: 20px;
    font-weight: 600;
}

.project-description .description-content {
    color: #666;
    line-height: 1.8;
}

.project-description .description-content p {
    margin-bottom: 16px;
}

.project-summary {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.project-summary h3 {
    color: #334636;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.summary-content {
    line-height: 1.8;
    background: linear-gradient(135deg, #faf9f7, #F3F4F0);
    padding: 20px;
    border-left: 4px solid #9B7B4F;
}

/* ===================================================
   タブナビゲーション（メイン）
   ================================================ */
.additional-content {
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
    gap: 0;
}

.tab {
    padding: 15px 30px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #7C9880;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.tab:hover {
    color: #628468;
}

.tab.active {
    color: #2D5233;
    border-bottom: 3px solid #2D5233;
    background: white;
}

.tab-content {
    padding: 30px;
    min-height: 300px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===================================================
   フォトギャラリー
   ================================================ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    max-width: 100%;
}

.photo-item {
    width: 100%;
    height: 140px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: 5px;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* ===================================================
   ライトボックス
   ================================================ */
.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: fixed; 
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    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;
    border-radius: 50%;
    z-index: 10001; 
}

.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: 50px;
}

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

.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-prev:hover .arrow-left,
.lightbox-next:hover .arrow-right {
    border-color: #48965C;
    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);
}

.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);
}

/* ===================================================
   ビフォー・アフター比較（写真用）
   ================================================ */
.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.comparison-item h4 {
    margin-bottom: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    color: white;
}

.comparison-item.before h4 {
    background: #ff7675;
}

.comparison-item.after h4 {
    background: #00b894;
}

.comparison-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===================================================
   ビフォー・アフター比較（図面用）
   ================================================ */
.blueprint-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.blueprint-comparison-item h4 {
    margin-bottom: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    color: white;
}

.blueprint-comparison-item.before h4 {
    background: #ff7675;
}

.blueprint-comparison-item.after h4 {
    background: #00b894;
}

.blueprint-comparison-item .blueprint-thumbnail {
    height: 350px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: default;
    justify-content: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}
/* 
.blueprint-comparison-item .blueprint-thumbnail:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
*/

.blueprint-comparison-item .blueprint-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* 
.blueprint-comparison-item .blueprint-thumbnail:hover img {
    transform: scale(1.05);
}
*/

.blueprint-comparison-item .blueprint-thumbnail::after {
    content: 'クリックで表示';
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/*
.blueprint-comparison-item .blueprint-thumbnail:hover::after {
    opacity: 1;
}
*/

/* 旧スタイル（互換性のため残す） */
.before-after-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 0;
}

.before-after-item {
    display: flex;
    flex-direction: column;
}

.before-after-item h4 {
    margin-bottom: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    color: white;
    width: fit-content;
}

.before-after-item.before h4 {
    background-color: #ff7675;
}

.before-after-item.after h4 {
    background-color: #00b894;
}

.blueprint-thumbnail {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

/*
.blueprint-thumbnail:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
*/

.blueprint-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* 
.blueprint-thumbnail:hover img {
    transform: scale(1.05);
}
*/

.blueprint-thumbnail::after {
    content: 'クリックで表示';
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/*
.blueprint-thumbnail:hover::after {
    opacity: 1;
}
*/

.before-after-item .floor-plan-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.before-after-item .floor-plan-actions a {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.before-after-item .btn-view {
    background-color: #4a7c59;
    color: white;
}

.before-after-item .btn-view:hover {
    background-color: #334636;
    transform: translateY(-2px);
}

.before-after-item .btn-download {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.before-after-item .btn-download:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

/* ===================================================
   図面・資料エリア（階層タブ対応）
   ================================================ */

.floor-plans-container {
    margin: 0;
}

.floor-plan-hierarchy-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.hierarchy-tab-btn {
    background: #f3f4f6;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
    margin-bottom: -2px;
}

.hierarchy-tab-btn:hover {
    background: #e5e7eb;
    color: #334636;
}

.hierarchy-tab-btn.active {
    background: #ffffff;
    color: #334636;
    border-bottom-color: #4a7c59;
}

.hierarchy-tab-btn .tab-count {
    display: inline-block;
    margin-left: 6px;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
}

.hierarchy-tab-btn.active .tab-count {
    color: #7fb069;
}

.floor-plans-content {
    position: relative;
}

.hierarchy-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.hierarchy-tab-content.active {
    display: block;
}

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

.floor-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.floor-plan-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.floor-plan-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #4a7c59;
}

.floor-plan-thumbnail {
    width: 100%;
    height: 200px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.floor-plan-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.floor-plan-card:hover .floor-plan-thumbnail img {
    transform: scale(1.05);
}

.file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.file-icon-symbol {
    font-size: 60px;
    opacity: 0.6;
}

.file-type {
    display: inline-block;
    padding: 6px 16px;
    background: #0073aa;
    color: white;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.floor-plan-info {
    padding: 16px;
}

.floor-plan-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.floor-plan-actions {
    display: flex;
    gap: 8px;
}

.floor-plan-actions a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view {
    background: #4a7c59;
    color: white;
}

.btn-view:hover {
    background: #334636;
    transform: translateY(-2px);
}

.btn-download {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #4a7c59;
}

.btn-download:hover {
    background: #7fb069;
    border-color: #9ca3af;
    transform: translateY(-2px);
}

.floor-plan-actions .icon {
    font-size: 16px;
}

.floor-plans-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.floor-plans-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.floor-plans-empty-text {
    font-size: 16px;
    color: #6b7280;
}

/* ===================================================
   動画コンテナ
   ================================================ */
.video-container {
    text-align: center;
    padding: 20px;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}

.video-responsive iframe,
.video-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container video {
    max-width: 800px;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-link {
    display: inline-block;
    background: #4a7c59;
    color: white !important;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.video-link:hover {
    background: #005a87;
}

/* ===================================================
   関連実績
   ================================================ */
.related-works {
    padding: 40px;
    background: #f8f9fa;
    margin-top: 30px;
}

.related-works h2 {
    font-size: 20px;
    color: #334636;
    margin: 0 0 30px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #334636;
    display: inline-block;
}

.related-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.related-item {
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    border-radius: 5px;
}

.related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.related-item a {
    color: inherit;
    display: block;
}

.related-image {
    height: 120px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.related-title {
    font-size: 16px;
    font-weight: 600;
    color: #2D5233;
    margin: 0;
    padding: 15px 15px 5px;
    line-height: 1.4;
}

.related-meta-simple {
    padding: 12px 15px 15px;
}

.meta-row {
    display: flex;
    margin-bottom: 4px;
    align-items: flex-start;
}

.meta-row:last-child {
    margin-bottom: 0;
}

.meta-label {
    font-weight: 600;
    color: #9B7B4F;
    min-width: 55px;
    font-size: 14px;
    margin-right: 20px;
    flex-shrink: 0;
}

.meta-value {
    flex: 1;
    line-height: 1.8;
    font-size: 14px;
    color: #666;
}

.building-count {
    font-size: 10px;
    color: #999;
    margin-left: 6px;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 500;
}

/* ===================================================
   お問い合わせセクション
   ================================================ */
.contact-section {
    text-align: center;
    padding: 40px 0;
    background: #f8f9fa;
    margin: 30px -30px 0;
}

/* ===================================================
   図面ビューワーモーダル
   ================================================ */

.floor-plan-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    background: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floor-plan-viewer-modal.active {
    display: flex;
    opacity: 1;
}

.viewer-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
    pointer-events: auto;
}

.floor-plan-viewer-modal:not(.active) .viewer-backdrop {
    pointer-events: none;
}

.viewer-container {
    position: relative;
    width: 95vw;
    height: 95vh; 
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.viewer-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.viewer-title .hierarchy-badge {
    background: linear-gradient(135deg, #4a7c59 0%, #334636 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.viewer-plan-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.viewer-btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.viewer-btn-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
    transform: rotate(90deg);
}

.viewer-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: rgba(74, 124, 89, 0.8);
    border-color: #4a7c59;
    transform: translateY(-2px);
}

.toolbar-btn .icon {
    font-size: 16px;
}

.toolbar-btn .btn-text {
    display: inline;
}

.zoom-indicator {
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    min-height: 0;
    width: 100%;
}

.viewer-loading {
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.viewer-loading span {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.viewer-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: default;
    user-select: none;
    -webkit-user-drag: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.viewer-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 30px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.viewer-hints span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
}

/* ===================================================
   アニメーション効果
   ================================================ */

@keyframes viewerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.floor-plan-viewer-modal.active .viewer-container {
    animation: viewerSlideIn 0.3s ease;
}

body.viewer-open {
    overflow: hidden;
}

.slide-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.title-pc {
    display: inline;
}

.title-sp {
    display: none;
}

/* ===================================================
   レスポンシブ対応
   ================================================ */
@media (max-width: 768px) {
    .works-detail-page {
        padding: 40px 0;
    }

    .project-header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .project-title {
        padding: 20px 0;
        padding-left: 18px;
    }

    .project-title h1 {
        font-size: 24px;
    }

    .main-image {
        height: 280px;
    }

    .project-info {
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .info-label {
        font-size: 13px;
    }

    .info-value {
        font-size: 15px;
    }

    .tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: 0;
    }

    .tab {
        flex: 0 0 auto;
        min-width: 80px;
        padding: 12px 16px;
    }

    .tab-content {
        padding: 20px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .photo-item {
        height: 110px;
    }

    .before-after {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .before-after-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blueprint-comparison-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blueprint-comparison-item .blueprint-thumbnail {
        height: 250px;
    }

    .blueprint-comparison-item .blueprint-thumbnail::after {
        opacity: 1;
    }

    .blueprint-thumbnail {
        height: 250px;
    }

    .blueprint-thumbnail::after {
        opacity: 1;
    }

    .before-after-item .floor-plan-actions {
        flex-direction: column;
    }

    .before-after-item .floor-plan-actions a {
        width: 100%;
    }

    .floor-plan-hierarchy-tabs {
        gap: 6px;
    }
    
    .hierarchy-tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .floor-plans-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .floor-plan-thumbnail {
        height: 160px;
    }
    
    .floor-plan-actions {
        flex-direction: column;
    }
    
    .floor-plan-actions a {
        width: 100%;
    }

    .related-works {
        padding: 30px 20px;
    }

    .related-works-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .meta-label {
        min-width: 50px;
        font-size: 10px;
    }

    .meta-value {
        font-size: 11px;
    }

    .building-count {
        font-size: 9px;
        padding: 1px 3px;
    }

    .video-container {
        padding: 15px;
    }

    .video-link {
        padding: 10px 20px;
        font-size: 14px;
    }

    .project-summary h3 {
        font-size: 18px;
    }
    
    .summary-content {
        font-size: 14px;
        padding: 15px;
    }

    .lightbox-content {
        width: 95vw;
        height: 85vh;
    }

    .lightbox-close {
        top: 30px;
        right: 30px;
        font-size: 20px;
        width: 35px;
        height: 35px;
        padding: 10px;
    }

    .lightbox-prev,
    .lightbox-next {
        bottom: 20px;
        width: 45px;
        height: 45px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .arrow-left,
    .arrow-right {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

    .lightbox-counter {
        margin-top: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .contact-section {
        margin: 20px -20px 0;
        padding: 30px 20px;
    }

    .floor-plan-viewer-modal {
        display: flex !important;
    }

    .viewer-container {
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .viewer-header {
        padding: 15px 20px;
    }

    .viewer-plan-title {
        font-size: 16px;
        word-break: break-word;
    }

    .viewer-toolbar {
        padding: 10px 15px;
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .toolbar-btn {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .toolbar-btn .btn-text {
        display: none;
    }

    .zoom-indicator {
        font-size: 13px;
        min-width: 50px;
    }

    .viewer-hints {
        padding: 10px 15px;
        gap: 12px;
        font-size: 11px;
    }

    .viewer-image {
        max-width: 95%;
        max-height: 85%;
    }

    .viewer-content {
        width: 100vw;
        height: calc(100vh - 180px);
    }

    .sp-only {
        display: inline;
    }

    .title-pc {
        display: none;
    }

    .title-sp {
        display: inline;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .project-title h1 {
        font-size: 20px;
    }

    .main-image {
        height: 220px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .photo-item {
        height: 95px;
    }

    .tab {
        min-width: 70px;
        padding: 10px 12px;
    }

    .floor-plans-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hierarchy-tab-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .hierarchy-tab-btn .tab-count {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }

    .related-works {
        padding: 20px 15px;
    }

    .viewer-header {
        padding: 12px 16px;
    }

    .viewer-plan-title {
        font-size: 14px;
    }

    .hierarchy-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .toolbar-btn .icon {
        font-size: 14px;
    }

    .zoom-indicator {
        font-size: 12px;
        min-width: 45px;
        padding: 6px 10px;
    }

    .viewer-hints {
        display: none;
    }

    .viewer-image {
        max-width: 90%;
        max-height: 80%;
    }
}