/* ============================================================
   therapy-location-cards — Section wrapper
   ============================================================ */

.therapy-location-cards {
    position: relative;
    width: var(--vw);
    margin-left: var(--bleed-margin);
    background: #ffffff;
    padding: 96px 0;
    overflow: hidden;
}

.therapy-location-cards__inner {
    position: relative;
    z-index: auto;
    width: min(1290px, calc(var(--vw) - 96px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.therapy-location-cards__butterfly {
    position: absolute;
    top: 138px;
    right: -72px;
    z-index: 0;
    width: 477px;
    max-width: none;
    height: auto;
    opacity: 0.33;
    pointer-events: none;
    user-select: none;
    transform: rotate(153.81deg) scaleY(-1);
    transform-origin: center;
}

/* Header */

.therapy-location-cards__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.therapy-location-cards__eyebrow {
    font-family: var(--font-sans);
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.216px;
    text-transform: uppercase;
    color: #4a5565;
    margin: 0;
}

.therapy-location-cards__title {
    font-family: var(--font-sans);
    width: min(576px, 100%);
    font-size: 2.9375rem; /* 47px */
    font-weight: 400;
    line-height: 1.1;
    color: #4a5565;
    margin: 0;
}

.therapy-location-cards__body {
    font-family: var(--font-sans);
    width: min(850px, 100%);
    font-size: 1.1875rem; /* 19px */
    line-height: 1.7;
    color: #101828;
    margin: 0;
}

/* Two-card grid */

.therapy-location-cards__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.25));
}

@media (max-width: 767px) {
    .therapy-location-cards__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Individual card (is a button) */

.therapy-location-cards__card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 629 / 600;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 24px;
    overflow: hidden;
    text-align: left;
    background: #1a1a1a;
    transition: box-shadow 0.25s ease;
}

.therapy-location-cards__card:hover,
.therapy-location-cards__card:focus-visible {
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
    outline: none;
}

.therapy-location-cards__card:focus-visible {
    box-shadow: 0 0 0 3px #f25b72, 0 12px 28px rgba(16, 24, 40, 0.18);
}

.therapy-location-cards__card-image-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.therapy-location-cards__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.therapy-location-cards__card:hover .therapy-location-cards__card-image {
    transform: scale(1.04);
}

.therapy-location-cards__card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.4);
}

.therapy-location-cards__card:nth-child(1) .therapy-location-cards__card-overlay {
    background:
        linear-gradient(to bottom, rgba(0, 136, 156, 0) 0%, rgba(0, 136, 156, 0.4) 100%),
        rgba(0, 0, 0, 0.4);
}

.therapy-location-cards__card:nth-child(2) .therapy-location-cards__card-overlay {
    background:
        linear-gradient(to bottom, rgba(5, 156, 0, 0) 0%, rgba(5, 156, 0, 0.4) 100%),
        rgba(0, 0, 0, 0.4);
}

.therapy-location-cards__card-title {
    position: absolute;
    top: auto;
    bottom: 32px;
    left: 32px;
    right: auto;
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 2.0625rem; /* 33px */
    font-weight: 400;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
    .therapy-location-cards__card-title {
        width: auto;
        max-width: calc(100% - 84px);
        max-height: calc(100% - 64px);
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        white-space: normal;
    }
}

.therapy-location-cards__card-cta {
    position: absolute;
    bottom: 24px;
    left: 28px;
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.85;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
    display: none;
}

.therapy-location-cards__card:hover .therapy-location-cards__card-cta {
    opacity: 1;
}

/* ============================================================
   Modal backdrop
   ============================================================ */

.tlc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
    scrollbar-width: none;
}

.tlc-modal::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body.admin-bar .tlc-modal {
    padding-top: 96px;
}

.tlc-modal[hidden] {
    display: none;
}

.tlc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 0;
    cursor: pointer;
}

/* ============================================================
   Modal panel — two-column
   ============================================================ */

.tlc-modal__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 629px minmax(0, 1fr);
    column-gap: 0;
    align-items: start;
    width: 100%;
    max-width: min(1728px, calc(100vw - 96px));
    height: min(1117px, calc(100vh - 96px));
    height: min(1117px, calc(100dvh - 96px));
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    animation: tlcModalIn 0.28s ease forwards;
    box-shadow: 0 30px 80px rgba(16, 24, 40, 0.18);
}

@keyframes tlcModalIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Left — sticky image column */

.tlc-modal__image-col {
    position: relative;
    align-self: stretch;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tlc-modal__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tlc-modal__image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.52);
    pointer-events: none;
}

/* Right — scrollable content column */

.tlc-modal__content-col {
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 96px 40px 96px 140px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tlc-modal__content-col::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.tlc-modal__close {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #f25b72;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
}

.tlc-modal__close svg {
    width: 35px;
    height: 35px;
}

.tlc-modal__close:hover {
    color: #de5066;
    transform: scale(1.04);
}

.tlc-modal__close:focus-visible {
    outline: 3px solid #f25b72;
    outline-offset: 3px;
}

.tlc-modal__title {
    font-family: var(--font-sans);
    font-size: 2.9375rem; /* 47px */
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #4a5565;
    margin: 0 0 24px;
    max-width: 740px;
}

.tlc-modal__intro {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: #101828;
    margin-bottom: 24px;
    max-width: 740px;
}

.tlc-modal__intro p {
    margin: 0 0 27px;
}

.tlc-modal__intro p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Modal accordion
   ============================================================ */

.tlc-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 740px;
}

.tlc-accordion__item {
    border: 2px solid #d1d5dc;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tlc-accordion__item:has(.tlc-accordion__trigger[aria-expanded="true"]) {
    border-color: #d1d5dc;
    box-shadow: none;
}

.tlc-accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: #101828;
    transition: background-color 0.18s ease;
}

.tlc-accordion__trigger:hover {
    background: #fffafb;
}

.tlc-accordion__trigger:focus-visible {
    outline: 2px solid #f25b72;
    outline-offset: -2px;
    border-radius: 22px;
}

.tlc-accordion__trigger[aria-expanded="true"] {
    border-bottom: 2px solid #d1d5dc;
    margin-bottom: -2px;
    background: #fffafb;
}

.tlc-accordion__trigger-text {
    font-family: var(--font-sans);
    font-size: 1.6875rem; /* 27px */
    font-weight: 400;
    color: #101828;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.tlc-accordion__icon {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 36px;
    height: 36px;
    padding: 8px 8px 0;
    border-radius: 50%;
    background: #fff4f6;
    color: #4a5565;
    transition: background 0.18s ease, color 0.18s ease;
}

.tlc-accordion__icon svg {
    width: 20px;
    height: 20px;
    overflow: visible;
}

.tlc-accordion__icon-line {
    transition: opacity 0.18s ease;
}

.tlc-accordion__trigger[aria-expanded="true"] .tlc-accordion__icon {
    background: #fff4f6;
    color: #4a5565;
}

.tlc-accordion__trigger[aria-expanded="true"] .tlc-accordion__icon-line--vertical {
    opacity: 0;
}

.tlc-accordion__panel {
    padding: 0 32px;
    overflow: hidden;
}

.tlc-accordion__panel[hidden] {
    display: none;
}

.tlc-accordion__panel-inner {
    padding: 20px 0 32px;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: #101828;
}

.tlc-accordion__panel-inner p {
    margin: 0 0 12px;
}

.tlc-accordion__panel-inner p:last-child {
    margin-bottom: 0;
}

.tlc-accordion__panel-inner h4 {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    font-weight: 700;
    color: #101828;
    margin: 16px 0 6px;
}

.tlc-accordion__panel-inner h5 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: #101828;
    margin: 12px 0 4px;
}

.tlc-accordion__panel-inner ul,
.tlc-accordion__panel-inner ol {
    margin: 0 0 12px;
    padding-left: 1.4em;
}

/* ============================================================
   Responsive — tablet / mobile adjustments
   ============================================================ */

@media (max-width: 1280px) {
    /* Sheet slides up from bottom edge */
    .tlc-modal {
        align-items: flex-end;
        padding: 0;
        overflow: hidden;
    }

    .tlc-modal__panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 96dvh;
        border-radius: 20px 20px 0 0;
        overflow: hidden;
        box-shadow: 0 18px 44px rgba(16, 24, 40, 0.18);
    }

    /* Image pinned at top — never shrinks */
    .tlc-modal__image-col {
        position: relative;
        flex: 0 0 240px;
        max-width: 100%;
        width: 100%;
        height: 240px;
        align-self: auto;
    }

    /* Content column fills remaining height and scrolls */
    .tlc-modal__content-col {
        flex: 1;
        min-height: 0;
        max-width: none;
        padding: 28px 24px 40px;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Close button anchored to panel for consistent visibility on tablet */
    .tlc-modal__close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 3;
        width: 35px;
        height: 35px;
        padding: 0;
        color: #f25b72;
    }

    .tlc-modal__close svg {
        width: 35px;
        height: 35px;
    }

    .tlc-modal.tlc-modal--scrolled .tlc-modal__close {
        position: fixed;
        top: calc(var(--tlc-close-top-offset, 0px) + 16px);
        right: 16px;
        z-index: 1001;
    }
}

@media (max-width: 767px) {
    .therapy-location-cards {
        padding: 64px 0;
    }

    .therapy-location-cards__inner {
        width: min(100%, calc(100% - 32px));
        gap: 32px;
    }

    .therapy-location-cards__butterfly {
        display: none;
    }

    .therapy-location-cards__header {
        gap: 16px;
    }

    .therapy-location-cards__title {
        font-size: clamp(2rem, 9vw, 2.5rem);
    }

    .therapy-location-cards__body {
        font-size: 1.0625rem;
    }

    .therapy-location-cards__card-title {
        font-size: 1.5rem;
        top: auto;
        bottom: 24px;
        left: 20px;
        right: 20px;
        max-width: none;
        max-height: none;
        display: block;
        writing-mode: initial;
        text-orientation: initial;
        white-space: normal;
    }

    .therapy-location-cards__card-cta {
        bottom: 18px;
        left: 20px;
    }

    .tlc-modal {
        align-items: flex-end;
        padding: 24px;
    }

    .tlc-modal__panel {
        max-height: 85dvh;
        height: auto;
        border-radius: 20px 20px 0 0;
    }

    .tlc-modal__image-col {
        flex: 0 0 200px;
        height: 200px;
    }

    .tlc-modal__content-col {
        padding: 20px 16px 40px;
    }

    .tlc-modal.tlc-modal--scrolled .tlc-modal__close {
        right: 12px;
    }

    .tlc-modal__title {
        font-size: clamp(2rem, 9vw, 2.5rem);
    }

    .tlc-accordion__trigger-text {
        font-size: 1.125rem;
    }

    .tlc-accordion__trigger {
        padding: 22px 20px;
    }

    .tlc-accordion__panel {
        padding: 0 20px;
    }
}
