/*
Theme Name: Core Wellness Native
Theme URI: https://corewellnesscentres.com/
Author: Salaam Expert
Description: Native WordPress theme for Core Wellness Centres. Page content is managed in WordPress while the site design remains code-controlled.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: core-wellness-native
*/

.admin-bar header {
    top: 32px;
}

.cw-edit-link {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
}

.cw-edit-link a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #173c2c;
    color: #fff;
    padding: 11px 18px;
    font: 700 13px/1 "Plus Jakarta Sans", sans-serif;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}

.cw-edit-link a:hover,
.cw-edit-link a:focus {
    background: #2d6b4f;
    color: #fff;
}

@media (max-width: 782px) {
    .admin-bar header {
        top: 46px;
    }
}

.sidebar .recent-post-list {
    display: grid;
    gap: 18px;
    margin: 15px 0;
}

/* Four image cards are taller than a typical laptop viewport. Let the rail
 * scroll with the article so every card remains reachable. */
.article-layout > .sidebar {
    position: static;
}

.sidebar a.recent-post-card {
    margin: 0;
    color: #1a372a;
}

.recent-post-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 7px;
    margin-bottom: 8px;
    background: #e8eee9;
}

.recent-post-card .recent-post-meta {
    display: block;
    margin-bottom: 4px;
    color: #637168;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.4;
    text-transform: uppercase;
}

.recent-post-card strong {
    display: block;
    font-size: 13px;
    line-height: 1.45;
}

.sidebar .recent-post-all {
    display: inline-block;
    margin: 2px 0 22px;
    color: #2d6b4f;
    font-size: 12px;
    font-weight: 700;
}

/* Editorial journal refresh -------------------------------------------------
 * The migrated page used a full-bleed three-column grid, which left the outer
 * cards against the viewport. A restrained two-column layout gives titles and
 * summaries room to breathe and makes the journal feel intentionally framed.
 */
.cw-blog-index .page-head {
    position: relative;
    max-width: 1184px;
    margin: 42px auto 28px;
    padding: clamp(58px, 8vw, 96px) clamp(28px, 6vw, 82px);
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 12%, rgba(232, 179, 139, .28), transparent 32%),
        linear-gradient(135deg, #10291f 0%, #1f4a37 100%);
    color: #fff;
}

.cw-blog-index .page-head::after {
    content: "";
    position: absolute;
    right: -75px;
    bottom: -120px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255, 255, 255, .035), 0 0 0 86px rgba(255, 255, 255, .025);
}

.cw-blog-index .page-head > * {
    position: relative;
    z-index: 1;
}

.cw-blog-index .page-head h1 {
    max-width: 780px;
    margin-bottom: 22px;
    font-size: clamp(48px, 7vw, 84px);
}

.cw-blog-index .page-head .lead {
    color: #dce8e1;
}

.cw-blog-index .page-head .crumbs,
.cw-blog-index .page-head .crumbs a {
    color: #b8cec1;
}

.cw-blog-index .article-grid.all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    width: min(1184px, calc(100% - 56px));
    margin: 44px auto 110px;
}

.cw-blog-index .article-grid.all > a {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ded8ce;
    border-radius: 18px;
    background: #fffdf9;
    box-shadow: 0 8px 24px rgba(23, 60, 44, .06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.cw-blog-index .article-grid.all > a:hover,
.cw-blog-index .article-grid.all > a:focus-visible {
    transform: translateY(-5px);
    border-color: #b9cabf;
    box-shadow: 0 18px 42px rgba(23, 60, 44, .13);
}

.cw-blog-index .article-grid.all > a img {
    height: clamp(250px, 29vw, 350px);
    transition: transform .45s ease;
}

.cw-blog-index .article-grid.all > a:hover img {
    transform: scale(1.025);
}

.cw-blog-index .article-grid.all > a small,
.cw-blog-index .article-grid.all > a h2,
.cw-blog-index .article-grid.all > a p,
.cw-blog-index .article-grid.all > a span {
    margin-right: 26px;
    margin-left: 26px;
}

.cw-blog-index .article-grid.all > a small {
    margin-top: 24px;
}

.cw-blog-index .article-grid.all > a h2 {
    margin-top: 10px;
    font-size: clamp(27px, 2.5vw, 36px);
    line-height: 1.12;
}

.cw-blog-index .article-grid.all > a p {
    margin-top: 4px;
    margin-bottom: 22px;
    color: #4f5c55;
    font-size: 14px;
    line-height: 1.75;
}

.cw-blog-index .article-grid.all > a span {
    margin-top: auto;
    margin-bottom: 28px;
    color: #2d6b4f;
}

/* Article heroes now read as one composed banner instead of two unrelated
 * blocks floating above the article. */
.cw-blog-entry .entry-hero {
    position: relative;
    grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr);
    gap: 0;
    max-width: 1184px;
    margin: 42px auto 72px;
    padding: 0;
    overflow: hidden;
    border-radius: 28px;
    background: #173c2c;
    color: #fff;
    box-shadow: 0 22px 60px rgba(13, 33, 25, .16);
}

.cw-blog-entry .entry-hero .crumbs {
    grid-column: 1;
    margin: 0;
    padding: 52px 52px 0;
    color: #b8cec1;
}

.cw-blog-entry .entry-hero .crumbs a {
    color: #dce8e1;
}

.cw-blog-entry .entry-hero > div:not(.crumbs) {
    grid-column: 1;
    padding: 26px 52px 58px;
}

.cw-blog-entry .entry-hero h1 {
    margin: 12px 0 24px;
    font-size: clamp(42px, 5.1vw, 68px);
    line-height: .99;
}

.cw-blog-entry .entry-hero .lead {
    color: #d4e1d9;
    font-size: 16px;
}

.cw-blog-entry .entry-hero .byline {
    color: #adc4b6;
}

.cw-blog-entry .entry-hero > img {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 570px;
    object-fit: cover;
}

.cw-blog-entry .article-layout {
    max-width: 1184px;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: clamp(42px, 6vw, 78px);
}

@media (max-width: 1050px) {
    .cw-blog-index .page-head,
    .cw-blog-entry .entry-hero {
        width: calc(100% - 48px);
    }

    .cw-blog-entry .entry-hero {
        grid-template-columns: 1fr;
    }

    .cw-blog-entry .entry-hero .crumbs,
    .cw-blog-entry .entry-hero > div:not(.crumbs),
    .cw-blog-entry .entry-hero > img {
        grid-column: 1;
    }

    .cw-blog-entry .entry-hero > img {
        grid-row: auto;
        min-height: 0;
        height: 420px;
    }
}

@media (max-width: 700px) {
    .cw-blog-index .page-head,
    .cw-blog-entry .entry-hero {
        width: calc(100% - 32px);
        margin-top: 20px;
        border-radius: 18px;
    }

    .cw-blog-index .page-head {
        padding: 48px 26px;
    }

    .cw-blog-index .article-grid.all {
        grid-template-columns: 1fr;
        width: calc(100% - 32px);
        gap: 24px;
        margin-top: 28px;
        margin-bottom: 72px;
    }

    .cw-blog-index .article-grid.all > a img {
        height: 250px;
    }

    .cw-blog-entry .entry-hero {
        margin-bottom: 46px;
    }

    .cw-blog-entry .entry-hero .crumbs {
        padding: 32px 26px 0;
    }

    .cw-blog-entry .entry-hero > div:not(.crumbs) {
        padding: 20px 26px 38px;
    }

    .cw-blog-entry .entry-hero h1 {
        font-size: 40px;
    }

    .cw-blog-entry .entry-hero > img {
        height: 290px;
    }
}
