/* =============================================
   THERAPISTS PAGE
   ============================================= */

.therapists-page {
    padding-top: 72px;
    padding-bottom: 80px;
}

.therapists-hero {
    max-width: 920px;
    padding-top: 32px;
}

.hero-tag {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(18px);
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.page-title {
    margin-top: 16px;
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    max-width: 12ch;
}

.page-text {
    margin-top: 16px;
    max-width: 760px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--light);
}

/* ── Search glass panel ── */
.glass-panel {
    margin-top: 28px;
    padding: 22px;
    border-radius: 30px;
    background: var(--card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.search-wrap {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.18);
    color: var(--text);
    padding: 16px 18px;
    border-radius: 18px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    backdrop-filter: blur(14px);
}

.search-input::placeholder { color: var(--light); }

.search-btn {
    border: none;
    padding: 16px 28px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
    font-family: inherit;
    white-space: nowrap;
}
.search-btn:hover { transform: translateY(-2px); }

.results-bar {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--light);
    font-weight: 600;
    font-size: 0.95rem;
}

/* =============================================
   GRID — 2 columns (wide cards need more room)
   ============================================= */
.therapist-list { padding-top: 28px; }

.therapist-grid-advanced {
    display: grid;
    grid-template-columns: 1fr;   /* one card per row */
    gap: 22px;
}

/* =============================================
   CARD — horizontal layout (photo left, info right)
   ============================================= */
.therapist-card-advanced {
    position: relative;
    display: flex;
    flex-direction: row;          /* horizontal */
    gap: 0;
    border-radius: 28px;
    background: var(--card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.therapist-card-advanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

/* ── LEFT COLUMN: photo + rating + button ── */
.card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 22px;
    flex: 0 0 auto;
    width: 170px;
    border-right: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
}

/* Photo wrap */
.therapist-photo-wrap {
    width: 130px;
    height: 155px;                /* portrait aspect, like screenshot */
    border-radius: 18px;
    overflow: hidden;
    flex: 0 0 auto;
    isolation: isolate;
    background: rgba(120, 120, 140, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    will-change: transform;
    contain: layout paint;
}

.therapist-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    image-rendering: auto;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    filter: none !important;
}

.therapist-photo-fallback {
    width: 130px;
    height: 155px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    flex: 0 0 auto;
    isolation: isolate;
}

/* Stars + rating */
.card-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.card-stars {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 0.95rem;
    line-height: 1;
}

.star.filled  { color: #f5a623; }
.star.half    { color: #f5a623; opacity: 0.5; }
.star.empty   { color: rgba(255,255,255,0.25); }

.card-rating-num {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
}

/* Book button in left column */
.book-btn {
    width: 100%;
    padding: 12px 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 800;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}
.book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}

/* ── RIGHT COLUMN: all content ── */
.card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px 24px 20px;
    overflow: hidden;
}

/* Therapist name + location */
.card-header { margin-bottom: 16px; }

.card-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: var(--text);
}

.therapist-location {
    margin-top: 5px;
    color: var(--light);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Two-column info row (qualification + experience) */
.card-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Section label */
.therapist-label {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.therapist-label-icon { font-size: 0.85rem; }

.therapist-text {
    color: var(--text);
    line-height: 1.65;
    font-size: 0.9rem;
}

/* Divider between sections */
.card-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}

/* Section wrapper */
.card-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.card-section:last-child { margin-bottom: 0; }

/* Specializations checklist */
.spec-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
}

.spec-check {
    color: var(--primary);
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Areas of expertise tags */
.badge-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.badge {
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(var(--primary-rgb, 80, 180, 140), 0.12);
    border: 1px solid rgba(var(--primary-rgb, 80, 180, 140), 0.28);
}

/* Profile summary */
.summary-box {
    color: var(--light);
    line-height: 1.75;
    font-size: 0.91rem;
}

/* Ask question link */
.secondary-mini {
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
    text-decoration: none;
    align-self: flex-start;
    margin-top: 4px;
}
.secondary-mini:hover { transform: translateY(-2px); }

/* =============================================
   STATES
   ============================================= */
.state-box {
    margin-top: 24px;
    padding: 32px;
    border-radius: 28px;
    background: var(--card);
    backdrop-filter: blur(22px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--text);
}
.state-box h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}
.state-box p {
    color: var(--light);
    line-height: 1.7;
}

.hidden { display: none !important; }

.loader {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.22);
    border-top-color: var(--primary);
    margin: 0 auto 14px;
    animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.page-btn {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 11px 16px;
    min-width: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    transition: 0.25s ease;
    backdrop-filter: blur(16px);
}
.page-btn:hover:not(:disabled),
.page-btn.active {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* =============================================
   TOAST
   ============================================= */
.page-toast {
    position: fixed;
    top: 88px;
    right: 22px;
    z-index: 1200;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--text);
    color: #fff;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =============================================
   BOOKING MODAL
   ============================================= */
.booking-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 18px;
}
.booking-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 25, 0.55);
    backdrop-filter: blur(6px);
}
.booking-modal-card {
    position: relative;
    width: min(100%, 580px);
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 30px;
    padding: 28px;
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
}
.booking-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.booking-modal-top {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-right: 48px;
}
.booking-photo-fallback {
    width: 88px;
    height: 105px;
    border-radius: 18px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 900;
    font-size: 1.8rem;
    overflow: hidden;
    isolation: isolate;
}
.booking-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    image-rendering: auto;
    transform: translateZ(0);
    filter: none !important;
}
.booking-kicker {
    display: inline-block;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.booking-modal-head h3 {
    font-size: 1.4rem;
    letter-spacing: -0.04em;
}
.booking-modal-head p {
    margin-top: 4px;
    color: var(--light);
    line-height: 1.6;
    font-size: 0.95rem;
}
.booking-modal-body {
    margin-top: 18px;
}
.booking-modal-body p {
    color: var(--text);
    line-height: 1.75;
}
.booking-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--light);
    line-height: 1.7;
    font-size: 0.93rem;
}
.booking-modal-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet landscape */
@media (max-width: 1150px) {
    .spec-list {
        grid-template-columns: 1fr;
    }
}

/* Tablet portrait — 1 col */
@media (max-width: 820px) {
    .therapists-page   { padding-top: 64px; }
    .therapists-hero   { padding-top: 20px; }

    .page-title {
        font-size: clamp(2.5rem, 11vw, 4rem);
        max-width: 100%;
    }

    .search-wrap { flex-direction: column; align-items: stretch; }
    .search-btn  { width: 100%; }

    .therapist-grid-advanced { grid-template-columns: 1fr; }

    .therapist-card-advanced { border-radius: 24px; }

    /* On tablet keep horizontal but shrink left col */
    .card-left { width: 148px; padding: 20px 16px; }
    .therapist-photo-wrap, .therapist-photo-fallback { width: 112px; height: 134px; }

    .spec-list { grid-template-columns: 1fr; }
    .card-info-row { grid-template-columns: 1fr; gap: 10px; }

    .booking-modal-card   { padding: 22px; border-radius: 24px; }
    .booking-modal-top    { align-items: flex-start; }
    .booking-modal-actions { flex-direction: column; }
    .booking-modal-actions .primary-btn,
    .booking-modal-actions .secondary-btn { width: 100%; }
}

/* Phone — stack card vertically */
@media (max-width: 600px) {
    .therapists-page { padding-top: 56px; }
    .therapists-hero { padding-top: 16px; }
    .page-title      { font-size: clamp(2.2rem, 12vw, 3.4rem); }
    .page-text       { font-size: 0.98rem; }

    /* Stack card: photo row on top, content below */
    .therapist-card-advanced { flex-direction: column; }

    .card-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 18px 18px 14px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        gap: 16px;
        background: rgba(255,255,255,0.04);
    }

    /* Photo goes back to square on mobile */
    .therapist-photo-wrap,
    .therapist-photo-fallback {
        width: 86px;
        height: 100px;
        border-radius: 16px;
    }

    .card-left-meta {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
    }

    .book-btn { width: auto; padding: 11px 18px; }

    .card-right { padding: 18px; }

    .card-info-row { grid-template-columns: 1fr; }
    .spec-list     { grid-template-columns: 1fr; }

    .booking-modal-top { flex-direction: column; align-items: flex-start; }
    .booking-photo-fallback { width: 76px; height: 90px; }

    .page-toast { right: 14px; left: 14px; max-width: none; }
}

.therapist-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary, #6366f1);
    margin-top: 6px;
    text-align: center;
}


/* =============================================
   FILTER BAR
   ============================================= */
.filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ── Price Slider ── */
.price-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-slider-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--light);
}

.price-slider-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slider-track-wrap {
    position: relative;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    overflow: visible;
}

.slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    pointer-events: none;
    transition: width 0.08s ease;
}

.price-slider {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
}

.slider-track-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 2.5px solid var(--primary);
    box-shadow: 0 2px 12px rgba(110,168,254,0.35);
    pointer-events: none;
    left: var(--thumb-pct, 100%);
    transition: left 0.08s ease;
    z-index: 1;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--light);
    font-weight: 600;
    opacity: 0.7;
    margin-top: 2px;
}

/* ── Language Pills ── */
.lang-filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lang-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.lang-pill {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--light);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.lang-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(110, 168, 254, 0.06);
}

.lang-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(110,168,254,0.28);
}

/* ── Clear button ── */
.filter-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.clear-btn {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--light);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.clear-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Responsive ── */
@media (max-width: 820px) {
    .lang-pills { gap: 6px; }
    .lang-pill  { font-size: 0.8rem; padding: 6px 12px; }
}

@media (max-width: 600px) {
    .filter-wrap  { gap: 16px; margin-top: 16px; padding-top: 16px; }
    .clear-btn    { width: 100%; text-align: center; }
    .filter-footer { justify-content: stretch; }
}