/* ============================================================
   /works  +  /works/{id}  — Page Styles
   ============================================================ */

:root {
    --teal: #10c59a;
    --teal-dark: #00857e;
    --ink: #333333;
    --bg-light: #f8f8f8;
    --bg-gray: #f2f2f2;
}

/* ════════════════════════════════════════════
   WORKS LIST (/works)
════════════════════════════════════════════ */

.wk-section {
    padding: 56px 0 240px; /* 240px bottom clears CTA banner overlap */
    background: var(--bg-light);
}

/* ── Filter ── */
.wk-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.wk-tag {
    background: transparent;
    color: var(--teal);
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid var(--teal);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    text-align: center;
}
.wk-tag:hover { background: var(--teal); color: #fff; }
.wk-tag--active { background: var(--teal); color: #fff; }
@media (hover: none) {
    .wk-tag:not(.wk-tag--active):hover { background: transparent; color: var(--teal); }
}

.wk-divider {
    border: none;
    border-top: 1px solid #d8d8d8;
    margin-bottom: 48px;
}

/* ── Card grid ── */
.wk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px 40px;
}
.wk-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}
.wk-card:hover { opacity: 0.85; }

.wk-card-img-wrap {
    border-radius: 12px;
    overflow: hidden;
    height: 320px;
    background: var(--bg-gray);
}
.wk-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.wk-card:hover .wk-card-img-wrap img { transform: scale(1.03); }

.wk-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 12px;
}
.wk-card-tag {
    display: inline-block;
    background: var(--bg-gray);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}
.wk-card-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.55;
    margin: 0;
}

/* ════════════════════════════════════════════
   WORK DETAIL (/works/{id})
════════════════════════════════════════════ */

.wk-detail-section {
    background: var(--bg-light);
    padding: 60px 0 240px; /* 240px bottom for CTA overlap */
}

/* ── Back link ── */
.wk-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 40px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.wk-detail-back:hover { opacity: 1; color: var(--teal); }

/* ── Upper (tags + title  /  image) ── */
.wk-detail-upper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}
.wk-detail-upper-left {
    padding-top: 140px; /* visually aligns tags/title with lower portion of image */
}
.wk-detail-title {
    color: var(--ink);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.45;
    margin-top: 14px;
    margin-bottom: 0;
}
.wk-detail-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* ── Lower (challenges + solution  /  info panel) ── */
.wk-detail-lower {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Text column */
.wk-detail-label {
    color: var(--teal);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 12px;
}
.wk-detail-label--mt { margin-top: 48px; }
.wk-detail-body {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.9;
    margin-bottom: 0;
}

/* Info panel */
.wk-info-panel {
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 8px 36px 8px;
}
.wk-info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 20px 0;
    border-bottom: 1px solid #d8d8d8;
    font-size: 16px;
}
.wk-info-row:first-child { border-top: 1px solid #d8d8d8; }
.wk-info-label {
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}
.wk-info-value {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.7;
}
.wk-info-value a {
    color: var(--teal);
    word-break: break-all;
}
.wk-info-value a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .wk-detail-title { font-size: 30px; }
}

@media (max-width: 768px) {
    .wk-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
    .wk-tag { white-space: normal; font-size: 13px; padding: 10px 8px; }

    .wk-grid { grid-template-columns: 1fr; }
    .wk-card-img-wrap { height: 220px; }

    .wk-detail-upper { grid-template-columns: 1fr; }
    .wk-detail-upper-left { padding-top: 0; }
    .wk-detail-img { height: 240px; }
    .wk-detail-title { font-size: 26px; }

    .wk-detail-lower { grid-template-columns: 1fr; }
    .wk-info-panel { padding: 8px 20px; }
    .wk-info-row { grid-template-columns: 100px 1fr; font-size: 14px; }
    .wk-info-label { font-size: 15px; }
    .wk-info-value { font-size: 14px; }
}
