/**
 * Caribbean Therapist - Find a Therapist Directory styles
 *
 * Layout: Left filter sidebar (300px) + main results column.
 * Card: 2-col — col1 = photo + View Profile button stacked,
 *               col2 = name/title/location/bio/tags + social icons top-right.
 * Brand: Pink + Green primary, yellow as sparing accent. NO GRADIENTS.
 * Buttons: All green (#38b6a8).
 */

.ct-directory {
    --pink:        var(--ct-blush);
    --pink-soft:   var(--ct-blush-soft);
    --pink-bg:     var(--ct-blush-soft);
    --yellow:      var(--ct-yellow);
    --yellow-soft: #F8F7B8;
    --teal:        var(--ct-teal);
    --teal-deep:   var(--ct-teal-deep);
    --paper:       #FFFFFF;
    --ink:         var(--ct-teal-deep);
    --ink-soft:    var(--ct-text-muted);
    --rule:        var(--ct-rule);

    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    max-width: 1250px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    font-family: var(--ct-font-body);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
}

.ct-directory *,
.ct-directory *::before,
.ct-directory *::after {
    box-sizing: border-box;
}

/* ============ SIDEBAR (300px wide) ============ */
.ct-dir-sidebar {
    align-self: start;
    position: sticky;
    top: 90px;
    z-index: 1;
}

.ct-dir-sidebar-inner {
    background: #FFEBEA;
    border: 1px solid var(--rule);
    border-radius: 16px;
    padding: 26px 22px;
}

.ct-dir-sidebar-title {
    font-family: var(--ct-font-head);
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    color: var(--teal-deep);
    margin: 0 0 6px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.ct-dir-sidebar-sub {
    margin: 0 0 22px;
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.45;
}

.ct-dir-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ct-dir-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Filter labels - bigger and bolder per request */
.ct-dir-field label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--teal-deep);
}

/* Filter inputs/selects - 50px height for better touch targets */
.ct-dir-field input,
.ct-dir-field select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.ct-dir-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338b6a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 38px;
    cursor: pointer;
}

.ct-dir-field input:focus,
.ct-dir-field select:focus {
    border-color: var(--ct-teal-deep, #045969);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56,182,168,0.18);
}

.ct-dir-field select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ct-dir-reset-btn {
    margin-top: 6px;
    padding: 12px 18px;
    background: transparent;
    color: var(--teal-deep);
    border: 1.5px solid var(--teal);
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ct-dir-reset-btn:hover {
    background: var(--ct-teal-deep, #045969);
    color: #fff;
}

/* ============ MAIN COLUMN ============ */
.ct-dir-main {
    min-width: 0;
}

.ct-dir-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
}

.ct-dir-count {
    font-family: var(--ct-font-head);
    font-style: normal;
    font-weight: 400;
    font-size: 28px;
    color: var(--teal-deep);
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.0;
}

.ct-dir-count-num {
    font-weight: 400;
    color: var(--teal);
    margin-right: 4px;
}

.ct-dir-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ct-dir-sort label {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Match Sort select height to filter field heights (50px) */
.ct-dir-sort select {
    height: 50px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338b6a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
    min-width: 180px;
}

/* ============ RESULTS LIST ============ */
.ct-dir-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.2s;
}

.ct-dir-results[aria-busy="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.ct-dir-loading,
.ct-dir-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--ink-soft);
    background: var(--pink-soft);
    border: 1px dashed var(--rule);
    border-radius: 16px;
}

.ct-dir-empty svg {
    color: var(--teal);
    margin-bottom: 12px;
}

.ct-dir-empty strong {
    font-family: var(--ct-font-head);
    font-weight: 600;
    color: var(--teal-deep);
    font-size: 18px;
    display: block;
    margin-bottom: 6px;
}

/* ============ CARD — 2 COLUMNS ============
   col1: photo + View Profile button (stacked vertically)
   col2: details (name/title/location/bio/tags) + social icons top-right
*/
.ct-dir-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    align-items: start;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 16px;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.ct-dir-card:hover {
    border-color: var(--ct-teal-deep, #045969);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -16px rgba(56,182,168,0.35);
}

/* Col 1: photo + button stacked */
.ct-dir-card-col1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.ct-dir-card-photo {
    display: block;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pink-soft);
    border: 3px solid var(--teal);
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.ct-dir-card:hover .ct-dir-card-photo {
    border-color: var(--teal-deep);
}

.ct-dir-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct-dir-card-photo-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ct-font-head);
    font-weight: 700;
    font-size: 52px;
    color: var(--teal-deep);
    background: var(--pink-soft);
    text-transform: uppercase;
}

/* View Profile button - Primary (Deep Teal + Aqua text) */
.ct-dir-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--ct-teal-deep, #045969);
    color: var(--ct-bg-aqua, #B7F8F4);
    border-radius: 999px;
    font-family: var(--ct-font-head);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.15s;
    border: 1.5px solid var(--ct-teal-deep, #045969);
    white-space: nowrap;
    width: auto;
    max-width: none;
}

.ct-dir-view-btn:hover {
    background: #023a45;
    border-color: #023a45;
    color: var(--ct-bg-aqua, #B7F8F4);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -6px rgba(4,89,105,0.5);
}

.ct-dir-view-btn svg {
    transition: transform 0.15s;
    flex-shrink: 0;
}

.ct-dir-view-btn:hover svg {
    transform: translateX(2px);
}

/* Col 2: full width, head row reserves socials space inline */
.ct-dir-card-col2 {
    min-width: 0;
    position: relative;
}

.ct-dir-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.ct-dir-card-head-text {
    flex: 1;
    min-width: 0;
}

.ct-dir-card-socials {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ct-dir-card-social {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ct-teal-deep, #045969);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}

.ct-dir-card-social:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
}

.ct-dir-card-social svg {
    width: 14px;
    height: 14px;
    display: block;
}

.ct-dir-card-name {
    font-family: var(--ct-font-head);
    font-weight: 400;
    font-size: 32px;
    color: var(--teal-deep);
    margin: 0 0 2px;
    line-height: 1.0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 24px;
    color: var(--teal-deep);
    margin: 0 0 2px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.ct-dir-card-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.ct-dir-card-name a:hover {
    color: var(--teal);
}

.ct-dir-card-title {
    font-size: 15px;
    color: var(--teal);
    margin: 0;
    font-weight: 700;
    font-style: normal;
}

.ct-dir-card-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0 0 10px;
    font-weight: 500;
}

.ct-dir-card-location svg {
    color: #d4537e;
    flex-shrink: 0;
}

.ct-dir-card-bio {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ct-dir-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
}

.ct-dir-card-tags:last-child {
    margin-bottom: 0;
}

.ct-dir-card-tags-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-right: 4px;
}

.ct-dir-card-tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.ct-dir-card-tag-lang {
    background: var(--ct-blush, #FFD7D7);
    color: var(--ct-teal-deep, #045969);
    border: 1px solid rgba(4, 89, 105, 0.10);
}
.ct-dir-card-tag-session {
    background: #D9F2F0;
    color: var(--ct-teal-deep, #045969);
    border: 1px solid rgba(56,182,168,0.25);
}

.ct-dir-card-tag-more {
    background: var(--ct-teal-deep, #045969);
    color: #fff;
    border: 1px solid var(--teal);
    font-weight: 700;
    font-size: 11px;
    min-width: 32px;
    text-align: center;
}

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

.ct-dir-page-btn {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--teal-deep);
    cursor: pointer;
    transition: all 0.15s;
    min-width: 38px;
}

.ct-dir-page-btn:hover {
    border-color: var(--ct-teal-deep, #045969);
    background: var(--pink-soft);
}

.ct-dir-page-btn.active {
    background: var(--ct-teal-deep, #045969);
    color: #fff;
    border-color: var(--ct-teal-deep, #045969);
}

.ct-dir-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ct-dir-page-btn:disabled:hover {
    border-color: var(--rule);
    background: #fff;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
    .ct-directory {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px 16px 50px;
    }
    .ct-dir-sidebar {
        position: static;
    }
    .ct-dir-sidebar-inner {
        padding: 20px 18px;
    }
    .ct-dir-card {
        grid-template-columns: 130px 1fr;
        gap: 20px;
        padding: 20px;
    }
    .ct-dir-card-photo {
        width: 120px;
        height: 120px;
    }
    .ct-dir-view-btn {
        max-width: 130px;
        padding: 9px 14px;
        font-size: 12px;
    }
    .ct-dir-card-name {
        font-size: 20px;
    }
    .ct-dir-card-col2 {
        padding-right: 0;
    }
    .ct-dir-card-socials {
        position: static;
        margin-bottom: 10px;
        max-width: none;
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .ct-dir-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .ct-dir-card-photo {
        margin: 0 auto;
    }
    .ct-dir-card-location,
    .ct-dir-card-tags,
    .ct-dir-card-socials {
        justify-content: center;
    }
    .ct-dir-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
 *  USER OVERRIDES BAKED IN
 * ============================================================ */
.ct-dir-view-btn {
    padding: 5px 18px;
    background: #38b6a8;
    color: #ffffff;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 1.5px solid #38b6a8;
}
.ct-dir-view-btn:hover {
    background: #045969;
    color: #ffffff;
    border-color: #045969;
}
.ct-dir-card-social {
    background: #38b6a8;
    color: #fff;
}
