/* Blog article page */

.blog-article-meta-item + .blog-article-meta-item {
    margin-left: 16px;
}

.blog-article-meta-item.blue-link {
    cursor: pointer;
}

/* Banner */

.blog-article-banner {
    overflow: hidden;
    line-height: 0;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .03);
}

.blog-article-banner img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
}

@media (max-width: 767.98px) {
    .blog-article-banner {
        height: 260px;
    }
}

/* Content typography */

.blog-article-body {
    font-size: 16px;
    line-height: 1.65;
}

.blog-article-body h2,
.blog-article-body h3,
.blog-article-body h4 {
    scroll-margin-top: 90px;
    font-weight: 700;
}

.blog-article-body h2 {
    font-size: 24px;
    margin: 32px 0 12px;
}

.blog-article-body h3 {
    font-size: 20px;
    margin: 24px 0 10px;
}

.blog-article-body h4 {
    font-size: 18px;
    margin: 20px 0 8px;
}

.blog-article-body p {
    margin: 0 0 16px;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

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

.blog-article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px auto;
    border-radius: 7px;
}

#content .blog-article-body a,
#content .blog-article-body a:link,
#content .blog-article-body a:visited {
    color: var(--main-color, #0d9de3) !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color .15s ease, background-color .15s ease;
}

#content .blog-article-body a:hover,
#content .blog-article-body a:focus {
    color: #0b7cb4 !important;
    background: rgba(13, 157, 227, .12);
    text-decoration: none;
    border-radius: 3px;
}

.blog-article-body blockquote {
    margin: 24px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--main-color, #0d9de3);
    background: rgba(0, 0, 0, .03);
    border-radius: 4px;
}

/* Tables */

.blog-article-body table th {
    color: var(--ds-dark-text-color);
}

.blog-article-body table td,
.blog-article-body table td p,
.blog-article-body table td strong {
    color: var(--ds-secondary-text-color);
}

.blog-article-body table th strong {
    color: var(--ds-dark-text-color);
}

.blog-article-body table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 15px;
    display: block;
    overflow-x: auto;
}

.blog-article-body table th,
.blog-article-body table td {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    vertical-align: top;
    text-align: left;
}

.blog-article-body table th {
    background: rgba(0, 0, 0, .04);
}

.blog-article-body table th,
.blog-article-body table tr:first-child td strong {
    font-weight: 700;
}

.blog-article-body table tr:nth-child(even) {
    background: rgba(0, 0, 0, .02);
}

/* Table of contents */

.blog-toc {
    background: rgba(0, 0, 0, .03);
}

.blog-toc-toggle {
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
}

.blog-toc-toggle-icon {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.blog-toc-toggle[aria-expanded="true"] .blog-toc-toggle-icon {
    transform: rotate(-135deg);
}

.blog-toc-item {
    margin-bottom: 8px;
}

.blog-toc-level-3 {
    padding-left: 14px;
}

#content .blog-toc-link {
    display: block;
    color: inherit !important;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 8px;
    transition: color .15s ease, border-color .15s ease;
}

#content .blog-toc-link:hover {
    color: var(--main-color, #0d9de3) !important;
}

#content .blog-toc-link.is-active {
    color: var(--main-color, #0d9de3) !important;
    border-left-color: var(--main-color, #0d9de3);
    background: rgba(13, 157, 227, .08);
    font-weight: 700;
    border-radius: 0 4px 4px 0;
}

@media (min-width: 992px) {
    .blog-toc-col {
        position: relative;
    }

    .blog-toc {
        position: sticky;
        top: 90px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .blog-toc-list {
        display: none;
        margin-top: 12px !important;
    }

    .blog-toc.is-open .blog-toc-list {
        display: block;
    }
}

/* FAQ accordion */

.blog-faq {
    margin: 20px 0 8px;
    scroll-margin-top: 90px;
}

.blog-faq-item {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 7px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}

.blog-faq-item.is-open {
    border-color: var(--main-color, #0d9de3);
}

#content .blog-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: 0;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

#content .blog-faq-question:hover {
    color: var(--main-color, #0d9de3) !important;
    background: rgba(13, 157, 227, .06);
}

.blog-faq-icon {
    position: relative;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
}

.blog-faq-icon::before,
.blog-faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.blog-faq-icon::before {
    top: 6px;
    left: 0;
    width: 14px;
    height: 2px;
}

.blog-faq-icon::after {
    top: 0;
    left: 6px;
    width: 2px;
    height: 14px;
}

.blog-faq-question[aria-expanded="true"] .blog-faq-icon::after {
    transform: scaleY(0);
    opacity: 0;
}

.blog-faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .25s ease;
}

.blog-faq-item.is-open .blog-faq-answer {
    grid-template-rows: 1fr;
}

.blog-faq-answer-inner {
    overflow: hidden;
    padding: 0 16px;
}

.blog-faq-item.is-open .blog-faq-answer-inner {
    padding-bottom: 14px;
}

#content .blog-faq-answer-inner p,
#content .blog-faq-answer-inner li {
    margin-bottom: 8px;
}

#content .blog-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* Gallery */

.blog-article-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.blog-article-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}

/* Related / popular slider */

.ds-module-slider {
    position: relative;
}

.ds-module-slider .ds-module-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    scrollbar-width: none;
}

.ds-module-slider .ds-module-track::-webkit-scrollbar {
    display: none;
}

.ds-module-slider .ds-module-col {
    flex: 0 0 auto;
    width: 260px;
    scroll-snap-align: start;
}

.ds-module-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: background-color .15s ease, transform .15s ease;
}

.ds-module-slider-btn:hover {
    background: #f3f4f6;
    transform: translateY(-50%) scale(1.05);
}

.ds-module-slider-btn svg {
    stroke: #1f2937;
    display: block;
}

.ds-module-slider-btn.prev { left: -8px; }
.ds-module-slider-btn.next { right: -8px; }

.ds-module-slider-btn[hidden] { display: none; }