/* Blog posts and static pages — Views/Pages/PostDetail.cshtml (/{slug}/), with js/post-detail.js.
   Everything is scoped to .bd-* classes so the theme's own blog styles stay untouched. */

.bd-progress,
.bd-hero,
.bd-main,
.bd-band,
.bd-related {
    /* the red of the header's GET QUOTE: --base-color is navy here (decor-store.css) */
    --bd-accent: var(--red, #dc3131);
    --bd-accent-dark: #b92323;
    --bd-ink: var(--dark-gray, #232323);
    --bd-text: #474b54;
    --bd-muted: var(--medium-gray, #717580);
    --bd-line: #e6e7eb;
    --bd-soft: #f6f6f8;
    --bd-night: #1b1f27;
    --bd-radius: 16px;
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
}

/* ---- reading progress ---- */
.bd-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 3px;
    pointer-events: none;
}

.bd-progress span {
    display: block;
    height: 100%;
    background: var(--bd-accent);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* ---- buttons and links ---- */
.bd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.bd-btn:hover {
    transform: translateY(-1px);
}

.bd-btn--primary {
    background: var(--bd-accent);
    color: #fff;
}

.bd-btn--primary:hover {
    background: var(--bd-accent-dark);
    color: #fff;
}

.bd-btn--light {
    background: #fff;
    color: var(--bd-ink);
}

.bd-btn--light:hover {
    background: var(--bd-ink);
    color: #fff;
}

.bd-btn--outline-light {
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

.bd-btn--outline-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.bd-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bd-accent);
    font-size: 15px;
    font-weight: 700;
}

.bd-link:hover {
    color: var(--bd-accent-dark);
}

/* ---- hero ---- */
.bd-hero {
    padding: 44px 0 56px;
    background:
        radial-gradient(800px 380px at 100% 0%, rgba(220, 49, 49, .07), transparent 60%),
        linear-gradient(180deg, var(--bd-soft) 0%, #fbfbfc 100%);
    border-bottom: 1px solid var(--bd-line);
}

.bd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--bd-muted);
    font-size: 14px;
    line-height: 1.4;
}

.bd-breadcrumb a {
    color: var(--bd-ink);
    font-weight: 600;
}

.bd-breadcrumb a:hover {
    color: var(--bd-accent);
}

.bd-breadcrumb i {
    font-size: 11px;
    opacity: .5;
}

.bd-breadcrumb span {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(220, 49, 49, .1);
    color: var(--bd-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}

.bd-hero .bd-title {
    margin: 0 0 18px;
    color: var(--bd-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: clamp(30px, 3.6vw, 48px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.12;
}

.bd-lead {
    max-width: 680px;
    margin: 0 0 26px;
    color: var(--bd-text);
    font-size: 18px;
    line-height: 1.65;
}

.bd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin: 0;
    padding: 0;
    color: var(--bd-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.bd-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bd-meta i {
    color: var(--bd-ink);
}

.bd-meta__author {
    color: var(--bd-ink);
    font-weight: 700;
}

.bd-meta__author img {
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 1px solid var(--bd-line);
    border-radius: 50%;
    background: #fff;
}

.bd-cover {
    position: relative;
    max-width: 420px;
    margin: 0 0 0 auto;
}

.bd-cover::before {
    /* offset accent block behind the photo */
    content: "";
    position: absolute;
    inset: 22px -18px -18px 22px;
    border-radius: 22px;
    background:
        linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(135deg, #dc3131 0%, #b92323 100%);
    opacity: .9;
}

.bd-cover img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 24px 60px rgba(27, 31, 39, .18);
}

/* ---- article ---- */
.bd-main {
    padding: 64px 0 72px;
    background: #fff;
}

.bd-article {
    max-width: 760px;
    color: var(--bd-text);
    font-family: var(--primary-font, "Inter", sans-serif);
    font-size: 17px;
    line-height: 1.85;
}

.bd-article > :first-child {
    margin-top: 0;
}

.bd-article [id] {
    scroll-margin-top: 120px;
}

.bd-article p {
    margin: 0 0 22px;
}

.bd-article h1,
.bd-article h2,
.bd-article h3,
.bd-article h4 {
    color: var(--bd-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-weight: 800;
    letter-spacing: -.01em;
}

.bd-article h1,
.bd-article h2 {
    margin: 52px 0 18px;
    font-size: 28px;
    line-height: 1.25;
}

.bd-article h3 {
    margin: 36px 0 14px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}

.bd-article h4 {
    margin: 28px 0 12px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

/* legal pages: a paragraph holding a single <strong> is a section title (ArticleOutline) */
.bd-article .bd-subhead {
    margin: 40px 0 14px;
    color: var(--bd-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 20px;
    line-height: 1.35;
}

.bd-article strong,
.bd-article b {
    color: var(--bd-ink);
}

/* .bd-main for weight: the theme's link and <strong> colours are more specific than .bd-article a */
.bd-main .bd-article a,
.bd-main .bd-article a strong {
    color: var(--bd-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.bd-main .bd-article a:hover,
.bd-main .bd-article a:hover strong {
    color: var(--bd-accent-dark);
}

.bd-article ul,
.bd-article ol {
    margin: 0 0 24px;
    padding: 0;
}

.bd-article li {
    position: relative;
    margin-bottom: 10px;
    list-style: none;
}

.bd-article ul > li {
    padding-left: 28px;
}

.bd-article ul > li::before {
    content: "";
    position: absolute;
    top: .78em;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bd-accent);
    box-shadow: 0 0 0 4px rgba(220, 49, 49, .14);
}

.bd-article ol {
    counter-reset: bd-step;
}

.bd-article ol > li {
    padding-left: 42px;
    counter-increment: bd-step;
}

.bd-article ol > li::before {
    content: counter(bd-step);
    position: absolute;
    top: .2em;
    left: 0;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--bd-soft);
    color: var(--bd-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.bd-article blockquote {
    margin: 32px 0;
    padding: 22px 26px;
    border-left: 4px solid var(--bd-accent);
    border-radius: 0 14px 14px 0;
    background: var(--bd-soft);
    color: var(--bd-ink);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.6;
}

.bd-article blockquote p:last-child {
    margin-bottom: 0;
}

.bd-article hr {
    margin: 36px 0;
    border: 0;
    border-top: 1px solid var(--bd-line);
    opacity: 1;
}

.bd-article img {
    height: auto;
    border-radius: 14px;
}

.bd-article iframe {
    max-width: 100%;
}

.bd-article table {
    width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
    font-size: 15px;
}

.bd-article th,
.bd-article td {
    padding: 10px 14px;
    border: 1px solid var(--bd-line);
    text-align: left;
}

.bd-article th {
    background: var(--bd-soft);
    color: var(--bd-ink);
}

/* ---- article footer: tags and sharing ---- */
/* .bd-main for weight over the theme's footer { padding: 110px 0 } */
.bd-main .bd-article-footer {
    max-width: 760px;
    margin-top: 44px;
    padding: 28px 0 0;
    border-top: 1px solid var(--bd-line);
}

.bd-label {
    display: block;
    margin-bottom: 12px;
    color: var(--bd-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.bd-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
}

.bd-tags .bd-label {
    flex: 0 0 100%;
    margin-bottom: 4px;
}

.bd-tag {
    padding: 8px 14px;
    border: 1px solid var(--bd-line);
    border-radius: 999px;
    color: var(--bd-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: capitalize;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.bd-tag:hover {
    border-color: var(--bd-ink);
    background: var(--bd-ink);
    color: #fff;
}

.bd-share__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bd-share__links a,
.bd-share__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--bd-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bd-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.bd-share__links a {
    width: 44px;
    padding: 0;
    font-size: 17px;
}

.bd-share__links a:hover,
.bd-share__button:hover {
    border-color: var(--bd-ink);
    background: var(--bd-ink);
    color: #fff;
}

.bd-share__button i {
    font-size: 17px;
}

.bd-share__button.is-done {
    border-color: #1f8a4c;
    background: #1f8a4c;
    color: #fff;
}

.bd-share__button[hidden] {
    display: none;
}

.bd-back {
    margin-top: 30px;
}

/* ---- sidebar: outline and call to action ---- */
.bd-aside {
    position: sticky;
    top: 120px;
}

.bd-toc {
    margin-bottom: 22px;
    border: 1px solid var(--bd-line);
    border-radius: var(--bd-radius);
    background: #fff;
}

.bd-toc summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px;
    color: var(--bd-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
}

.bd-toc summary::-webkit-details-marker {
    display: none;
}

.bd-toc summary > i:first-child {
    color: var(--bd-accent);
    font-size: 17px;
}

.bd-toc__chevron {
    margin-left: auto;
    transition: transform .2s ease;
}

.bd-toc[open] .bd-toc__chevron {
    transform: rotate(180deg);
}

.bd-toc ol {
    position: relative;
    /* the sticky top, the summary and the call-to-action card below must fit the screen too */
    max-height: calc(100vh - 440px);
    min-height: 140px;
    margin: 0;
    padding: 0 12px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bd-toc--alone ol {
    max-height: calc(100vh - 240px);
}

.bd-toc li {
    margin: 0;
    list-style: none;
}

.bd-toc a {
    display: block;
    padding: 8px 10px 8px 14px;
    border-left: 2px solid var(--bd-line);
    color: var(--bd-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.bd-toc a:hover {
    color: var(--bd-ink);
}

.bd-toc a.is-active {
    border-left-color: var(--bd-accent);
    background: rgba(220, 49, 49, .05);
    color: var(--bd-ink);
}

/* kept compact: it is sticky together with the outline */
.bd-cta-card {
    position: relative;
    overflow: hidden;
    padding: 24px 24px 20px;
    border-radius: var(--bd-radius);
    background:
        radial-gradient(420px 220px at 100% 0%, rgba(220, 49, 49, .4), transparent 65%),
        linear-gradient(135deg, #171a21 0%, #232833 100%);
    color: rgba(255, 255, 255, .75);
}

.bd-aside .bd-cta-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
}

.bd-cta-card__title i {
    color: #ff8a8a;
}

.bd-cta-card__text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.6;
}

.bd-cta-card .bd-btn {
    width: 100%;
}

.bd-cta-card__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.bd-cta-card__phone:hover {
    color: #ff8a8a;
}

/* ---- call to action band ---- */
.bd-band {
    padding: 0 0 72px;
    background: #fff;
}

.bd-band__box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 44px 48px;
    border-radius: 24px;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, .16), transparent 60%),
        linear-gradient(135deg, #dc3131 0%, #b92323 100%);
    color: rgba(255, 255, 255, .88);
}

.bd-band .bd-band__title {
    margin: 0 0 6px;
    color: #fff;
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
}

.bd-band__text {
    max-width: 560px;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.bd-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---- related posts ---- */
.bd-related {
    padding: 0 0 90px;
    background: #fff;
}

.bd-related__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.bd-related .bd-related__title {
    margin: 0;
    color: var(--bd-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.bd-related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.bd-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    border: 1px solid var(--bd-line);
    border-radius: var(--bd-radius);
    background: #fff;
    color: var(--bd-muted);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.bd-card:hover {
    border-color: transparent;
    box-shadow: 0 18px 44px rgba(27, 31, 39, .12);
    color: var(--bd-muted);
    transform: translateY(-3px);
}

.bd-card__img {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--bd-soft);
}

/* the post images are 4:5 graphics with their headline at the top: crop from the bottom */
.bd-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 15%;
    transition: transform .4s ease;
}

.bd-card:hover .bd-card__img img {
    transform: scale(1.04);
}

.bd-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.bd-card__date {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.bd-card__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--bd-ink);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bd-card__text {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bd-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--bd-accent);
    font-size: 14px;
    font-weight: 700;
}

.bd-card__more i {
    transition: transform .2s ease;
}

.bd-card:hover .bd-card__more i {
    transform: translateX(3px);
}

/* ---- responsive ---- */
@media (min-width: 992px) {
    /* always open beside the text */
    .bd-toc summary {
        pointer-events: none;
    }

    .bd-toc__chevron {
        display: none;
    }
}

@media (max-width: 991px) {
    .bd-aside {
        position: static;
    }

    .bd-toc {
        margin-bottom: 0;
    }

    .bd-toc ol {
        max-height: 50vh;
    }

    .bd-cover {
        max-width: 360px;
        margin: 0 auto 0 0;
    }

    .bd-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .bd-hero {
        padding: 32px 0 44px;
    }

    .bd-breadcrumb {
        margin-bottom: 24px;
    }

    .bd-lead {
        font-size: 16px;
    }

    .bd-cover {
        max-width: 300px;
    }

    .bd-main {
        padding: 40px 0 56px;
    }

    .bd-article {
        font-size: 16px;
        line-height: 1.8;
    }

    .bd-article h1,
    .bd-article h2 {
        margin-top: 40px;
        font-size: 24px;
    }

    .bd-article h3 {
        font-size: 19px;
    }

    .bd-band__box {
        padding: 32px 22px;
    }

    .bd-band .bd-band__title {
        font-size: 25px;
    }

    .bd-band__actions .bd-btn {
        width: 100%;
    }

    .bd-related__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bd-btn,
    .bd-card,
    .bd-card__img img,
    .bd-card__more i {
        transition: none;
    }
}
