.pm-a4112a64-wrapper {
    width: 100%;
}

.pm-a4112a64-grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

@media (min-width: 768px) {
    .pm-a4112a64-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .pm-a4112a64-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pm-a4112a64-card {
    position: relative;
    border-radius: 8px; /* Control via Elementor settings if added, defaults here */
    overflow: hidden; /* This keeps the image zoom inside the borders */
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    background-color: #000;
    /* Added to fix Safari overflow issues with border-radius */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transition: all ease .3s;
}

/* User's custom hover effect applied internally */
.pm-a4112a64-card:hover {
    transform: scale(1.0);
    background-size: 250%;
    transition: all ease .3s;
}

.pm-a4112a64-card:hover .pm-a4112a64-card-bg {
    transform: scale(1.0);
    background-size: 250%;
}


/* Background image handling */
.pm-a4112a64-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: all ease .3s;
}

.pm-a4112a64-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4) 70%, transparent);
    padding: 20px;
    color: #fff;
}

.pm-a4112a64-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-a4112a64-meta {
    font-size: 12px;
    color: #ddd;
    opacity: 0.8;
}

/* Modal Styles */
.pm-a4112a64-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pm-a4112a64-modal-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pm-a4112a64-modal-content.show {
    opacity: 1;
    transform: translateY(0);
}

.pm-a4112a64-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pm-a4112a64-modal-header h2 {
    margin-top: 0;
}

.pm-a4112a64-modal-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 20px;
}

.pm-a4112a64-modal-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.pm-a4112a64-modal-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.pm-a4112a64-modal-body img {
    max-width: 100%;
    height: auto;
}