/* ============================================================
   EMV Pro — Front-end Styles  v2.0.0
   ============================================================ */

/* ── Reset / Base ─────────────────────────────────────────── */
.emv-wrap *,
.emv-wrap *::before,
.emv-wrap *::after { box-sizing: border-box; }

.emv-wrap a { text-decoration: none; color: inherit; }
.emv-wrap img { display: block; max-width: 100%; height: auto; }

/* ── Block title ──────────────────────────────────────────── */
.emv-block-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid currentColor;
}

/* ── List layout ──────────────────────────────────────────── */
.emv-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Grid layout ──────────────────────────────────────────── */
.emv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ── Item ─────────────────────────────────────────────────── */
.emv-item {
    /*
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    overflow: hidden;
    transition: all 300ms ease;
    */
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.emv-item:hover {
    /*
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    */
    
    border-color: #1B6E3C;
    background: #E6F4EC;
    transform: translateX(4px);
}

/* ── Link ─────────────────────────────────────────────────── */
.emv-item-link {
    display: flex;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* ── Image position variants ──────────────────────────────── */
.emv-img-pos-left  .emv-item-link { flex-direction: row; }
.emv-img-pos-right .emv-item-link { flex-direction: row-reverse; }
.emv-img-pos-top   .emv-item-link { flex-direction: column; }
.emv-img-pos-bottom .emv-item-link { flex-direction: column-reverse; }

/* ── Thumbnail ────────────────────────────────────────────── */
.emv-thumb {
    position: relative;
    flex-shrink: 0;
    width: 90px;
    overflow: hidden;
}

.emv-img-pos-top .emv-thumb,
.emv-img-pos-bottom .emv-thumb { width: 100%; }

.emv-thumb-img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    transition: transform 300ms ease;
}

.emv-img-pos-top .emv-thumb-img,
.emv-img-pos-bottom .emv-thumb-img { height: 180px; }

.emv-item:hover .emv-thumb-img { transform: scale(1.04); }

/* ── Body ─────────────────────────────────────────────────── */
.emv-item-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

/* ── Rank badge ───────────────────────────────────────────── */
.emv-rank {
    /*
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    background: #e63946;
    color: #fff;
    flex-shrink: 0;
    margin-bottom: 6px;
    */
    font-size: 1.4rem;
    font-weight: 800;
    color: #E2E8F0;
    min-width: 32px;
    text-align: right;
    line-height: 1;
}

/* Rank inside thumb (overlay) */
.emv-thumb .emv-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* Top-3 special colours */
.emv-rank-1 { background: #FFD700; color: #1a1a1a; }
.emv-rank-2 { background: #C0C0C0; color: #1a1a1a; }
.emv-rank-3 { background: #CD7F32; color: #fff; }

/* ── Category badge ───────────────────────────────────────── */
.emv-category {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #e8f4fd;
    color: #0073aa;
    padding: 2px 7px;
    border-radius: 3px;
    margin-bottom: 4px;
    width: fit-content;
}

/* ── Title ────────────────────────────────────────────────── */
.emv-title {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 4px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.emv-item:hover .emv-title { color: #e63946; }

/* ── Excerpt ──────────────────────────────────────────────── */
.emv-excerpt {
    font-size: .82rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Meta ─────────────────────────────────────────────────── */
.emv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    color: #999;
    margin-top: auto;
    padding-top: 4px;
}

.emv-sep { opacity: .5; }

/* ── Trending badge ───────────────────────────────────────── */
.emv-trending-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    font-weight: 700;
    background: #ff4757;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: .03em;
    animation: emv-pulse 2s infinite;
}

@keyframes emv-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .75; }
}

/* ── Views icon ───────────────────────────────────────────── */
.emv-views { display: inline-flex; align-items: center; gap: 3px; }

/* ── No posts ─────────────────────────────────────────────── */
.emv-no-posts {
    padding: 20px;
    text-align: center;
    color: #aaa;
    font-size: .9rem;
}

/* ── Carousel ─────────────────────────────────────────────── */
.emv-carousel .slick-slide { margin: 0 8px; }
.emv-carousel .slick-list  { margin: 0 -8px; }

.emv-carousel .slick-prev,
.emv-carousel .slick-next {
    z-index: 10;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.emv-carousel .slick-prev { left: -18px; }
.emv-carousel .slick-next { right: -18px; }

.emv-carousel .slick-prev::before,
.emv-carousel .slick-next::before { color: #333; font-size: 18px; }

.emv-carousel .slick-dots { bottom: -28px; }
.emv-carousel .slick-dots li button::before { color: #e63946; }

/* ── Shortcode legacy styles ──────────────────────────────── */
.emv-most-viewed { list-style: none; margin: 0; padding: 0; }
.emv-item .emv-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.emv-style-compact .emv-thumb { display: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .emv-grid { grid-template-columns: 1fr; }

    .emv-img-pos-left .emv-thumb,
    .emv-img-pos-right .emv-thumb { width: 70px; }

    .emv-thumb-img { height: 70px; }
}
