/* ==========================================================================
   SMSCove — blog (blog.php, blog-post.php, blog-category.php)
   Loaded after landing.css + pages.css. Same tokens, same scope.
   ========================================================================== */

/* ==========================================================================
   Filter bar — categories + search
   ========================================================================== */

body.sim-landing .bl-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--lp-line);
    margin-bottom: 44px;
}

body.sim-landing .bl-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.sim-landing .bl-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--lp-line);
    background: var(--lp-surface);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--lp-fg-2);
    transition: border-color 0.2s var(--lp-ease), color 0.2s var(--lp-ease),
        background 0.2s var(--lp-ease);
}

body.sim-landing .bl-pill:hover {
    border-color: var(--lp-teal);
    color: var(--lp-fg);
}

body.sim-landing .bl-pill.is-active {
    background: var(--lp-ink);
    border-color: var(--lp-ink);
    color: var(--lp-on-ink);
}

body.sim-landing .bl-pill span {
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    opacity: 0.65;
}

body.sim-landing .bl-search {
    position: relative;
    width: 100%;
    max-width: 300px;
    flex-shrink: 0;
}

body.sim-landing .bl-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lp-fg-3);
    font-size: 0.9rem;
    pointer-events: none;
}

body.sim-landing .bl-search input {
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--lp-fg);
    background: var(--lp-surface);
    border: 1px solid var(--lp-line);
    border-radius: 999px;
    padding: 11px 16px 11px 40px;
    transition: border-color 0.2s var(--lp-ease), box-shadow 0.2s var(--lp-ease);
}

body.sim-landing .bl-search input:focus {
    outline: none;
    border-color: var(--lp-teal);
    box-shadow: 0 0 0 3px rgba(18, 179, 159, 0.14);
}

/* ==========================================================================
   Featured post
   ========================================================================== */

body.sim-landing .bl-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0;
    border: 1px solid var(--lp-line);
    border-radius: 20px;
    overflow: hidden;
    background: var(--lp-surface);
    margin-bottom: 56px;
    transition: box-shadow 0.3s var(--lp-ease), transform 0.3s var(--lp-ease);
}

body.sim-landing .bl-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px -28px rgba(8, 32, 30, 0.4);
}

body.sim-landing .bl-featured-media {
    position: relative;
    min-height: 320px;
    background: var(--lp-paper-2);
    overflow: hidden;
}

body.sim-landing .bl-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--lp-ease);
}

body.sim-landing .bl-featured:hover .bl-featured-media img {
    transform: scale(1.04);
}

body.sim-landing .bl-featured-body {
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.sim-landing .bl-featured-body h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.15;
    color: var(--lp-fg);
    margin: 16px 0 0;
}

body.sim-landing .bl-featured-body p {
    font-size: 0.975rem;
    line-height: 1.65;
    color: var(--lp-fg-2);
    margin-top: 14px;
    max-width: 48ch;
}

/* A cover-less card still needs an image slot that reads as intentional. */
body.sim-landing .bl-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(18, 179, 159, 0.22) 0%, transparent 60%),
        var(--lp-ink);
    color: rgba(255, 255, 255, 0.28);
    font-size: 2.4rem;
}

/* ==========================================================================
   Post grid
   ========================================================================== */

body.sim-landing .bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

body.sim-landing .bl-card {
    display: flex;
    flex-direction: column;
    background: var(--lp-surface);
    border: 1px solid var(--lp-line);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s var(--lp-ease), box-shadow 0.3s var(--lp-ease),
        border-color 0.3s var(--lp-ease);
}

body.sim-landing .bl-card:hover {
    transform: translateY(-4px);
    border-color: var(--lp-line-2);
    box-shadow: 0 20px 40px -26px rgba(8, 32, 30, 0.42);
}

body.sim-landing .bl-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--lp-paper-2);
    overflow: hidden;
}

body.sim-landing .bl-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--lp-ease);
}

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

body.sim-landing .bl-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.sim-landing .bl-card-body h3 {
    font-size: 1.075rem;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.3;
    color: var(--lp-fg);
    margin: 14px 0 0;
}

body.sim-landing .bl-card-body p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--lp-fg-2);
    margin-top: 10px;
}

body.sim-landing .bl-card .bl-meta {
    margin-top: auto;
    padding-top: 18px;
}

/* Category chip */
body.sim-landing .bl-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--lp-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lp-teal-deep);
}

body.sim-landing .bl-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Meta row: date · reading time · views */
body.sim-landing .bl-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    letter-spacing: 0.06em;
    color: var(--lp-fg-3);
}

body.sim-landing .bl-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.sim-landing .bl-meta i {
    font-size: 0.85em;
}

/* ==========================================================================
   Empty state + pagination
   ========================================================================== */

body.sim-landing .bl-empty {
    text-align: center;
    padding: 72px 20px;
    border: 1px dashed var(--lp-line);
    border-radius: 18px;
    color: var(--lp-fg-3);
}

body.sim-landing .bl-empty i {
    font-size: 1.8rem;
    color: var(--lp-fg-3);
}

body.sim-landing .bl-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lp-fg);
    margin: 14px 0 6px;
}

body.sim-landing .bl-empty p {
    font-size: 0.925rem;
    color: var(--lp-fg-2);
}

body.sim-landing .bl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
    flex-wrap: wrap;
}

body.sim-landing .bl-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--lp-line);
    background: var(--lp-surface);
    font-family: var(--lp-mono);
    font-size: 0.813rem;
    color: var(--lp-fg-2);
    transition: border-color 0.2s var(--lp-ease), color 0.2s var(--lp-ease),
        background 0.2s var(--lp-ease);
}

body.sim-landing .bl-page:hover {
    border-color: var(--lp-teal);
    color: var(--lp-fg);
}

body.sim-landing .bl-page.is-active {
    background: var(--lp-ink);
    border-color: var(--lp-ink);
    color: var(--lp-on-ink);
}

body.sim-landing .bl-page.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

body.sim-landing .bl-dots {
    color: var(--lp-fg-3);
    font-family: var(--lp-mono);
    padding: 0 4px;
}

/* ==========================================================================
   Single post
   ========================================================================== */

body.sim-landing .bl-article-hero .lp-phero-inner {
    max-width: 860px;
}

body.sim-landing .bl-article-hero h1 {
    max-width: 24ch;
}

body.sim-landing .bl-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

body.sim-landing .bl-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-teal);
    color: var(--lp-ink);
    font-family: var(--lp-mono);
    font-size: 0.813rem;
    font-weight: 700;
    flex-shrink: 0;
}

body.sim-landing .bl-author-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: #fff;
}

body.sim-landing .bl-author-meta {
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lp-on-ink-3);
    margin-top: 3px;
}

/* Cover pulled up over the hero/paper seam */
body.sim-landing .bl-cover {
    max-width: 980px;
    margin: -56px auto 0;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

body.sim-landing .bl-cover img {
    width: 100%;
    border-radius: 20px;
    display: block;
    box-shadow: 0 30px 60px -34px rgba(8, 32, 30, 0.55);
}

body.sim-landing .bl-body-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 40px 96px;
}

body.sim-landing .bl-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 64px;
    align-items: start;
}

body.sim-landing .bl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--lp-line);
}

body.sim-landing .bl-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--lp-paper-2);
    border: 1px solid var(--lp-line);
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    letter-spacing: 0.06em;
    color: var(--lp-fg-2);
    transition: border-color 0.2s var(--lp-ease), color 0.2s var(--lp-ease);
}

body.sim-landing .bl-tag:hover {
    border-color: var(--lp-teal);
    color: var(--lp-teal-deep);
}

/* Share rail */
body.sim-landing .bl-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

body.sim-landing .bl-share-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lp-line);
    background: var(--lp-surface);
    color: var(--lp-fg-2);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s var(--lp-ease), color 0.2s var(--lp-ease),
        background 0.2s var(--lp-ease), transform 0.2s var(--lp-ease);
}

body.sim-landing .bl-share-btn:hover {
    border-color: var(--lp-teal);
    color: var(--lp-teal-deep);
    background: var(--lp-teal-tint);
    transform: translateY(-2px);
}

/* Reading progress bar */
body.sim-landing .bl-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--lp-teal);
    z-index: 950;
    transition: width 0.1s linear;
}

/* ==========================================================================
   Comments
   ========================================================================== */

body.sim-landing .bl-comments {
    margin-top: 64px;
    padding-top: 44px;
    border-top: 1px solid var(--lp-line);
    max-width: 72ch;
}

body.sim-landing .bl-comments h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--lp-fg);
    margin-bottom: 26px;
}

body.sim-landing .bl-comment {
    display: flex;
    gap: 14px;
    padding: 22px 0;
    border-bottom: 1px solid var(--lp-line-2);
}

body.sim-landing .bl-comment.is-reply {
    margin-left: 54px;
}

body.sim-landing .bl-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-teal-tint);
    color: var(--lp-teal-deep);
    font-family: var(--lp-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

body.sim-landing .bl-comment-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

body.sim-landing .bl-comment-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--lp-fg);
}

body.sim-landing .bl-comment-time {
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    color: var(--lp-fg-3);
}

body.sim-landing .bl-comment-text {
    font-size: 0.925rem;
    line-height: 1.65;
    color: var(--lp-fg-2);
    margin-top: 7px;
    white-space: pre-line;
}

body.sim-landing .bl-comment-reply {
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lp-teal-deep);
    background: none;
    border: none;
    padding: 8px 0 0;
    cursor: pointer;
}

body.sim-landing .bl-form-wrap {
    margin-top: 36px;
    background: var(--lp-paper-2);
    border: 1px solid var(--lp-line);
    border-radius: 18px;
    padding: 30px;
}

body.sim-landing .bl-form-wrap h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lp-fg);
    margin-bottom: 6px;
}

body.sim-landing .bl-form-note {
    font-size: 0.85rem;
    color: var(--lp-fg-3);
    margin-bottom: 20px;
}

body.sim-landing .bl-replying {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--lp-teal-tint);
    color: var(--lp-teal-deep);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

body.sim-landing .bl-replying.is-on {
    display: flex;
}

body.sim-landing .bl-replying button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-weight: 700;
}

/* ==========================================================================
   Related posts
   ========================================================================== */

body.sim-landing .bl-related {
    background: var(--lp-paper-2);
    border-top: 1px solid var(--lp-line);
}

body.sim-landing .bl-prevnext {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 44px;
}

/* ==========================================================================
   Sidebar rail on the article page
   ========================================================================== */

body.sim-landing .bl-rail {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

body.sim-landing .bl-rail-block h4 {
    font-family: var(--lp-mono);
    font-size: 0.688rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lp-teal-deep);
    margin-bottom: 14px;
}

body.sim-landing .bl-rail-post {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--lp-line);
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--lp-fg-2);
    transition: color 0.2s var(--lp-ease);
}

body.sim-landing .bl-rail-post:hover {
    color: var(--lp-teal-deep);
}

body.sim-landing .bl-rail-post small {
    display: block;
    font-family: var(--lp-mono);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    color: var(--lp-fg-3);
    margin-top: 5px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
    body.sim-landing .bl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.sim-landing .bl-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }
    body.sim-landing .bl-rail {
        position: static;
    }
    body.sim-landing .bl-featured {
        grid-template-columns: minmax(0, 1fr);
    }
    body.sim-landing .bl-featured-media {
        min-height: 240px;
    }
}

@media (max-width: 720px) {
    body.sim-landing .bl-grid,
    body.sim-landing .bl-prevnext {
        grid-template-columns: minmax(0, 1fr);
    }
    body.sim-landing .bl-featured-body {
        padding: 28px;
    }
    body.sim-landing .bl-body-section {
        padding: 48px 20px 72px;
    }
    body.sim-landing .bl-cover {
        padding: 0 20px;
        margin-top: -36px;
    }
    body.sim-landing .bl-filters {
        gap: 16px;
    }
    body.sim-landing .bl-search {
        max-width: none;
    }
    body.sim-landing .bl-comment.is-reply {
        margin-left: 24px;
    }
    body.sim-landing .bl-form-wrap {
        padding: 22px;
    }
}
