/* ==========================================================================
   TenderMitra — Blog list + Blog detail
   Loads on top of modern.css, which supplies the fonts, tokens, buttons,
   mesh, reveal and .hm-prose. Scoped to .tm-blog / .tm-post or prefixed .bl-*.
   ========================================================================== */

/* ==========================================================================
   HERO
   ========================================================================== */

/* Shell and atmosphere come from modern.css; only the padding is local */
.bl-hero {
    padding-top: clamp(3rem, 2rem + 4vw, 5rem);
    padding-bottom: clamp(2.5rem, 2rem + 3vw, 4rem);
}

.bl-hero > .hm-wrap { position: relative; z-index: 1; }

.bl-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    font-size: .8125rem;
    /* Sits on the coloured field, so one step darker than body muted */
    color: var(--s-ink-2);
}

.bl-crumbs--center { justify-content: center; }
.bl-crumbs a { color: var(--s-ink-2); text-decoration: none; transition: color .2s var(--tm-ease); }
.bl-crumbs a:hover { color: var(--s-ink); }
.bl-crumbs li + li::before { content: "/"; margin-right: .45rem; color: var(--s-line-2); }
.bl-crumbs [aria-current="page"] { color: var(--s-ink); }

.bl-crumbs .bl-crumb-now {
    max-width: 26ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   POST META
   ========================================================================== */

.bl-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    font-size: .8125rem;
    color: var(--s-ink-3);
}

.bl-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.bl-meta i { color: var(--s-orange); font-size: .9em; }
.bl-meta .bl-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--s-line-2); }

/* ==========================================================================
   FEATURED POST
   ========================================================================== */

.bl-feature {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    align-items: center;
    padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    background: #fff;
    border: 1px solid var(--s-line);
    border-radius: 26px;
    text-decoration: none;
    transition: transform .3s var(--tm-ease), box-shadow .3s var(--tm-ease), border-color .3s var(--tm-ease);
}

@media (max-width: 767.98px) { .bl-feature { grid-template-columns: 1fr; } }

.bl-feature:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 2px 4px rgb(11 18 32 / .04),
                0 12px 24px -10px rgb(11 18 32 / .12),
                0 28px 56px -24px rgb(11 18 32 / .24);
}

.bl-feature-media {
    overflow: hidden;
    border-radius: 18px;
    /* Posts without a thumbnail fall back to this box. A flat tint reads as
       a missing image; a two-stop brand gradient reads as a cover. Any real
       image sits on top of it and hides it entirely. */
    background: linear-gradient(135deg, var(--t-cream) 0%, var(--t-blush) 52%, var(--t-lilac) 100%);
    aspect-ratio: 16 / 11;
}

.bl-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s var(--tm-ease-out);
}

.bl-feature:hover .bl-feature-media img { transform: scale(1.04); }

.bl-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--s-orange-d);
    background: var(--t-cream);
    border-radius: 999px;
    margin-bottom: 1rem;
}

.bl-feature-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -.012em;
    color: var(--s-ink);
    margin: 0 0 .85rem;
}

.bl-feature-text {
    font-size: .9375rem;
    line-height: 1.68;
    color: var(--s-ink-2);
    margin: 0 0 1.35rem;
}

.bl-more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--s-ink);
}

.bl-more i { transition: transform .25s var(--tm-ease); }
.bl-feature:hover .bl-more i,
.bl-card:hover .bl-more i { transform: translateX(4px); }

/* ==========================================================================
   POST GRID
   ========================================================================== */

.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }

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

.bl-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--s-line);
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .3s var(--tm-ease), box-shadow .3s var(--tm-ease), border-color .3s var(--tm-ease);
}

.bl-card:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 2px 4px rgb(11 18 32 / .04),
                0 12px 24px -10px rgb(11 18 32 / .12),
                0 28px 56px -24px rgb(11 18 32 / .24);
}

.bl-card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--t-cream) 0%, var(--t-blush) 52%, var(--t-lilac) 100%);
}

.bl-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s var(--tm-ease-out);
}

.bl-card:hover .bl-card-media img { transform: scale(1.05); }

.bl-card-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 1.35rem; }

.bl-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -.018em;
    line-height: 1.35;
    color: var(--s-ink);
    margin: .75rem 0 .5rem;
}

.bl-card-text {
    font-size: .875rem;
    line-height: 1.62;
    color: var(--s-ink-3);
    margin: 0 0 1.15rem;
    flex: 1 1 auto;
}

/* ==========================================================================
   PAGINATION — the list view paginates three posts per page
   ========================================================================== */

.bl-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 3rem;
}

.bl-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 40px;
    height: 40px;
    padding: 0 .9rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--s-ink-2);
    background: #fff;
    border: 1px solid var(--s-line);
    border-radius: 999px;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    transition: border-color .2s var(--tm-ease), color .2s var(--tm-ease), background-color .2s var(--tm-ease);
}

.bl-page:hover { border-color: var(--s-line-2); color: var(--s-ink); }

.bl-page[aria-current="page"] {
    background: var(--s-ink);
    border-color: var(--s-ink);
    color: #fff;
}

.bl-page--off { opacity: .4; pointer-events: none; }

/* ==========================================================================
   DETAIL
   ========================================================================== */

.bl-article { max-width: 44rem; margin-inline: auto; }

.bl-cover {
    overflow: hidden;
    border-radius: 24px;
    background: var(--t-cream);
    margin-bottom: 2.5rem;
    aspect-ratio: 16 / 9;
}

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

.bl-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--s-line);
}

.bl-share-label { font-size: .8125rem; color: var(--s-ink-3); margin: 0 .3rem 0 0; }

.bl-share a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--s-ink-2);
    background: #fff;
    border: 1px solid var(--s-line);
    text-decoration: none;
    transition: transform .2s var(--tm-ease), border-color .2s var(--tm-ease), color .2s var(--tm-ease);
}

.bl-share a:hover { transform: translateY(-2px); border-color: var(--s-line-2); color: var(--s-ink); }

.bl-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.bl-empty {
    max-width: 34rem;
    margin-inline: auto;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 20px;
    background: var(--t-cream);
}

.bl-empty i { font-size: 1.75rem; color: var(--s-orange); }
.bl-empty p { margin: .85rem 0 0; font-size: .9063rem; color: var(--s-ink-2); line-height: 1.6; }

/* ==========================================================================
   CTA
   ========================================================================== */

.bl-cta { padding-block: clamp(4rem, 3rem + 5vw, 7rem); }

.bl-cta > .hm-wrap { position: relative; z-index: 1; }

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .bl-card-media img,
    .bl-feature-media img { transition: none !important; }

    .bl-card:hover .bl-card-media img,
    .bl-feature:hover .bl-feature-media img { transform: none !important; }
}
