/* Psychologist section polish */

#therapist-section {
    position: relative;
    overflow-x: clip;
    max-width: 100%;
}

#therapist-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(30 43 88 / 0.12), transparent);
}

#therapist-section .therapist-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    #therapist-section .therapist-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
    }

    #therapist-section .therapist-toolbar .input-shell {
        margin-top: 0;
        flex: 1;
        max-width: 22rem;
    }
}

#specialty-filters {
    margin-top: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

#specialty-filters::-webkit-scrollbar {
    display: none;
}

#specialty-filter-list {
    gap: 0.5rem;
}

#specialty-filter-list .filter-pill {
    border-radius: 0.625rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#specialty-filter-list .filter-pill.is-active {
    background: #1e2b58;
    color: #fff;
    border-color: #1e2b58;
    box-shadow: 0 8px 20px rgb(30 43 88 / 0.18);
}

#therapist-grid {
    gap: 1.25rem;
    max-width: 100%;
}

.therapist-card {
    position: relative;
    border-radius: 1rem !important;
    border: 1px solid rgb(30 43 88 / 0.08) !important;
    background: #fff;
    box-shadow: 0 10px 30px rgb(30 43 88 / 0.05);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    transform: none;
    backface-visibility: hidden;
}

.therapist-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #1e2b58, #0071bc, #ffd200);
    opacity: 0.9;
}

/* Hover lift only on desktop — sticky :hover causes mobile scroll shake */
@media (hover: hover) and (pointer: fine) {
    .therapist-card {
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    .therapist-card:hover {
        transform: translateY(-4px);
        border-color: rgb(0 113 188 / 0.22) !important;
        box-shadow: 0 18px 40px rgb(30 43 88 / 0.1);
    }

    .therapist-card__book:hover {
        background: #0071bc;
    }
}

@media (hover: none), (pointer: coarse) {
    .therapist-card:hover,
    .therapist-card:active {
        transform: none !important;
        box-shadow: 0 10px 30px rgb(30 43 88 / 0.05) !important;
    }
}

.therapist-card__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 1rem;
    background: linear-gradient(180deg, rgb(250 250 250) 0%, rgb(255 255 255) 100%);
}

.therapist-card__photo {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
    border: 1px solid rgb(30 43 88 / 0.08);
    box-shadow: 0 6px 16px rgb(30 43 88 / 0.08);
}

.therapist-card__meta {
    min-width: 0;
    flex: 1;
}

.therapist-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.therapist-card__name {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 650;
    color: #1e2b58;
    letter-spacing: -0.01em;
}

.therapist-card__title {
    margin: 0.2rem 0 0;
    font-size: 0.875rem;
    color: #4a5568;
}

.therapist-card__qualification {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgb(74 85 104 / 0.9);
}

.therapist-card__category {
    display: inline-flex;
    align-items: center;
    margin-top: 0.65rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgb(0 113 188 / 0.08);
    color: #0071bc;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.therapist-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 1.25rem 1.25rem;
    min-width: 0;
}

.therapist-card .audio-player {
    margin-top: 0.25rem;
    border-radius: 0.85rem;
    border: 1px solid rgb(30 43 88 / 0.08);
    background: linear-gradient(180deg, #fafafa, #f5f7fa);
    padding: 0.7rem 0.85rem;
    max-width: 100%;
}

.therapist-card .audio-play-btn {
    width: 2.25rem;
    height: 2.25rem;
    box-shadow: 0 6px 14px rgb(30 43 88 / 0.18);
}

.therapist-card .audio-wave {
    height: 1.75rem;
    gap: 2px;
    overflow: hidden;
}

.therapist-card .audio-bar {
    width: 2.5px;
    border-radius: 999px;
    background: rgb(30 43 88 / 0.18);
    transform-origin: center bottom;
}

.therapist-card .audio-label {
    min-width: 3.25rem;
    text-align: right;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
}

.therapist-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgb(30 43 88 / 0.06);
}

.therapist-card__hint {
    margin: 0;
    min-width: 0;
    font-size: 0.6875rem;
    color: #4a5568;
}

.therapist-card__hint strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e2b58;
}

.therapist-card__book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 2.25rem;
    padding: 0.5rem 1rem;
    border-radius: 0.7rem;
    background: #1e2b58;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.therapist-card .verified-badge {
    border-radius: 999px;
    background: rgb(255 210 0 / 0.2);
    color: #1e2b58;
    padding: 0.2rem 0.55rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#therapist-loading,
#therapist-empty {
    border: 1px dashed rgb(30 43 88 / 0.12);
    border-radius: 1rem;
    background: rgb(255 255 255 / 0.7);
}

@media (max-width: 640px) {
    .therapist-card__footer {
        flex-wrap: wrap;
    }

    .therapist-card__book {
        width: 100%;
    }

    /* Enter animation fights scroll on mobile */
    .therapist-card.is-visible {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
