/*
Theme Name: Hello Biz Child
Template: hello-biz
Version: 1.0.6
*/

@font-face {
    font-family: 'Sora';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url('assets/fonts/sora-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('assets/fonts/dm-sans-latin.woff2') format('woff2');
}

/* CLS: reserve hero media space so content below does not jump */
.ehp-flex-hero__image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 320px;
}

.ehp-flex-hero__image-container,
.ehp-flex-hero__img {
    width: 100%;
    height: 100%;
    display: block;
}

.ehp-flex-hero__img {
    object-fit: cover;
}

/* CTA widget: hide primary button when "Primary CTA" toggle is set to Hide. */
.sp-primary-cta-hide-yes .ehp-cta__button--primary {
    display: none !important;
}

/* No animations: keep page stable for SEO/CWV */
.elementor-invisible,
.elementor-widget.elementor-invisible,
.e-con.elementor-invisible {
    visibility: visible !important;
    opacity: 1 !important;
}

.animated,
.animated-fast,
.elementor-animated,
[class*="elementor-animation-"],
[class*="nfd-wb-animate"] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Desktop homepage CLS hardening */
@media (min-width: 1025px) {
    body.home .elementor.elementor-136 .elementor-invisible,
    body.home .elementor.elementor-136 .elementor-widget.elementor-invisible,
    body.home .elementor.elementor-136 .e-con.elementor-invisible {
        visibility: visible !important;
        opacity: 1 !important;
    }

    body.home .elementor.elementor-136 [class*="nfd-wb-"],
    body.home .elementor.elementor-136 [class*="nfd-wb-animated-in"] {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        transition: none !important;
        animation: none !important;
    }

    body.home .elementor.elementor-136 .ehp-header,
    body.home .elementor.elementor-136 .ehp-header__elements-container,
    body.home .elementor.elementor-136 .ehp-header__site-link-container {
        min-height: 72px;
    }

    body.home .elementor.elementor-136 .ehp-header__site-logo {
        width: 98px;
        height: 72px;
        aspect-ratio: 98 / 72;
        display: block;
    }

    body.home .elementor.elementor-136 .ehp-flex-hero__heading,
    body.home .elementor.elementor-136 .ehp-flex-hero__subheading,
    body.home .elementor.elementor-136 .ehp-header__item,
    body.home .elementor.elementor-136 .ehp-header__button-text {
        line-height: 1.25;
        text-wrap: pretty;
    }

    /* Keep section spacing compact on desktop without changing responsive layouts. */
    body.home .elementor.elementor-136 .elementor-element.elementor-element-61ad754d {
        --margin-top: 48px;
        --margin-bottom: 72px;
    }

    body.home .elementor.elementor-136 .sp-recent-posts-home {
        margin-top: 0;
        margin-bottom: 32px;
    }
}

.sp-recent-posts-home {
    margin: 48px auto;
    padding: 36px;
    border: 2px solid #1e1e1e;
    border-radius: 24px;
    background: #fffef7;
}

.sp-recent-posts-home__title {
    margin: 0 0 20px;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.2;
}

.sp-recent-posts-home__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sp-recent-posts-home__item {
    background: #ffffff;
    border: 1px solid #c9c9c9;
    border-radius: 14px;
    padding: 16px;
}

.sp-recent-posts-home__item-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.sp-recent-posts-home__item-title a {
    color: #111;
    text-decoration: none;
}

.sp-recent-posts-home__item-title a:hover,
.sp-recent-posts-home__item-title a:focus {
    text-decoration: underline;
}

.sp-recent-posts-home__meta {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: #555;
}

.sp-recent-posts-home__excerpt {
    margin: 0;
    color: #222;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .sp-recent-posts-home {
        padding: 22px;
        margin: 32px auto;
    }
}

/* Blog archive redesign */
.sp-blog-archive {
    max-width: min(1280px, 92vw);
    margin: 0 auto;
    padding: 40px 0 56px;
}

.sp-blog-archive__header {
    margin-bottom: 26px;
}

.sp-blog-archive__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

.sp-blog-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
}

.sp-blog-card__thumb-link {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #efe8ff;
}

.sp-blog-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-blog-card__thumb--placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f6ccff 0%, #d9b9ff 55%, #c8b2ff 100%);
}

.sp-blog-card__body {
    padding: 18px 18px 20px;
}

.sp-blog-card__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sp-blog-card__category {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #6b6b6b;
}

.sp-blog-card__date {
    font-size: 0.82rem;
    color: #6b6b6b;
}

.sp-blog-card__title {
    margin: 0 0 12px;
    font-size: clamp(1.25rem, 2vw, 1.95rem);
    line-height: 1.18;
}

.sp-blog-card__title a {
    color: #1f1f1f;
    text-decoration: none;
}

.sp-blog-card__title a:hover,
.sp-blog-card__title a:focus {
    color: #6f56de;
}

.sp-blog-card__excerpt {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.55;
    color: #3b3b3b;
}

.sp-blog-pagination {
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .sp-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .sp-blog-grid {
        grid-template-columns: 1fr;
    }

    .sp-blog-archive {
        max-width: 94vw;
        padding-top: 22px;
    }
}

/* Single post redesign */
.sp-single {
    max-width: min(1320px, 94vw);
    margin: 0 auto;
    padding: 32px 0 64px;
}

.sp-single__article {
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 20px;
    padding: 28px;
}

.sp-single__header {
    margin-bottom: 20px;
}

.sp-single__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #181818;
}

.sp-single__meta {
    margin-top: 10px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #646464;
    font-size: 0.95rem;
}

.sp-single__featured-image {
    margin: 0 0 24px;
    border-radius: 14px;
    overflow: hidden;
}

.sp-single__featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.sp-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.sp-single__content {
    color: #252525;
    font-size: 1.08rem;
    line-height: 1.75;
}

.sp-single__content h2,
.sp-single__content h3 {
    scroll-margin-top: 90px;
    line-height: 1.2;
    margin-top: 1.8em;
    margin-bottom: 0.55em;
}

.sp-single__content h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.25rem);
}

.sp-single__content h3 {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.sp-single__content a {
    color: #5d48cc;
}

.sp-toc {
    position: sticky;
    top: 20px;
    background: #f3f3f3;
    border: 1px solid #dbdbdb;
    border-radius: 16px;
    padding: 18px;
}

.sp-toc__title {
    margin: 0 0 10px;
    font-size: 1.7rem;
    line-height: 1.1;
}

.sp-toc__list {
    list-style: none;
    margin: 0;
    padding: 10px 0 0;
    border-top: 3px solid #f16330;
    display: grid;
    gap: 10px;
}

.sp-toc__item {
    margin: 0;
    padding-left: 18px;
    position: relative;
}

.sp-toc__item::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #f16330;
    position: absolute;
    left: 0;
    top: 0.58em;
}

.sp-toc__item a {
    color: #222;
    text-decoration: none;
    font-size: 1.03rem;
    line-height: 1.35;
}

.sp-toc__item a:hover,
.sp-toc__item a:focus {
    color: #f16330;
}

.sp-toc__item--h3 {
    padding-left: 26px;
}

.sp-toc__item--h3::before {
    left: 8px;
    width: 6px;
    height: 6px;
}

.sp-related {
    margin-top: 46px;
}

.sp-related__title {
    margin: 0 0 18px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.14;
    text-decoration: underline;
    text-decoration-color: #f16330;
    text-decoration-thickness: 4px;
    text-underline-offset: 6px;
}

.sp-related__grid {
    margin-top: 0;
}

.sp-related__card .sp-blog-card__title {
    font-size: clamp(1.15rem, 2vw, 1.65rem);
}

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

    .sp-single__sidebar {
        order: -1;
    }

    .sp-toc {
        position: static;
    }
}

@media (max-width: 720px) {
    .sp-single {
        max-width: 96vw;
        padding: 20px 0 44px;
    }

    .sp-single__article {
        padding: 18px;
        border-radius: 14px;
    }
}
