.jpg-projects-wrap {
    --jpg-navy: #071c3c;
    --jpg-blue: #154f91;
    --jpg-red: #c9232b;
    --jpg-light: #f3f6fa;
    width: min(1320px, calc(100% - 32px));
    margin: 48px auto 72px;
}

.jpg-projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

.jpg-project-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(7, 28, 60, .10);
    border-radius: 5px;
    box-shadow: 0 10px 28px rgba(7, 28, 60, .10);
    transition: transform .25s ease, box-shadow .25s ease;
}

.jpg-project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(7, 28, 60, .17);
}

.jpg-project-image {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--jpg-light);
}

.jpg-project-image img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform .5s ease;
}

.jpg-project-card:hover .jpg-project-image img {
    transform: scale(1.055);
}

.jpg-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background: linear-gradient(135deg, var(--jpg-navy), var(--jpg-blue));
}

.jpg-placeholder .dashicons {
    width: auto;
    height: auto;
    color: rgba(255, 255, 255, .85);
    font-size: 54px;
}

.jpg-project-card-body {
    display: flex;
    min-height: 96px;
    align-items: center;
    padding: 20px 22px;
    border-top: 4px solid var(--jpg-red);
}

.jpg-project-title {
    margin: 0 !important;
    font-size: clamp(18px, 1.25vw, 22px) !important;
    font-weight: 700;
    line-height: 1.3;
}

.jpg-project-title a {
    color: var(--jpg-navy) !important;
    text-decoration: none !important;
}

.jpg-project-title a:hover,
.jpg-project-title a:focus {
    color: var(--jpg-red) !important;
}

.jpg-no-projects {
    padding: 48px 24px;
    text-align: center;
    background: var(--jpg-light);
    border-left: 5px solid var(--jpg-red);
}

.jpg-home-projects-link {
    display: flex;
    width: 100%;
    justify-content: center;
    clear: both;
    padding: 30px 16px 4px;
}

/* Visible fallback when the theme's Projects section cannot be detected. */
.jpg-home-projects-link--floating {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    right: 22px !important;
    bottom: 22px !important;
    z-index: 999999 !important;
    width: auto !important;
    padding: 0 !important;
}

.jpg-projects-button {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 13px 24px;
    color: #fff !important;
    background: #071c3c;
    border: 2px solid #071c3c;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.jpg-projects-button:hover,
.jpg-projects-button:focus {
    color: #fff !important;
    background: #c9232b;
    border-color: #c9232b;
    transform: translateY(-2px);
}

.jpg-projects-button span {
    font-size: 20px;
    line-height: 1;
}

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

@media (max-width: 600px) {
    .jpg-projects-wrap { width: min(100% - 24px, 1320px); margin-top: 28px; }
    .jpg-projects-grid { grid-template-columns: 1fr; gap: 20px; }
    .jpg-project-card-body { min-height: 82px; padding: 17px 18px; }
}

