/* Iz Medija Widget */

.izm-grid {
    display: grid;
    width: 100%;
}
.izm-cols-1 { grid-template-columns: repeat(1, 1fr); }
.izm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.izm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.izm-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .izm-cols-3, .izm-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .izm-cols-1, .izm-cols-2, .izm-cols-3, .izm-cols-4 { grid-template-columns: 1fr; }
}

/* Card */
.izm-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}
.izm-card:hover {
    text-decoration: none;
}

/* Thumbnail wrap */
.izm-thumb-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 16px;
}

/* Thumbnail — clean, no distortion */
.izm-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    transform: scale(1) !important;
    border-radius: 0px !important;
}
.izm-card:hover .izm-thumb {
    transform: scale(1.1) !important;
}

/* No-thumbnail fallback */
.izm-no-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
}
.izm-no-thumb .dashicons {
    font-size: 40px;
    color: #555;
}

/* Hover overlay */
.izm-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.18);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.izm-card:hover .izm-hover-overlay {
    opacity: 1;
}

/* Portal tag */
.izm-portal-tag {
    position: absolute;
    z-index: 2;
    padding: 3px 9px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 5px;
    line-height: 1.6;
    pointer-events: none;
    white-space: nowrap;
}
.izm-tag-bl { bottom: 10px; left: 10px; }
.izm-tag-br { bottom: 10px; right: 10px; }
.izm-tag-tl { top: 10px;    left: 10px; }
.izm-tag-tr { top: 10px;    right: 10px; }

/* Card body */
.izm-card-body {
    padding: 10px 0 0;
    flex: 1;
}

/* Title — no !important so Elementor inline styles win */
.izm-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.6;
    color: #fff;
    transition: color 0.15s;
    /* clamp with padding so descenders/ascenders aren't clipped */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding: 2px 0 4px;
}

/* Editor placeholder */
.izm-placeholder {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #444;
    border-radius: 12px;
    color: #aaa;
}
.izm-placeholder .dashicons {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
    color: #888;
}
.izm-error { color: #c00; font-size: 0.9rem; }
