/* หน้ากรณีศึกษาผลงาน — ใช้โทนเดียวกับหน้าแรก (landing-home.css) ต่อยอดเฉพาะส่วนที่หน้านี้ต้องใช้ */

.case-hero {
    padding: 132px 0 56px;
    background: linear-gradient(180deg, var(--accent-soft), var(--bg) 70%);
}

.case-hero .eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.case-hero h1 {
    font-size: clamp(30px, 4.6vw, 46px);
    line-height: 1.3;
    margin: 0 0 18px;
    color: var(--ink);
    max-width: 18ch;
}

.case-hero .lead {
    font-size: 18px;
    line-height: 1.85;
    color: var(--muted);
    max-width: 62ch;
    margin: 0;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 36px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.case-meta div {
    min-width: 0;
}

.case-meta span {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    letter-spacing: .04em;
}

.case-meta strong {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--ink);
}

.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.tech-chips span {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
}

/* ---------- ภาพประกอบ ---------- */
.case-shot {
    margin: 0;
}

.case-shot img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    background: #fff;
}

.case-shot figcaption {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 12px;
    line-height: 1.7;
}

.case-hero .case-shot {
    margin-top: 40px;
}

.shot-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.shot-stack {
    display: grid;
    gap: 34px;
    margin-top: 34px;
}

/* ---------- การ์ดเนื้อหา ---------- */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.case-grid > * {
    min-width: 0;
}

.case-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.case-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 8px;
    line-height: 1.5;
}

.case-card p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
}

.case-card .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 14px;
}

/* ---------- แถบตัวเลข ---------- */
.case-stats {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 34px 30px;
    margin-top: 38px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 26px;
}

.case-stats div {
    min-width: 0;
}

.case-stats b {
    display: block;
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.case-stats span {
    display: block;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .72);
    margin-top: 6px;
}

/* ---------- ตารางส่งมอบ ---------- */
.case-rows {
    margin-top: 32px;
    border-top: 1px solid var(--line);
}

.case-rows > div {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 6px 30px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.case-rows h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
}

.case-rows p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
}

/* ---------- ส่วนมือถือ ---------- */
.case-split {
    display: grid;
    grid-template-columns: minmax(0, 400px) 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 32px;
}

.case-split > * {
    min-width: 0;
}

.case-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.case-list li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
}

.case-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 11px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- ปิดท้าย ---------- */
.case-cta {
    background: var(--grad);
    border-radius: var(--radius);
    padding: 40px 34px;
    color: #fff;
    text-align: center;
    margin-top: 10px;
}

.case-cta h2 {
    font-size: clamp(24px, 3.2vw, 32px);
    margin: 0 0 12px;
    color: #fff;
}

.case-cta p {
    font-size: 16.5px;
    line-height: 1.8;
    margin: 0 auto;
    max-width: 56ch;
    color: rgba(255, 255, 255, .9);
}

.case-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 26px;
}

.case-cta-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15.5px;
    text-decoration: none;
    background: #fff;
    color: var(--accent);
    border: 1px solid transparent;
}

.case-cta-actions a.ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
}

.case-note {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.8;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
    .shot-pair { grid-template-columns: 1fr; }
    .case-split { grid-template-columns: 1fr; gap: 26px; }
    .case-rows > div { grid-template-columns: 1fr; gap: 4px; }
    .case-hero { padding-top: 112px; }
}

/* ---------- หน้ารวมผลงาน ---------- */
.case-hero-list {
    padding-bottom: 20px;
}

.case-hero-list h1 {
    max-width: none;
}

.case-back {
    display: inline-block;
    font-size: 14.5px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 18px;
}

.case-back:hover {
    color: var(--accent);
}

/* จำกัดความกว้างสูงสุดของการ์ด ไม่งั้นตอนมีผลงานชิ้นเดียวจะยืดเต็มจอจนดูเหมือนแบนเนอร์ */
.case-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 1024px) {
    .case-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .case-index-grid {
        grid-template-columns: 1fr;
    }
}

.case-index-grid > * {
    min-width: 0;
}

.case-index-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.case-index-card:hover {
    border-color: #c6d4f7;
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.case-index-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top left;
    border-bottom: 1px solid var(--line);
    background: var(--bg-alt);
}

.case-index-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.case-index-tag {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--grad);
    border-radius: 999px;
    padding: 4px 12px;
}

.case-index-body h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    color: var(--ink);
}

.case-index-body p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
    margin: 0;
}

.case-index-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.case-index-tech span {
    font-size: 12.5px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
}

.case-index-more {
    margin-top: auto;
    padding-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--accent);
}

.case-index-more .icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.case-note {
    margin: 32px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--muted);
}

.case-note a {
    color: var(--accent);
    font-weight: 600;
}
