/* =========================================================================
   MT - Blog Posts Widget  |  prefix: mtfe-
   ========================================================================= */

/* ── Grid ── */
.mtfe-blog-posts-grid {
    display: grid;
    gap: 48px 32px;
}

.mtfe-blog-posts-grid.mtfe-cols-1 { grid-template-columns: 1fr; }
.mtfe-blog-posts-grid.mtfe-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mtfe-blog-posts-grid.mtfe-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
    .mtfe-blog-posts-grid.mtfe-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .mtfe-blog-posts-grid.mtfe-cols-2,
    .mtfe-blog-posts-grid.mtfe-cols-3 { grid-template-columns: 1fr; }
}

/* ── Card ── */
.mtfe-blog-card {
    cursor: pointer;
    position: relative;
}

/* ── Image wrapper ── */
.mtfe-blog-card__image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    border-radius: 4px;
    isolation: isolate;
    min-height: 0;
}

.mtfe-blog-card__image-wrap.mtfe-ratio-4-3  { aspect-ratio: 4/3; }
.mtfe-blog-card__image-wrap.mtfe-ratio-4-5  { aspect-ratio: 4/5; }
.mtfe-blog-card__image-wrap.mtfe-ratio-16-9 { aspect-ratio: 16/9; }
.mtfe-blog-card__image-wrap.mtfe-ratio-1-1  { aspect-ratio: 1/1; }
.mtfe-blog-card__image-wrap.mtfe-ratio-3-2  { aspect-ratio: 3/2; }

/* Inner clip box: contains the zoom so it never overlaps content below */
.mtfe-blog-card__image-inner {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}

.mtfe-blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    display: block;
    transform-origin: center center;
}

.mtfe-blog-card__image-wrap:hover .mtfe-blog-card__image {
    transform: scale(1.08);
}

/* ── Category badge ── */
.mtfe-blog-card__category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    display: inline-block;
    background: #ffffff;
    color: #18181b;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s;
}

/* ── Body ── */
.mtfe-blog-card__body {
    padding: 0 4px;
}

.mtfe-blog-card__body > * + * {
    margin-top: 16px;
}

/* ── Title ── */
.mtfe-blog-card__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #18181b;
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

.mtfe-blog-card:hover .mtfe-blog-card__title {
    color: #52525b;
}

/* ── Excerpt ── */
.mtfe-blog-card__excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #71717a;
}

/* ── Meta (date + comments) ── */
.mtfe-blog-card__meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mtfe-blog-card__meta-line {
    height: 1px;
    width: 32px;
    background: #d4d4d8;
    flex-shrink: 0;
    transition: width 0.5s ease;
}

.mtfe-blog-card:hover .mtfe-blog-card__meta-line {
    width: 48px;
}

.mtfe-blog-card__meta-info {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.mtfe-blog-card__meta-sep {
    margin: 0 8px;
    opacity: 0.3;
}

/* ── No-posts message ── */
.mtfe-blog-posts-empty {
    padding: 32px;
    text-align: center;
    color: #71717a;
    font-size: 14px;
    border: 1px dashed #d4d4d8;
    border-radius: 4px;
}
