/* Programs page and treatment pillar pages (moved from pages/services.php). */
/* Utilities & Transitions */
.letter-spacing-1 { letter-spacing: 1px; }
.letter-spacing-2 { letter-spacing: 2px; }
.x-small { font-size: 0.7rem; }
.object-fit-cover { object-fit: cover; }
.filter-item { transition: opacity 0.4s ease, transform 0.4s ease; }

.nh-program-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.nh-program-list-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    color: #3f333b;
    text-decoration: none;
    border: 1px solid #f4f4f4;
    border-radius: var(--radius-md, 16px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.nh-program-list-card:hover,
.nh-program-list-card:focus-visible {
    background: #00c896;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(67, 43, 58, 0.16);
    outline: none;
}

.nh-program-list-image {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f2f4f3;
}

.nh-program-list-image::before,
.nh-program-list-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.45s ease;
}

.nh-program-list-image::before {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0.44) 45%, rgba(255, 255, 255, 0) 72%);
    transform: translateX(-55%);
    mix-blend-mode: screen;
}

.nh-program-list-image::after {
    background:
        radial-gradient(circle at 28% 18%, rgba(72, 49, 127, 0.38), transparent 36%),
        linear-gradient(180deg, rgba(0, 200, 150, 0), rgba(0, 200, 150, 0.18));
    box-shadow: inset 0 0 42px rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
}

.nh-program-list-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.55s ease, filter 0.35s ease;
}

.nh-program-list-card:hover .nh-program-list-image::before,
.nh-program-list-card:focus-visible .nh-program-list-image::before {
    opacity: 0.85;
    transform: translateX(55%);
}

.nh-program-list-card:hover .nh-program-list-image::after,
.nh-program-list-card:focus-visible .nh-program-list-image::after {
    opacity: 1;
}

.nh-program-list-card:hover .nh-program-list-image img,
.nh-program-list-card:focus-visible .nh-program-list-image img {
    transform: scale(1.045);
    filter: saturate(1.06) contrast(1.02);
}

.nh-program-list-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 188px;
    padding: 22px 24px 28px;
}

.nh-program-list-category {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 7px 12px;
    background: #48317f;
    border-radius: var(--radius-sm, 10px);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
}

.nh-program-list-card h3 {
    margin: 0 0 10px;
    color: #00c896;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.08rem, 1.25vw, 1.28rem);
    font-weight: 800;
    line-height: 1.2;
    min-height: 2.64em;
    transition: color 0.25s ease;
}

.nh-program-list-card p {
    margin: 0;
    color: #63545e;
    font-size: 0.88rem;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    transition: color 0.25s ease;
}

.nh-program-list-card:hover h3,
.nh-program-list-card:focus-visible h3,
.nh-program-list-card:hover p,
.nh-program-list-card:focus-visible p {
    color: #ffffff;
}

.nh-program-list-action {
    margin-top: auto;
    padding-top: 18px;
    color: #48317f;
    font-size: 0.82rem;
    font-weight: 900;
}

.programs-intro {
    max-width: 100%;
    min-width: 0;
}

.programs-intro-copy {
    max-width: 760px;
    min-width: 0;
}

.programs-intro-copy h2,
.programs-intro-copy p {
    max-width: 100%;
    overflow-wrap: break-word;
}

.program-filter-panel {
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
    max-width: 100%;
}

.program-filter-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
    padding-right: 24px;
    border-right: 1px solid rgba(0, 200, 150, 0.14);
    color: var(--classic-blue);
}

.program-filter-label strong,
.program-filter-label small {
    display: block;
}

.program-filter-label strong {
    font-size: 0.88rem;
    line-height: 1.25;
}

.program-filter-label small {
    margin-top: 2px;
    color: #788580;
    font-size: 0.72rem;
}

.program-filter-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: var(--radius-control, 14px);
    color: #fff;
    background: var(--classic-blue);
}

.program-filter-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* Responsive Alternation */
@media (min-width: 992px) {
    .w-lg-50 { width: 50% !important; }
    .border-start-md { border-left: 1px solid #eee; padding-left: 30px; }
}

@media (max-width: 991px) {
    .border-start-md { border-top: 1px solid #eee; padding-top: 20px; margin-top: 10px; }

    .nh-program-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .program-filter-panel {
        display: block;
        padding: 16px;
        overflow: hidden;
    }

    .program-filter-label {
        min-width: 0;
        margin-bottom: 14px;
        padding: 0 0 14px;
        border-right: 0;
        border-bottom: 1px solid rgba(0, 200, 150, 0.12);
    }

    .program-filter-options {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
        max-width: calc(100vw - 64px);
    }
}

@media (max-width: 575.98px) {
    .programs-intro-copy h2 {
        font-size: clamp(2rem, 11vw, 2.6rem);
        line-height: 1.08;
    }

    .program-filter-panel {
        margin-right: -4px;
        margin-left: -4px;
        padding-right: 4px;
        padding-left: 4px;
    }

    .program-filter-options {
        max-width: calc(100vw - 40px);
    }

    .program-img-wrapper {
        min-height: 230px !important;
    }

    .nh-program-list-grid {
        grid-template-columns: 1fr;
    }

    .card-premium {
        border-radius: var(--radius-md, 16px) !important;
    }
}

/* Premium Filter Buttons */
.filter-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(0, 200, 150, 0.15);
    color: #42534d;
    padding: 9px 14px;
    border-radius: var(--radius-md, 16px);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-btn span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 7px;
    padding: 0 6px;
    border-radius: 999px;
    color: var(--classic-blue);
    background: #edf5f2;
    font-size: 0.68rem;
}

.filter-btn:hover {
    border-color: var(--classic-blue);
    color: var(--classic-blue);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--classic-blue);
    border-color: var(--classic-blue);
    color: #fff;
    box-shadow: 0 7px 18px rgba(0, 200, 150, 0.2);
}

.filter-btn.active span {
    color: var(--classic-blue);
    background: #fff;
}

/* Premium Card Effects */
.card-premium { background: #fff; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.card-premium:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(0,0,0,0.07) !important; }

.program-img-wrapper { position: relative; overflow: hidden; }
.transition-transform { transition: transform 0.8s ease; }
.card-premium:hover .transition-transform { transform: scale(1.06); }

.glass-badge {
    position: absolute; top: 20px; left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 16px; color: var(--classic-blue);
    border-radius: var(--radius-md, 16px); font-size: 0.7rem; font-weight: 800;
    text-transform: uppercase;
}

.btn-link-premium {
    color: var(--accent-pink);
    text-decoration: none; font-weight: 700;
    transition: all 0.3s ease;
}
.btn-link-premium:hover { color: var(--classic-blue); padding-left: 5px; }

.article-mini-card { transition: transform 0.3s ease; cursor: pointer; }
.article-mini-card h6 { color: #212529 !important; }
.article-mini-card:hover { transform: translateX(5px); }

/* ==== Treatment pillars (programs page and pillar pages) ==== */
.nh-pillars { padding: clamp(48px, 6vw, 80px) 0 clamp(24px, 3vw, 40px); }
.nh-pillars-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.nh-pillars-head h2 { margin: 0 0 12px; color: var(--hl-ink, #15122b); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; }
.nh-pillars-head p { margin: 0; color: var(--hl-muted, #6f7378); line-height: 1.7; }
.nh-pillar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.nh-pillar-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 28px 28px;
    border: 1px solid #e3e6eb;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.nh-pillar-card:hover,
.nh-pillar-card:focus-visible { border-color: var(--hl-green, #00c896); box-shadow: 0 18px 40px rgba(21, 18, 43, .1); transform: translateY(-4px); }
.nh-pillar-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.nh-pillar-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--hl-purple, #48317f); color: #fff; font-size: 1.4rem; }
.nh-pillar-count { padding: 6px 12px; border-radius: 999px; background: rgba(0, 200, 150, .12); color: var(--hl-green-text, #008f6b); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.nh-pillar-card h3 { margin: 0 0 10px; color: var(--hl-ink, #15122b); font-size: 1.35rem; font-weight: 800; }
.nh-pillar-card p { margin: 0 0 22px; color: var(--hl-muted, #6f7378); font-size: .95rem; line-height: 1.65; }
.nh-pillar-link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--hl-green-text, #008f6b); font-weight: 700; }
.nh-pillar-link i { transition: transform .2s; }
.nh-pillar-card:hover .nh-pillar-link i { transform: translateX(4px); }

.nh-pillar-page { padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
/* Main column (intro, then programs) with the admissions card in a sticky sidebar. */
.nh-pillar-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    grid-template-areas: "intro aside" "programs aside";
    column-gap: clamp(28px, 4vw, 48px);
    align-items: start;
}
.nh-pillar-intro { grid-area: intro; margin-bottom: clamp(28px, 4vw, 40px); }
.nh-pillar-programs { grid-area: programs; }
.nh-pillar-programs .nh-program-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.nh-pillar-aside { grid-area: aside; align-self: start; }
.nh-pillar-aside { position: sticky; top: 110px; }
.nh-pillar-intro p { color: #4a4560; font-size: 1.05rem; line-height: 1.75; }
.nh-pillar-side { padding: 28px; border-radius: 12px; background: var(--hl-purple, #48317f); color: #fff; }
.nh-pillar-side h2 { margin: 0 0 10px; color: #fff; font-size: 1.3rem; font-weight: 800; }
.nh-pillar-side p { margin: 0 0 20px; color: rgba(255, 255, 255, .85); font-size: .95rem; line-height: 1.6; }
.nh-pillar-side .nh-btn { width: 100%; }
.nh-pillar-side-call { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: #fff; font-weight: 700; text-decoration: none; }
.nh-pillar-side-call:hover { color: var(--hl-green, #00c896); }
.nh-pillar-section-title { margin: 0 0 24px; color: var(--hl-ink, #15122b); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; }
.nh-pillar-others { margin-top: clamp(48px, 6vw, 72px); }

@media (max-width: 991.98px) {
    .nh-pillar-grid { grid-template-columns: 1fr; }
    .nh-pillar-layout { grid-template-columns: 1fr; grid-template-areas: "intro" "aside" "programs"; }
    .nh-pillar-aside { margin-bottom: 36px; }
    .nh-pillar-aside { position: static; }
}
@media (max-width: 575.98px) {
    .nh-pillar-programs .nh-program-list-grid { grid-template-columns: 1fr; }
}

/* Compact "Other treatment areas" list under the admissions card. */
.nh-pillar-areas { margin-top: 16px; padding: 20px; border: 1px solid #e3e6eb; border-radius: 12px; background: #fff; }
.nh-pillar-areas h2 { margin: 0 0 12px; color: var(--hl-ink, #15122b); font-size: 1rem; font-weight: 800; }
.nh-pillar-areas ul { margin: 0; padding: 0; list-style: none; }
.nh-pillar-areas li + li { border-top: 1px solid #eef0f2; }
.nh-pillar-areas a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--hl-ink, #15122b); font-weight: 700; font-size: .95rem; text-decoration: none; }
.nh-pillar-areas a:hover .nh-pillar-areas-name,
.nh-pillar-areas a:focus-visible .nh-pillar-areas-name { color: var(--hl-green-text, #008f6b); }
.nh-pillar-areas-icon { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--hl-purple, #48317f); color: #fff; font-size: .85rem; }
.nh-pillar-areas-name { flex: 1 1 auto; transition: color .2s; }
.nh-pillar-areas-count { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; background: rgba(0, 200, 150, .12); color: var(--hl-green-text, #008f6b); font-size: .72rem; font-weight: 700; }
.nh-pillar-areas-arrow { color: var(--hl-green-text, #008f6b); font-size: .85rem; }

.filter-item[hidden] { display: none !important; }
