.lpwg-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto;
    padding: 20px;
}

.lpwg-post-item {
    display: flex;
    width: 100%;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    text-align: center;
}

.lpwg-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    padding: 15px;
    width: 100%; 
    min-width: 220px;
    text-align: start;
    text-decoration: none !important;
    color: inherit;
    flex: 0 0 auto;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e8e8e8; /* Light grey border as in image */
    display: flex;
    flex-direction: column;
    height: 100%; 
}

/* Hover effect for cards - adding border as requested */
.lpwg-card:hover {
    border: 1px solid #7B5FB4; /* Slightly darker border on hover */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Image styling - with border exactly as in image */
.lpwg-card .lpwg-image {
    background-color: #ffffff;
    border: 1px solid #f0f0f0; /* Very light grey border around image area */
    border-radius: 8px;
    height: 220px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
    padding: 5px;
}

.lpwg-card .lpwg-image img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
}

/* Title styling */
.lpwg-card h2 {
    font-size: 1.2rem;
    margin:0 0 0 5px;
    flex-grow: 1;
    max-height: 50px;
    overflow: hidden;
    color: #000000;
    font-weight: 500; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    /* Container adjustments */
    .lpwg-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
        gap: 15px;
        padding: 15px;
    }
    
    /* Card responsive */
    .lpwg-card {
        padding: 12px;
        min-width: 200px;
    }
    
    /* Card image responsive */
    .lpwg-card .lpwg-image {
        height: 180px;
        margin-bottom: 12px;
    }
    
    .lpwg-card .lpwg-image img {
        height: 160px;
    }
    
    /* Card title responsive */
    .lpwg-card h2 {
        font-size: 1.2rem;
        max-height: 45px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE (480px - 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Container mobile adjustments */
    .lpwg-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 12px;
        padding: 12px;
    }
    
    /* Card mobile */
    .lpwg-card {
        padding: 10px;
        min-width: 160px;
    }
    
    /* Card image mobile */
    .lpwg-card .lpwg-image {
        height: 150px;
        margin-bottom: 10px;
    }
    
    .lpwg-card .lpwg-image img {
        height: 130px;
    }
    
    /* Card title mobile */
    .lpwg-card h2 {
        font-size: 1.1rem;
        max-height: 40px;
        margin: 0 0 0 3px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SMALL MOBILE (320px - 480px)
   ======================================== */
@media (max-width: 480px) {
    /* Container small mobile */
    .lpwg-container {
        grid-template-columns: 1fr; /* 1 column on small mobile */
        gap: 10px;
        padding: 10px;
    }
    
    /* Card small mobile */
    .lpwg-card {
        padding: 8px;
        min-width: auto;
    }
    
    /* Card image small mobile */
    .lpwg-card .lpwg-image {
        height: 120px;
        margin-bottom: 8px;
    }
    
    .lpwg-card .lpwg-image img {
        height: 100px;
    }
    
    /* Card title small mobile */
    .lpwg-card h2 {
        font-size: 1rem;
        max-height: 35px;
        margin: 0 0 0 2px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - EXTRA SMALL MOBILE (below 320px)
   ======================================== */
@media (max-width: 320px) {
    /* Container extra small mobile */
    .lpwg-container {
        gap: 8px;
        padding: 8px;
    }
    
    /* Card extra small mobile */
    .lpwg-card {
        padding: 6px;
    }
    
    /* Card image extra small mobile */
    .lpwg-card .lpwg-image {
        height: 100px;
        margin-bottom: 6px;
    }
    
    .lpwg-card .lpwg-image img {
        height: 80px;
    }
    
    /* Card title extra small mobile */
    .lpwg-card h2 {
        font-size: 0.8rem;
        max-height: 30px;
        margin: 0 0 0 1px;
    }
}
