.pmg-5840aec3-masonry {
    column-count: 3;
    column-gap: 20px; /* Default overridden by elementor controls */
    width: 100%;
}

.pmg-5840aec3-item {
    break-inside: avoid;
    margin-bottom: 40px; /* Default overridden by elementor controls */
    display: block;
    text-decoration: none !important;
    transition: transform 0.3s ease;
}

/* Margin offsets to break horizontal alignment for a true masonry effect */
/* These default values are now overridden by Elementor controls via selectors */
.pmg-5840aec3-offset-down {
    margin-top: 60px;
}

.pmg-5840aec3-offset-up {
    margin-top: -60px;
}

.pmg-5840aec3-offset-down-large {
    margin-top: 120px;
}

@media (max-width: 767px) {
    .pmg-5840aec3-offset-down, 
    .pmg-5840aec3-offset-up, 
    .pmg-5840aec3-offset-down-large {
        margin-top: 0 !important; /* Reset offsets on mobile for a single column */
    }
}

.pmg-5840aec3-item:hover {
    transform: translateY(-5px);
}

.pmg-5840aec3-img-wrap {
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

.pmg-5840aec3-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Base heights mapped to controls */
.pmg-5840aec3-img-extra-tall {
    height: 580px;
}

.pmg-5840aec3-img-tall {
    height: 450px;
}

.pmg-5840aec3-img-standard {
    height: 350px;
}

.pmg-5840aec3-img-short {
    height: 250px;
}

.pmg-5840aec3-img-extra-short {
    height: 180px;
}

/* Base uniform height for mobile, mapped to controls */
@media (max-width: 767px) {
    .pmg-5840aec3-img {
        height: 250px; 
    }
}


.pmg-5840aec3-content {
    padding: 0 5px;
}

.pmg-5840aec3-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 300;
    color: #fff; /* Default color, overrideable by settings */
    font-family: 'Oswald', sans-serif; /* Fallback for the design aesthetic */
}

.pmg-5840aec3-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 10px;
    font-weight: 300;
}

.pmg-5840aec3-readmore {
    font-size: 14px;
    color: #ccc;
    font-weight: 300;
    margin-top: 15px;
}
