/*
 * tdmc-blog.css — editorial styling for the public blog.
 * Loaded only on blog pages via @push('styles'); sits after style.css/tdmc-public.css.
 */
:root {
    --tdmc-ink: #15171c;
    --tdmc-muted: #6b7280;
    --tdmc-line: #e9eaee;
    --tdmc-blog-primary: var(--primary, #CF3425);
}

/* ---------------------------------------------------------------- Cards */
.tdmc-post-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid var(--tdmc-line);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tdmc-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(18, 22, 33, .12);
    border-color: transparent;
}
.tdmc-post-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f2f3f5;
}
.tdmc-post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .55s ease;
}
.tdmc-post-card:hover .tdmc-post-card__media img { transform: scale(1.06); }
.tdmc-post-card__cat {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    background: rgba(255, 255, 255, .94);
    color: var(--tdmc-ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.tdmc-post-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px 22px 22px;
}
.tdmc-post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--tdmc-muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.tdmc-post-card__meta i { color: var(--tdmc-blog-primary); margin-right: 3px; }
.tdmc-post-card__title {
    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 10px;
}
.tdmc-post-card__title a {
    color: var(--tdmc-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s ease;
}
.tdmc-post-card__title a:hover { color: var(--tdmc-blog-primary); }
.tdmc-post-card__excerpt {
    color: var(--tdmc-muted);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tdmc-post-card__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--tdmc-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.tdmc-post-card__author { font-size: 13px; color: var(--tdmc-muted); font-weight: 500; }
.tdmc-post-card__more {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tdmc-blog-primary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tdmc-post-card__more i { transition: transform .2s ease; }
.tdmc-post-card:hover .tdmc-post-card__more i { transform: translateX(4px); }

/* Row (list) variant — horizontal on >= sm.
   The media fills the card height via absolute positioning so the image can
   never make the card taller than its content. */
@media (min-width: 576px) {
    .tdmc-post-card--row { flex-direction: row; align-items: stretch; }
    .tdmc-post-card--row .tdmc-post-card__media { flex: 0 0 40%; max-width: 40%; aspect-ratio: auto; }
    .tdmc-post-card--row .tdmc-post-card__media img { position: absolute; inset: 0; }
    .tdmc-post-card--row .tdmc-post-card__body { padding: 26px 30px; min-height: 230px; }
    .tdmc-post-card--row .tdmc-post-card__title { font-size: 22px; }
    .tdmc-post-card--row .tdmc-post-card__excerpt { -webkit-line-clamp: 2; }
}
.tdmc-blog-list .tdmc-post-card { margin-bottom: 26px; }

/* ---------------------------------------------------------------- Pagination */
.tdmc-pagination-nav { display: flex; justify-content: center; }
.tdmc-pagination {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.tdmc-pagination li a,
.tdmc-pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--tdmc-line);
    background: #fff;
    color: var(--tdmc-ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s ease;
}
.tdmc-pagination li a:hover { border-color: var(--tdmc-blog-primary); color: var(--tdmc-blog-primary); transform: translateY(-2px); }
.tdmc-pagination li.is-active span {
    background: var(--tdmc-blog-primary);
    border-color: var(--tdmc-blog-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(207, 52, 37, .28);
}
.tdmc-pagination li.is-disabled span { opacity: .4; }
.tdmc-pagination li.is-dots span { border: none; background: transparent; min-width: 22px; padding: 0; }

/* ---------------------------------------------------------------- Article (detail) */
.blog-details {
    border: 1px solid var(--tdmc-line);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(18, 22, 33, .05);
}
.blog-details .card-body { padding: clamp(20px, 3vw, 40px); }
.blog-details .blog-image img { border-radius: 14px; }

.blog-body { color: #33373f; font-size: 17px; line-height: 1.85; }
.blog-body p { margin-bottom: 1.25rem; }
.blog-body h2 {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    color: var(--tdmc-ink);
    margin: 2.2rem 0 1rem;
    line-height: 1.3;
}
.blog-body h2::before {
    content: "";
    display: block;
    width: 46px;
    height: 4px;
    border-radius: 4px;
    background: var(--tdmc-blog-primary);
    margin-bottom: 14px;
}
.blog-body h3 {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    color: var(--tdmc-ink);
    margin: 1.8rem 0 .8rem;
}
.blog-body ul, .blog-body ol { margin: 0 0 1.4rem; padding-left: 1.2rem; }
.blog-body li { margin-bottom: .55rem; padding-left: .25rem; }
.blog-body li::marker { color: var(--tdmc-blog-primary); }
.blog-body blockquote {
    margin: 1.6rem 0;
    padding: 18px 22px;
    background: #faf6f5;
    border-left: 4px solid var(--tdmc-blog-primary);
    border-radius: 0 12px 12px 0;
    color: #3a3f47;
    font-size: 16.5px;
}
.blog-body blockquote p { margin: 0; }
.blog-body a {
    color: var(--tdmc-blog-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.blog-body strong { color: var(--tdmc-ink); }
.blog-body img { border-radius: 12px; max-width: 100%; height: auto; }

/* Lead paragraph (excerpt) under the meta row */
.blog-content .blog-lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--tdmc-ink);
    font-weight: 500;
    margin-bottom: 1.4rem;
}

/* Sidebar cards */
.theiaStickySidebar .card {
    border: 1px solid var(--tdmc-line);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(18, 22, 33, .04);
}

/* Breadcrumb breathing room above the content */
.content { padding-top: 48px; padding-bottom: 64px; }

/* ---------------------------------------------------------------- Reading progress bar */
.tdmc-readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1080; background: transparent; pointer-events: none; }
.tdmc-readbar #tdmc-readbar-fill { display: block; height: 100%; width: 0; background: var(--tdmc-blog-primary); transition: width .1s linear; }

/* Heading anchor offset so the fixed header doesn't cover jumped-to headings */
.blog-body h2, .blog-body h3 { scroll-margin-top: 100px; }

/* ---------------------------------------------------------------- Table of contents */
.tdmc-toc__nav { display: flex; flex-direction: column; }
.tdmc-toc__link { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--tdmc-line); color: #5a6069; font-size: 14px; line-height: 1.4; text-decoration: none; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.tdmc-toc__link--l3 { padding-left: 28px; font-size: 13.5px; }
.tdmc-toc__link:hover { color: var(--tdmc-blog-primary); border-color: var(--tdmc-blog-primary); }
.tdmc-toc__link.is-active { color: var(--tdmc-blog-primary); border-color: var(--tdmc-blog-primary); font-weight: 600; background: linear-gradient(90deg, rgba(207, 52, 37, .07), transparent); }

/* ---------------------------------------------------------------- FAQ accordion */
.tdmc-faq__heading { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: var(--tdmc-ink); margin-bottom: 1rem; }
.tdmc-faq .accordion-item { border: 1px solid var(--tdmc-line); border-radius: 12px !important; margin-bottom: 10px; overflow: hidden; }
.tdmc-faq .accordion-button { font-weight: 600; color: var(--tdmc-ink); font-size: 16px; padding: 16px 18px; }
.tdmc-faq .accordion-button:not(.collapsed) { background: #faf6f5; color: var(--tdmc-blog-primary); box-shadow: none; }
.tdmc-faq .accordion-button:focus { box-shadow: none; border-color: var(--tdmc-line); }
.tdmc-faq .accordion-body { color: #4a4f57; font-size: 15.5px; line-height: 1.7; padding: 4px 18px 18px; }

/* ---------------------------------------------------------------- Author (E-E-A-T) */
.tdmc-avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; vertical-align: middle; }
.tdmc-avatar--initial { background: var(--tdmc-blog-primary); color: #fff; font-weight: 700; line-height: 1; }
.tdmc-byline { text-decoration: none; transition: color .15s ease; }
.tdmc-byline:hover { color: var(--tdmc-blog-primary) !important; }
a.tdmc-post-card__author { text-decoration: none; transition: color .15s ease; }
a.tdmc-post-card__author:hover { color: var(--tdmc-blog-primary); }

/* Author archive hero */
.tdmc-author-hero { display: flex; gap: 22px; align-items: flex-start; background: #fff; border: 1px solid var(--tdmc-line); border-radius: 18px; padding: 28px 30px; box-shadow: 0 10px 40px rgba(18, 22, 33, .05); }
.tdmc-author-hero .tdmc-avatar { box-shadow: 0 6px 18px rgba(18, 22, 33, .12); }
.tdmc-author-hero__name { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; color: var(--tdmc-ink); margin: 0 0 4px; }
.tdmc-author-hero__title { color: var(--tdmc-blog-primary); font-weight: 600; margin: 0 0 10px; }
.tdmc-author-hero__bio { color: #4a4f57; font-size: 15.5px; line-height: 1.7; margin: 0 0 12px; max-width: 62ch; }
.tdmc-author-hero__meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tdmc-author-hero__count { font-size: 13px; font-weight: 600; color: #fff; background: var(--tdmc-ink); padding: 4px 12px; border-radius: 999px; }
.tdmc-author-hero__socials a, .tdmc-authorbox__socials a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--tdmc-line); border-radius: 50%; color: #5a6069; margin-right: 6px; transition: all .15s ease; }
.tdmc-author-hero__socials a:hover, .tdmc-authorbox__socials a:hover { color: #fff; background: var(--tdmc-blog-primary); border-color: var(--tdmc-blog-primary); }
@media (max-width: 575px) { .tdmc-author-hero { flex-direction: column; align-items: center; text-align: center; } .tdmc-author-hero__meta { justify-content: center; } }

/* Author box on the article */
.tdmc-authorbox { display: flex; gap: 18px; background: #faf9f8; border: 1px solid var(--tdmc-line); border-radius: 14px; padding: 20px 22px; }
.tdmc-authorbox__avatar { flex-shrink: 0; }
.tdmc-authorbox__eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tdmc-muted); font-weight: 600; }
.tdmc-authorbox__name { font-size: 17px; font-weight: 700; margin: 2px 0 6px; color: var(--tdmc-ink); }
.tdmc-authorbox__name a { color: var(--tdmc-ink); }
.tdmc-authorbox__name a:hover { color: var(--tdmc-blog-primary); }
.tdmc-authorbox__role { font-weight: 500; color: var(--tdmc-muted); font-size: 14px; }
.tdmc-authorbox__bio { color: #4a4f57; font-size: 14.5px; line-height: 1.65; margin: 0 0 10px; }
.tdmc-authorbox__socials { margin-bottom: 10px; }
.tdmc-authorbox__more { font-size: 13.5px; font-weight: 600; color: var(--tdmc-blog-primary); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
@media (max-width: 575px) { .tdmc-authorbox { flex-direction: column; } }
