/* ============================================
   Case Study Page — Premium Design
   ============================================
   Dependencies: common.css, about-tokens.css
   Loaded by: /about/*/case/*/index.html
   ============================================ */

/* --- Background --- */
.case-bg {
    min-height: 100vh;
    padding: calc(var(--nav-height, 72px) + 40px) 0 0;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8edf3 100%);
    position: relative;
}
.case-bg::before {
    content: '';
    position: absolute;
    top: 200px;
    right: -120px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10,191,182,0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Container --- */
.case-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Hero Image --- */
.case-hero {
    position: relative;
    width: 100%;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}
.case-hero img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}
.case-hero__overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 28px;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}
.case-hero__badge {
    display: inline-block;
    background: var(--about-primary, #0ABFB6);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 6px;
}

/* --- Paper Card (Article Body) --- */
.case-paper {
    background: #fff;
    border-radius: 0 0 20px 20px;
    padding: 40px 44px 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 48px;
}
.case-company {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--about-primary, #0ABFB6);
    margin-bottom: 8px;
}
.case-paper h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--jg-text, #2D313D);
    line-height: 1.5;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--about-primary, #0ABFB6);
}
.case-paper h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--jg-text, #2D313D);
    margin: 36px 0 12px;
    line-height: 1.5;
}
.case-paper h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jg-text, #2D313D);
    margin: 28px 0 10px;
    padding-left: 12px;
    border-left: 3px solid var(--about-primary, #0ABFB6);
}
.case-paper p {
    font-size: 1.5rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 16px;
}
.case-paper a {
    color: var(--about-primary, #0ABFB6);
    text-decoration: underline;
}
.case-paper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
    display: block;
}

/* Q&A styled blocks */
.case-paper .question {
    background: #f0fafa;
    border-left: 4px solid var(--about-primary, #0ABFB6);
    padding: 14px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    color: var(--jg-text, #2D313D);
}

/* Legacy class support */
.case-paper .about-case__intro {
    margin-bottom: 16px;
}
.case-paper .about-case__sec {
    margin-bottom: 24px;
}
.case-paper .about-case__content {
    margin-top: 16px;
}

/* --- Related Cases Grid --- */
.related-cases {
    max-width: 860px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.related-cases__title {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    color: var(--jg-text, #2D313D);
}
.related-cases__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.related-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.related-card__img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}
.related-card__body {
    padding: 14px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.related-card__tag {
    display: inline-block;
    background: var(--about-primary, #0ABFB6);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    width: fit-content;
}
.related-card__company {
    font-size: 1.15rem;
    color: #999;
    margin-bottom: 4px;
}
.related-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--jg-text, #2D313D);
    flex: 1;
}

/* --- CTA Section --- */
.case-cta {
    max-width: 860px;
    margin: 0 auto 80px;
    padding: 0 24px;
}
.case-cta__box {
    background: linear-gradient(135deg, #1F2536 0%, #0d1420 100%);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    color: #fff;
}
.case-cta__heading {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.case-cta__sub {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
    line-height: 1.6;
}
.case-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--about-primary, #0ABFB6);
    color: #fff;
    font-size: 1.45rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.case-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(10,191,182,0.4);
}

/* --- Fade-in Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .case-container { padding: 0 16px; }
    .case-hero img { height: 240px; }
    .case-paper { padding: 28px 24px 32px; }
    .case-paper h1 { font-size: 1.7rem; }
    .case-paper h2 { font-size: 1.5rem; }
    .case-paper p { font-size: 1.4rem; }
    .related-cases__grid { grid-template-columns: 1fr; }
    .case-cta__box { padding: 32px 20px; }
    .case-cta__heading { font-size: 1.6rem; }
}
