/* ============================================================
   Blog — list + detail pages.
   Uses tokens declared in site-redesign.css.
   Class prefix: .bm-  (markup in blog.cshtml + Details.cshtml).
   ============================================================ */

.bm-page {
    background:
        radial-gradient(70% 60% at 0% 0%, rgba(232, 134, 26, .06), transparent 70%),
        radial-gradient(70% 60% at 100% 0%, rgba(201, 162, 39, .05), transparent 70%),
        var(--bm-bg);
    color: var(--bm-ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 100px;
}
.bm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ============================================================
   HERO — list page
   ============================================================ */
.bm-hero {
    position: relative;
    padding: 96px 0 36px;
    text-align: center;
    overflow: hidden;
}
.bm-hero::before {
    content: "Stories from Lalsot";
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--bm-saffron);
    white-space: nowrap;
}
.bm-hero .bm-container { position: relative; }
.bm-hero__title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.05;
    margin: 28px 0 16px;
    color: var(--bm-ink);
    font-weight: 800;
    letter-spacing: -.025em;
    background: linear-gradient(135deg, var(--bm-maroon) 0%, var(--bm-saffron) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.bm-hero__sub {
    color: var(--bm-mute);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.08rem;
    line-height: 1.7;
}

/* Ornament under hero */
.bm-hero::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 28px auto 0;
    background: linear-gradient(90deg, var(--bm-saffron), var(--bm-gold));
    border-radius: 2px;
}

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.bm-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 40px auto 0;
    max-width: 900px;
    padding: 0 20px;
}
.bm-pill {
    padding: 9px 20px;
    border-radius: 999px;
    background: #fff;
    color: var(--bm-ink-soft);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--bm-line);
    transition: all .2s ease;
    white-space: nowrap;
}
.bm-pill:hover {
    color: var(--bm-maroon);
    border-color: var(--bm-saffron);
    background: var(--bm-cream-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 134, 26, .14);
}
.bm-pill.is-active {
    background: linear-gradient(135deg, var(--bm-maroon), var(--bm-maroon-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(139, 26, 26, .26);
}
.bm-pill.is-active:hover {
    background: linear-gradient(135deg, var(--bm-saffron), var(--bm-maroon));
    color: #fff;
}

/* ============================================================
   CARD GRID
   ============================================================ */
.bm-page > .bm-container,
section.bm-container {
    margin-top: 60px;
}

.bm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.bm-card {
    background: var(--bm-surface);
    border: 1px solid var(--bm-line);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.bm-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bm-saffron), var(--bm-maroon));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
    z-index: 2;
}
.bm-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(92, 15, 15, .14);
    border-color: var(--bm-saffron);
}
.bm-card:hover::before { transform: scaleX(1); }

.bm-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bm-cream-2), var(--bm-cream));
    position: relative;
}
.bm-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(92, 15, 15, .08));
    pointer-events: none;
}
.bm-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.bm-card:hover .bm-card__media img { transform: scale(1.05); }

.bm-card__body {
    padding: 24px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.bm-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--bm-cream-2), #fff);
    color: var(--bm-maroon);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--bm-line);
    width: max-content;
    transition: all .2s ease;
}
.bm-tag:hover {
    background: linear-gradient(135deg, var(--bm-saffron), var(--bm-maroon));
    color: #fff;
    border-color: transparent;
}

.bm-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bm-ink);
    margin: 0;
    line-height: 1.35;
    letter-spacing: -.01em;
}
.bm-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}
.bm-card__title a:hover { color: var(--bm-maroon); }

.bm-card__read {
    margin-top: auto;
    color: var(--bm-maroon);
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap .2s ease, color .2s ease;
}
.bm-card__read::after {
    content: "→";
    transition: transform .2s ease;
}
.bm-card__read:hover {
    color: var(--bm-saffron);
    gap: 10px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.bm-empty {
    text-align: center;
    padding: 80px 24px;
    background: var(--bm-surface);
    border: 1px dashed var(--bm-line);
    border-radius: 16px;
}
.bm-empty h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bm-ink);
    margin: 0 0 8px;
}
.bm-empty p {
    color: var(--bm-mute);
    margin: 0;
}
.bm-empty a {
    color: var(--bm-maroon);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* ============================================================
   DETAILS PAGE
   ============================================================ */
.bm-article-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 28px 0;
    align-items: start;
}

.bm-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: .86rem;
    color: var(--bm-mute);
    margin-bottom: 28px;
}
.bm-crumbs a {
    color: var(--bm-mute);
    text-decoration: none;
    transition: color .15s ease;
}
.bm-crumbs a:hover { color: var(--bm-maroon); }
.bm-crumbs__sep {
    color: var(--bm-faint);
    font-weight: 600;
}

.bm-article__header {
    margin-bottom: 36px;
}
.bm-article__header .bm-tag {
    margin-bottom: 18px;
}
.bm-article__title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--bm-ink);
    letter-spacing: -.02em;
    margin: 0 0 18px;
}
.bm-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .9rem;
    color: var(--bm-mute);
    font-weight: 500;
}
.bm-meta__dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bm-saffron);
}

.bm-article__hero {
    margin: 0 0 36px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(92, 15, 15, .14);
    position: relative;
}
.bm-article__hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bm-saffron), var(--bm-maroon));
    z-index: 1;
}
.bm-article__hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* Prose */
.bm-prose {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--bm-ink-soft);
    max-width: 760px;
}
.bm-prose p { margin: 0 0 1.2em; }
.bm-prose h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--bm-ink);
    margin: 2em 0 .6em;
    letter-spacing: -.015em;
    position: relative;
    padding-left: 18px;
}
.bm-prose h2::before {
    content: "";
    position: absolute;
    left: 0; top: .25em; bottom: .25em;
    width: 4px;
    background: linear-gradient(180deg, var(--bm-saffron), var(--bm-maroon));
    border-radius: 2px;
}
.bm-prose h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bm-ink);
    margin: 1.6em 0 .5em;
}
.bm-prose a {
    color: var(--bm-maroon);
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 26, 26, .3);
    transition: border-color .15s ease, color .15s ease;
}
.bm-prose a:hover {
    color: var(--bm-saffron);
    border-bottom-color: var(--bm-saffron);
}
.bm-prose ul, .bm-prose ol {
    padding-left: 1.4em;
    margin: 0 0 1.2em;
}
.bm-prose li { margin: 6px 0; }
.bm-prose blockquote {
    margin: 1.6em 0;
    padding: 22px 26px;
    background: var(--bm-cream);
    border-left: 5px solid var(--bm-saffron);
    border-radius: 8px;
    font-style: italic;
    color: var(--bm-ink-soft);
}
.bm-prose img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.4em 0;
    box-shadow: var(--bm-shadow-sm);
}
.bm-prose code {
    background: var(--bm-cream-2);
    color: var(--bm-maroon);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .92em;
}
.bm-prose pre {
    background: #1A0707;
    color: #FBEFD7;
    padding: 18px 22px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.4em 0;
}
.bm-prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.bm-prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bm-line), transparent);
    margin: 2em 0;
}

/* Sidebar */
.bm-aside {
    position: sticky;
    top: 96px;
}
.bm-aside__card {
    background: var(--bm-surface);
    border: 1px solid var(--bm-line);
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: var(--bm-shadow-sm);
    position: relative;
    overflow: hidden;
}
.bm-aside__card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bm-saffron), var(--bm-maroon));
}
.bm-aside__title {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--bm-saffron);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bm-line);
}
.bm-recent {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bm-recent__item {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--bm-ink-soft);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.45;
    transition: all .2s ease;
    position: relative;
}
.bm-recent__item:hover {
    background: var(--bm-cream-2);
    color: var(--bm-maroon);
    transform: translateX(4px);
}
.bm-recent__item.is-current {
    background: linear-gradient(135deg, var(--bm-cream-2), var(--bm-cream));
    color: var(--bm-maroon);
    font-weight: 700;
    border-left: 3px solid var(--bm-saffron);
    padding-left: 11px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .bm-article-wrap {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .bm-aside { position: static; }
}
@media (max-width: 768px) {
    .bm-hero { padding: 72px 0 28px; }
    .bm-grid { grid-template-columns: 1fr; gap: 22px; }
    .bm-card__body { padding: 22px; }
    .bm-article-wrap { padding: 40px 22px 0; }
    .bm-prose { font-size: 1rem; line-height: 1.78; }
    .bm-pills { padding: 0 16px; }
}
@media (max-width: 480px) {
    .bm-container { padding: 0 18px; }
    .bm-pill { padding: 8px 16px; font-size: .88rem; }
}
