/* Blog: listing (home.php), archives (archive.php), search and single posts.
   Loaded only on blog screens (inc/blog.php). Builds on the page hero and
   shared tokens in style.css / custom.css. */

.blog-page {
    --blog-ink: #2d1a10;
    --blog-text: #5d5048;
    --blog-green: #34452c;
    --blog-gold: var(--color-light-primary);
    --blog-line: #e7dccb;
    --blog-card: #fffdf9;
    background: #fbf7f0;
}

/* ---- Category menu ---- */
.blog-cats {
    margin-bottom: 42px;
}
.blog-cats ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.blog-cats a {
    display: inline-block;
    padding: 9px 20px;
    color: var(--blog-green);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: 40px;
    transition: background-color .2s, color .2s, border-color .2s;
}
.blog-cats a:hover {
    border-color: var(--blog-gold);
    color: var(--blog-gold);
}
.blog-cats a[aria-current="page"] {
    color: #fff;
    background: var(--blog-green);
    border-color: var(--blog-green);
}

/* ---- Two-column layout ---- */
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
}

/* ---- Card grid ---- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}
.blog-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--blog-card);
    border: 1px solid var(--blog-line);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgb(72 50 25 / 6%);
    transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgb(72 50 25 / 12%);
}
.blog-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.blog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.blog-card:hover .blog-card__media img {
    transform: scale(1.04);
}
.blog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 24px;
}
.blog-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 10px;
    color: #8a7a6c;
    font-size: var(--fs-xs);
}
.blog-card__cat {
    color: var(--blog-gold);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
}
.blog-card__cat:hover {
    color: var(--color-primary);
}
.blog-card__title {
    margin: 0 0 10px;
    font-family: var(--font-secondary);
    font-size: var(--fs-h4);
    font-weight: 600;
    line-height: 1.2;
}
.blog-card__title a {
    color: var(--blog-ink);
    text-decoration: none;
}
.blog-card__title a:hover {
    color: var(--blog-gold);
}
.blog-card__excerpt {
    margin: 0 0 16px;
    color: var(--blog-text);
    font-size: var(--fs-small);
    line-height: 1.65;
}
.blog-card__more {
    margin-top: auto;
    color: var(--blog-green);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
}
.blog-card__more:hover {
    color: var(--blog-gold);
}

/* Featured (newest) article: wide card, image beside the text. */
.blog-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}
.blog-card--featured .blog-card__media {
    flex: 0 0 55%;
    aspect-ratio: auto;
    min-height: 320px;
}
.blog-card--featured .blog-card__body {
    justify-content: center;
    padding: 36px 38px;
}
.blog-card--featured .blog-card__title {
    font-size: var(--fs-h3);
}

/* ---- Pagination ---- */
.blog-pagination {
    margin-top: 46px;
}
.blog-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    color: var(--blog-green);
    font-size: var(--fs-small);
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: 40px;
}
.blog-pagination a.page-numbers:hover {
    border-color: var(--blog-gold);
    color: var(--blog-gold);
}
.blog-pagination .page-numbers.current {
    color: #fff;
    background: var(--blog-green);
    border-color: var(--blog-green);
}
.blog-pagination .page-numbers.dots {
    background: transparent;
    border: 0;
}

/* ---- Empty state ---- */
.blog-empty {
    padding: 60px 30px;
    text-align: center;
    background: var(--blog-card);
    border: 1px dashed var(--blog-line);
    border-radius: 12px;
}
.blog-empty h2 {
    font-family: var(--font-secondary);
    font-size: var(--fs-h3);
}

/* ---- Sidebar ---- */
.blog-sidebar {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 24px;
}
.blog-widget {
    padding: 24px 24px 26px;
    background: var(--blog-card);
    border: 1px solid var(--blog-line);
    border-radius: 12px;
}
.blog-widget__title {
    position: relative;
    margin: 0 0 16px;
    padding-bottom: 12px;
    color: var(--blog-ink);
    font-family: var(--font-secondary);
    font-size: var(--fs-h4);
    font-weight: 600;
}
.blog-widget__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    background: var(--blog-gold);
}
.blog-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--blog-line);
    border-radius: 40px;
    background: #fff;
}
.blog-search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 11px 18px;
    border: 0;
    background: transparent;
    font-size: var(--fs-small);
}
.blog-search input[type="search"]:focus {
    outline: none;
}
.blog-search:focus-within {
    border-color: var(--blog-gold);
}
.blog-search button {
    width: 46px;
    color: #fff;
    border: 0;
    background: var(--blog-green);
    cursor: pointer;
}
.blog-widget__cats,
.blog-widget__recent {
    margin: 0;
    padding: 0;
    list-style: none;
}
.blog-widget__cats li + li {
    border-top: 1px solid var(--blog-line);
}
.blog-widget__cats a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--blog-text);
    font-size: var(--fs-small);
    text-decoration: none;
}
.blog-widget__cats a:hover {
    color: var(--blog-gold);
}
.blog-widget__cats span {
    min-width: 28px;
    color: var(--blog-green);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    background: #eef0e6;
    border-radius: 20px;
}
.blog-widget__recent li + li {
    margin-top: 14px;
}
.blog-widget__recent a {
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
}
.blog-widget__recent img {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}
.blog-widget__recent strong {
    display: block;
    color: var(--blog-ink);
    font-family: var(--font-secondary);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}
.blog-widget__recent a:hover strong {
    color: var(--blog-gold);
}
.blog-widget__recent time {
    color: #8a7a6c;
    font-size: 12px;
}
.blog-widget--cta {
    color: #fff;
    background: linear-gradient(160deg, #2b3f2f 0%, #3c5340 100%);
    border: 0;
}
.blog-widget--cta .blog-widget__title {
    color: #fff;
}
.blog-widget--cta p {
    margin: 0 0 18px;
    color: rgb(255 255 255 / 85%);
    font-size: var(--fs-small);
}

/* ---- Single article ---- */
.blog-hero-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: var(--fs-small);
    letter-spacing: .03em;
}
.blog-article {
    padding: 44px 48px;
    background: var(--blog-card);
    border: 1px solid var(--blog-line);
    border-radius: 12px;
}
.blog-article__lead {
    margin: 0 0 28px;
    padding-left: 18px;
    color: var(--blog-green);
    font-family: var(--font-secondary);
    font-size: var(--fs-h4);
    font-style: italic;
    line-height: 1.45;
    border-left: 3px solid var(--blog-gold);
}
.blog-article__content {
    color: var(--blog-text);
    font-size: 17px;
    line-height: 1.8;
}
.blog-article__content > * + * {
    margin-top: 1.1em;
}
.blog-article__content h2,
.blog-article__content h3,
.blog-article__content h4 {
    margin: 1.6em 0 .5em;
    color: var(--blog-ink);
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
}
.blog-article__content h2 { font-size: var(--fs-h3); }
.blog-article__content h3 { font-size: var(--fs-h4); }
.blog-article__content a {
    color: var(--color-care);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.blog-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}
.blog-article__content blockquote {
    margin: 1.6em 0;
    padding: 18px 24px;
    color: var(--blog-green);
    font-family: var(--font-secondary);
    font-size: var(--fs-h4);
    font-style: italic;
    background: #f3f1e7;
    border-left: 3px solid var(--blog-gold);
    border-radius: 0 10px 10px 0;
}
.blog-article__content ul,
.blog-article__content ol {
    padding-left: 1.3em;
}
.blog-article__content li::marker {
    color: var(--blog-gold);
}
.blog-article__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--blog-line);
}
.blog-article__tags,
.blog-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-small);
}
.blog-article__tags > span,
.blog-share > span {
    color: var(--blog-ink);
    font-weight: 700;
}
.blog-article__tags a {
    padding: 5px 13px;
    color: var(--blog-green);
    font-size: 13px;
    text-decoration: none;
    background: #eef0e6;
    border-radius: 20px;
}
.blog-article__tags a:hover {
    color: #fff;
    background: var(--blog-green);
}
.blog-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--blog-green);
    text-decoration: none;
    border: 1px solid var(--blog-line);
    border-radius: 50%;
}
.blog-share a:hover {
    color: #fff;
    background: var(--blog-gold);
    border-color: var(--blog-gold);
}

/* Previous / next article */
.blog-postnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.blog-postnav__link {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    background: var(--blog-card);
    border: 1px solid var(--blog-line);
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}
.blog-postnav__link--next {
    flex-direction: row-reverse;
    text-align: right;
}
.blog-postnav__link--empty {
    visibility: hidden;
}
a.blog-postnav__link:hover {
    border-color: var(--blog-gold);
    box-shadow: 0 10px 24px rgb(72 50 25 / 10%);
}
.blog-postnav__link img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}
.blog-postnav__link small {
    display: block;
    margin-bottom: 4px;
    color: var(--blog-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.blog-postnav__link strong {
    color: var(--blog-ink);
    font-family: var(--font-secondary);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
}

/* Related */
.blog-related {
    margin-top: 56px;
}
.blog-related .section-title {
    margin-bottom: 24px;
}
.blog-back {
    margin: 36px 0 0;
}
.blog-back a {
    color: var(--blog-green);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
}
.blog-back a:hover {
    color: var(--blog-gold);
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
    .blog-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 32px;
    }
    .blog-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 991px) {
    .blog-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .blog-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .blog-card--featured {
        flex-direction: column;
    }
    .blog-card--featured .blog-card__media {
        flex: none;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
    .blog-article {
        padding: 32px 28px;
    }
}
@media (max-width: 767px) {
    .blog-grid,
    .blog-grid--compact,
    .blog-postnav,
    .blog-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
    .blog-card--featured .blog-card__body {
        padding: 24px;
    }
    .blog-article {
        padding: 24px 18px;
    }
    .blog-postnav__link--empty {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card__media img {
        transition: none;
    }
    .blog-card:hover,
    .blog-card:hover .blog-card__media img {
        transform: none;
    }
}

/* ---- Article blocks (built by ayurveda_blog_enhance_content() in inc/blog.php) ---- */

/* Small headings with their lines -> cards side by side */
.blog-article__content .blog-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin: 1.4em 0 1.8em;
}
.blog-article__content .blog-point {
    position: relative;
    padding: 20px 20px 18px;
    background: #f8f5ee;
    border: 1px solid var(--blog-line);
    border-top: 3px solid var(--blog-gold);
    border-radius: 10px;
}
.blog-article__content .blog-point > * + * {
    margin-top: .6em;
}
.blog-article__content .blog-point h6 {
    margin: 0 0 10px;
    color: var(--blog-ink);
    font-family: var(--font-secondary);
    font-size: var(--fs-h4);
    font-weight: 600;
    line-height: 1.2;
}
.blog-article__content .blog-point p {
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.75;
}
.blog-article__content .blog-point strong {
    color: var(--blog-green);
    font-weight: 700;
}

/* Checklist with tick marks */
.blog-article__content .blog-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 18px;
    margin: 1.2em 0 1.6em;
    padding: 0;
    list-style: none;
}
.blog-article__content .blog-checklist li {
    position: relative;
    padding: 12px 14px 12px 46px;
    color: var(--blog-ink);
    font-size: var(--fs-small);
    line-height: 1.5;
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: 10px;
}
.blog-article__content .blog-checklist li::marker {
    content: '';
}
.blog-article__content .blog-checklist li::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    background: var(--blog-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
    border-radius: 50%;
    transform: translateY(-50%);
}

/* Heading in quotation marks -> pull quote */
.blog-article__content .blog-pullquote {
    position: relative;
    margin: 2em 0;
    padding: 34px 36px 30px;
    text-align: center;
    background: #f3f1e7;
    border: 0;
    border-radius: 12px;
}
.blog-article__content .blog-pullquote::before {
    content: '\201C';
    display: block;
    height: 36px;
    color: var(--blog-gold);
    font-family: var(--font-secondary);
    font-size: 72px;
    line-height: 1;
}
.blog-article__content .blog-pullquote p {
    margin: 0;
    color: var(--blog-green);
    font-family: var(--font-secondary);
    font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem);
    font-style: italic;
    line-height: 1.35;
}

/* Closing call to action */
.blog-article__content .blog-cta {
    margin: 2.2em 0 .4em;
    padding: 32px 34px;
    color: #fff;
    text-align: center;
    background: linear-gradient(160deg, #2b3f2f 0%, #3c5340 100%);
    border-radius: 12px;
}
.blog-article__content .blog-cta h2 {
    margin: 0 0 8px;
    color: #fff;
}
.blog-article__content .blog-cta p {
    margin: 0;
    color: rgb(255 255 255 / 85%);
}
.blog-article__content .blog-cta p + p {
    margin-top: 18px;
}
.blog-article__content .blog-cta a.btn {
    color: #fff;
    text-decoration: none;
    background: var(--blog-gold);
    border-color: var(--blog-gold);
}
.blog-article__content .blog-cta a.btn:hover {
    background: var(--color-care);
    border-color: var(--color-care);
}

@media (max-width: 575px) {
    .blog-article__content .blog-pullquote,
    .blog-article__content .blog-cta {
        padding: 26px 20px;
    }
}

/* ---- Single article header: text panel left, framed featured image right ---- */
.blog-hero {
    position: relative;
    overflow: hidden;
    padding: 150px 0 70px;
    color: #fff;
    background:
        radial-gradient(ellipse at 85% 20%, rgb(255 255 255 / 6%), transparent 55%),
        linear-gradient(135deg, #2b3f2f 0%, #34452c 55%, #3c5340 100%);
}
.blog-hero::after { /* soft leaf in the corner */
    content: '';
    position: absolute;
    left: -40px;
    bottom: -40px;
    width: 260px;
    height: 260px;
    opacity: .07;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23fff' stroke-width='1'%3E%3Cpath d='M38 10C20 10 10 20 10 38c18 0 28-10 28-28Z'/%3E%3Cpath d='M10 38 30 18M20 28h7M24 24v-7'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.blog-hero__row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}
.blog-hero__crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
    font-size: var(--fs-xs);
}
.blog-hero__crumbs li + li::before {
    content: '\203A';
    margin-right: 6px;
    color: rgb(255 255 255 / 50%);
}
.blog-hero__crumbs a {
    color: rgb(255 255 255 / 75%);
    text-decoration: none;
}
.blog-hero__crumbs a:hover {
    color: #e6c58f;
}
.blog-hero__kicker {
    display: block;
    color: #e6c58f;
    font-size: var(--fs-xs);
    letter-spacing: 3px;
    text-transform: uppercase;
}
.blog-hero__kicker::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    margin-bottom: 16px;
    background: #c8a064;
}
.blog-hero__title {
    margin: 14px 0 20px;
    color: #fff;
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem);
    font-weight: 500;
    line-height: 1.12;
}
.blog-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0;
    color: rgb(255 255 255 / 82%);
    font-size: var(--fs-small);
}
.blog-hero__figure {
    position: relative;
    margin: 0;
}
.blog-hero__figure::before { /* offset gold frame */
    content: '';
    position: absolute;
    inset: 16px -16px -16px 16px;
    border: 1px solid rgb(230 197 143 / 55%);
    border-radius: 14px;
}
.blog-hero__figure img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 24px 50px rgb(0 0 0 / 30%);
}
@media (max-width: 991px) {
    .blog-hero { padding: 120px 0 56px; }
    .blog-hero__row { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .blog-hero__figure { max-width: 560px; }
}
@media (max-width: 575px) {
    .blog-hero { padding-top: 104px; }
    .blog-hero__figure::before { inset: 10px -8px -10px 8px; }
}
/* compact article header: less padding, shorter picture */
.blog-hero {
    padding: 118px 0 46px;
}
.blog-hero__crumbs ol {
    margin-bottom: 18px;
}
.blog-hero__title {
    margin: 10px 0 14px;
}
.blog-hero__figure {
    justify-self: end;
    width: 100%;
    max-width: 520px;
}
.blog-hero__figure img {
    aspect-ratio: 16 / 10;
    max-height: 330px;
}
.blog-hero__figure::before {
    inset: 12px -12px -12px 12px;
}
.blog-hero::after {
    width: 180px;
    height: 180px;
    opacity: .05;
}
@media (max-width: 991px) {
    .blog-hero { padding: 104px 0 40px; }
    .blog-hero__figure { justify-self: start; }
}
/* listing header: intro line under the title; current breadcrumb item */
.blog-hero__lead {
    max-width: 520px;
    margin: 0;
    color: rgb(255 255 255 / 85%);
    font-size: var(--fs-lead);
    line-height: 1.6;
}
.blog-hero__crumbs [aria-current] {
    color: #e6c58f;
}

/* Header background taken from the header's own photo: blurred, darkened and
   tinted so the text reads clearly and the colours match the picture. */
.blog-hero {
    isolation: isolate;
    background: #23302a;
}
.blog-hero::before {
    content: '';
    position: absolute;
    inset: -40px;
    z-index: -2;
    background: var(--blog-hero-bg) center / cover no-repeat;
    filter: blur(28px) saturate(1.15);
    transform: scale(1.1);
}
.blog-hero__row::before {
    content: '';
    position: absolute;
    inset: -200px -100vw;
    z-index: -1;
    background: linear-gradient(90deg, rgb(18 24 20 / 82%) 0%, rgb(18 24 20 / 66%) 45%, rgb(18 24 20 / 40%) 100%);
    pointer-events: none;
}
.blog-hero__row {
    z-index: 0;
}