.ebsf-wrapper {
    position: relative;
    width: 100%;
    font-family: 'Clash Display', sans-serif;
}

/* Search Bar */
.ebsf-search-container {
    position: relative;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ebsf-search-input-wrapper {
    display: flex;
    align-items: center;
    background: #F4F4F4;
    border-radius: 56px;
    padding: 6px 6px 6px 24px;
    border: 1px solid #E5E5E5;
    transition: border-color 0.3s, background-color 0.3s;
}

.ebsf-search-input-wrapper:focus-within {
    background-color: #FFFFFF;
}

.ebsf-search-input-wrapper .ebsf-search-input {
    flex-grow: 1;
    border: none !important;
    background: transparent;
    box-shadow: none;
    padding: 10px 0;
    outline: none;
    font-size: 16px;
    color: #000000;
    font-family: 'DM Sans', sans-serif;
}

.ebsf-search-input-wrapper input[type="text"]:focus {
    outline: none;
    box-shadow: none;
    border-color: transparent;
    border: none !important;
}

.ebsf-search-input::placeholder {
    color: #7F7F7F;
}

.ebsf-search-button {
    background: #7F7F7F;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px; /* Prevent shrinking */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    margin-left: 10px;
    padding: 0; /* Reset padding */
    outline: none;
}

.ebsf-search-button:focus {
    outline: none;
}

.ebsf-search-button svg {
    width: 17px;
    height: 17px;
    display: block;
}

.ebsf-search-button:hover,
.ebsf-search-input-wrapper:focus-within .ebsf-search-button {
    background: #8F78F0;
}

.ebsf-search-clear {
    cursor: pointer;
    padding: 0 10px;
    color: #ABABAB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebsf-search-clear:hover {
    color: #000000;
}

.ebsf-search-clear svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Suggestions */
.ebsf-search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    z-index: 100;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    padding: 16px;
}

.ebsf-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: none;
    transition: background 0.2s;
    border-radius: 16px;
    margin-bottom: 10px;
}

.ebsf-suggestion-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ebsf-suggestion-item:hover {
    background: #f4f4f4;
}

.ebsf-suggestion-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ebsf-suggestion-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Filters */
.ebsf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    margin-bottom: 50px;
}

.ebsf-filter-btn {
    padding: 6px 12px;
    border: 1px solid #E5E5E5;
    border-radius: 50px;
    background: white;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
    color: #7F7F7F;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
}

.ebsf-filter-btn:focus {
    outline: none;
    border: 1px solid #eee;
    background: white;
    color: #666;
    box-shadow: none;
}

.ebsf-filter-btn.active:focus {
    background: #000;
    color: white;
    border-color: #000;
}

.ebsf-filter-btn:hover {
    background: #E5E5E5;
    border-color: #E5E5E5;
    color: #7F7F7F;
}

.ebsf-filter-btn.active {
    background: #000;
    color: white;
    border-color: #000;
}

.ebsf-remove-icon {
    display: none;
    font-size: 16px;
    line-height: 1;
    margin-left: 2px;
}

.ebsf-filter-btn.active .ebsf-remove-icon {
    display: inline-block;
}

/* Grid */
.ebsf-posts-grid {
    display: grid;
    grid-column-gap: 40px;
    grid-row-gap: 64px;
}

.ebsf-grid-cols-1 .ebsf-posts-grid { grid-template-columns: 1fr; }
.ebsf-grid-cols-2 .ebsf-posts-grid { grid-template-columns: repeat(2, 1fr); }
.ebsf-grid-cols-3 .ebsf-posts-grid { grid-template-columns: repeat(3, 1fr); }
.ebsf-grid-cols-4 .ebsf-posts-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .ebsf-posts-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

.ebsf-grid-item {
    /* No background/padding for clean look */
}

/* Post Card Styling */
.ebsf-post {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ebsf-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10; /* Adjust as needed */
}

.ebsf-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.ebsf-thumbnail-wrapper:hover img {
    transform: scale(1.05);
}

.ebsf-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    z-index: 2;
    font-family: 'DM Sans', sans-serif;
}

.ebsf-date {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    font-family: 'DM Sans', sans-serif;
}

.ebsf-post-title {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.6;
}

.ebsf-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.ebsf-post-title a:hover {
    color: #8F78F0;
}

/* Pagination / Load More Button */
.ebsf-load-more-container {
    text-align: center;
    margin-top: 0;
}

.ebsf-load-more-btn {
    margin-top: 46px;
    background-color: #FFFFFF;
    font-family: "Clash Display", Sans-serif;
    font-weight: 700;
    color: #000000;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #B2B2B2;
    border-radius: 10px 10px 10px 10px;
    padding: 14px 24px 14px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    outline: none;
}

.ebsf-load-more-btn:focus {
    outline: none;
    box-shadow: none;
    background: inherit;
    color: inherit;
    border-color: inherit;
}

.ebsf-load-more-btn:hover {
    background-color: #000;
    border-color: #000;
    color: #FFFFFF;
}

.ebsf-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ebsf-no-results-wrapper {
    text-align: center;
    width: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.ebsf-no-results-img-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ebsf-no-results-title {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.ebsf-no-results-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #7F7F7F;
    max-width: 500px;
    margin: 0 auto;
}

.ebsf-no-results {
    text-align: center;
    width: 100%;
    padding: 20px;
    font-size: 18px;
    color: #777;
}