/* Joyful Cook Recipe Grids: front end
   Breakpoints: desktop >= 991px, tablet 691-990px, mobile <= 690px.
   Colours, radius and shadow come from Settings (CSS variables printed after this file). */

.jcg, .jcg *, .jcg *::before, .jcg *::after { box-sizing: border-box; }
.jcg { --jcg-accent: #e4990d; --jcg-dark: #06311a; --jcg-radius: 10px; --jcg-shadow: 0 2px 14px rgba(0,0,0,.07); color: #222; }

/* ---------- which screen shows which layout ---------- */
.jcg-view { display: block; margin: var(--jcg-sp-top, 0px) 0 var(--jcg-sp-bot, 8px); animation: jcgFadeUp .9s ease both; }
/* tight top: no extra gap above the grid (theme row/paragraph spacing above is left alone) */
.jcg { margin-top: 0; padding-top: 0; }
.jcg .jcg-view > :first-child, .jcg .jcg-frame__main > :first-child, .jcg .jcg-split__a > :first-child { margin-top: 0; }
/* tight bottom: trailing margins/padding of the last block inside the grid */
.jcg .jcg-view > :last-child, .jcg .jcg-frame__main > :last-child, .jcg .jcg-split__a > :last-child, .jcg .jcg-split__b > :last-child, .jcg .jcg-stack, .jcg .jcg-compact { margin-bottom: 0; }
.jcg .jcg-stack > :last-child, .jcg .jcg-split__b > .jcg-text:last-child, .jcg .jcg-text:last-child { margin-bottom: 0; }
.jcg .jcg-cards--track { padding-bottom: 6px; }
@media (min-width: 991px) { .jcg-view:not(.jcg-on-desktop) { display: none; } }
@media (min-width: 691px) and (max-width: 990px) { .jcg-view:not(.jcg-on-tablet) { display: none; } }
@media (max-width: 690px) { .jcg-view:not(.jcg-on-mobile) { display: none; } }

@keyframes jcgFadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- side text frame ---------- */
.jcg-frame { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.jcg-frame.has-left, .jcg-frame.has-right { padding: 0 25px; }
.jcg-frame__main { flex: 1 1 auto; min-width: 0; }
.jcg-side {
    position: relative; flex: 0 0 auto; display: inline-block;
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: "DM Sans", "Lora", Georgia, serif; font-size: 15px; font-weight: 500; letter-spacing: 5px;
    color: var(--jcg-accent); opacity: .8; text-align: center; white-space: nowrap;
}
.jcg-side::before, .jcg-side::after {
    content: ""; position: absolute; left: 50%; width: 2.5px; height: 30px; margin-left: -1px;
    background: var(--jcg-accent); border-radius: 2px; box-shadow: 0 0 8px var(--jcg-accent), 0 0 15px var(--jcg-accent);
    animation: jcgGlow 2.5s ease-in-out infinite alternate;
}
.jcg-side::before { top: -60px; }
.jcg-side::after  { bottom: -60px; animation-delay: .2s; }
@keyframes jcgGlow { from { opacity: .45; } to { opacity: 1; } }

@media (max-width: 690px) {
    .jcg-frame { gap: 8px; }
    .jcg-frame.has-left, .jcg-frame.has-right { padding: 0 2px; }
    .jcg-side { font-size: 11px; letter-spacing: 3px; }
    .jcg-side::before, .jcg-side::after { height: 20px; }
    .jcg-side::before { top: -34px; }
    .jcg-side::after  { bottom: -34px; }
}

/* ---------- heading, text, image, button ---------- */
.jcg .jcg-title {
    margin: 0 0 18px; padding: 0; text-align: center; color: #1c1c1c;
    font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.2; letter-spacing: 0;
}
.jcg .jcg-title::after, .jcg .jcg-title::before { display: none; }
.jcg .jcg-text { font-family: "Lora", Georgia, serif; font-size: 15.5px; line-height: 1.65; color: #333; margin: 0 0 20px; }
.jcg .jcg-text p { margin: 0 0 .8em; }
.jcg .jcg-text p:last-child { margin-bottom: 0; }
.jcg .jcg-media { margin: 0; line-height: 0; border-radius: var(--jcg-radius); overflow: hidden; box-shadow: var(--jcg-shadow); background: #f1ede6; }
.jcg .jcg-media img { display: block; width: 100% !important; height: auto !important; max-width: 100% !important; aspect-ratio: 1 / 1; object-fit: cover; margin: 0; }
.jcg .jcg-btnrow { margin-top: 22px; text-align: center; }
.jcg .jcg-btn {
    display: inline-block; padding: 11px 24px; border-radius: 999px; background: var(--jcg-dark); color: #fff;
    font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, transform .2s;
}
.jcg .jcg-btn:hover { background: var(--jcg-accent); color: #fff; transform: translateY(-1px); }
.jcg-empty { text-align: center; color: #666; }

/* ---------- recipe cards ---------- */
.jcg .jcg-cards { display: grid; grid-template-columns: repeat(var(--jcg-cols, 2), minmax(0, 1fr)); gap: 18px; }
.jcg .jcg-card {
    position: relative; margin: 0; padding: 10px; text-align: center; background: #fff; border: 1px solid #eee;
    border-radius: var(--jcg-radius); box-shadow: var(--jcg-shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.jcg .jcg-card__link { display: block; height: 100%; color: inherit; text-decoration: none; box-shadow: none; border: 0; }
.jcg .jcg-card__media {
    position: relative; overflow: hidden; aspect-ratio: var(--jcg-ratio, 1 / 1);
    border-radius: max(calc(var(--jcg-radius) - 3px), 0px); background: #f1ede6;
}
.jcg .jcg-card__media img {
    position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0;
    object-fit: cover; object-position: center; transition: transform .45s ease, filter .45s ease;
}
.jcg .jcg-ph { position: absolute; inset: 0; background: linear-gradient(135deg, #f6efe2, #e6d8bf); }
.jcg .jcg-card__body { padding: 2px 4px 4px; }
.jcg .jcg-card__title {
    margin: 8px 0 2px; padding: 0; color: #222; font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(14px, 1.2vw, 17px); font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; transition: color .2s;
}
.jcg .jcg-card__link:hover .jcg-card__title { color: var(--jcg-dark); }

/* category / "Favorite" tag on the photo */
.jcg .jcg-chip {
    position: absolute; top: 10px; left: 10px; z-index: 2; padding: 5px 10px; border-radius: 4px; line-height: 1.2;
    background: var(--jcg-accent); color: #fff; font-size: 13px; font-weight: 500; pointer-events: none;
}
.jcg-motion--shake .jcg-chip { animation: jcgShake 8s ease-in-out infinite; }
.jcg-motion--float .jcg-chip { animation: jcgFloat 3s ease-in-out infinite; }
.jcg-motion--pulse .jcg-chip { animation: jcgPulse 2.4s ease-in-out infinite; }
@keyframes jcgShake { 0%, 8%, 100% { transform: none; } 1.5% { transform: translateX(-5px); } 3% { transform: translateX(5px); } 4.5% { transform: translateX(-4px); } 6% { transform: translateX(3px); } }
@keyframes jcgFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes jcgPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* mobile: slightly smaller stars so the count never gets pushed outside the card */
@media (max-width: 690px) { .jcg .jcg-star { font-size: 13px; } .jcg .jcg-rating__n { font-size: 10.5px; } }

/* hover */
.jcg-hover--zoom .jcg-card:hover .jcg-card__media img { transform: scale(1.08); filter: brightness(1.05); }
.jcg-hover--lift .jcg-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,.14); }

/* stars: isolated markup (jcg-*), immune to theme / CPT rules for .recipe-rating, .star etc. */
.jcg .jcg-card__stars { display: block; width: 100%; margin: 9px 0 0; padding: 0; text-align: center; line-height: 1; float: none; position: static; }
.jcg .jcg-rating { display: inline-flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 4px; max-width: 100%; margin: 0; padding: 0; float: none; position: static; line-height: 1; white-space: nowrap; color: #555; text-align: center; }
.jcg .jcg-stars { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 1px; margin: 0; padding: 0; float: none; position: static; }
.jcg .jcg-star { display: inline-block; position: static; float: none; margin: 0; padding: 0; width: auto; height: auto; font-family: Arial, "Segoe UI Symbol", sans-serif; font-style: normal; font-weight: 400; font-size: 14px; line-height: 1; color: #d6d6d6; text-shadow: none; }
.jcg .jcg-star::before, .jcg .jcg-star::after { content: none; }
.jcg .jcg-star--full { color: #f5b700; }
.jcg .jcg-star--half { color: #d6d6d6; background: linear-gradient(90deg, #f5b700 50%, #d6d6d6 50%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.jcg .jcg-rating__n { display: inline; margin: 0; padding: 0; font-size: 11px; font-weight: 400; line-height: 1; color: inherit; }

/* card style: overlay */
.jcg-card--overlay .jcg-card { padding: 0; border: 0; overflow: hidden; }
.jcg-card--overlay .jcg-card__link { position: relative; }
.jcg-card--overlay .jcg-card__media { border-radius: 0; }
.jcg-card--overlay .jcg-card__body {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 46px 12px 12px; text-align: left; color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
}
.jcg-card--overlay .jcg-card__title, .jcg-card--overlay .jcg-card__link:hover .jcg-card__title { color: #fff; margin-top: 6px; }
.jcg-card--overlay .jcg-card__stars { margin-top: 0; text-align: left; }
.jcg-card--overlay .jcg-rating { color: #fff; }

/* card style: minimal */
.jcg-card--minimal .jcg-card { padding: 0; background: transparent; border: 0; box-shadow: none; }
.jcg-card--minimal .jcg-card__media { box-shadow: var(--jcg-shadow); border-radius: var(--jcg-radius); }
.jcg-card--minimal .jcg-card__body { padding: 2px 0 0; }

/* card style: horizontal */
.jcg-card--horizontal .jcg-card__link { display: flex; align-items: center; gap: 14px; }
.jcg-card--horizontal .jcg-card__media { flex: 0 0 40%; }
.jcg-card--horizontal .jcg-card__body { flex: 1 1 auto; min-width: 0; text-align: left; padding: 4px 6px 4px 0; }
.jcg-card--horizontal .jcg-card__title { margin-top: 6px; }
.jcg-card--horizontal .jcg-chip { top: 6px; left: 6px; font-size: 11px; padding: 3px 7px; }

/* ---------- layout: split ---------- */
.jcg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.jcg-split--flip .jcg-split__a { order: 2; }
.jcg-split__b .jcg-text { margin-top: 0; }
.jcg-split__b .jcg-cards { gap: 14px; }
@media (max-width: 690px) {
    .jcg-split { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .jcg-split--flip .jcg-split__a { order: 0; }
    .jcg .jcg-split .jcg-media img { aspect-ratio: 4 / 3; }
}

/* ---------- layout: stacked / grid / carousel ---------- */
.jcg-stack { margin-bottom: 22px; }
.jcg-stack--plain { margin-bottom: 18px; }
.jcg .jcg-stack .jcg-media img { aspect-ratio: 16 / 8; }
.jcg .jcg-stack .jcg-text { max-width: 70ch; margin: 18px auto 0; text-align: center; }
.jcg .jcg-stack--plain .jcg-text { margin-top: 0; }
@media (max-width: 690px) {
    .jcg .jcg-stack .jcg-media img { aspect-ratio: 4 / 3; }
}

/* ---------- layout: banner + float ---------- */
.jcg .jcg-hero { position: relative; overflow: hidden; border-radius: var(--jcg-radius); box-shadow: var(--jcg-shadow); background: #222; }
.jcg .jcg-hero__media { line-height: 0; }
.jcg .jcg-hero__media img { display: block; width: 100% !important; height: auto !important; max-width: 100% !important; aspect-ratio: 21 / 8; object-fit: cover; margin: 0; }
.jcg .jcg-hero__body {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 24px 8%; text-align: center; color: #fff; background: linear-gradient(rgba(0,0,0,.32), rgba(0,0,0,.58));
}
.jcg .jcg-hero .jcg-title { color: #fff; margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.jcg .jcg-hero .jcg-text { max-width: 62ch; margin: 0; color: #f6f6f6; }
.jcg .jcg-hero--banner + .jcg-cards, .jcg .jcg-hero--banner + .jcg-carousel { margin-top: 22px; }

.jcg .jcg-hero--float .jcg-hero__media img { aspect-ratio: 16 / 7; }
.jcg .jcg-hero--float .jcg-hero__body { justify-content: flex-end; align-items: flex-start; text-align: left; padding: 32px 36px 120px; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.05) 70%); }
.jcg .jcg-hero--float .jcg-title { text-align: left; }
.jcg .jcg-float-cards { position: relative; z-index: 2; margin: -90px 28px 0; }
.jcg .jcg-float-cards .jcg-card { background: #fff; }
.jcg .jcg-float-cards .jcg-card--minimal { background: #fff; }
.jcg-card--minimal .jcg-float-cards .jcg-card { padding: 10px; }
.jcg .jcg-hero--float + .jcg-float-cards + .jcg-btnrow { margin-top: 24px; }

@media (max-width: 690px) {
    .jcg .jcg-hero__body, .jcg .jcg-hero--float .jcg-hero__body {
        position: static; padding: 20px 18px; align-items: center; text-align: center; background: var(--jcg-dark);
    }
    .jcg .jcg-hero--float .jcg-title { text-align: center; }
    .jcg .jcg-hero__media img, .jcg .jcg-hero--float .jcg-hero__media img { aspect-ratio: 4 / 3; }
    .jcg .jcg-float-cards { margin: 18px 0 0; }
}

/* ---------- layout: carousel ---------- */
.jcg .jcg-carousel { position: relative; }
.jcg .jcg-cards--track {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 6px 2px 14px; margin: 0 -2px;
}
.jcg .jcg-cards--track::-webkit-scrollbar { display: none; }
.jcg .jcg-cards--track .jcg-card { flex: 0 0 calc((100% - (var(--jcg-cols, 2) - 1) * 16px) / var(--jcg-cols, 2)); scroll-snap-align: start; }
.jcg .jcg-arrow {
    position: absolute; top: 42%; z-index: 3; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: #fff; color: var(--jcg-dark); font-size: 26px; line-height: 38px; text-align: center; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: transform .2s, background .2s, color .2s, opacity .2s;
}
.jcg .jcg-arrow:hover { background: var(--jcg-dark); color: #fff; }
.jcg .jcg-arrow--prev { left: -12px; }
.jcg .jcg-arrow--next { right: -12px; }
.jcg .jcg-arrow[hidden] { display: none; }
@media (max-width: 690px) { .jcg .jcg-arrow { width: 34px; height: 34px; font-size: 22px; line-height: 32px; } .jcg .jcg-arrow--prev { left: -4px; } .jcg .jcg-arrow--next { right: -4px; } }

/* ---------- small screens: tighter cards ---------- */
@media (max-width: 690px) {
    .jcg .jcg-cards { gap: 12px; }
    .jcg .jcg-card { padding: 7px; }
    .jcg .jcg-card__title { font-size: 14px; }
    .jcg .jcg-chip { top: 7px; left: 7px; font-size: 11.5px; padding: 3px 7px; }
}

@media (prefers-reduced-motion: reduce) {
    .jcg-view, .jcg .jcg-chip, .jcg-side::before, .jcg-side::after { animation: none !important; }
    .jcg .jcg-card, .jcg .jcg-card__media img { transition: none; }
}

/* ---------- scrolling strip ---------- */
.jcg .jcg-strip {
    overflow: hidden; white-space: nowrap; margin: 0 0 14px; color: var(--jcg-dark); font-size: 13.5px; font-weight: 700; line-height: 1.4;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.jcg .jcg-strip__track { display: inline-flex; animation: jcgMarquee 60s linear infinite; will-change: transform; }
.jcg .jcg-strip:hover .jcg-strip__track { animation-play-state: paused; }
.jcg .jcg-strip__i { padding-right: 2.4em; }
@keyframes jcgMarquee { to { transform: translateX(-50%); } }
.jcg .jcg-hero .jcg-strip, .jcg .jcg-poster__a .jcg-strip { color: #fff; max-width: 100%; }
.jcg .jcg-stack .jcg-strip { text-align: center; }

/* "New" badge */
.jcg .jcg-new {
    position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--jcg-dark);
    font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; box-shadow: 0 2px 8px rgba(0,0,0,.2); pointer-events: none;
}

/* ---------- layout: poster ---------- */
.jcg-poster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: stretch; }
.jcg .jcg-poster__a { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px; overflow: hidden; border-radius: var(--jcg-radius); background: #222; box-shadow: var(--jcg-shadow); }
.jcg .jcg-poster__media { position: absolute; inset: 0; line-height: 0; }
.jcg .jcg-poster__media img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; margin: 0; }
.jcg .jcg-poster__body { position: relative; z-index: 1; padding: 110px 26px 26px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0)); }
.jcg .jcg-poster__body .jcg-title { margin-bottom: 8px; color: #fff; text-align: left; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.jcg .jcg-poster__body .jcg-text { margin: 0; color: #f3f3f3; font-size: 14.5px; }
@media (max-width: 690px) {
    .jcg-poster { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .jcg .jcg-poster__a { min-height: 0; }
    .jcg .jcg-poster__media { position: static; }
    .jcg .jcg-poster__media img { height: auto !important; aspect-ratio: 4 / 3; }
    .jcg .jcg-poster__body { padding: 18px; background: var(--jcg-dark); text-align: center; }
    .jcg .jcg-poster__body .jcg-title { text-align: center; }
}

/* ---------- layout: compact ---------- */
.jcg .jcg-compact { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.jcg .jcg-compact__photo { flex: 0 0 112px; width: 112px; height: 112px; overflow: hidden; border-radius: 50%; line-height: 0; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--jcg-accent), var(--jcg-shadow); background: #f1ede6; }
.jcg .jcg-compact__photo img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; margin: 0; }
.jcg .jcg-compact__txt { min-width: 0; }
.jcg .jcg-compact__txt .jcg-title { margin-bottom: 6px; text-align: left; }
.jcg .jcg-compact__txt .jcg-strip { margin-bottom: 8px; }
.jcg .jcg-compact__txt .jcg-text { margin: 0; }
@media (max-width: 690px) {
    .jcg .jcg-compact { gap: 12px; }
    .jcg .jcg-compact__photo { flex-basis: 72px; width: 72px; height: 72px; }
    .jcg .jcg-compact__txt .jcg-title { font-size: 19px; }
}

/* ---------- carousel: photo is the first slide ---------- */
.jcg .jcg-slide-photo {
    flex: 0 0 calc((100% - (var(--jcg-cols, 2) - 1) * 16px) / var(--jcg-cols, 2)); scroll-snap-align: start; overflow: hidden;
    border-radius: var(--jcg-radius); box-shadow: var(--jcg-shadow); background: #f1ede6; line-height: 0;
}
.jcg .jcg-slide-photo img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; margin: 0; }
.jcg .jcg-stack .jcg-media + .jcg-strip { margin-top: 16px; }
@media (max-width: 690px) { .jcg .jcg-compact { align-items: flex-start; } }

/* ---------- fixed photo height (px) instead of a photo shape ---------- */
.jcg .jcg-fixh .jcg-card__media { aspect-ratio: auto; height: var(--jcg-h); }

/* ---------- card style: original (the exact look of the old [jc_recipe_grid]) ---------- */
.jcg .jcg-card--original .jcg-cards { gap: 20px; }
.jcg .jcg-card--original .jcg-card { padding: 15px; border: 1px solid #eee; border-radius: 10px; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.05); }
.jcg .jcg-card--original .jcg-card__media { border-radius: 8px; }
.jcg .jcg-card--original .jcg-card__stars { margin: 28px 0 22px; }
.jcg .jcg-card--original .jcg-star { margin: 0 2.5px; font-size: 18px; }
.jcg .jcg-card--original .jcg-rating__n { margin-left: 3px; font-size: 14px; }
.jcg .jcg-card--original .jcg-card__title { margin: 0 0 10px; font-size: 23px; line-height: 1.45; }
.jcg-hover--zoom .jcg-card--original .jcg-card:hover .jcg-card__media img { transform: scale(1.1); filter: brightness(1.05); }
@media (max-width: 990px) {
    .jcg .jcg-card--original .jcg-card__title { font-size: 20px; }
    .jcg .jcg-card--original .jcg-card__stars { margin: 20px 0 14px; }
}
@media (max-width: 690px) {
    .jcg .jcg-card--original .jcg-cards { gap: 12px; }
    .jcg .jcg-card--original .jcg-card { padding: 8px; }
    .jcg .jcg-card--original .jcg-card__stars { margin: 8px 0 4px; }
    .jcg .jcg-card--original .jcg-star { margin: 0 1px; font-size: 13px; }
    .jcg .jcg-card--original .jcg-rating__n { font-size: 11px; }
    .jcg .jcg-card--original .jcg-card__title { font-size: 15px; margin-bottom: 4px; }
}

/* ---------- extra card details (time, servings, calories, diet, short description) ----------
   Spacing is set with margins/padding (not only flex "gap"), so theme CSS cannot squash it.
   Sizes per screen: desktop >= 991px, tablet 691-990px, mobile <= 690px. */
.jcg { --jcg-m-fs: 14px; --jcg-m-ico: 16px; --jcg-m-icogap: 7px; --jcg-m-x: 12px; --jcg-m-y: 5px; --jcg-m-top: 12px; }
@media (max-width: 990px) { .jcg { --jcg-m-fs: 13px; --jcg-m-ico: 15px; --jcg-m-icogap: 6px; --jcg-m-x: 10px; --jcg-m-y: 4px; --jcg-m-top: 10px; } }
@media (max-width: 690px) { .jcg { --jcg-m-fs: 12px; --jcg-m-ico: 13px; --jcg-m-icogap: 5px; --jcg-m-x: 7px; --jcg-m-y: 3px; --jcg-m-top: 8px; } }

.jcg .jcg-card__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; margin: var(--jcg-m-top) 0 0; padding: 0; list-style: none; color: #5a5a5a; font-size: var(--jcg-m-fs); line-height: 1.3; }
.jcg .jcg-card__meta .jcg-m { display: inline-flex; align-items: center; margin: var(--jcg-m-y) var(--jcg-m-x) !important; padding: 0 !important; font-size: inherit; line-height: 1.3; list-style: none; white-space: nowrap; }
.jcg .jcg-m svg { display: block; width: var(--jcg-m-ico); height: var(--jcg-m-ico); flex: 0 0 var(--jcg-m-ico); margin: 0 var(--jcg-m-icogap) 0 0 !important; fill: none; stroke: var(--jcg-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jcg .jcg-m span { display: inline-block; margin: 0; padding: 0; }
.jcg .jcg-card__ex { margin: 10px 0 0; color: #555; font-family: "Lora", Georgia, serif; font-size: 13px; line-height: 1.5; }
.jcg-card--horizontal .jcg-card__meta { justify-content: flex-start; }
.jcg-card--horizontal .jcg-card__meta .jcg-m { margin-left: 0 !important; }
.jcg-card--overlay .jcg-card__meta, .jcg-card--overlay .jcg-card__ex { color: #f1f1f1; }
.jcg-card--overlay .jcg-card__meta { margin-top: 4px; justify-content: flex-start; }
.jcg-card--overlay .jcg-card__meta .jcg-m { margin-left: 0 !important; margin-right: calc(var(--jcg-m-x) + 2px) !important; }
.jcg-card--overlay .jcg-card__ex { display: none; }
@media (max-width: 690px) { .jcg .jcg-card__ex { font-size: 12px; } }

/* ---------- hardening against theme / page-builder styles (mobile fixes) ---------- */
.jcg .jcg-card { display: flex; flex-direction: column; min-width: 0; overflow-wrap: break-word; word-wrap: break-word; }
.jcg .jcg-card__link { flex: 1 1 auto; height: auto; min-width: 0; text-decoration: none !important; }
.jcg .jcg-card__body { min-width: 0; }
.jcg .jcg-card__title { text-align: inherit; overflow-wrap: break-word; hyphens: auto; }
.jcg .jcg-card__meta li { text-indent: 0; }
.jcg .jcg-card__meta li::before, .jcg .jcg-card__meta li::marker { content: none; display: none; }
.jcg-card--original .jcg-card__stars, .jcg-card--horizontal .jcg-card__stars { text-align: inherit; }
.jcg-card--horizontal .jcg-card__stars { text-align: left; }

/* ---------- mobile: ignore the theme container, stretch to the full screen width ----------
   Pure-CSS "full bleed" (works when the theme container is centred). frontend.js then measures the real
   position and corrects it, so it also works with uneven theme padding. The small space on the left and
   right comes from Settings > Style > "Space left and right of the grid" (--jcg-m-gap). */
@media (max-width: 690px) {
    .jcg.jcg--mfull {
        position: relative;
        box-sizing: border-box !important;
        display: block;
        float: none !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: 0 !important;
        padding-left: var(--jcg-m-gap, 10px) !important;
        padding-right: var(--jcg-m-gap, 10px) !important;
        left: auto !important;
        right: auto !important;
    }
}
