/* =====================================================
   Case Study Page — Premium Styles
   ===================================================== */

/* ---- Page Container ---- */
.cs-page {
    padding-top: 140px;
    padding-bottom: 80px;
    max-width: 880px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---- Hero Section ---- */
.cs-hero {
    text-align: center;
    margin-bottom: 60px;
}

.cs-hero-inner {
    margin-bottom: 40px;
}

.cs-badge {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #8a2be2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    margin-bottom: 30px;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.cs-main-title {
    font-size: 2.2rem;
    line-height: 1.5;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-jp);
    margin-bottom: 20px;
}

.cs-main-title-label {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: #aaa;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.cs-hero-lead {
    font-size: 1.15rem;
    color: #999;
    line-height: 1.8;
    font-family: var(--font-jp);
}

/* Thumbnail */
.cs-hero-thumbnail {
    max-width: 680px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cs-hero-thumbnail img {
    width: 100%;
    display: block;
    height: auto;
}

/* ---- Cards (each section) ---- */
.cs-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 50px 45px;
    margin-bottom: 36px;
    backdrop-filter: blur(12px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cs-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.08);
}

.cs-card-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.cs-card-number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(138, 43, 226, 0.2));
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cs-card-header h2 {
    font-size: 1.6rem;
    line-height: 1.5;
    color: #fff;
    margin: 0;
    font-family: var(--font-jp);
    font-weight: 700;
}

/* ---- Body Text ---- */
.cs-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #ccc;
    margin-bottom: 20px;
    font-family: var(--font-jp);
    font-weight: 300;
}

.cs-body strong {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(transparent 60%, rgba(0, 212, 255, 0.15) 60%);
    padding: 0 3px;
}

/* ---- Blockquote ---- */
.cs-blockquote {
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.08) 0%, transparent 100%);
    padding: 24px 28px;
    border-radius: 0 16px 16px 0;
    margin: 0 0 24px 0;
}

.cs-blockquote p {
    font-size: 1.15rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.8;
    font-style: italic;
    font-family: var(--font-jp);
    margin: 0;
}

/* ---- 3 Walls Grid ---- */
.cs-wall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.cs-wall-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.cs-wall-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
}

.cs-wall-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.cs-wall-item h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
    font-family: var(--font-jp);
}

.cs-wall-item h3 small {
    font-size: 0.85rem;
    font-weight: 400;
    color: #999;
}

.cs-wall-item p {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.7;
    font-family: var(--font-jp);
    font-weight: 300;
}

.cs-wall-item p strong {
    color: var(--accent-color);
}

/* ---- Figures (images) ---- */
.cs-figure {
    margin: 30px auto;
    max-width: 600px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
}

.cs-figure:hover {
    transform: scale(1.01);
}

.cs-figure img {
    width: 100%;
    display: block;
    height: auto;
}

.cs-figure figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #777;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    font-family: var(--font-jp);
}

/* Smaller figures for inline images */
.cs-figure-sm {
    max-width: 480px;
}

/* ---- Step blocks ---- */
.cs-step {
    display: flex;
    gap: 24px;
    margin: 36px 0;
    align-items: flex-start;
}

.cs-step-label {
    flex-shrink: 0;
}

.cs-step-label span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 8px 18px;
    background: linear-gradient(135deg, #00d4ff, #8a2be2);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 10px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.cs-step-content {
    flex: 1;
    min-width: 0;
}

.cs-step-content h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.4;
    font-family: var(--font-jp);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

/* ---- Pro Tip / Important Note ---- */
.cs-protip {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.06), rgba(255, 152, 0, 0.04));
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 20px;
    padding: 36px 32px;
    margin: 36px 0;
}

.cs-protip-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.cs-protip-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.cs-protip-header h4 {
    font-size: 1.15rem;
    color: #ffc107;
    font-weight: 700;
    line-height: 1.4;
    font-family: var(--font-jp);
    margin: 0;
}

.cs-protip-answer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 193, 7, 0.15);
}

.cs-protip-answer .cs-body strong {
    background: linear-gradient(transparent 60%, rgba(76, 175, 80, 0.2) 60%);
}

/* ---- Comparison Cards ---- */
.cs-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.cs-comparison-item {
    border-radius: 20px;
    padding: 28px 24px;
}

.cs-comparison-before {
    background: rgba(255, 82, 82, 0.06);
    border: 1px solid rgba(255, 82, 82, 0.2);
}

.cs-comparison-after {
    background: rgba(76, 175, 80, 0.06);
    border: 1px solid rgba(76, 175, 80, 0.25);
}

.cs-comparison-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.cs-comparison-before .cs-comparison-label {
    color: #ff5252;
}

.cs-comparison-after .cs-comparison-label {
    color: #4caf50;
}

.cs-comparison-item h4 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 10px;
    font-family: var(--font-jp);
    font-weight: 700;
    line-height: 1.4;
}

.cs-comparison-item p {
    font-size: 0.95rem;
    color: #bbb;
    line-height: 1.7;
    font-family: var(--font-jp);
    font-weight: 300;
    margin: 0;
}

.cs-comparison-item p strong {
    color: #fff;
}

.cs-result-text {
    text-align: center;
    font-size: 1.1rem !important;
    margin-top: 20px;
}

/* ---- CTA Card ---- */
.cs-card-cta {
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(138, 43, 226, 0.06));
    border-color: rgba(0, 212, 255, 0.2);
}

.cs-card-cta .cs-card-header {
    justify-content: center;
}

.cs-card-cta .cs-card-header h2 {
    text-align: center;
}

.cs-cta-button {
    margin-top: 36px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cs-page {
        padding-top: 110px;
    }

    .cs-main-title {
        font-size: 1.6rem;
    }

    .cs-card {
        padding: 32px 22px;
    }

    .cs-wall-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cs-step {
        flex-direction: column;
        gap: 12px;
    }

    .cs-comparison {
        grid-template-columns: 1fr;
    }

    .cs-figure {
        max-width: 100%;
    }

    .cs-figure-sm {
        max-width: 100%;
    }

    .cs-hero-thumbnail {
        max-width: 100%;
    }

    .cs-protip {
        padding: 24px 18px;
    }

    .cs-card-header {
        flex-direction: column;
        gap: 12px;
    }
}

/* ---- Larger Figures (diagram images) ---- */
.cs-figure-lg {
    max-width: 100%;
}

/* ---- Clickable Figures ---- */
.cs-clickable {
    cursor: zoom-in;
}

.cs-clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 50px rgba(0, 212, 255, 0.15);
}

.cs-zoom-hint {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--accent-color);
    opacity: 0.7;
}

/* ---- Lightbox Overlay ---- */
.cs-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.cs-lightbox.active {
    display: flex;
    animation: lightboxFadeIn 0.25s ease;
}

.cs-lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    object-fit: contain;
}

.cs-lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
    z-index: 10001;
}

.cs-lightbox-close:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}