/* ==========================================================================
   Strapi-backed blog
   --------------------------------------------------------------------------
   Loaded only by the blogNew views, following the same convention as
   user-guide.css / pricing.css / help.css.

   Deliberately a standalone file rather than an SCSS partial: compiling the
   SCSS would rebuild public/css/app.css, which every other page — including
   the industry pages — depends on.

   Logical properties (margin-inline, padding-inline, border-inline-start) are
   used throughout so the Arabic RTL locale mirrors without extra rules.
   ========================================================================== */

:root {
    --blog-primary: #0282da;
    --blog-ink: #161c2d;
    --blog-muted: #6b7280;
    --blog-line: #e5e7eb;
    --blog-surface: #f7faff;
    --blog-radius: 12px;
}

/* --------------------------------------------------------------------------
   Listing: filters
   -------------------------------------------------------------------------- */

.blog-filters {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 36px;
}

.blog-filters__search {
    max-width: 420px;
    width: 100%;
}

.blog-filters__search .form-control {
    border: 1px solid var(--blog-line);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 15px;
}

.blog-filters__search .form-control:focus {
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(2, 130, 218, 0.15);
}

.blog-filters__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-pill {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid var(--blog-line);
    border-radius: 999px;
    background: #fff;
    color: var(--blog-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.blog-pill:hover {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
}

.blog-pill.is-active {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: #fff;
}

.blog-listing__empty {
    color: var(--blog-muted);
    margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Listing: cards
   -------------------------------------------------------------------------- */

.blog-card[hidden] {
    display: none !important;
}

.blog-card .card.blog {
    display: flex;
    flex-direction: column;
}

.blog-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--blog-surface);
}

.blog-card__media .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--blog-surface), #e8eefc);
}

.blog-card__category {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--blog-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
}

.blog-card__title {
    margin: 0 0 8px;
    line-height: 1.35;
}

.blog-card__title a {
    color: var(--blog-ink);
    text-decoration: none !important;
}

.blog-card__title a:hover {
    color: var(--blog-primary);
}

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

.blog-card__meta {
    color: var(--blog-muted);
    font-size: 13px;
}

.blog-card__dot {
    margin-inline: 6px;
}

/* --------------------------------------------------------------------------
   Article shell
   -------------------------------------------------------------------------- */

/* _general.scss fixes .article-container to 680px with no mobile fallback.
   Scoped override so only the new blog is responsive; the old blog detail and
   the industry pages keep their existing behaviour. */
.article-container.blog-article {
    width: 100%;
    max-width: 680px;
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--blog-muted);
}

.blog-breadcrumb a {
    color: var(--blog-muted);
    text-decoration: none !important;
}

.blog-breadcrumb a:hover {
    color: var(--blog-primary);
}

.blog-article__meta {
    align-items: center;
    row-gap: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.blog-article__author {
    font-weight: 600;
    color: var(--blog-ink);
}

.blog-article__cover {
    border-radius: var(--blog-radius);
}

/* Restore a real heading hierarchy. _general.scss flattens every heading inside
   .article-container to 20px !important, which is why these need !important
   too — they are scoped to .blog-article so nothing else is affected. */
.article-container.blog-article article h2 {
    font-size: 28px !important;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 40px;
    margin-bottom: 14px;
}

.article-container.blog-article article h3 {
    font-size: 22px !important;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 30px;
    margin-bottom: 12px;
}

.article-container.blog-article article h4 {
    font-size: 18px !important;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}

.article-container.blog-article article p {
    font-size: 17px;
    line-height: 1.75;
    color: #33394a;
    margin-bottom: 18px;
}

.article-container.blog-article article ul,
.article-container.blog-article article ol {
    font-size: 17px;
    line-height: 1.75;
    color: #33394a;
    padding-inline-start: 22px;
    margin-bottom: 18px;
}

.article-container.blog-article article li {
    margin-bottom: 8px;
}

.article-container.blog-article article blockquote {
    margin: 24px 0;
    padding-inline-start: 18px;
    border-inline-start: 3px solid var(--blog-primary);
    color: var(--blog-ink);
    font-size: 18px;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */

.blog-toc {
    margin: 28px 0 36px;
    padding: 20px 22px;
    background: var(--blog-surface);
    border-radius: var(--blog-radius);
}

.blog-toc__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blog-muted);
}

.blog-toc__list {
    margin: 0;
    padding-inline-start: 18px;
}

.blog-toc__item {
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.5;
}

.blog-toc__item--h3 {
    padding-inline-start: 14px;
    list-style: none;
    font-size: 14px;
}

.blog-toc a {
    color: var(--blog-ink);
    text-decoration: none !important;
}

.blog-toc a:hover {
    color: var(--blog-primary);
    text-decoration: underline !important;
}

/* --------------------------------------------------------------------------
   Media blocks
   -------------------------------------------------------------------------- */

.blog-figure {
    margin: 28px 0;
}

.blog-figure img {
    border-radius: var(--blog-radius);
    width: 100%;
    height: auto;
}

.blog-figure figcaption,
.blog-gallery figcaption,
.blog-video figcaption,
.blog-table figcaption {
    margin-top: 10px;
    color: var(--blog-muted);
    font-size: 14px;
    text-align: center;
}

.blog-figure--wide,
.blog-figure--full {
    /* Break out of the 680px column without overflowing the viewport. */
    width: min(92vw, 900px);
    margin-inline-start: 50%;
    transform: translateX(-50%);
}

[dir="rtl"] .blog-figure--wide,
[dir="rtl"] .blog-figure--full {
    transform: translateX(50%);
}

.blog-gallery {
    margin: 28px 0;
}

.blog-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.blog-gallery__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.blog-video {
    margin: 28px 0;
}

.blog-video__frame {
    border-radius: var(--blog-radius);
    overflow: hidden;
    background: #000;
}

.blog-video__frame iframe,
.blog-video__frame video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --------------------------------------------------------------------------
   Quote
   -------------------------------------------------------------------------- */

.blog-quote {
    margin: 32px 0;
    padding: 24px 26px;
    background: var(--blog-surface);
    border-radius: var(--blog-radius);
}

.blog-quote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 19px;
    line-height: 1.6;
    font-style: italic;
    color: var(--blog-ink);
}

.blog-quote__by {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 14px;
    color: var(--blog-muted);
}

.blog-quote__by small {
    display: block;
}

.blog-quote__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Callout and key takeaways
   -------------------------------------------------------------------------- */

.blog-callout {
    margin: 28px 0;
    padding: 18px 20px;
    border-radius: var(--blog-radius);
    border-inline-start: 4px solid var(--blog-primary);
    background: var(--blog-surface);
}

.blog-callout--tip {
    border-inline-start-color: #10b981;
    background: #ecfdf5;
}

.blog-callout--warning {
    border-inline-start-color: #f59e0b;
    background: #fffbeb;
}

.blog-callout--success {
    border-inline-start-color: #22c55e;
    background: #f0fdf4;
}

.blog-callout__title {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--blog-ink);
}

.blog-callout__body p:last-child,
.blog-takeaways__body p:last-child,
.blog-takeaways__body ul:last-child,
.blog-takeaways__body ol:last-child {
    margin-bottom: 0 !important;
}

.blog-takeaways {
    margin: 32px 0;
    padding: 22px 24px;
    border: 1px solid var(--blog-line);
    border-radius: var(--blog-radius);
    background: #fff;
}

.blog-takeaways__title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blog-primary);
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */

.blog-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 36px 0;
    padding: 26px 28px;
    border-radius: var(--blog-radius);
    background: var(--blog-primary);
    color: #fff;
}

.blog-cta--soft {
    background: var(--blog-surface);
    color: var(--blog-ink);
}

.blog-cta--banner {
    flex-direction: column;
    text-align: center;
    background: linear-gradient(135deg, var(--blog-primary), #0b5ed7);
    color: #fff;
}

.blog-cta__image {
    width: 96px;
    height: 96px;
    object-fit: contain;
    flex: 0 0 auto;
}

.blog-cta__title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.blog-cta__desc {
    margin: 0 0 14px;
    opacity: 0.9;
}

.blog-cta .blog-cta__button {
    background: #fff;
    border-color: #fff;
    color: var(--blog-primary);
    font-weight: 700;
}

.blog-cta--soft .blog-cta__button {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Store badges
   -------------------------------------------------------------------------- */

.blog-store-badges {
    margin: 28px 0;
}

.blog-store-badges__title {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--blog-ink);
}

.blog-store-badges__links a {
    text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.blog-faq {
    margin: 40px 0;
}

.blog-faq .accordion-item {
    border: 1px solid var(--blog-line);
    border-radius: var(--blog-radius) !important;
    margin-bottom: 10px;
    overflow: hidden;
}

.blog-faq .accordion-button {
    font-weight: 600;
    font-size: 16px;
    color: var(--blog-ink);
    box-shadow: none;
}

.blog-faq .accordion-button:not(.collapsed) {
    background: var(--blog-surface);
    color: var(--blog-primary);
}

.blog-faq .accordion-body p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */

.blog-table {
    margin: 28px 0;
}

.blog-table__scroll {
    overflow-x: auto;
}

.blog-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.blog-table th,
.blog-table td {
    padding: 10px 14px;
    border: 1px solid var(--blog-line);
    text-align: start;
}

.blog-table thead th {
    background: var(--blog-surface);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */

.blog-divider {
    margin: 36px 0;
}

.blog-divider--line {
    border-top: 1px solid var(--blog-line);
}

.blog-divider--dots {
    text-align: center;
    color: var(--blog-muted);
    letter-spacing: 10px;
}

.blog-divider--dots::before {
    content: "•••";
}

.blog-divider--space {
    margin: 48px 0;
}

/* --------------------------------------------------------------------------
   Code
   -------------------------------------------------------------------------- */

.blog-code {
    margin: 24px 0;
    padding: 16px 18px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--blog-radius);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.blog-code code {
    color: inherit;
    background: none;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Tags, author, related, share
   -------------------------------------------------------------------------- */

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 36px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--blog-line);
}

.blog-tags__label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--blog-muted);
}

.blog-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.blog-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--blog-surface);
    color: var(--blog-muted);
    font-size: 13px;
}

.blog-author {
    display: flex;
    gap: 16px;
    margin: 32px 0;
    padding: 22px 24px;
    background: var(--blog-surface);
    border-radius: var(--blog-radius);
}

.blog-author__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.blog-author__name {
    margin: 0;
    font-weight: 700;
    color: var(--blog-ink);
}

.blog-author__role {
    margin: 2px 0 8px;
    font-size: 14px;
    color: var(--blog-primary);
}

.blog-author__bio {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--blog-muted);
}

.blog-author__links {
    margin: 10px 0 0;
    display: flex;
    gap: 14px;
    font-size: 14px;
}

.blog-related {
    margin: 44px 0 0;
    padding-top: 32px;
    border-top: 1px solid var(--blog-line);
}

.blog-related__title {
    font-size: 22px !important;
    font-weight: 700;
    margin-bottom: 20px;
}

/* The related strip reuses the grid cards, which are sized for a 3-column
   container; inside the narrower article column they stack. */
.blog-related .blog-card {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

.blog-share {
    align-items: center;
}

.blog-share__copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.blog-share__copied {
    font-size: 12px;
    color: var(--blog-primary);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
    .article-container.blog-article article h2 {
        font-size: 24px !important;
        margin-top: 32px;
    }

    .article-container.blog-article article h3 {
        font-size: 20px !important;
    }

    .article-container.blog-article article p,
    .article-container.blog-article article ul,
    .article-container.blog-article article ol {
        font-size: 16px;
    }

    .blog-figure--wide,
    .blog-figure--full {
        width: 100%;
        margin-inline-start: 0;
        transform: none;
    }

    [dir="rtl"] .blog-figure--wide,
    [dir="rtl"] .blog-figure--full {
        transform: none;
    }

    .blog-cta {
        flex-direction: column;
        text-align: center;
    }

    .blog-author {
        flex-direction: column;
    }

    .blog-toc {
        padding: 16px 18px;
    }
}
