.vtm-resources-page {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: #fcfaff;
    min-height: 100vh;
    padding-top: 0 !important;
    margin-top: -16px !important; /* Touch the Odoo header exactly */
    overflow-x: hidden; /* Prevent horizontal scroll at ultra-narrow widths */
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.vtm-resources-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(
        180deg,
        #fef5f0 0%,
        #fcddd6 22%,
        #f5c5d5 48%,
        #d8aee4 72%,
        #ece4f8 88%,
        #faf8ff 100%
    );
    padding: 40px 24px 56px;
}

/* Decorative orbs */
.vtm-resources-hero::before,
.vtm-resources-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.18;
}

.vtm-resources-hero::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #f4a8c0 0%, transparent 65%);
    top: -120px;
    right: -100px;
    opacity: 0.35;
}

.vtm-resources-hero::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #c880d8 0%, transparent 65%);
    bottom: -100px;
    left: -70px;
    opacity: 0.28;
}

.vtm-resources-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 680px;
    width: 100%;
}

.vtm-resources-hero__title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: #3a1060;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 8px rgba(180, 80, 160, 0.12);
}

.vtm-resources-hero__title::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, #e8829a, #b060cc);
    border-radius: 4px;
    margin: 16px auto 0;
}

.vtm-resources-hero__subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #7a2a90;
    margin: 12px 0 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(192, 80, 180, 0.1);
    padding: 6px 20px;
    border-radius: 100px;
    border: 1px solid rgba(192, 80, 180, 0.22);
}

/* ── Floating Search Bar ─────────────────────────────────────────────── */

.vtm-resources-search-wrapper {
    display: flex;
    justify-content: center;
    padding: 0 40px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    /* Prevent the wrapper itself from causing page-level overflow */
    max-width: 100%;
    box-sizing: border-box;
}

.vtm-resources-search {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(45, 27, 105, 0.08);
    padding: 24px 36px;
    width: 100%;
    max-width: 1000px;
    gap: 24px;
    /* Ensure padding does not add to reported width */
    box-sizing: border-box;
}

.vtm-resources-search__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;     /* allow flex children to shrink below content size */
    overflow: hidden; /* clip any injected widget that might overflow */
}

/* ── Select2 widget — prevent overflow at any width ─────────────────── */
/* Select2 sets a fixed pixel width via the `style` attribute; override it
   so the widget always respects the flex column width instead. */
.vtm-resources-search .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.vtm-resources-search .select2-selection {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.vtm-resources-search__label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2d1b69;
    margin: 0;
}

.vtm-resources-search__select {
    width: 100%;
    border: 1px solid #e0d9f7;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    color: #3d2b7a;
    outline: none;
    background: #faf8ff;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236c47d4%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 10px auto;
}

.vtm-resources-search__select:focus {
    border-color: #6c47d4;
    box-shadow: 0 0 0 3px rgba(108, 71, 212, 0.1);
    background: #fff;
}

.vtm-resources-search__btn-container {
    display: flex;
    align-items: flex-end;
}

.vtm-resources-search__btn {
    background: #431D74;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0 32px;
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.vtm-resources-search__btn:hover {
    background: #73559b;
    transform: scale(1.03);
}

/* ── Content Area ────────────────────────────────────────────────────── */

.vtm-resources-content {
    max-width: 1000px;
    margin: 40px auto 80px;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

.vtm-resources-header {
    margin-bottom: 24px;
}

.vtm-resources-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3d2b7a;
    margin: 0;
}

.vtm-resources-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Therapist Card ──────────────────────────────────────────────────── */

.vtm-therapist-card {
    display: flex;
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    gap: 24px;
    box-shadow: 0 3px 18px rgba(45, 27, 105, 0.06);
    border: 1px solid rgba(108, 71, 212, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
    text-decoration: none !important;
}

.vtm-therapist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(45, 27, 105, 0.12);
}

.vtm-therapist-card__avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f5;
    position: relative;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.vtm-therapist-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vtm-therapist-card__status {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #e53935;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    border: 2px solid white;
}

.vtm-therapist-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.vtm-therapist-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.vtm-therapist-card__name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d1b69;
    margin: 0;
    word-break: break-word;
}

.vtm-therapist-card__verified {
    background: #4CAF50;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.35);
}

.vtm-therapist-card__verified i {
    font-size: 0.85rem;
}

.vtm-therapist-card__verified-avatar {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    background: #4CAF50;
    color: #fff;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.45);
    z-index: 2;
    pointer-events: none;
}

.vtm-resource-unavailable .vtm-therapist-card__verified,
.vtm-resource-unavailable .vtm-therapist-card__verified-avatar {
    filter: grayscale(100%);
    opacity: 0.65;
}

.vtm-therapist-card__subtitle {
    font-size: 1rem;
    color: #4a2fb0;
    margin: 0;
    font-weight: 500;
}

.vtm-therapist-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #6b6b8a;
    margin-top: 4px;
    flex-wrap: wrap;
}

.vtm-therapist-card__rating i {
    color: #fbc02d;
    font-size: 1.1rem;
}

.vtm-therapist-card__rating-score {
    font-weight: 700;
    color: #3d2b7a;
}

.vtm-therapist-card__location {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #6b6b8a;
    margin-top: 6px;
    word-break: break-word;
}

.vtm-therapist-card__location i {
    color: #4a2fb0;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

/* Tablet portrait */
@media (max-width: 900px) {
    .vtm-resources-hero {
        min-height: 140px;
        padding: 32px 20px 44px;
    }

    .vtm-resources-hero__title {
        font-size: 2rem;
    }

    .vtm-resources-search-wrapper {
        padding: 0 20px;
    }

    .vtm-resources-search {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }

    .vtm-resources-search__btn-container {
        align-items: stretch;
    }

    .vtm-resources-search__btn {
        width: 100%;
        height: 48px;
    }

    .vtm-resources-content {
        padding: 0 20px;
        margin-top: 36px;
    }
}

/* Mobile: landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .vtm-resources-hero {
        min-height: 110px;
        padding: 24px 20px 40px;
    }

    .vtm-resources-hero__title {
        font-size: 1.5rem;
    }

    .vtm-resources-search-wrapper {
        margin-top: -20px;
        padding: 0 16px;
    }

    .vtm-resources-search {
        flex-direction: row;
        padding: 14px 20px;
        gap: 16px;
    }

    .vtm-resources-search__btn-container {
        align-items: flex-end;
    }

    .vtm-resources-content {
        padding: 0 16px;
        margin-top: 28px;
    }
}

/* Small mobile: portrait */
@media (max-width: 580px) {
    .vtm-resources-hero {
        min-height: 130px;
        padding: 28px 16px 44px;
    }

    .vtm-resources-hero__title {
        font-size: 1.65rem;
        letter-spacing: -0.01em;
    }

    .vtm-resources-hero__subtitle {
        font-size: 0.85rem;
        padding: 5px 14px;
    }

    .vtm-resources-search-wrapper {
        padding: 0 14px;
        margin-top: -25px;
    }

    .vtm-resources-search {
        padding: 16px;
        gap: 14px;
        border-radius: 16px;
    }

    .vtm-resources-content {
        padding: 0 14px;
        margin-top: 28px;
        margin-bottom: 48px;
    }

    .vtm-resources-count {
        font-size: 1rem;
    }

    .vtm-therapist-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 16px;
        align-items: center;
    }

    .vtm-therapist-card__header {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .vtm-therapist-card__name {
        font-size: 1.1rem;
    }

    .vtm-therapist-card__rating {
        justify-content: center;
    }

    .vtm-therapist-card__location {
        justify-content: center;
        text-align: center;
    }

    .vtm-therapist-card__avatar {
        width: 90px;
        height: 90px;
    }

    .vtm-therapist-card__verified {
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .vtm-therapist-card__verified-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.68rem;
    }
}

/* Very small mobile */
@media (max-width: 360px) {
    .vtm-resources-hero__title {
        font-size: 1.05rem;
    }

    .vtm-resources-search {
        padding: 14px 12px;
    }

    .vtm-resources-content {
        padding: 0 10px;
    }
}

/* Ultra-narrow mobile (< 300px) — prevents search card and therapist cards
   from overflowing the viewport */
@media (max-width: 299px) {
    .vtm-resources-search-wrapper {
        padding: 0 6px;
        margin-top: -30px;
    }

    .vtm-resources-search {
        padding: 10px 8px;
        gap: 10px;
        border-radius: 12px;
        /* Prevent any child from forcing horizontal overflow */
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    .vtm-resources-search__field {
        min-width: 0;
        width: 100%;
    }

    .vtm-resources-search__select {
        /* Allow the select to shrink inside the card */
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 10px 28px 10px 10px;
        font-size: 0.9rem;
        background-position: right 8px top 50%;
    }

    .vtm-resources-search__label {
        font-size: 0.85rem;
    }

    .vtm-resources-search__btn {
        font-size: 0.9rem;
        padding: 0 16px;
        height: 42px;
    }

    .vtm-resources-content {
        padding: 0 6px;
    }

    .vtm-therapist-card {
        padding: 14px 10px;
        gap: 12px;
    }

    .vtm-therapist-card__avatar {
        width: 72px;
        height: 72px;
    }

    .vtm-therapist-card__name {
        font-size: 0.95rem;
    }

    .vtm-therapist-card__verified {
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .vtm-therapist-card__verified-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.62rem;
    }

    .vtm-therapist-card__subtitle,
    .vtm-therapist-card__rating,
    .vtm-therapist-card__location {
        font-size: 0.8rem;
    }
}
