/*
 * JustMove blog redesign – blog listing, category archive, single post.
 * Loaded only on those views (see inc/blog-functions.php). All selectors use the "jmb-" prefix.
 */

:root {
    --jmb-red: #ee1d23;
    --jmb-red-dark: #c8141a;
    --jmb-navy: #1b2a6b;
    --jmb-text: #4a4f5c;
    --jmb-muted: #6b7180;
    --jmb-border: #e3e7f0;
    --jmb-bg: #f5f7fc;
    --jmb-shadow: 0 6px 18px rgba(27, 42, 107, .08);
}

.jmb-hero,
.jmb-listing,
.jmb-single {
    font-family: 'Roboto', sans-serif;
}

.jmb-listing *,
.jmb-single *,
.jmb-hero * {
    box-sizing: border-box;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* ---------- Shared bits ---------- */

/* Theme styles every <nav> with a dark background (styles-headers.css) – reset ours. */
.jmb-breadcrumb,
.jmb-pagination {
    background: none;
}

.jmb-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--jmb-red);
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 3px;
    text-decoration: none !important;
    transition: background .2s;
}

.jmb-badge:hover,
.jmb-badge:focus {
    background: var(--jmb-red-dark);
}

.jmb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0 0 12px;
    color: var(--jmb-muted);
    font-size: 13px;
    line-height: 1.4;
}

.jmb-meta span {
    display: inline-flex;
    align-items: center;
}

.jmb-meta .fa {
    margin-right: 7px;
    color: var(--jmb-navy);
    font-size: 14px;
}

.jmb-meta--lg {
    font-size: 15px;
}

.jmb-points {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.jmb-points li,
.jmb-content ul li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 30px;
    color: var(--jmb-text);
    font-size: 15px;
    line-height: 1.5;
    list-style: none;
}

.jmb-points li:before,
.jmb-content ul li:before {
    content: "\f058";
    position: absolute;
    top: 0;
    left: 0;
    color: var(--jmb-red);
    font-family: 'FontAwesome';
    font-size: 19px;
    line-height: 1.15;
}

.jmb-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    border: 2px solid var(--jmb-red);
    border-radius: 3px;
    background: #fff;
    color: var(--jmb-red) !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background .2s, color .2s;
}

.jmb-btn:hover,
.jmb-btn:focus {
    background: var(--jmb-red);
    color: #fff !important;
}

.jmb-section-title,
.jmb-heading {
    position: relative;
    margin: 0;
    padding-left: 22px;
    color: var(--jmb-navy);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.15;
}

.jmb-section-title:before,
.jmb-heading:before {
    content: "";
    position: absolute;
    top: 8%;
    bottom: 8%;
    left: 0;
    width: 6px;
    border-radius: 2px;
    background: var(--jmb-red);
}

.jmb-section-title {
    font-size: 40px;
}

.jmb-section-title span {
    color: var(--jmb-red);
}

.jmb-heading {
    padding-left: 16px;
    font-size: 24px;
}

.jmb-heading:before {
    width: 4px;
}

/* ---------- Hero banner ---------- */

.jmb-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 330px;
    background-color: #2b2b2b;
    background-position: center;
    background-size: cover;
}

.jmb-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 75%);
}

.jmb-hero .container {
    position: relative;
    flex: none;
}

.jmb-hero__text {
    position: relative;
    padding-left: 28px;
}

.jmb-hero__text:before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 6px;
    height: 44px;
    border-radius: 2px;
    background: var(--jmb-red);
}

.jmb-hero__title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.1;
}

.jmb-hero__subtitle {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
}

/* ---------- Listing ---------- */

.jmb-listing {
    padding: 50px 0 60px;
    background: var(--jmb-bg);
}

.jmb-listing__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 34px;
}

.jmb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.jmb-select {
    height: 44px;
    min-width: 190px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--jmb-border);
    border-radius: 3px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231b2a6b' d='M6 8 0 1.4 1.4 0 6 4.9 10.6 0 12 1.4z'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: var(--jmb-navy);
    font-size: 14px;
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.jmb-search {
    display: flex;
    margin: 0;
}

.jmb-search input[type="search"] {
    width: 200px;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--jmb-border);
    border-right: 0;
    border-radius: 3px 0 0 3px;
    background: #fff;
    color: var(--jmb-text);
    font-size: 14px;
    box-shadow: none;
}

.jmb-search button {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 3px 3px 0;
    background: var(--jmb-red);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}

.jmb-search button:hover,
.jmb-search button:focus {
    background: var(--jmb-red-dark);
}

.jmb-select:focus,
.jmb-search input[type="search"]:focus {
    border-color: var(--jmb-navy);
    outline: none;
}

.jmb-search-note {
    margin: -14px 0 24px;
    color: var(--jmb-text);
    font-size: 15px;
}

.jmb-search-note a {
    color: var(--jmb-red);
}

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

.jmb-empty {
    padding: 40px 0;
    color: var(--jmb-text);
    font-size: 16px;
    text-align: center;
}

/* ---------- Card ---------- */

.jmb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--jmb-border);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--jmb-shadow);
    transition: transform .25s, box-shadow .25s;
}

.jmb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(27, 42, 107, .14);
}

.jmb-card__media {
    display: block;
    height: 200px;
    overflow: hidden;
}

.jmb-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.jmb-card:hover .jmb-card__media img {
    transform: scale(1.05);
}

.jmb-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
}

.jmb-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px 20px;
}

.jmb-card__title {
    margin: 0 0 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.jmb-card__title a {
    color: var(--jmb-navy);
    text-decoration: none;
}

.jmb-card__title a:hover,
.jmb-card__title a:focus {
    color: var(--jmb-red);
}

.jmb-card__excerpt {
    margin: 0 0 22px;
    color: var(--jmb-text);
    font-size: 15px;
    line-height: 1.55;
}

.jmb-card .jmb-btn {
    margin-top: auto;
}

.jmb-card--compact .jmb-card__media {
    height: 165px;
}

.jmb-card--compact .jmb-card__title {
    font-size: 17px;
}

.jmb-card--compact .jmb-btn {
    padding: 7px 16px;
    font-size: 14px;
}

/* ---------- Pagination ---------- */

.jmb-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.jmb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--jmb-border);
    border-radius: 3px;
    background: #fff;
    color: var(--jmb-navy);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.jmb-pagination .page-numbers.current,
.jmb-pagination a.page-numbers:hover,
.jmb-pagination a.page-numbers:focus {
    border-color: var(--jmb-red);
    background: var(--jmb-red);
    color: #fff;
}

.jmb-pagination .page-numbers.dots {
    border: 0;
    background: none;
}

/* ---------- Single post ---------- */

.jmb-single {
    background: #fff;
}

.jmb-single {
    --jmb-sticky-top: 120px; /* height of the sticky site header + gap */
    padding: 22px 0 60px;
}

/* Content left, related articles sidebar right */
.jmb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 40px;
}

.jmb-layout--full {
    grid-template-columns: minmax(0, 1fr);
}

.jmb-article {
    min-width: 0;
}

/* Featured image shown in full – never cropped (images often contain text) */
.jmb-article__image {
    margin: 0 0 20px;
}

.jmb-article__image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.jmb-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 18px;
    color: var(--jmb-muted);
    font-size: 13px;
}

.jmb-breadcrumb a {
    color: var(--jmb-navy);
    text-decoration: none;
}

.jmb-breadcrumb a:hover {
    color: var(--jmb-red);
}

.jmb-breadcrumb .fa-angle-right {
    color: var(--jmb-muted);
}

.jmb-article__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 12px 0 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--jmb-border);
}

.jmb-article__title {
    margin: 0 0 12px;
    color: var(--jmb-navy);
    font-family: 'Roboto', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.jmb-article__head .jmb-meta {
    margin: 0;
}

.jmb-share {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 9px;
    color: var(--jmb-navy);
    font-size: 14px;
    font-weight: 500;
}

.jmb-share span {
    margin-right: 4px;
}

.jmb-share a,
.jmb-share button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, opacity .2s;
}

.jmb-share a:hover,
.jmb-share button:hover {
    transform: translateY(-2px);
    opacity: .9;
}

.jmb-share__fb { background: #2d4fa3; }
.jmb-share__in { background: #1f6fb5; }
.jmb-share__tw { background: #1da1f2; }

.jmb-share__copy {
    background: #e7ebf5;
    color: var(--jmb-navy) !important;
}

.jmb-share__copy.is-copied {
    background: #2e9b4e;
    color: #fff !important;
}

/* Content */

.jmb-content {
    color: var(--jmb-text);
    font-size: 16px;
    line-height: 1.7;
}

.jmb-content p {
    margin: 0 0 14px;
    color: var(--jmb-text);
    font-size: 16px;
    line-height: 1.7;
}

.jmb-content a {
    color: var(--jmb-red);
    text-decoration: underline;
}

.jmb-content ul,
.jmb-content ol {
    margin: 0 0 16px;
    padding: 0;
}

.jmb-content ol {
    padding-left: 20px;
}

.jmb-content h2,
.jmb-content h3,
.jmb-content h4,
.jmb-content h5 {
    margin: 0 0 12px;
    color: var(--jmb-navy);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.jmb-content h2 { font-size: 24px; }
.jmb-content h3 { font-size: 21px; }
.jmb-content h4 { font-size: 19px; }
.jmb-content h5 { font-size: 17px; }

.jmb-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.jmb-intro {
    padding: 6px 0 10px;
}

.jmb-intro > p:first-child {
    font-size: 17px;
}

.jmb-step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0 4px;
    padding: 22px 0 14px;
    border-bottom: 1px solid var(--jmb-border);
}

.jmb-step:last-child {
    border-bottom: 0;
}

.jmb-step--media {
    grid-template-columns: 44px minmax(0, 1fr) 240px;
    gap: 0 24px;
}

.jmb-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--jmb-red);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.jmb-step__body > :first-child {
    margin-top: 4px;
}

.jmb-content .jmb-step__body > h2,
.jmb-content .jmb-step__body > h3,
.jmb-content .jmb-step__body > h4 {
    font-size: 21px;
}

.jmb-step__media img,
.jmb-step__media figure {
    display: block;
    width: 100%;
    margin: 0;
}

.jmb-step__media img {
    height: 190px;
    object-fit: cover;
    box-shadow: var(--jmb-shadow);
}

/* "Moving Tip" box – any quote block in the post */
.jmb-content blockquote {
    position: relative;
    min-height: 96px;
    margin: 26px 0;
    padding: 20px 24px 20px 112px;
    border: 0;
    border-radius: 6px;
    background: #e9f1fc;
    color: var(--jmb-navy);
    font-size: 16px;
    font-style: normal;
}

.jmb-content blockquote:before {
    content: "\f0eb";
    position: absolute;
    top: 16px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    border-radius: 4px;
    background: var(--jmb-red);
    color: #fff;
    font-family: 'FontAwesome';
    font-size: 34px;
}

.jmb-content blockquote p {
    margin: 0 0 6px;
    color: var(--jmb-navy);
}

.jmb-content blockquote strong:first-child {
    display: block;
    color: var(--jmb-red);
    font-size: 21px;
}

/* FAQ – any Details block in the post */
.jmb-content details {
    margin: 0 0 8px;
    border: 1px solid var(--jmb-border);
    border-radius: 4px;
    background: #fff;
}

.jmb-content summary {
    position: relative;
    padding: 11px 44px 11px 16px;
    color: var(--jmb-navy);
    font-size: 15px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.jmb-content summary::-webkit-details-marker {
    display: none;
}

.jmb-content summary:after {
    content: "\f107";
    position: absolute;
    top: 50%;
    right: 16px;
    font-family: 'FontAwesome';
    font-size: 18px;
    transform: translateY(-50%);
    transition: transform .2s;
}

.jmb-content details[open] summary:after {
    transform: translateY(-50%) rotate(180deg);
}

.jmb-content details > :not(summary) {
    padding: 0 16px 12px;
}

.jmb-comments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--jmb-border);
}

.jmb-single .page-links {
    margin: 20px 0;
}

/* Related articles sidebar */

.jmb-sidebar__inner {
    position: sticky;
    top: var(--jmb-sticky-top);
    max-height: calc(100vh - var(--jmb-sticky-top) - 20px);
    overflow-y: auto;
    padding: 20px;
    border-radius: 6px;
    background: var(--jmb-bg);
    scrollbar-width: thin;
}

.jmb-sidebar .jmb-heading {
    margin-bottom: 18px;
    font-size: 21px;
}

.jmb-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.jmb-sidebar .jmb-card:hover {
    transform: none;
}

.jmb-sidebar .jmb-card__media {
    height: 120px;
}

.jmb-sidebar .jmb-card__badge {
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 12px;
}

.jmb-sidebar .jmb-card__body {
    padding: 12px 14px 14px;
}

.jmb-sidebar .jmb-meta {
    margin-bottom: 6px;
    font-size: 12px;
}

.jmb-sidebar .jmb-card__title {
    margin-bottom: 0;
    font-size: 16px;
}

/* Desktop sidebar: image + title are the links, button hidden to keep 3 cards in view */
@media (min-width: 992px) {
    .jmb-sidebar .jmb-btn {
        display: none;
    }
}

.jmb-link {
    color: var(--jmb-red) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
}

.jmb-link .fa {
    margin-left: 6px;
    transition: transform .2s;
}

.jmb-link:hover .fa {
    transform: translateX(4px);
}

/* ---------- Responsive ---------- */

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

    .jmb-section-title {
        font-size: 34px;
    }

    .jmb-hero {
        min-height: 260px;
    }

    .jmb-hero__title {
        font-size: 40px;
    }

    .jmb-article__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .jmb-article__title {
        font-size: 30px;
    }

    .jmb-step--media {
        grid-template-columns: 44px minmax(0, 1fr) 220px;
    }

    /* Sidebar drops below the content */
    .jmb-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .jmb-sidebar__inner {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .jmb-sidebar__list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .jmb-sidebar .jmb-card__title {
        margin-bottom: 12px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .jmb-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 30px;
    }

    .jmb-article__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .jmb-step--media {
        grid-template-columns: 44px minmax(0, 1fr) 200px;
    }
}

@media (max-width: 767px) {
    .jmb-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .jmb-hero {
        min-height: 200px;
    }

    .jmb-hero:before {
        background: rgba(0, 0, 0, .45);
    }

    .jmb-hero .container {
        width: 100%;
    }

    .jmb-hero__text {
        padding-left: 20px;
    }

    .jmb-hero__text:before {
        height: 34px;
        width: 5px;
    }

    .jmb-hero__title {
        font-size: 34px;
    }

    .jmb-hero__subtitle {
        font-size: 16px;
    }

    .jmb-listing {
        padding: 34px 0 44px;
    }

    .jmb-listing__head {
        margin-bottom: 24px;
    }

    .jmb-section-title {
        padding-left: 16px;
        font-size: 28px;
    }

    .jmb-section-title:before {
        width: 4px;
    }

    .jmb-filters,
    .jmb-select,
    .jmb-search {
        width: 100%;
    }

    .jmb-search input[type="search"] {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .jmb-card__media {
        height: 210px;
    }

    .jmb-single {
        padding-top: 16px;
    }

    .jmb-sidebar__inner {
        padding: 16px;
    }

    .jmb-sidebar__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .jmb-article__title {
        font-size: 25px;
    }

    .jmb-meta--lg {
        font-size: 14px;
    }

    .jmb-step,
    .jmb-step--media {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0;
    }

    .jmb-step__num {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .jmb-step__media {
        grid-column: 1 / -1;
        margin-top: 10px;
    }

    .jmb-content .jmb-step__body > h2,
    .jmb-content .jmb-step__body > h3,
    .jmb-content .jmb-step__body > h4 {
        font-size: 19px;
    }

    .jmb-content blockquote {
        padding: 86px 18px 18px;
    }

    .jmb-content blockquote:before {
        width: 54px;
        height: 54px;
        font-size: 28px;
    }
}