/* Kaium Stays premium compact blog archive + single post */
.ks-blog-page,
.ks-blog-page *,
.ks-single-post,
.ks-single-post * {
    box-sizing: border-box;
}

.ks-blog-page,
.ks-single-post {
    margin: 0;
    padding: 0;
    background: #F6F9E1;
    color: #2B332C;
    font-family: "Alone Kaium", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 400;
}

/* Prevent blog post heading scale from damaging footer widgets */
body footer h1,
body footer h2,
body footer h3,
body footer h4,
body footer .elementor-heading-title,
body footer .widget-title,
body .site-footer h1,
body .site-footer h2,
body .site-footer h3,
body .site-footer h4,
body .site-footer .elementor-heading-title,
body .site-footer .widget-title,
body .elementor-location-footer h1,
body .elementor-location-footer h2,
body .elementor-location-footer h3,
body .elementor-location-footer h4,
body .elementor-location-footer .elementor-heading-title,
body .elementor-location-footer .widget-title {
    font-size: 20px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
}

body.single-post .entry-header,
body.single-post header.entry-header,
body.single-post .page-header,
body.single-post .post-thumbnail,
body.single-post .entry-title {
    display: none !important;
}

.ks-blog-wrap,
.ks-single-wrap {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.ks-blog-wrap {
    padding: 54px 0 82px;
}

.ks-single-wrap {
    padding: 56px 0 82px;
}

.ks-blog-top {
    display: grid;
    grid-template-columns: minmax(0, 0.74fr) minmax(260px, 0.56fr);
    gap: 28px;
    align-items: end;
    margin-bottom: 26px;
}

.ks-blog-kicker {
    display: inline-flex;
    margin: 0;
    padding: 7px 11px;
    border-radius: 12px;
    background: #E0F4AD;
    color: #2B332C;
    font-size: 14px;
    line-height: 1;
}

.ks-blog-top h1 {
    margin: 12px 0 0;
    color: #2B332C;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 40px;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.ks-blog-top p {
    margin: 0;
    max-width: 520px;
    color: #4F584F;
    line-height: 1.45;
}

/* Default multi-post grid */
.ks-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

/* One post: make it premium, not empty right-side */
.ks-blog-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.ks-blog-grid-single .ks-blog-card {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1fr);
    align-items: stretch;
    max-width: 100%;
}

.ks-blog-card {
    overflow: hidden;
    border: 1px solid rgba(43, 51, 44, 0.14);
    border-radius: 18px;
    background: #F9FBF0;
}

.ks-blog-grid:not(.ks-blog-grid-single) .ks-blog-card {
    display: flex;
    flex-direction: column;
}

.ks-blog-image-link {
    display: block;
    padding: 4px;
    text-decoration: none;
}

.ks-blog-grid-single .ks-blog-image-link {
    height: 100%;
}

.ks-blog-image-link img,
.ks-blog-image-fallback {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #E0F4AD 0%, #EEF4D2 52%, #FBFDF1 100%);
}

.ks-blog-grid-single .ks-blog-image-link img,
.ks-blog-grid-single .ks-blog-image-fallback {
    height: 100%;
    min-height: 290px;
    aspect-ratio: auto;
}

.ks-blog-image-fallback {
    display: grid;
    place-items: center;
    color: #559009;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.ks-blog-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.ks-blog-grid-single .ks-blog-card-body {
    justify-content: center;
    padding: 30px;
}

.ks-blog-meta,
.ks-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.ks-blog-meta span,
.ks-single-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 6px 9px;
    border-radius: 10px;
    background: #EEF4D2;
    color: #4F584F;
    font-size: 13px;
    line-height: 1;
}

.ks-blog-card h2 {
    margin: 0;
    color: #2B332C;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 21px;
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ks-blog-grid-single .ks-blog-card h2 {
    max-width: 620px;
    font-size: 36px;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.ks-blog-card h2 a {
    color: #2B332C;
    text-decoration: none;
}

.ks-blog-card h2 a:hover {
    color: #559009;
}

.ks-blog-card p {
    margin: 12px 0 18px;
    color: #556055;
    line-height: 1.42;
    font-size: 18px;
}

.ks-blog-grid-single .ks-blog-card p {
    max-width: 620px;
    margin: 16px 0 22px;
    font-size: 20px;
    line-height: 1.46;
}

.ks-blog-read,
.ks-blog-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.ks-blog-read {
    width: fit-content;
    margin-top: auto;
    padding: 12px 15px;
    border-radius: 13px;
    background: #2B332C;
    color: #FFFFFF;
    font-size: 17px;
}

.ks-blog-read:hover {
    transform: translateX(4px);
    background: #89D822;
    color: #2B332C;
}

.ks-blog-empty {
    border: 1px solid rgba(43, 51, 44, 0.14);
    border-radius: 18px;
    background: #F9FBF0;
    padding: 24px;
}

.ks-blog-empty h2 {
    margin: 0;
    color: #2B332C;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ks-blog-empty p {
    margin: 8px 0 0;
    color: #556055;
    line-height: 1.45;
}

/* Single */
.ks-single-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: #2B332C;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ks-single-hero {
    padding: 34px;
    border: 1px solid rgba(43, 51, 44, 0.14);
    border-radius: 30px;
    background: linear-gradient(135deg, #FBFDF1 0%, #F6F9E1 64%, #EAF1CC 100%);
}

.ks-single-hero h1 {
    margin: 16px 0 0;
    color: #2B332C;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 44px;
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.035em;
    max-width: 920px;
}

.ks-single-hero > p {
    margin: 18px 0 0;
    max-width: 760px;
    color: #4F584F;
    line-height: 1.5;
}

.ks-single-featured {
    margin: 18px 0 0;
    padding: 4px;
    border: 1px solid rgba(43, 51, 44, 0.14);
    border-radius: 25px;
    background: #F9FBF0;
}

.ks-single-featured img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 21px;
}

.ks-single-content {
    width: min(840px, 100%);
    margin: 28px auto 0;
    padding: 40px;
    border: 1px solid rgba(43, 51, 44, 0.14);
    border-radius: 25px;
    background: #F9FBF0;
    color: #2B332C;
    line-height: 1.65;
}

.ks-single-content > *:first-child {
    margin-top: 0;
}

.ks-single-content > *:last-child {
    margin-bottom: 0;
}

.ks-single-content h2,
.ks-single-content h3,
.ks-single-content h4 {
    color: #2B332C;
    font-family: "Sora", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.ks-single-content h2 {
    margin: 38px 0 14px;
    font-size: 32px;
    line-height: 1.12;
}

.ks-single-content h3 {
    margin: 30px 0 12px;
    font-size: 25px;
    line-height: 1.16;
}

.ks-single-content p {
    margin: 0 0 18px;
    color: #4F584F;
}

.ks-single-content a {
    color: #559009;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ks-single-content ul,
.ks-single-content ol {
    margin: 0 0 24px 22px;
    padding: 0;
    color: #4F584F;
}

.ks-single-content li {
    margin-bottom: 10px;
}

.ks-single-content blockquote {
    margin: 30px 0;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(43, 51, 44, 0.14);
    background: #E0F4AD;
    color: #2B332C;
}

.ks-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.ks-single-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: 44px;
    padding: 26px;
    border: 1px solid rgba(43, 51, 44, 0.14);
    border-radius: 25px;
    background: linear-gradient(135deg, #F9FBF0 0%, #F6F9E1 55%, #E0F4AD 100%);
}

.ks-single-cta h2 {
    margin: 0;
    max-width: 620px;
    color: #2B332C;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 30px;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.ks-single-cta p {
    margin: 10px 0 0;
    max-width: 620px;
    color: #4F584F;
    line-height: 1.45;
}

.ks-blog-cta-btn {
    min-height: 50px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #A2E847;
    color: #2B332C;
    white-space: nowrap;
}

.ks-blog-cta-btn:hover {
    transform: translateX(4px);
    background: #89D822;
    color: #2B332C;
}

@media (max-width: 1024px) {
    .ks-blog-wrap,
    .ks-single-wrap {
        width: min(100% - 32px, 900px);
    }

    .ks-blog-top {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ks-blog-top h1,
    .ks-single-hero h1 {
        font-size: 38px;
    }

    .ks-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ks-blog-grid-single .ks-blog-card {
        grid-template-columns: 1fr;
    }

    .ks-blog-grid-single .ks-blog-image-link img,
    .ks-blog-grid-single .ks-blog-image-fallback {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }

    .ks-blog-grid-single .ks-blog-card h2 {
        font-size: 30px;
    }

    .ks-blog-grid-single .ks-blog-card p {
        font-size: 18px;
    }

    .ks-single-cta {
        grid-template-columns: 1fr;
    }

    .ks-blog-cta-btn {
        width: fit-content;
    }
}

@media (max-width: 767px) {
    .ks-blog-wrap,
    .ks-single-wrap {
        width: min(100% - 24px, 560px);
        padding: 36px 0 64px;
    }

    .ks-blog-top h1,
    .ks-single-hero h1 {
        font-size: 30px;
        line-height: 1.12;
    }

    .ks-blog-top p,
    .ks-blog-card p,
    .ks-blog-grid-single .ks-blog-card p,
    .ks-single-hero > p,
    .ks-single-content,
    .ks-single-cta p {
        font-size: 18px;
    }

    .ks-blog-grid {
        grid-template-columns: 1fr;
    }

    .ks-blog-card h2,
    .ks-blog-grid-single .ks-blog-card h2 {
        font-size: 21px;
    }

    .ks-blog-card-body,
    .ks-blog-grid-single .ks-blog-card-body {
        padding: 16px;
    }

    .ks-blog-empty,
    .ks-single-hero,
    .ks-single-content,
    .ks-single-cta {
        border-radius: 25px;
        padding: 22px;
    }

    .ks-blog-empty h2,
    .ks-single-cta h2 {
        font-size: 26px;
    }

    .ks-single-content h2 {
        font-size: 28px;
    }

    .ks-single-content h3 {
        font-size: 23px;
    }

    .ks-blog-cta-btn,
    .ks-blog-read {
        width: 100%;
        justify-content: center;
    }
}
