/* Shared page heroes — mobile: white/auto height; desktop: optional background image */

section.page-hero,
section.blog-index-hero,
section.success-story-hero {
    background: #fff;
    padding: 120px 0 48px;
    border-bottom: 1px solid #ececec;
    overflow: visible;
    height: auto !important;
    min-height: 0 !important;
}

.page-hero-inner,
.blog-index-hero-inner,
.success-story-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.page-hero-badge,
.blog-index-hero-badge,
.success-story-hero-badge {
    display: inline-block;
    background: var(--base-color, #30bd9b);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 22px;
    border-radius: 100px;
    margin-bottom: 18px;
    line-height: 1.2;
}

.page-hero-title,
.blog-index-hero-title,
.success-story-hero-title,
.success-story-hero-name {
    font-size: clamp(1.85rem, 5vw, 3rem);
    font-weight: 700;
    color: #353642;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

.page-hero-subtitle,
.success-story-hero-uni {
    font-size: 1.125rem;
    font-weight: 500;
    color: #353642;
    margin: 12px 0 0;
    line-height: 1.4;
}

.page-hero-meta,
.success-story-hero-meta {
    font-size: 1rem;
    color: #717580;
    margin: 6px 0 0;
    line-height: 1.5;
}

.page-hero-lead,
.success-story-hero-lead {
    font-size: 1rem;
    color: #353642;
    opacity: 0.85;
    margin: 18px 0 0;
    line-height: 1.5;
}

@media (min-width: 768px) {
    section.page-hero[style*="--page-hero-bg"],
    section.blog-index-hero[style*="--page-hero-bg"],
    section.success-story-hero[style*="--page-hero-bg"] {
        background-color: transparent;
        background-image: var(--page-hero-bg);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-bottom: none;
    }
}

@media (max-width: 991px) {
    section.page-hero,
    section.blog-index-hero,
    section.success-story-hero {
        padding: 100px 0 40px;
    }
}

@media (max-width: 767px) {
    section.page-hero,
    section.blog-index-hero,
    section.success-story-hero {
        padding: 92px 0 32px;
    }

    section.page-hero .page-hero-badge,
    section.blog-index-hero .blog-index-hero-badge,
    section.success-story-hero .success-story-hero-badge,
    section.page-hero .page-hero-badge {
        font-size: 11px;
        padding: 8px 18px;
        margin-bottom: 14px;
    }

    section.page-hero .page-hero-subtitle,
    section.success-story-hero .success-story-hero-uni {
        font-size: 1rem;
    }
}

/* Blog post article hero — desktop keeps image overlay + colors; mobile simplified */
@media (max-width: 767px) {
    section.blog-post-hero {
        height: auto !important;
        min-height: 0 !important;
        padding: 96px 0 36px !important;
        overflow: visible !important;
        align-items: center !important;
        background-position: center center !important;
    }

    section.blog-post-hero #particles-style-01,
    section.blog-post-hero .blog-post-hero__particles {
        display: none !important;
    }

    section.blog-post-hero .container > .row > [class*="col-"] {
        text-align: center !important;
    }

    section.blog-post-hero h1 {
        width: 100% !important;
        line-height: 1.15 !important;
        font-size: clamp(1.65rem, 7vw, 2.15rem) !important;
        letter-spacing: -0.02em !important;
        margin-bottom: 20px !important;
    }

    section.blog-post-hero .blog-post-hero__meta,
    section.blog-post-hero .d-inline-block.mb-20px {
        margin-bottom: 14px !important;
    }

    section.blog-post-hero .blog-post-hero__author {
        align-items: center !important;
        margin-top: 20px !important;
    }

    section.blog-post-hero .blog-post-hero__author img,
    section.blog-post-hero .blog-post-hero__author-person img {
        margin-right: 0 !important;
    }

    section.blog-post-hero .blog-post-hero__cta {
        margin-top: 4px !important;
    }

    section.blog-post-hero [data-anime],
    section.blog-post-hero [data-anime] * {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (min-width: 768px) {
    section.blog-post-hero .container > .row > [class*="col-"] {
        text-align: left;
    }
}

section.blog-post-hero .blog-post-hero__author {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

section.blog-post-hero .blog-post-hero__author-person {
    display: flex;
    align-items: center;
}

/* Related posts: keep the original 2000x1300 card image frame.
   CMS blog thumbnails are often square; crop them to match the static cards. */
.related-posts-grid .card .blog-image.related-post-thumb {
    aspect-ratio: 2000 / 1300;
}

.related-posts-grid .card .blog-image.related-post-thumb a {
    display: block;
    height: 100%;
}

.related-posts-grid .card .blog-image.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.related-posts-grid .card .card-top .avtar {
    object-fit: cover;
}
