.abf-root {
    width: 100%;
}

.abf {
    --abf-columns-desktop: 4;
    --abf-columns-tablet: 2;
    --abf-columns-mobile: 1;
    --abf-color-primary: #111827;
    --abf-color-secondary: #2563eb;
    --abf-card-border-radius: 16px;
    --abf-badge-border-radius: 999px;
    color: var(--abf-color-primary);
}

.abf__header,
.abf__controls,
.abf__pagination,
.abf-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.abf__header {
    margin-bottom: 1.5rem;
}

.abf__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.abf__title {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.15;
}

.abf__results {
    margin: 0;
    color: #4b5563;
}

.abf__controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f9fafb;
}

.abf__control {
    display: grid;
    gap: 0.4rem;
    min-width: 12rem;
    flex: 1 1 12rem;
}

.abf__control span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.abf__control input,
.abf__control select,
.abf__submit {
    min-height: 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font: inherit;
}

.abf__control input,
.abf__control select {
    width: 100%;
    padding: 0 0.875rem;
    background: #ffffff;
}

.abf__submit {
    padding: 0 1.25rem;
    font-weight: 600;
    color: #ffffff;
    background: #111827;
    cursor: pointer;
}

.abf__grid,
.abf__skeleton-grid {
    display: grid;
    grid-template-columns: repeat(var(--abf-columns-desktop), minmax(0, 1fr));
    gap: 1.5rem;
}

.abf__category-nav {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-start;
}

.abf__category-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    max-width: 380px;
}

.abf__category-select-label {
    font-size: 0.825rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--abf-color-primary) 60%, transparent);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.abf__custom-select {
    position: relative;
    flex-grow: 1;
    font-family: inherit;
}

.abf__custom-select-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 2.75rem !important;
    padding: 0.5rem 1rem !important;
    border: 1px solid color-mix(in srgb, var(--abf-color-primary) 20%, transparent) !important;
    border-radius: calc(var(--abf-card-border-radius, 16px) * 0.55) !important;
    background-color: #ffffff !important;
    font: inherit !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    color: var(--abf-color-primary) !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.abf__custom-select-trigger:hover {
    border-color: var(--abf-color-secondary) !important;
    box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--abf-color-secondary) 8%, transparent), 0 2px 4px -1px color-mix(in srgb, var(--abf-color-secondary) 4%, transparent) !important;
    background-color: #ffffff !important;
}

.abf__custom-select-trigger:hover .abf__custom-select-arrow {
    color: var(--abf-color-secondary) !important;
}

.abf__custom-select-trigger:focus {
    outline: none !important;
    border-color: var(--abf-color-secondary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--abf-color-secondary) 15%, transparent) !important;
    background-color: #ffffff !important;
}

.abf__custom-select-arrow {
    display: flex;
    align-items: center;
    color: color-mix(in srgb, var(--abf-color-primary) 45%, transparent);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.abf__custom-select.is-open .abf__custom-select-arrow {
    transform: rotate(180deg);
    color: var(--abf-color-secondary);
}

.abf__custom-select-options {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 260px;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    overflow-y: auto;
    border: 1px solid color-mix(in srgb, var(--abf-color-primary) 15%, transparent);
    border-radius: calc(var(--abf-card-border-radius, 16px) * 0.55);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.abf__custom-select.is-open .abf__custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.abf__custom-select-option {
    padding: 0.625rem 1rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: color-mix(in srgb, var(--abf-color-primary) 70%, transparent);
    cursor: pointer;
    transition: all 0.15s ease;
}

.abf__custom-select-option:hover {
    color: var(--abf-color-secondary);
    background-color: color-mix(in srgb, var(--abf-color-secondary) 6%, transparent);
}

.abf__custom-select-option.is-selected {
    color: var(--abf-color-secondary);
    background-color: color-mix(in srgb, var(--abf-color-secondary) 8%, transparent);
    font-weight: 600;
}

.abf-card,
.abf-skeleton {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: var(--abf-card-border-radius);
    background: #ffffff;
}

.abf-card__media,
.abf-skeleton__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #e5e7eb;
}

.abf-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.abf-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
}

.abf-card__body,
.abf-skeleton__body {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.abf-card__category-badge {
    position: absolute;
    top: 0.875rem;
    left: 0.875rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 1.75rem);
    padding: 0.45rem 0.7rem;
    border-radius: var(--abf-badge-border-radius);
    background: var(--abf-color-secondary);
    backdrop-filter: blur(6px);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abf-card__title {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.35;
}

.abf-card__title a {
    color: inherit;
    text-decoration: none;
}

.abf-card__meta {
    justify-content: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.abf-card__excerpt {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

.abf__empty {
    padding: 2rem;
    border: 1px dashed #d1d5db;
    border-radius: 1rem;
    text-align: center;
    color: #4b5563;
}

.abf__pagination {
    margin-top: 1.5rem;
    justify-content: center;
}

.abf__page-link,
.abf__page-link:link,
.abf__page-link:visited,
.abf__page-link:hover,
.abf__page-link:focus,
.abf__page-link:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: var(--abf-color-primary);
    background: #ffffff;
    text-decoration: none;
}

.abf__page-link.is-current,
.abf__page-link.is-current:link,
.abf__page-link.is-current:visited,
.abf__page-link.is-current:hover,
.abf__page-link.is-current:focus,
.abf__page-link.is-current:active {
    border-color: var(--abf-color-primary);
    color: #ffffff;
    background: var(--abf-color-primary);
    text-decoration: none;
}

.abf-skeleton__line {
    height: 0.85rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
    background-size: 200% 100%;
    animation: abf-pulse 1.2s ease-in-out infinite;
}

.abf-skeleton__line--short {
    width: 40%;
}

.abf-skeleton__line--medium {
    width: 65%;
}

.abf-skeleton__line--full {
    width: 100%;
}

@keyframes abf-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 1024px) {
    .abf__grid,
    .abf__skeleton-grid {
        grid-template-columns: repeat(var(--abf-columns-tablet), minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .abf__grid,
    .abf__skeleton-grid {
        grid-template-columns: repeat(var(--abf-columns-mobile), minmax(0, 1fr));
    }

    .abf__controls {
        padding: 0.875rem;
    }

    .abf__control {
        min-width: 100%;
    }

    .abf__submit {
        width: 100%;
    }

    .abf__category-select-wrapper {
        max-width: 100%;
    }
}
