/* =========================
   Blog Index — Post List Layout
   All rules are scoped to .blog-index-* classes,
   which only exist in the blog index item markup.
   No animations or transitions.
   ========================= */

/* --- List container (one post per row) --- */
.blog-index-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* keep the infinite-scroll waypoint out of the flow */
.blog-index-list > #waypoint {
    height: 0;
}

/* Profile view renders entries inside a shared Bootstrap grid row (2-3 cols).
   Make each blog entry span the full row — one post per row — while other
   modules' items keep their normal grid cells. */
.row > .blog-index-item {
    flex: 0 0 100%;
    max-width: 100%;
}

/* --- Card shell (image left, data right) ---
   Bootstrap's .card sets flex-direction:column — override it explicitly. */
.blog-index-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-radius: 12px;
}

[data-bs-theme="light"] .blog-index-card {
    background-color: #fff;
}
[data-bs-theme="dark"] .blog-index-card {
    background-color: var(--darkElement);
}

/* --- Media (cover image, left side) --- */
.blog-index-media-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 38%;
    min-width: 180px;
    max-width: 400px;
}

/* base size from the 3/2 ratio, grows to fill the row when text is taller */
.blog-index-media {
    display: block;
    flex: 1 1 auto;
    aspect-ratio: 3/2;
    border-radius: 11px 0 0 11px;
    background-color: rgba(0,0,0,.18);
    background-size: cover;
    background-position: center;
}

/* --- Status / privacy / group / admin icons (over image) --- */
.blog-index-card .index-item-icon-holder {
    top: .5rem;
    right: .5rem;
    left: auto;
    gap: .35rem;
}
.blog-index-card .item-info-icon {
    margin-top: 0;
    margin-right: 0;
}

/* --- Body (text, right side) --- */
.blog-index-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    /* core mobile rule zeroes card-body side padding — keep blog items padded */
    padding: .9rem 1.25rem !important;
}

/* Category + date row */
.blog-index-meta-top {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .35rem;
}

.blog-index-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--bs-primary);
    text-decoration: none;
}
[data-bs-theme="light"] .blog-index-category { color: #495057; }
.blog-index-category:hover { text-decoration: underline; }

.blog-index-date {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: 12px;
    color: #8a8a8a;
}
[data-bs-theme="light"] .blog-index-date { color: #7d7d7d; }
.blog-index-date i { font-size: 13px; opacity: .85; }

/* Title */
.blog-index-title {
    margin-bottom: .4rem;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-index-title a { color: inherit; text-decoration: none; }
[data-bs-theme="dark"] .blog-index-title a { color: #fff; }
[data-bs-theme="light"] .blog-index-title a { color: #333; }
.blog-index-title a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Excerpt */
.blog-index-excerpt {
    margin-bottom: .75rem;
    font-size: 14px;
    line-height: 1.55;
    color: #8a8a8a;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* excerpt is a popup link — keep it muted, no default link styling */
.blog-index-excerpt a { color: inherit; text-decoration: none; }
[data-bs-theme="light"] .blog-index-excerpt a:hover { color: #5f6368; }
[data-bs-theme="dark"] .blog-index-excerpt a:hover { color: #b0b0b0; }

/* Author row (pinned to bottom of the text column) */
.blog-index-author-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: 13px;
    color: #8a8a8a;
}
[data-bs-theme="light"] .blog-index-author-row { color: #7d7d7d; }
.blog-index-author-row > i { font-size: 14px; opacity: .85; }

.blog-index-author { min-width: 0; }
.blog-index-author a { color: inherit; text-decoration: none; }
[data-bs-theme="light"] .blog-index-author a:hover { color: #333; text-decoration: underline; }
[data-bs-theme="dark"] .blog-index-author a:hover { color: #fff; text-decoration: underline; }

/* --- Mobile: stack image above text, match other modules' index items
   (square corners + the same 8px side inset their g-3 grid gutters give) --- */
@media (max-width: 768px) {
    .blog-index-item { margin-left: 8px; margin-right: 8px; }
    .blog-index-card { flex-direction: column; border-radius: 0; }
    .blog-index-media-wrap { width: 100%; max-width: none; min-width: 0; }
    .blog-index-media { border-radius: 0; }
    .blog-index-title { font-size: 17px; }
}
