/* 首页定制覆盖
 *
 * 仅作用于"Latest Projects"区块（#latest-projects），把原主题的深色块 + 红色 hover
 * 改成与全站一致的纯黑白配色，并把 slick 走马灯换成静态 3 列 grid（只剩 3 个项目，
 * 走马灯反而显得空荡且增加 JS 体积）。
 */

/* services 段落与 latest 段落都是白底，theme 默认 .page-section{padding:100px 0}
 * 加上 latest 自己 96px，叠出 196px 死白；
 * latest 紧跟 services（同色），上 padding 收一收；下 padding 维持，因为下一段会换底色。
 */
#latest-projects {
    background-color: #ffffff;
    padding: 56px 0 80px;
}

/* 已完成区块用 --rjs-bg-soft 浅灰底，与 ongoing 区块视觉成对但能区分；
 * 上下对称，靠底色切换做天然分隔，不再追加大量白边。
 */
#completed-projects {
    background-color: #f7f7f7;
    padding: 80px 0 72px;
}

/* services 段的 eyebrow 还是 theme 的红色，与全站 B&W 不一致；统一覆盖。*/
#our-services .custom-meta-title,
#latest-projects .section-header .custom-meta-title,
#completed-projects .section-header .custom-meta-title {
    color: #6b6b6b;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 14px;
}

#latest-projects .section-header,
#completed-projects .section-header {
    max-width: 720px;
    margin: 0 auto 44px;
    text-align: center;
}

#latest-projects .section-header .section-title,
#completed-projects .section-header .section-title {
    color: #1a1a1a;
    font-weight: 600;
    margin: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

/* 静态 3 列 grid，移动端自动塌陷 */
.rjs-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
}

@media (max-width: 991px) {
    .rjs-latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .rjs-latest-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.rjs-latest-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    margin: 0; /* 抵消主题里 article {margin: 0 15px} */
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.rjs-latest-card:hover,
.rjs-latest-card:focus-within {
    border-color: #1a1a1a;
    box-shadow: 0 18px 36px -22px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.rjs-latest-card .featured-image {
    overflow: hidden;
    aspect-ratio: 490 / 375;
    background: #f0f0f0;
}

.rjs-latest-card .featured-image a {
    display: block;
    height: 100%;
}

.rjs-latest-card .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.rjs-latest-card:hover .featured-image img,
.rjs-latest-card:focus-within .featured-image img {
    transform: scale(1.04);
}

.rjs-latest-card .entry-container {
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.rjs-latest-card .entry-title {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.35;
    margin: 0;
}

.rjs-latest-card .entry-title a {
    color: #1a1a1a;
    text-decoration: none;
    /* 让整张卡可点：拉伸链接覆盖整个 article */
}

.rjs-latest-card .entry-title a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.rjs-latest-card {
    position: relative;
}

.rjs-latest-card .entry-title a:hover,
.rjs-latest-card .entry-title a:focus {
    color: #4a4a4a; /* 不再使用 #ff2d00 */
}

/* 元数据 dl：左列固定 88px、右列 1fr。
 * 冒号挂在 dd::before（值列起点），所有冒号天然在同一 x 位对齐——
 * 之前挂在 dt::after 时短标签的冒号会贴着标签贴近左侧、长标签贴右，看上去歪。
 */
.rjs-card-meta {
    margin: 0;
    display: grid;
    grid-template-columns: 88px 1fr;
    row-gap: 8px;
    column-gap: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    align-content: start;
}

.rjs-card-meta dt {
    color: #6b6b6b;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.72rem;
    padding-top: 2px;
}

.rjs-card-meta dd {
    color: #1a1a1a;
    margin: 0;
    font-weight: 500;
    display: flex;
}

.rjs-card-meta dd::before {
    content: ":";
    color: #9a9a9a;
    margin-right: 10px;
    flex-shrink: 0;
}

/* 区块底部"View all projects"链接：低调下划线，和卡片一致用纯黑灰 */
.rjs-latest-cta {
    margin-top: 40px;
    text-align: center;
}

.rjs-latest-link {
    display: inline-block;
    color: #1a1a1a;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid #1a1a1a;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rjs-latest-link:hover,
.rjs-latest-link:focus {
    color: #4a4a4a;
    border-color: #4a4a4a;
    transform: translateX(4px);
}
