/* ============================================================
   FRESH ELEMENT GRID – 100% unique classes, no conflicts
   ============================================================ */

/* ---- Grid Container ---- */
.fresh-elements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
    align-items: stretch;
    justify-items: stretch;
}

/* ---- Each Card ---- */
.fresh-element-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    min-width: 0;
    width: 100%;
}

/* ---- Image Link (square container) ---- */
.fresh-element-link {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

/* Square via pseudo-element */
.fresh-element-link::before {
    content: '';
    display: block;
    padding-bottom: 100%; /* 1:1 */
}

/* ---- Image (fills the square) ---- */
.fresh-element-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.fresh-element-link:hover .fresh-element-image {
    transform: scale(1.06);
}

/* ---- Card Title ---- */
.fresh-element-card-title {
    margin: 0.6rem 0 0;
    padding: 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1e1e1e;
    word-break: break-word;
}

.fresh-element-card-title a {
    color: inherit;
    text-decoration: none;
}

.fresh-element-card-title a:hover {
    color: #0073aa;
}

/* ---- Excerpt ---- */
.fresh-element-excerpt {
    margin: 0.2rem 0 0;
    padding: 0 0.2rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Section Title ---- */
.fresh-elements-title {
    margin-bottom: 0.5rem;
}

.fresh-elements-search-term {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .fresh-elements-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}
@media (max-width: 768px) {
    .fresh-elements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .fresh-elements-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    .fresh-element-card-title {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }
    .fresh-element-excerpt {
        display: none;
    }
}