 /* Container, reset & full-width friendly */
    .ecg-grid-wrapper { width:100%; max-width:1200px; margin:24px auto; padding:12px; box-sizing:border-box; }
    .ecg-grid { display:grid; gap:18px; grid-template-columns: repeat(3, 1fr); align-items:stretch; }

   .ecg-card {
    display:flex;
    align-items:center;
    gap:14px;
    padding:14px;
    background:#fff;
    border-radius:12px;
    box-shadow: 0 8px 22px rgba(10,10,10,0.06);
    overflow:visible;  
    position:relative;
    max-width: calc(100% - 60px);
    opacity: 0;                     /* start invisible */
    transform: translateY(20px);    /* start slightly below */
    transition: transform 0.5s ease, opacity 0.5s ease, box-shadow 0.3s ease;
}

.ecg-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Hover lift */
.ecg-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 16px 40px rgba(10,10,10,0.08);
}

    
    /* Stagger multiple cards */
.ecg-grid .ecg-card:nth-child(1) { animation-delay: 0.1s; }
.ecg-grid .ecg-card:nth-child(2) { animation-delay: 0.2s; }
.ecg-grid .ecg-card:nth-child(3) { animation-delay: 0.3s; }
.ecg-grid .ecg-card:nth-child(4) { animation-delay: 0.4s; }
.ecg-grid .ecg-card:nth-child(5) { animation-delay: 0.5s; }
.ecg-grid .ecg-card:nth-child(6) { animation-delay: 0.6s; }

/* Animation keyframes */
@keyframes ecg-fade-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

    /* left meta column */
    .ecg-left { flex:1 1 auto; min-width:0; }
    
    .ecg-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.2;
    text-align:left;
    font-weight: 700;
    color: #111;
    max-width: calc(100% - 60px); /* leave space for the image */
}
    .ecg-title a { color:inherit; text-decoration:none; }
    .ecg-title a:hover { text-decoration:none; }

    /* meta row */
    .ecg-meta-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
    .ecg-meta-item { display:flex; align-items:center; gap:6px; font-size:13px; color:#666; background: #fff; padding:6px 8px; border-radius:8px; }
    .ecg-meta-item i { color:#06311a; font-size:14px; min-width:16px; text-align:center; }
    .ecg-meta-label { font-weight:600; color:#222; }
    .ecg-meta-sub { font-size:11px; color:#777; margin-left:4px; }

    /* right image column */
  .ecg-right {
    flex:0 0 auto;
    width:0;
    position:relative;  /* required for absolute image positioning */
}
    .ecg-image-link { display:inline-block; text-decoration:none; }
    
   .ecg-image-circle {
   width:135px;
    height:135px;
    border-radius:15%;
    overflow:hidden;
    background:#f3f3f3;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.3s ease; /* smooth zoom */
    position:absolute;
    top:50%;
    right:-55px;
    transform: translateY(-50%) scale(1); /* keep Y centered */
}


    .ecg-image-circle img { width:100%; height:100%; object-fit:cover; display:block; }

    .ecg-image-circle:hover { transform: translateY(-50%) scale(1.08); /* subtle zoom without moving */ }

    /* arrow button (small) */
    .ecg-arrow-inline {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:24px;
    height:24px;
    margin-left:6px;
    border-radius:50%;
    background:#06311a;
    color:#fff;
    font-size:12px;
    text-decoration:none;
    box-shadow: 0 4px 12px rgba(11,122,74,0.16);
    transition: transform .14s ease, box-shadow .14s ease;
}

.ecg-arrow-inline:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(11,122,74,0.18);
}

.ecg-arrow-inline i{
    color:#fff;
}
    .ecg-arrow { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; border-radius:999px; background:#0b7a4a; color:#fff; text-decoration:none; box-shadow: 0 6px 18px rgba(11,122,74,0.16); transition: transform .14s ease, box-shadow .14s ease; }
    .ecg-arrow i { font-size:14px; }
    .ecg-arrow:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 30px rgba(11,122,74,0.18); }


/*style for star ratings*/
/* Star Rating */
.ecg-rating {
    display:flex;
    align-items:center;
    gap:3px;
    margin: -4px 0 8px; /* tight spacing under title */
}

.ecg-rating .star i {
    font-size:14px;
    color:#f4b400; /* Google-style gold */
}

.ecg-rating .star.empty i {
    color:#ddd;
}

.ecg-rating .rating-count {
    font-size:12px;
    color:#666;
    margin-left:4px;
}




    /* Responsive breakpoints */
    @media (max-width: 1024px) {
        .ecg-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 760px) {
        /* Show 4 posts on mobile — if the query returned 6 we still display what we have,
           but grid becomes one column and spacing increases for touch. */
        .ecg-grid { grid-template-columns: 1fr; gap:14px; }
        .ecg-wrapper {
        width: 100%;
        max-width: 100%;  /* override any desktop max-width */
        padding: 15px;     /* optional padding */
    }
        .ecg-image-circle { width:150px; height:150px; right:-60px; }
        .ecg-card { max-width: calc(100% - 42px); }
        .ecg-right { min-width:72px; }
          .ecg-title {
    max-width: calc(100% - 1px); /* leave space for the image */
}
    }

    /* small visual tweaks */
    .ecg-meta-item:first-child { background: transparent; padding-left:0; }