/* ==============================
   single-case.php
============================== */

/* ヘッダー強制スクロール状態 */
body.is-case-single #site-header {
    background: rgba(255, 255, 255, 0.56) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

body.is-case-single #site-header .logo-en {
    color: var(--color-black) !important;
}

body.is-case-single #site-header .logo-ja {
    color: rgba(0, 0, 0, 0.45) !important;
}

body.is-case-single #site-header .global-nav a {
    color: rgba(0, 0, 0, 0.7) !important;
}

body.is-case-single #site-header .header-sns a {
    color: rgba(0, 0, 0, 0.5) !important;
}

body.is-case-single #site-header .nav-toggle span {
    background: var(--color-black) !important;
}

/* ==============================
   Hero
============================== */
.cs-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 480px;
    overflow: hidden;
    z-index: 0;
}

.cs-hero-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
}

.cs-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.cs-hero-content {
    position: absolute;
    bottom: 10%;
    left: 8%;
    z-index: 2;
}

.cs-title {
    font-family: var(--font-ja);
    font-size: clamp(24px, 3.5vw, 48px);
    font-weight: 400;
    color: var(--color-white);
    letter-spacing: 0.08em;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cs-tag {
    font-family: var(--font-ja);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.75);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    padding: 4px 12px;
}

/* ==============================
   Gallery（メイソンリー）
============================== */
.cs-gallery {
    column-count: 3;
    column-gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 0;
    background: #fff;
}

.cs-gallery-item {
    break-inside: avoid;
    margin-bottom: 24px;
    overflow: hidden;
    cursor: zoom-in;
}

.cs-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.6s ease;
}

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

/* ==============================
   本文
============================== */
.cs-body {
    padding: 80px 24px 120px;
}

.cs-body-inner {
    max-width: 720px;
    text-align: center;
    margin: 0 auto;
    font-family: var(--font-ja);
    font-size: 15px;
    line-height: 2.2;
    letter-spacing: 0.06em;
    color: #444;
}

.cs-body-inner p {
    margin-bottom: 1.8em;
}

.cs-body-inner h2 {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--color-black);
    margin: 2.4em 0 1em;
    padding-bottom: 8px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);
}

.cs-body-inner h3 {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--color-black);
    margin: 2em 0 0.8em;
}

/* ==============================
   Responsive
============================== */
@media (max-width: 768px) {
    .cs-hero {
        height: 60vh;
    }

    .cs-gallery {
        column-count: 2;
        column-gap: 12px;
        padding: 48px 16px 0;
    }

    .cs-gallery-item {
        margin-bottom: 12px;
    }

    .cs-body {
        padding: 60px 20px 80px;
    }
}

/* ==============================
   前後ナビ
============================== */
.cs-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 0.5px solid rgba(0, 0, 0, 0.12);
}

.cs-post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 40px 48px;
    transition: background 0.3s ease;
}

.cs-post-nav-item:hover {
    background: #f0ece4;
}

.cs-post-nav-prev {
    border-right: 0.5px solid rgba(0, 0, 0, 0.12);
    align-items: flex-start;
}

.cs-post-nav-next {
    align-items: flex-end;
}

.cs-post-nav-label {
    font-family: var(--font-en);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}

.cs-post-nav-title {
    font-family: var(--font-ja);
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--color-black);
    line-height: 1.6;
}

.cs-post-nav-empty {
    padding: 40px 48px;
}

@media (max-width: 768px) {
    .cs-post-nav {
        grid-template-columns: 1fr;
    }

    .cs-post-nav-prev {
        border-right: none;
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
    }

    .cs-post-nav-item {
        padding: 28px 24px;
    }
}

/* ==============================
   ライトボックス
============================== */
#cs-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

#cs-lightbox.active {
    display: block;
}

.cs-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.cs-lightbox-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.cs-lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    transition: color 0.3s ease;
}

.cs-lightbox-close:hover {
    color: var(--color-white);
}

.cs-lightbox-prev,
.cs-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 48px;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    transition: color 0.3s ease;
    padding: 0 24px;
}

.cs-lightbox-prev {
    left: 0;
}

.cs-lightbox-next {
    right: 0;
}

.cs-lightbox-prev:hover,
.cs-lightbox-next:hover {
    color: var(--color-white);
}

/* ==============================
   共有ボタン
============================== */
.cs-share {
    padding: 48px 72px;
    display: flex;
    align-items: center;
    gap: 32px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.12);
}

.cs-share-label {
    font-family: var(--font-en);
    font-size: 11px;
    letter-spacing: 0.26em;
    color: var(--color-text-muted);
}

.cs-share-buttons {
    display: flex;
    gap: 12px;
}

.cs-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    font-family: var(--font-en);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--color-black);
    transition: background 0.3s ease, color 0.3s ease;
}

.cs-share-btn:hover {
    background: var(--color-black);
    color: var(--color-white);
}

@media (max-width: 768px) {
    .cs-share {
        padding: 36px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}