/* Blog page family (Listing + Details) — scoped under .blog-page /
   .blog-details-content only, reuses the design-token custom properties
   defined in resources/views/layouts/dynamic-color.blade.php. Does not
   touch any selector used elsewhere on the site. The hero banner above the
   Listing page is the shared frontend.partials.catalog-hero-banner
   component (its own styles live in that partial), not styled here. The
   Details page has no colored hero banner — a plain .breadcrumb.sf-breadcrumb
   (already defined in style.css) sits above the article image instead — and
   reuses .blog-details-content/.blog-details-sidebar/.blog-popular-item/
   .blog-categories-list/.blog-tag-list (all already defined in
   public/assets/scss/style.css) — only what genuinely has no prior art
   (the meta row) is added here. */

/* Details page has no hero banner above it anymore, so the shared
   .section-gap top padding (150px) is too much — pinned to 80px here
   (bottom padding stays inherited from .section-gap). Two-class selector
   so it reliably beats .section-gap regardless of stylesheet order. */
.blog-details-page.section-gap {
    padding-top: 80px;
}

/* Listing page — same 80px top-gap pin, right below the hero banner. */
.blog-list-page.section-gap {
    padding-top: 80px;
}

.blog-page {
    background: var(--white);
}

/* Search */
.blog-search-form {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--stroke-2);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(16, 24, 39, 0.06);
}

.blog-search-form--lg {
    max-width: 640px;
    margin: 0 auto 24px;
    padding: 6px 6px 6px 24px;
}

.blog-search-form--sm {
    padding: 4px 4px 4px 16px;
}

.blog-search-form__input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--gray-90);
    padding: 10px 0;
}

.blog-search-form__input::placeholder {
    color: var(--para-text);
}

.blog-search-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--button, var(--brand-primary));
    color: var(--white);
    cursor: pointer;
    transition: var(--transition, all 0.3s linear);
}

.blog-search-form__submit:hover {
    opacity: 0.9;
}

/* Category / tag pills */
.blog-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.blog-pills--stacked {
    justify-content: flex-start;
    margin-bottom: 0;
}

.blog-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--stroke-2);
    background: var(--secondary);
    color: var(--gray-90);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition, all 0.3s linear);
}

.blog-pill:hover,
.blog-pill.is-active {
    background: var(--button, var(--brand-primary));
    border-color: var(--button, var(--brand-primary));
    color: var(--white);
}

/* Active filters bar */
.blog-active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--para-text);
}

.blog-active-filters a {
    color: var(--button, var(--brand-primary));
    font-weight: 600;
    text-decoration: underline;
}

/* Featured article */
.blog-featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: center;
    background: var(--secondary);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 48px;
}

.blog-featured__image {
    display: block;
    height: 100%;
    min-height: 280px;
}

.blog-featured__image img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
}

.blog-featured__body {
    padding: 32px 32px 32px 0;
}

.blog-featured__badge {
    margin-bottom: 16px;
}

.blog-featured__title {
    display: block;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-90);
    margin-bottom: 14px;
}

.blog-featured__title:hover {
    color: var(--button, var(--brand-primary));
}

.blog-featured__excerpt {
    color: var(--para-text);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Shared badge (featured + card) */
.blog-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--white);
    color: var(--button, var(--brand-primary));
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Latest Articles grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
    margin-bottom: 40px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--stroke-2);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition, all 0.3s linear);
}

.blog-card:hover {
    box-shadow: 0 12px 30px rgba(16, 24, 39, 0.08);
    transform: translateY(-2px);
}

.blog-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
}

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

.blog-card__image .blog-badge {
    position: absolute;
    left: 14px;
    top: 14px;
}

.blog-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gray-90);
    margin-bottom: 8px;
}

.blog-card__title:hover {
    color: var(--button, var(--brand-primary));
}

.blog-card__excerpt {
    color: var(--para-text);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--gray-50);
    margin-bottom: 12px;
}

.blog-card__author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card__author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.blog-tag-pill {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--gray-50);
    font-size: 11px;
    font-weight: 500;
}

.blog-card__link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--button, var(--brand-primary));
    font-size: 14px;
    font-weight: 600;
}

/* Empty state */
.blog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--para-text);
    border: 1px dashed var(--stroke-2);
    border-radius: 16px;
}

/* Pagination (scoped override of the shared .zPaginatation-list class) */
.blog-pagination {
    margin-bottom: 8px;
}

.blog-page .zPaginatation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.blog-page .zPaginatation-list .item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--stroke-2);
    color: var(--gray-90);
    font-size: 14px;
    transition: var(--transition, all 0.3s linear);
}

.blog-page .zPaginatation-list .item:hover,
.blog-page .zPaginatation-list .item.active {
    background: var(--button, var(--brand-primary));
    border-color: var(--button, var(--brand-primary));
    color: var(--white);
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-widget {
    background: var(--secondary);
    border-radius: 16px;
    padding: 24px;
}

.blog-widget__title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-90);
    margin: 0 0 20px !important;
}

.blog-sidebar-latest {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-sidebar-latest__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-sidebar-latest__item img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-sidebar-latest__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gray-90);
}

.blog-sidebar-latest__item:hover .blog-sidebar-latest__title {
    color: var(--button, var(--brand-primary));
}

.blog-sidebar-latest__date {
    display: block;
    font-size: 12px;
    color: var(--gray-50);
    margin-top: 4px;
}

.blog-cta-widget {
    background: var(--secondary);
    text-align: center;
}

.blog-cta-widget__title {
    color: var(--gray-90);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px !important;
}

/* Layout only — deliberately does not touch .sf-btn-icon-primary's own
   background/color (that rule is !important sitewide), so the button
   keeps its normal, everywhere-else-legible look. */
.blog-cta-widget .sf-btn-icon-primary {
    width: 100%;
    justify-content: center;
}

/* Responsive: Desktop 3 cols / Tablet 2 cols / Mobile 1 col */
@media (max-width: 1199.98px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured__body {
        padding: 28px;
    }
}

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

    .blog-sidebar {
        margin-top: 40px;
    }
}

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

    .blog-search-form--lg {
        padding-left: 16px;
    }
}

/* ===== Blog Details page — additions only, no prior art existed for these ===== */

/* Meta row (category badge + existing .date pill + author/reading time) */
.blog-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.blog-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--para-text);
}

.blog-meta-item i {
    color: var(--para-text);
}

/* Supplemental typography for bare (unclassed) tags inside rich-text Blog
   content, on top of the existing .text p/span rules above this file. */
.blog-details-content .textBlock-wrap .text h1,
.blog-details-content .textBlock-wrap .text h2,
.blog-details-content .textBlock-wrap .text h3,
.blog-details-content .textBlock-wrap .text h4,
.blog-details-content .textBlock-wrap .text h5,
.blog-details-content .textBlock-wrap .text h6 {
    font-weight: 600;
    line-height: 1.35;
    color: var(--title-text, var(--gray-90));
    margin: 32px 0 16px;
}

.blog-details-content .textBlock-wrap .text h1:first-child,
.blog-details-content .textBlock-wrap .text h2:first-child,
.blog-details-content .textBlock-wrap .text h3:first-child {
    margin-top: 0;
}

.blog-details-content .textBlock-wrap .text ul:not(.unorderList),
.blog-details-content .textBlock-wrap .text ol:not(.orderList) {
    padding-left: 24px;
    margin-bottom: 16px;
    color: var(--para-text);
    line-height: 1.7;
}

.blog-details-content .textBlock-wrap .text ul:not(.unorderList) li,
.blog-details-content .textBlock-wrap .text ol:not(.orderList) li {
    margin-bottom: 8px;
}

.blog-details-content .textBlock-wrap .text blockquote:not(.quoteWrap) {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--button, var(--brand-primary));
    background: var(--secondary);
    color: var(--gray-90);
    font-size: 18px;
    font-style: italic;
    line-height: 1.6;
}

.blog-details-content .textBlock-wrap .text a {
    color: var(--button, var(--brand-primary));
    text-decoration: underline;
}

.blog-details-content .textBlock-wrap .text img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
}

/* Article footer — Tags / Share row spacing (lists/icons themselves reuse
   the existing .blog-tag-list / .footer-social-link classes) */
.blog-details-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--stroke-2);
}

.blog-copy-link.is-copied {
    background: var(--button, var(--brand-primary)) !important;
}

.blog-copy-link.is-copied svg,
.blog-copy-link.is-copied i {
    color: var(--white) !important;
}
