/* Main Wrapper */
.rfw-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.rfw-wrapper * {
    box-sizing: border-box;
}

/* Error Message */
.rfw-error {
    color: #ff4d4d;
    background: #2a0000;
    padding: 10px;
    border-radius: 4px;
    font-family: inherit;
}

/* Filter Bar */
.rfw-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.rfw-filter-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px; /* Default radius, overridden by controls */
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.4;
}

.rfw-filter-type-tabs .rfw-filter-btn {
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
    margin-right: 15px;
}

.rfw-filter-type-tabs .rfw-filter-btn.active,
.rfw-filter-type-tabs .rfw-filter-btn:hover {
    border-bottom-color: currentColor;
    background: transparent !important; /* Force transparent bg for tabs usually */
}

/* Grid Layout */
.rfw-grid-container {
    display: grid;
    /* Columns and Gap set by Elementor Controls inline */
    grid-template-columns: repeat(4, 1fr); /* Fallback */
    gap: 20px; /* Fallback */
}

/* Card Styling */
.rfw-card {
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Equal height cards */
}

.rfw-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Image */
.rfw-card-image {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
}

.rfw-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rfw-card:hover .rfw-card-image img {
    transform: scale(1.05);
}

/* Content */
.rfw-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title */
.rfw-card-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.rfw-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.rfw-card-title a:hover {
    color: #4da6ff; /* Default hover, likely overridden */
}

/* Description */
.rfw-card-desc {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1; /* Pushes footer down */
}

/* Meta */
.rfw-card-meta {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rfw-time-icon {
    font-size: 11px;
}

/* Footer / Read More */
.rfw-card-footer {
    margin-top: auto; /* Ensure it stays at bottom if desc is short */
}

.rfw-read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.rfw-read-more:hover {
    background-color: #333;
}

/* Filtering Persistence Animation */
.rfw-card.rfw-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .rfw-grid-container {
        grid-template-columns: repeat(2, 1fr) !important; /* Fallback if inline styles fail */
    }
}

@media (max-width: 767px) {
    .rfw-grid-container {
        grid-template-columns: 1fr !important;
    }
    .rfw-filter-bar {
        justify-content: center; /* Center filters on mobile usually looks better */
    }
}
