@charset "utf-8";

/* ============================================================
   1. Base & Reset
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body { 
    display: flex; 
    flex-direction: column; 
    background-color: #f2f2f2; 
    font-family: "Helvetica Neue", Arial, sans-serif; 
    color: #333; 
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   2. Header & Navigation
   ============================================================ */
header { 
    position: fixed; top: 0; width: 100%; height: 90px; 
    background: rgba(242, 242, 242, 0.98); 
    display: flex; justify-content: center; z-index: 1000; 
}

.header-inner { 
    width: 100%; max-width: 1920px; 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 0 50px; 
}

.logo { 
    font-family: 'Michroma', sans-serif; 
    font-size: 25px; 
    letter-spacing: 0.4em; 
    text-decoration: none; 
    color: #666; 
    transition: color 0.4s ease, letter-spacing 0.4s ease;
    display: inline-block;
    margin-right: 30px; 
    flex-shrink: 0;
}

.logo:hover { color: #FFCC00; letter-spacing: 0.55em; }

.nav-container { display: flex; align-items: center; gap: 25px; }
nav ul { display: flex; list-style: none; align-items: center; }
nav ul li { display: flex; align-items: center; }

nav ul li:not(:last-child)::after {
    content: ''; display: block; width: 1px; height: 12px; background: #ccc; margin: 0 15px;
}

nav ul li a { 
    font-family: 'Michroma', sans-serif; font-size: 12px; 
    text-decoration: none; color: #666; letter-spacing: 0.15em; 
    transition: color 0.4s ease, letter-spacing 0.5s ease;
    display: inline-block;
}

nav ul li a:hover { color: #FFCC00; letter-spacing: 0.3em; }

.header-mark { height: 24px; width: auto; transition: opacity 0.3s; }
.header-mark:hover { opacity: 0.7; }

/* Hamburger Menu Button */
.menu-btn {
    display: none; width: 30px; height: 24px; position: relative; cursor: pointer; z-index: 2000;
}
.menu-btn span {
    position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background-color: #333; transition: all 0.4s ease;
}
.menu-btn span::before, .menu-btn span::after {
    content: ''; position: absolute; left: 0; width: 100%; height: 1px; background-color: #333; transition: all 0.4s ease;
}
.menu-btn span::before { top: -10px; }
.menu-btn span::after { top: 10px; }

.menu-btn.active span { background-color: transparent; }
.menu-btn.active span::before { transform: translateY(10px) rotate(45deg); background-color: #999; }
.menu-btn.active span::after { transform: translateY(-10px) rotate(-45deg); background-color: #999; }

/* ============================================================
   3. Index Page (Works Grid)
   ============================================================ */
.index-main {
    width: 100%;           /* 固定幅をやめて100%に */
    max-width: none;       /* 最大幅の制限を解除 */
    padding: 50px 100px;  /* 左右の余白を100pxに固定（上下 100px / 左右 100px） */
    box-sizing: border-box; /* パディングを含めた幅計算にする */
}
.filter-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 60px;
    padding: 0 20px;
    /* アニメーションの初期設定 */
    opacity: 0;
    transform: translateX(80px); /* 右に80pxずらしておく */
    animation: slideInRight 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.4s; /* ヘッダーが表示された後に動くよう少し遅らせる */
    margin-top: 80px;
}

.filter-btn {
    opacity: 0; /* 最初は消しておく */
    transform: translateX(50px); /* 右にずらしておく */
    /* JSでクラスが付与されたら動く設定 */
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    width: 70px;
}

.filter-icon {
    width: 42px; /* ○の大きさ */
    height: 42px;
    border: 1px solid #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Michroma', sans-serif;
    font-size: 10px;
    color: #666;
    transition: all 0.4s ease;
}

/* --- 下の小さい文字ラベル --- */
.filter-label {
    font-family: 'Michroma', sans-serif;
    font-size: 8px;
    color: #999;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- ホバー & アクティブ状態 --- */
.filter-btn:hover .filter-icon,
.filter-btn.active .filter-icon {
    background-color: #FFCC00; /* ロゴと同じアクセントカラー */
    border-color: #FFCC00;
    color: #fff;
    transform: translateY(-5px); /* 少し上に浮く */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* 軽い影 */
}

.filter-btn:hover .filter-label,
.filter-btn.active .filter-label {
    color: #333;
}

.filter-btn:nth-child(1) { animation-delay: 0.4s; }
.filter-btn:nth-child(2) { animation-delay: 0.5s; }
.filter-btn:nth-child(3) { animation-delay: 0.6s; }
.filter-btn:nth-child(4) { animation-delay: 0.7s; }
.filter-btn:nth-child(5) { animation-delay: 0.8s; }
.filter-btn:nth-child(6) { animation-delay: 0.9s; }
.filter-btn:nth-child(7) { animation-delay: 1.0s; }
.filter-btn:nth-child(8) { animation-delay: 1.1s; }
.filter-btn:nth-child(9) { animation-delay: 1.2s; }
.filter-btn:nth-child(10) { animation-delay: 1.3s; }
.filter-btn:nth-child(11) { animation-delay: 1.4s; }

/* 登場時のクラス（JSで付与） */
.filter-btn.is-animated {
    opacity: 1;
    transform: translateX(0);
}

.works-grid {
    display: flex;
    flex-wrap: wrap;       /* 横に並びきらない場合に自動改行させる */
    justify-content: flex-start; /* 左詰めで並べる */
    gap: 8px;             /* 画像同士の間隔（お好みで調整してください） */
    width: 100%;
}

.work-item {
    width: 150px;
    flex: 0 0 150px;
    opacity: 0;           /* 最初は透明 */
    transform: scale(0.8); /* 少し小さくしておく */
    transition: opacity 0.8s ease, transform 0.8s ease, all 0.8s ease;
    border-radius: 8px; overflow: hidden;
}

/* 表示されている時の状態 */
.work-item.is-visible {
    opacity: 1;
    transform: scale(1);
}

.work-item a { display: block; overflow: hidden; background: #fff; }
.work-item img { 
    width: 150px; height: 150px; object-fit: cover; display: block; 
    filter: saturate(30%); opacity: 0.6; transition: 0.6s ease; border-radius: 8px; overflow: hidden;
 }
.work-item a:hover img { transform: scale(1.1); opacity: 1; filter: saturate(100%); }

/* ============================================================
   4. Detail Page
   ============================================================ */
.detail-container { 
    flex: 1; max-width: 1200px; margin: 90px auto 0; padding: 100px 150px 60px; 
    opacity: 0; transition: 0.8s; 
}
.detail-container.is-visible { opacity: 1; transform: translateY(0) !important; pointer-events: auto; /* 表示されたら操作可能にする */}
.detail-visual img {
    width: auto !important;
    max-width: 100% !important;
    height: auto;
    margin-bottom: 20px;
}

.detail-visual { 
    display: flex; 
    flex-direction: column; 
    flex-wrap: wrap;     /* 幅がいっぱいになったら折り返す */
    gap: 40px 4%;        /* 画像間の余白（上下 左右） */
    width: 100%; 
    margin-bottom: 20px; 
}

/* 画像の基本設定（コンテナ幅いっぱいに広がる） */
.detail-visual img { 
    width: 100%; 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 0 auto; 
}

/* 動画（MP4）の設定：ここを560px固定に変更 */
.detail-visual video { 
    width: 100%; 
    max-width: 560px; /* ここをご希望のサイズに固定 */
    height: auto; 
    display: block; 
    margin: 0 auto; 
    background: #000; /* 読み込み前の黒背景 */
}
.detail-info { display: flex; gap: 40px; margin-bottom: 20px; }
.detail-text { flex: 2; }
.detail-title { font-family: 'Michroma', sans-serif; font-size: 18px; letter-spacing: 0.2em; margin-bottom: 25px; }
.detail-desc { font-size: 13px; line-height: 2.2; color: #666; }
.detail-spec { flex: 1; border-left: 1px solid #ddd; padding-left: 40px; }
.spec-label { font-family: 'Michroma', sans-serif; font-size: 9px; color: #999; margin-bottom: 5px; }

/* YouTubeのサイズを560pxに固定し、中央に寄せる */
.youtube-wrapper {
    width: 100%;
    max-width: 560px;
    margin: 0 auto 60px; /* 中央寄せ */
    position: relative;
    padding-bottom: 315px; /* 16:9比率（560pxに対する高さ） */
    height: 0;
    background: #000;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================
   5. Common UI (Arrows, Top Button, Footer)
   ============================================================ */
/* Navigation Arrows */

.nav-arrow {
    position: fixed; top: 40%; font-size: 180px; font-weight: 100; text-decoration: none; 
    color: #bbb; z-index: 500; padding: 5px; display: inline-block;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.nav-arrow.prev { left: 5px; transform: translateY(-40%) scaleX(0.2); transform-origin: right center; }
.nav-arrow.next { right: 5px; transform: translateY(-40%) scaleX(0.2); transform-origin: left center; }
.nav-arrow:hover { color: #999; }
.nav-arrow.prev:hover { transform: translateY(-40%) scaleX(0.5) translateX(-12px); }
.nav-arrow.next:hover { transform: translateY(-40%) scaleX(0.5) translateX(12px); }
/* --- 1200pxから1001pxの間だけ、矢印をさらに画面の端へ追い出す --- */
@media (max-width: 1200px) and (min-width: 1001px) {
    .nav-arrow.prev { 
        /* 左端ギリギリか、少し外へ出す */
        left: -30px !important; 
    }
    .nav-arrow.next { 
        /* 右端ギリギリか、少し外へ出す */
        right: -30px !important; 
    }
}

/* TOP Button */
.pagetop-trigger {
    position: fixed; 
    /* calc(50% + 520px) だった部分を 500px などに減らすか、right指定に変更します */
    left: auto;
    right: 40px; /* 端から20pxだったものを40pxに（20px内側へ） */
    bottom: 120px; 
    opacity: 0; 
    visibility: hidden; 
    transition: 0.5s; 
    z-index: 1000;
    text-decoration: none; 
    display: flex; 
    flex-direction: column-reverse; 
    align-items: center;
}
.pagetop-trigger.show { opacity: 1; visibility: visible; }
.pagetop-text { font-family: 'Michroma', sans-serif; font-size: 9px; color: #666; letter-spacing: 0.1em; margin-top: 15px; writing-mode: vertical-rl; }
.pagetop-line { width: 1px; height: 70px; background: rgba(102, 102, 102, 0.2); position: relative; overflow: hidden; }
.pagetop-line::after {
    content: ''; position: absolute; top: -70px; left: 0; width: 100%; height: 70px;
    background: #666; animation: top-line-anim 3s infinite;
}
@keyframes top-line-anim { 0% { top: -70px; } 30% { top: 0; } 60%, 100% { top: 70px; } }
/* 右からスライドインするキーフレーム */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Footer */
.back-link-area { text-align: center; margin: 0px 0 25px; }
.back-btn-small { 
    font-family: 'Michroma', sans-serif; font-size: 9px; text-decoration: none; 
    color: #666; padding: 11px 28px; transition: 0.3s; display: inline-block; letter-spacing: 0.2em; 
}
.back-btn-small:hover { background: #000; color: #fff; }

footer { padding: 30px 50px; background: #f2f2f2; }
.footer-inner { border-top: 1px solid #e5e5e5; padding-top: 30px; }
.footer-copy { font-size: 9px; line-height: 1.8; color: #999; text-align: center; }

/* ============================================================
   6. Subpage Layouts (Company, Contact, Award)
   ============================================================ */
.subpage-container {
    flex: 1; max-width: 900px; margin: 90px auto 0; padding: 50px 50px 0px 50px;
    opacity: 0; transition: 0.8s ease;
}
.subpage-container.is-visible { opacity: 1; }
.subpage-title { 
    font-family: 'Michroma', sans-serif; font-size: 20px; 
    letter-spacing: 0.3em; margin-bottom: 60px; text-align: center; color: #666;
}

/* Info Rows (Common for Company/Contact) */
.info-row { display: flex; margin-bottom: 30px; line-height: 2; font-size: 12px; }
.info-label { width: 110px; font-family: 'Michroma', sans-serif; font-size: 11px; color: #999; flex-shrink: 0; }
.info-content { color: #666; }
.info-content a { color: #666; text-decoration: none; border-bottom: 1px solid #ccc; }
.info-content a:hover { color: #FFCC00; border-color: #FFCC00; }

/* Award List */
.award-list { max-width: 700px; margin: 0 auto; list-style: none; }
.award-item { 
    margin-bottom: 12px; font-size: 13px; color: #666; 
    display: flex; align-items: baseline; line-height: 1.6;
}
.award-item::before { content: '・'; margin-right: 12px; color: #ccc; font-weight: bold; }

/* Google Map Wrapper */
.map-wrapper { width: 100%; height: 550px; filter: grayscale(100%); transition: 0.5s; margin-top: 40px; }
.map-wrapper:hover { filter: grayscale(0%); }
.map-wrapper iframe { width: 100%; height: 100%; border: none; }

/* COMPANY / ACCESS Specific */
.company-layout-container {
    margin: 0 auto !important; max-width: 600px !important; width: 100%;
    padding: 0 20px; box-sizing: border-box;
}
.company-concept { text-align: center; font-size: 14px; line-height: 2.2; color: #666; margin-bottom: 40px; }
.switch-visual { text-align: center; margin: 80px 0; }
.switch-visual.after-map { margin: 100px 0 120px !important; }
.switch-img { max-width: 250px; height: auto; opacity: 0.9; }

.company-layout-container .info-row {
    display: flex !important; margin-bottom: 25px !important;
    width: 100% !important; float: none !important;
    clear: both !important; text-align: left !important;
}

#google-map-area {
    display: block !important; margin: 50px auto 0 !important; 
    width: 100% !important; max-width: 800px !important; 
    height: 500px !important; background: #eee;
    overflow: hidden; border: 1px solid #eee;
}

/* ============================================================
   7. Responsive Design (General & Tablet)
   ============================================================ */
@media (max-width: 1200px) {
    .pagetop-trigger { 
        
        right: 40px /* ここも40pxに設定（元の20pxからさらに20px内側へ） */
    }
}
@media (max-width: 1000px) {
    /* 1. PC用の巨大矢印と、上部の不要なボタンを消す */
    .nav-arrow,
    .back-button-container,
    .back-link-area {
        display: none !important;
    }

    /* 2. 1000px以下で表示させるナビゲーションの設定 */
    .mobile-nav-footer {
        display: flex !important; /* 強制表示 */
        justify-content: center;
        align-items: center;
        gap: 40px;          /* 記号と文字の間隔 */
        margin: 60px 0 30px !important;
        width: 100%;
    }

    /* 記号 〈 〉 のデザイン */
.mobile-arrow {
    font-family: 'Michroma', sans-serif !important;
    font-size: 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-weight: normal !important;
    padding: 10px;
    line-height: 1;
    display: inline-block !important;

    /* --- アニメーションの設定 --- */
    transition: all 0.3s ease; /* 変化を滑らかにする（0.3秒） */
    opacity: 0.6;              /* 通常時は少しだけ薄くしておく（お好みで） */
}

/* 矢印ホバー時のアニメーション */
.mobile-arrow:hover {
    opacity: 1;                /* ホバーで色がハッキリする */
    color: #000 !important;    /* 色をより濃くする */
    
    /* わずかに横に動かす演出（左矢印は左へ、右矢印は右へ） */
}

/* 個別の動き：左矢印をホバーした時 */
#mobilePrev:hover {
    transform: translateX(-4px); /* 左に3px動く */
}

/* 個別の動き：右矢印をホバーした時 */
#mobileNext:hover {
    transform: translateX(4px);  /* 右に3px動く */
}

    /* BACK TO LIST ボタンのデザインをスマホ版に合わせる */
    .back-btn-small {
        ffont-family: 'Michroma', sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.2em !important; /* ←これは残す（文字の間隔） */
    /* ↓これを追加（見た目の中央補正） */
    text-indent: 0.4em !important;    /* letter-spacingと同じ数値を指定 */
    text-decoration: none !important;
    color: #333 !important;
    background-color: transparent;
    padding: 8px 24px !important; 
    display: inline-block !important;
    text-align: center; /* これも一応残しておきます */
    transition: all 0.3s ease;        /* 変化を滑らかにする */
    }
    .back-btn-small:hover {
    background-color: #333 !important; /* 背景を黒に */
    color: #fff !important;           /* 文字を白に */
}
}
/* 768px以下のスマホ版では、以前決めた通り完全に消す */
@media (max-width: 768px) {
    .nav-arrow {
        display: none !important;
    }
}

/* --- 1000px以下のナビゲーション設定箇所を以下に書き換え --- */
@media (max-width: 1000px) {
    .header-mark { display: none; }
    .menu-btn { display: block; }
    

    nav {
        position: fixed; 
        top: -100%; 
        left: 0; 
        width: 100%; 
        height: 100vh;
        background: #FFCC00; /* ★背景をイエローに変更 */
        display: flex; 
        align-items: center; 
        justify-content: center;
        transition: 0.5s; 
        z-index: 1500;
        visibility: hidden; /* 閉じている時は完全に隠す */
        opacity: 0;        /* 透明にしておく */
    }

    nav.active { top: 0; visibility: visible; 
        opacity: 1;}
    nav ul { flex-direction: column; }
    nav ul li { padding: 20px 0; }
    nav ul li:not(:last-child)::after { display: none; }

    /* メニューの文字設定 */
    nav ul li a { 
        font-size: 40px; 
        letter-spacing: 0.25em; 
        color: #666 !important; /* ★文字色を#666に固定 */
        transition: 0.3s;
    }

    /* メニューのホバー（タップ）時 */
    nav ul li a:hover { 
        color: #fff !important; /* ★ホバーで白に変更 */
        letter-spacing: 0.35em; /* 少し広がる演出 */
    }

    /* ハンバーガーボタン自体の色（背景が黄色なので黒系が見やすい） */
    .menu-btn.active span::before,
    .menu-btn.active span::after {
        background-color: #333 !important;
    }
    
}

/* ============================================================
   8. Responsive Design (Smartphone & Mobile Fixes)
   ============================================================ */
@media (max-width: 767px) {
    /* --- Works Grid (Instagram-like 3 columns) --- */
    .index-main {
        padding: 60px 20px; /* スマホは余白を詰めないと画像が小さくなりすぎるため、これでOK */
    }

    .works-grid { 
        display: flex;         /* PCと同じflexを継承 */
        flex-wrap: wrap; 
        justify-content: center; /* スマホでは中央寄せが綺麗 */
        gap: 10px;             /* スマホでは間隔を少し狭める */
    }

    .work-item {
        /* 3列にしたい場合は、150px固定ではなく計算式に書き換えます */
        width: calc((100% - 20px) / 3); /* (100% - 隙間10px*2) / 3枚 */
        flex: 0 0 auto; 
    }

    .work-item img {
        width: 100%;           /* 親要素（3列の幅）に合わせる */
        height: auto; 
        aspect-ratio: 1 / 1;   /* 正方形を維持 */
    }

    /* --- Common Subpage Adjustments --- */
    .header-inner { padding: 0 20px; }
    .subpage-container { padding: 120px 20px 60px !important; max-width: 100% !important; }
    .subpage-title { font-size: 18px !important; margin-bottom: 50px !important; }
    
    .detail-container { padding: 50px 20px 0px; }
    .detail-info { flex-direction: column; gap: 40px; }
    .detail-spec { border-left: none; border-top: 1px solid #ddd; padding: 30px 0 0; }
    .detail-visual { gap: 40px; } /* スマホでは間隔を半分にする調整 */
    .pagetop-trigger { 
        right: 30px; /* ここも40pxに（元の20pxから20px内側へ） */
        bottom: 40px; /* スマホでは下すぎると操作しにくいので適宜調整 */
    }

    /* --- Company Page Mobile --- */
    .company-layout-container { max-width: 400px !important; padding: 0 !important; }
    .company-concept { font-size: 12px; margin-bottom: 30px; }
    .switch-img { max-width: 180px; }
    #google-map-area { height: 350px !important; margin-top: 50px !important; }
    .switch-visual.after-map { margin: 80px 0 80px !important; }

    /* --- Contact & Link Page Mobile (150% Font & Center Align) --- */
    .subpage-container .info-row {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-bottom: 60px !important;
        width: 100% !important;
        display: flex !important;
    }

    .subpage-container .info-label {
        width: 100% !important; margin-bottom: 15px !important;
        font-size: 11px !important; color: #888 !important; letter-spacing: 0.2em;
    }

    .subpage-container .info-content {
        width: 100% !important; font-size: 20px !important; /* 150% Base */
        line-height: 1.6 !important; padding: 0 !important; color: #333 !important;
    }

    .subpage-container .info-content p {
        font-size: 18px !important; margin-bottom: 30px !important;
        text-align: center !important; line-height: 1.8 !important;
    }

    /* Mail & Tel Highlight */
    #mail-area a, 
    .subpage-container .info-content span[style*="font-size: 18px"] {
        font-size: 24px !important; font-weight: bold !important;
        word-break: break-all; display: inline-block;
        border-bottom: 1px solid #777; margin-top: 5px;
    }

    /* Link Section Logos & URLs */
    .info-content div[style*="display: flex"] {
        flex-direction: column !important; align-items: center !important;
        text-align: center !important; gap: 20px !important; margin-top: 30px !important;
    }

    .info-content img {
        max-width: 200px !important; height: auto !important;
        margin: 0 auto !important; display: block !important;
    }

    .info-content a[href^="http"] {
        font-size: 18px !important; /* 150% URL Size */
        display: inline-block !important; margin-top: 10px !important;
        word-break: break-all !important;
    }

    .info-content .link-item p { font-size: 18px !important; margin-bottom: 10px !important; }
    .info-content p[style*="font-size: 12px"] { font-size: 16px !important; }
    
    .info-content .link-item,
    .info-content div[style*="margin-bottom: 40px"] {
        margin-bottom: 60px !important;
    }
    /* 1. 画面中央の大きな矢印を完全に消す */
    .nav-arrow {
        display: none !important;
    }

    /* 2. 下部ナビゲーションエリアのレイアウト */
    .mobile-nav-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px; /* BACKボタンと矢印の間の距離 */
        margin-bottom: 40px;
    }

    /* 3. 下部用の小さな矢印のデザイン */
    .mobile-arrow {
        font-family: 'Michroma', sans-serif;
        font-size: 20px;
        color: #666;
        text-decoration: none;
        padding: 10px;
    }
    .back-link-area {
        display: none !important;
    }

    /* 追記：消した分の余白を詰める */
    .mobile-nav-footer {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important; /* 区切り線も不要なら削除 */
    }

    .detail-container {
        padding-bottom: 20px !important; /* 全体の下の余白を詰める */
    }
}


/* PC版では下部矢印は不要なので隠す */
@media (min-width: 768px) {
    .mobile-nav-footer {
        display: none;
    }
}

/* 動画のサイズをPCで500pxに制限、スマホで100%にする */
.custom-video-wrapper {
    max-width: 500px; /* PCでの最大幅 */
    width: 100%;      /* 基本は幅いっぱい */
    margin: 0 auto 40px auto; /* 中央寄せと下の余白 */
}

/* YouTubeリンクの装飾 */
.youtube-link {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    margin-top: 8px;
}

.youtube-link:hover {
    text-decoration: underline;
}

/* スマホ用の画面幅可変設定 */
@media screen and (max-width: 500px) {
    .custom-video-wrapper {
        max-width: 100%;
        padding: 0;
    }
}

/* ============================================================
   作品詳細ページのレイアウト調整
   ============================================================ */

/* メインコンテナ：ヘッダーに被らないよう余白を確保 */
.detail-container {
    margin-top: 160px; /* ヘッダー(90px) + 余白 */
    padding: 0 50px 0px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* JavaScriptでデータが入った後に表示させる */
.detail-container.is-visible {
    opacity: 1;
    transform: translateY(0) !important;
    pointer-events: auto; /* 表示されたら操作可能にする */
}



/* 内部の要素（画像、動画、YouTubeなど）すべてに下マージンを設定 */
#visual-area > * {
    width: 100%;
    display: block;
    margin-bottom: 50px; /* ★ここが要素同士の間隔になります */
}

/* 種類に関わらず、一番最後の要素だけは下の余白を消す */
#visual-area > *:last-child {
    margin-bottom: 0;
}

/* テキスト情報エリアのレイアウト */
.detail-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 120px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-bottom: 0px; /* ★ここを 0 にして余白を一旦リセットします */
    padding-left: 20px;
    padding-right: 20px;
}

.detail-text {
    flex: 1.5;
}

.detail-title {
    font-family: 'Michroma', sans-serif;
    font-size: 18px;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: #333;
}

.detail-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    white-space: pre-wrap; /* 改行を反映させる */
}

/* クライアントなどのスペック情報 */
.detail-spec {
    width: 300px;      /* 幅を少し絞る */
    flex-shrink: 0;
}

.spec-label {
    font-family: 'Michroma', sans-serif;
    font-size: 10px;
    color: #999;
    margin-bottom: 5px;
    letter-spacing: 0.1em;
}

/* モバイル対応（スマホで見た時に縦に並べる） */
@media (max-width: 768px) {
    .detail-container {
        padding: 0 20px 60px;
        margin-top: 100px;
    }

    .detail-info {
        flex-direction: column;
        gap: 30px;
    }

    .detail-spec {
        width: 100%;
    }
}
/* ============================================================
   作品詳細ページ（Detail Page）
   ============================================================ */

/* 1. 全体コンテナ */
.detail-container {
    flex: 1;
    max-width: 1200px;
    margin: 100px auto 0; /* ヘッダー分を確保 */
    padding: 10px 0px;
    opacity: 0;
    transform: translateY(40px); /* 最初は30px下に下げておく */
    
    /* 1.2秒かけて、高級感のある加速・減速（cubic-bezier）で動かす */
    transition: 
        opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.detail-container.is-visible { opacity: 1; transform: translateY(0) !important; pointer-events: auto; /* 表示されたら操作可能にする */}

/* 2. メディアエリア（画像・動画） */
#visual-area {
    width: 100%;
    margin-bottom: 60px;
    display: flex;
    flex-wrap: wrap; /* 横幅がいっぱいになったら自動で改行 */
    gap: 15px;       /* 画像同士の隙間（上下左右共通） */
    align-items: flex-start;
}

/* 各メディア要素の間隔と中央寄せ */
.media-item {
    width: 100%;
    margin-bottom: 10px; /* 要素同士の間隔 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 中央寄せ */
    box-sizing: border-box; /* パディングを含めたサイズ計算 */
}

/* 最後のメディア要素だけ下マージンを調整 */
.media-item:last-child {
    margin-bottom: 30px;
}

/* 3. 各メディアの個別設定 */

/* 画像：コンテナ幅いっぱいに広げる */
.media-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px
}

/* MP4動画：560pxに固定 */
.media-item video {
    width: 100%;
    max-width: 560px; /* PCでの最大幅 */
    height: auto;
    max-height: 80vh;
    background: #000;
    display: block;
    outline: none;
}

/* YouTubeラッパー：16:9比率を維持 */
.youtube-wrapper {
    position: relative;
    width: 100%;
    max-width: 560px; /* MP4動画と合わせる */
    padding-bottom: 315px; /* 16:9 (560px幅の時) */
    height: 0;
    background: #000;
    overflow: hidden;
}
.youtube-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

/* YouTubeリンクをセンターに寄せるための調整 */
.video-link-container {
    width: 100%;
    display: flex;
    justify-content: center; /* 横方向の中央寄せ */
    margin-top: 15px;       /* 動画との間隔 */
}

.youtube-link {
    display: inline-block;
    font-family: 'Michroma', sans-serif;
    font-size: 10px;
    text-decoration: none;
    color: #999 !important; /* 文字色グレー */
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.youtube-link:hover {
    color: #333 !important; /* ホバーで少し濃く */
    text-decoration: underline !important;
}

/* 4. スマホ対応（768px以下） */
@media (max-width: 768px) {
　　　.col-2, .col-3 {
        width: 100%;
    }
    
    .media-item {
        margin-bottom: 20px; /* スマホでは間隔を少し詰める */
    }

    /* 動画とYouTubeをスマホでは横幅いっぱいに */
    .media-item video, 
    .youtube-wrapper {
        max-width: 100%;
    }
    .youtube-wrapper {
        padding-bottom: 56.25%; /* スマホではアスペクト比で高さを出す */
    }
}

/* アーカイブリスト全体の調整 */
#archive-list {
    max-width: 900px; /* 見やすい幅に制限 */
    margin: 0 auto;
    padding: 40px 20px;
}

/* 1作品ずつの塊（セクション） */
.archive-item {
    margin-bottom: 100px; /* 作品同士の間隔を広くとる */
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.archive-item:first-child {
    border-top: none; /* 最初の作品の上の線は消す */
}

/* 画像の調整 */
.archive-item img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 5px; /* 5pxの角丸 */
}

/* 作品タイトルとスペックの並び（詳細ページに近いスタイル） */
.archive-item-info {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

/* MEDIUM（媒体名）の表示エリアで改行を有効にする */
#work-direction {
    white-space: pre-wrap;
}

/* ついでに画像キャプションも一括設定する場合 */
.image-caption {
    white-space: pre-wrap;
}

/* 作品詳細ページのメインタイトル */
#work-title {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4; /* 2行になった時の行間を調整（お好みで） */
}
/* CLIENT（クライアント名）の表示エリアで改行を有効にする */
#work-client {
    white-space: pre-wrap;
    line-height: 1.5; /* 改行した際に見やすくなるよう行間を調整 */
}


.media-item.col-1 {
    width: 100%;
}

/* col-2 (横並び用) は横幅 約49% */
.media-item.col-2 {
    width: 48%;
}

/* 3枚並び（33.3%から隙間分を引く） */
.col-3 { width: calc(33.333% - 6.7px); }

@media screen and (max-width: 768px) {
    .media-item.col-2 {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .filter-nav { gap: 15px 10px; }
    .filter-btn { width: 60px; }
    .filter-icon { width: 36px; height: 36px; font-size: 9px; }
}


/* 画像の選択と保存アクションを抑制する */
img {
    /* ドラッグ禁止 */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;

    /* 長押しメニュー禁止（スマホ用） */
    -webkit-touch-callout: none;
    
    /* 選択禁止 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* --- ヘッダー下の余白を強制的に広げる設定 --- */
.detail-container {
    /* 120pxから180pxに広げる（お好みで160〜200の間で調整してください） */
    margin-top: 160px !important; 
    /* 下側の余計なパディングをリセット */
    padding-bottom: 0 !important; 
    transition: 
        opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1) !important,
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* スマホ表示でも広げたい場合（必要であれば） */
@media screen and (max-width: 1000px) {
    .detail-container {
        margin-top: 120px !important; /* スマホでのヘッダー下余白 */ }
    .header-inner {
        /* 左の余白は維持し、右だけ10px（かなり端）に詰める */
        padding: 0 0px 0 25px !important; 
    }
}

html {
    scroll-behavior: smooth;
}

/* フィルタリングで非表示にする際のスタイル */
.work-item.is-hidden {
    display: none;
}