/* =======================================================
   PROFESSIONALS GRID
   Clean text-only tiles — no images.
   Categories/subcategories = square, products/files = compact.
   ======================================================= */

.box-professionals-wrapper {
    width: 100%;
    font-family: var(--e-global-typography-primary-font-family), "AeonikPro", Sans-serif;
}

/* --- Page Title --- */
.professionals-page-title {
    font-size: clamp(1.25rem, 3vw, 2rem);
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

/* --- Breadcrumbs --- */
.professionals-breadcrumbs {
    font-size: var(--box-font-size-label, 0.6875rem);
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--box-color-text-mute, #666);
    letter-spacing: 0.5px;
}

.professionals-breadcrumbs a {
    color: var(--box-color-text-mute, #666);
    text-decoration: none;
    transition: color 0.2s ease;
}

.professionals-breadcrumbs a:hover {
    color: var(--box-color-black, #000);
}

/* --- Filter Bar --- */
.professionals-filter-bar {
    display: flex;
    flex-wrap: wrap;
    background: #f2f2f2;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

.professionals-filter-bar .filter-select-wrapper {
    flex: 1;
    min-width: 120px;
    position: relative;
    border-right: 1px solid #ddd;
}

.professionals-filter-bar .filter-select-wrapper:last-child {
    border-right: none;
}

.professionals-filter-bar select {
    width: 100%;
    height: 40px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    font-size: var(--box-font-size-label, 0.6875rem);
    text-transform: uppercase;
    color: #333;
    cursor: pointer;
    outline: none;
    font-weight: 500;
    padding: 0 40px 0 15px;
    font-family: inherit;
}

.professionals-filter-bar .filter-select-wrapper::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 45%;
    width: 7px;
    height: 7px;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    transform: rotate(45deg) translateY(-50%);
    pointer-events: none;
}

/* --- Grid Layout (shared base) --- */
.professionals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

/* --- Card Base --- */
.professionals-card {
    position: relative;
    border: 1px solid var(--box-border-color, #E5E5E5);
    background: var(--box-color-white, #ffffff);
    transition: border-color 0.2s ease;
}

.professionals-card:hover {
    border-color: var(--box-color-black, #000);
}

.professionals-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    gap: 6px;
}

.professionals-card-title {
    font-size: clamp(0.8125rem, 1.2vw, 1.125rem);
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.3;
    color: var(--box-color-black, #000);
}

.professionals-card-action {
    font-size: var(--box-font-size-label, 0.6875rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--box-color-text-mute, #666);
}

/* =======================================================
   LEVEL-SPECIFIC OVERRIDES
   Categories & subcategories = square tiles
   Products & files = compact rectangular tiles
   ======================================================= */

/* Categories & Subcategories: Square — !important overrides any Elementor inline height */
.professionals-grid.level-categories .professionals-card,
.professionals-grid.level-subcategories .professionals-card {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
}

/* Products & Files: Compact rectangle — height controlled via Elementor widget control */
.professionals-grid.level-products .professionals-card,
.professionals-grid.level-files .professionals-card {
    aspect-ratio: auto;
    min-height: 80px;
}

/* --- Loading State (AJAX filters) --- */
.professionals-grid.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* --- Empty State --- */
.professionals-empty {
    color: var(--box-color-text-mute, #666);
    font-size: var(--box-font-size-ui, 1rem);
}

/* --- Mobile Filter Toggle --- */
.professionals-mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: var(--box-font-size-label, 0.6875rem);
    text-transform: uppercase;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.professionals-mobile-filter-toggle .toggle-arrow {
    width: 8px;
    height: 8px;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.professionals-mobile-filter-toggle.is-active .toggle-arrow {
    transform: rotate(-135deg);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .professionals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .professionals-filter-bar {
        flex-direction: column;
        background: transparent;
        border: none;
    }

    .professionals-mobile-filter-toggle {
        display: flex;
        background: #f2f2f2;
        border: 1px solid #ddd;
        height: 50px;
        padding: 0 20px;
    }

    .professionals-filter-bar .filter-select-wrapper {
        display: none;
        border-right: none;
        border-left: 1px solid #ddd;
        border-right: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        background: #f2f2f2;
    }

    .professionals-filter-bar .filter-select-wrapper select {
        height: 50px;
        padding-left: 20px;
    }

    .professionals-filter-bar .filter-select-wrapper::after {
        top: 50%;
    }

    .professionals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .professionals-grid {
        grid-template-columns: 1fr;
    }
}