/*
Theme Name: Mungo Therapy Locator
Theme URI: https://therapylocator.co.uk/
Author: Kojo Danso / ChatGPT
Description: TherapyLocator-focused child theme for Mungo Base. Adds TherapyLocator brand styling, homepage shortcode normalisation, mobile directory endpoint containment, title cleanup, shortcode-page polish, carousel containment, a clean custom footer, no-Kadence homepage shortcode/template, page-title suppression, stronger homepage card/icon normalisation, and mobile-safe featured listing grids, and server-rebuilt clean featured cards.
Version: 0.2.6
Template: mungo-base
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mungo-therapy-locator
*/

:root {
    --mungo-color-primary: #0f5b33;
    --mungo-color-primary-contrast: #ffffff;
    --mungo-color-link: #064e2b;
    --mungo-color-text: #101827;
    --mungo-color-muted: #4b5563;
    --mungo-color-surface: #f8fafc;
    --mungo-color-border: #e7e9ee;
    --mungo-color-accent: #df8a00;
    --mungo-color-accent-soft: #fff5e4;
    --mungo-radius-sm: 0.65rem;
    --mungo-radius-md: 1rem;
    --mungo-radius-lg: 1.35rem;
    --mungo-container: 1320px;
    --mungo-container-wide: 1560px;
    --mungo-shadow-soft: 0 14px 35px rgba(16, 24, 39, 0.06);
}

html,
body {
    overflow-x: hidden;
}

body {
    background: #ffffff;
    color: var(--mungo-color-text);
}

body,
button,
input,
select,
textarea {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header polish */
.site-header {
    background: rgba(255, 255, 255, 0.98);
}

.site-header__inner {
    min-height: 82px;
}

.custom-logo-link img {
    max-height: 54px;
}

.primary-menu {
    gap: clamp(0.25rem, 1vw, 1.2rem);
}

.primary-menu a {
    padding: 0.65rem 0.95rem;
    color: #111827;
    font-size: clamp(1rem, 0.9rem + 0.35vw, 1.25rem);
    font-weight: 800;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    background: #f5f8f7;
    color: var(--mungo-color-primary);
}

/* Shortcode-heavy page handling. The plugin owns the layout; the theme gives it sensible boundaries. */
.home .site-main,
.front-page .site-main,
.mungo-shortcode-main {
    padding-top: clamp(2.75rem, 5vw, 5rem);
    padding-bottom: 0;
}

.home .entry-content > *,
.mungo-shortcode-content > * {
    width: min(calc(100% - 4rem), var(--mungo-container-wide));
    max-width: var(--mungo-container-wide);
    margin-left: auto;
    margin-right: auto;
}

.home .entry-content > .alignfull,
.mungo-shortcode-content > .alignfull {
    width: 100%;
    max-width: none;
}

.home .entry-content > * + *,
.mungo-shortcode-content > * + * {
    margin-top: clamp(1.25rem, 2vw, 2rem);
}

.home .entry-content h1,
.mungo-shortcode-content h1 {
    font-size: clamp(2.3rem, 4.4vw, 3.8rem);
    letter-spacing: -0.04em;
}

.home .entry-content h2,
.mungo-shortcode-content h2,
.home .entry-content .wp-block-heading,
.mungo-shortcode-content .wp-block-heading {
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    letter-spacing: -0.035em;
}

.home .entry-content h3,
.mungo-shortcode-content h3 {
    font-size: clamp(1.25rem, 1.6vw, 1.7rem);
}

/* Make plugin/card sections feel centred rather than stretched on very wide screens. */
.home .entry-content :where(section, .wp-block-group, [class*="section"], [class*="grid"], [class*="cards"], [class*="directory"], [class*="therapy"], [class*="therapist"], [class*="locator"], [class*="tl-"]) {
    max-width: 100%;
}

.home .entry-content :where(.wp-block-group, section, [class*="section"]):has(> h2),
.mungo-shortcode-content :where(.wp-block-group, section, [class*="section"]):has(> h2) {
    border-radius: 1.45rem;
}

/* Search panel controls */
.home .entry-content select,
.home .entry-content input[type="text"],
.home .entry-content input[type="search"],
.home .entry-content input[type="email"],
.home .entry-content input[type="url"],
.mungo-shortcode-content select,
.mungo-shortcode-content input[type="text"],
.mungo-shortcode-content input[type="search"],
.mungo-shortcode-content input[type="email"],
.mungo-shortcode-content input[type="url"] {
    min-width: 0;
    border-color: #dfe4ea;
    border-radius: 0.9rem;
    color: #111827;
}

.home .entry-content button,
.home .entry-content input[type="submit"],
.home .entry-content .button,
.home .entry-content .wp-block-button__link,
.mungo-shortcode-content button,
.mungo-shortcode-content input[type="submit"],
.mungo-shortcode-content .button,
.mungo-shortcode-content .wp-block-button__link {
    background: var(--mungo-color-accent);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 800;
    min-height: 48px;
}

.home .entry-content button:hover,
.home .entry-content input[type="submit"]:hover,
.mungo-shortcode-content button:hover,
.mungo-shortcode-content input[type="submit"]:hover {
    background: #c97900;
}

/* Featured slider/carousel containment. Prevents the first and last cards being visibly sliced by the page. */
.home .entry-content :where([class*="carousel"], [class*="slider"], [class*="swiper"], [class*="slick"], [class*="featured"]),
.mungo-shortcode-content :where([class*="carousel"], [class*="slider"], [class*="swiper"], [class*="slick"], [class*="featured"]) {
    max-width: 100%;
}

.home .entry-content :where([class*="carousel"], [class*="slider"], .swiper, .slick-list),
.mungo-shortcode-content :where([class*="carousel"], [class*="slider"], .swiper, .slick-list) {
    overflow: hidden;
}

.home .entry-content :where(.swiper-wrapper, .slick-track),
.mungo-shortcode-content :where(.swiper-wrapper, .slick-track) {
    align-items: stretch;
}

.home .entry-content :where(.swiper-slide, .slick-slide),
.mungo-shortcode-content :where(.swiper-slide, .slick-slide) {
    height: auto;
}

/* Directory cards: keep them elegant and stop long names from causing uneven cards. */
.home .entry-content :where(article, li, div)[class*="card"],
.home .entry-content :where(article, li, div)[class*="listing"],
.home .entry-content :where(article, li, div)[class*="therapist"],
.mungo-shortcode-content :where(article, li, div)[class*="card"],
.mungo-shortcode-content :where(article, li, div)[class*="listing"],
.mungo-shortcode-content :where(article, li, div)[class*="therapist"] {
    min-width: 0;
}

.home .entry-content :where(article, li, div)[class*="card"] img,
.home .entry-content :where(article, li, div)[class*="listing"] img,
.home .entry-content :where(article, li, div)[class*="therapist"] img,
.mungo-shortcode-content :where(article, li, div)[class*="card"] img,
.mungo-shortcode-content :where(article, li, div)[class*="listing"] img,
.mungo-shortcode-content :where(article, li, div)[class*="therapist"] img {
    object-fit: cover;
}

.home .entry-content :where(article, li, div)[class*="card"] a,
.home .entry-content :where(article, li, div)[class*="listing"] a,
.home .entry-content :where(article, li, div)[class*="therapist"] a,
.mungo-shortcode-content :where(article, li, div)[class*="card"] a,
.mungo-shortcode-content :where(article, li, div)[class*="listing"] a,
.mungo-shortcode-content :where(article, li, div)[class*="therapist"] a {
    overflow-wrap: anywhere;
}

/* Reduce accidental giant headings from imported block layouts. */
.home .entry-content > h1,
.home .entry-content > h2,
.home .entry-content > h3,
.mungo-shortcode-content > h1,
.mungo-shortcode-content > h2,
.mungo-shortcode-content > h3 {
    margin-bottom: 0.8rem;
}

/* Logged-in front-end edit link: keep it available but stop it looking like part of the public design. */
.home .entry-footer .edit-link {
    display: inline-block;
    width: min(calc(100% - 4rem), var(--mungo-container-wide));
    margin: 1rem auto 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Custom TherapyLocator footer */
.tl-site-footer {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    background: #101827;
    color: #d7dde8;
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 1.5rem;
}

.tl-site-footer a {
    color: #ffffff;
    text-decoration: none;
}

.tl-site-footer a:hover,
.tl-site-footer a:focus {
    color: #ffb44d;
}

.tl-site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(260px, 0.85fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: stretch;
}

.tl-site-footer__panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 2.5vw, 1.8rem);
    background: rgba(255, 255, 255, 0.018);
}

.tl-site-footer__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    min-height: 180px;
    text-align: center;
}

.tl-site-footer__logo-text {
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
    color: #12345a;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 1;
}

.tl-site-footer__logo-text span {
    color: #ff8a00;
}

.tl-site-footer__tagline {
    margin: 0;
    color: #aeb8c8;
    font-size: 1rem;
}

.tl-site-footer__heading {
    margin: 0 0 0.9rem;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 850;
}

.tl-site-footer__disclaimer {
    margin: 0;
    color: #d7dde8;
    font-size: clamp(1rem, 0.95rem + 0.15vw, 1.08rem);
    line-height: 1.65;
}

.tl-site-footer__links {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1rem;
    color: #ffffff;
    font-size: 0.95rem;
}

.tl-site-footer__bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8rem 1.4rem;
}

@media (max-width: 1100px) {
    :root {
        --mungo-container-wide: 1180px;
    }

    .home .entry-content > *,
    .mungo-shortcode-content > * {
        width: min(calc(100% - 2rem), var(--mungo-container-wide));
    }

    .tl-site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .tl-site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .site-header__inner {
        min-height: 72px;
    }

    .custom-logo-link img {
        max-height: 44px;
    }

    .primary-menu a {
        font-size: 1rem;
    }
}

@media (max-width: 720px) {
    .home .site-main,
    .front-page .site-main,
    .mungo-shortcode-main {
        padding-top: 2rem;
    }

    .home .entry-content > *,
    .mungo-shortcode-content > * {
        width: min(calc(100% - 1.25rem), var(--mungo-container-wide));
    }

    .home .entry-content h1,
    .mungo-shortcode-content h1 {
        font-size: clamp(2rem, 10vw, 2.7rem);
    }

    .home .entry-content h2,
    .mungo-shortcode-content h2,
    .home .entry-content .wp-block-heading,
    .mungo-shortcode-content .wp-block-heading {
        font-size: clamp(1.35rem, 7vw, 1.8rem);
    }

    .home .entry-content :where([class*="grid"], [class*="cards"]) {
        gap: 0.85rem;
    }

    .tl-site-footer__grid {
        grid-template-columns: 1fr;
    }

    .tl-site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .tl-site-footer__bottom-links {
        justify-content: flex-start;
    }
}

/* v0.2.2: restore Browse by city and Latest blog posts to the clean homepage. */
.tl-latest-posts,
.tl-latest-posts * {
    box-sizing: border-box;
}

.tl-latest-posts__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tl-latest-posts__head .tl-clean-eyebrow {
    margin-bottom: 0.35rem;
}

.tl-latest-posts__all,
.tl-latest-post-card__link {
    color: var(--mungo-color-primary);
    font-weight: 800;
    text-underline-offset: 0.18em;
}

.tl-latest-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tl-latest-post-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--mungo-color-border);
    border-radius: 1.15rem;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(16, 24, 39, 0.045);
}

.tl-latest-post-card__image {
    display: block;
    overflow: hidden;
    background: var(--mungo-color-surface);
}

.tl-latest-post-card__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.tl-latest-post-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.1rem;
}

.tl-latest-post-card__date,
.tl-latest-post-card__title,
.tl-latest-post-card__excerpt {
    margin: 0;
}

.tl-latest-post-card__date {
    color: var(--mungo-color-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.tl-latest-post-card__title {
    color: var(--mungo-color-primary);
    font-size: clamp(1.08rem, 1.4vw, 1.32rem);
    line-height: 1.2;
}

.tl-latest-post-card__title a {
    color: inherit;
    text-decoration: none;
}

.tl-latest-post-card__excerpt {
    color: #374151;
    line-height: 1.55;
}

.tl-latest-post-card__link {
    margin-top: auto;
}

@media (max-width: 900px) {
    .tl-latest-posts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .tl-latest-posts__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tl-latest-posts__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .home .entry-content select,
    .home .entry-content input,
    .mungo-shortcode-content select,
    .mungo-shortcode-content input {
        min-height: 50px;
    }

    .tl-site-footer__panel {
        padding: 1.15rem;
    }

    .tl-site-footer__logo-text {
        font-size: 2.25rem;
    }
}

/* v0.1.2: calmer taxonomy/archive pages and tighter directory sections */
body.archive .mungo-breadcrumbs-wrap,
body.tax .mungo-breadcrumbs-wrap {
    margin-top: 1rem;
}

.tl-archive-main {
    padding-top: clamp(1.8rem, 3vw, 3rem);
    padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.tl-archive-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
    padding: clamp(1.4rem, 3.5vw, 2.25rem);
    background: linear-gradient(135deg, #ffffff 0%, #fff8ef 100%);
    border: 1px solid var(--mungo-color-border);
    border-radius: 1.45rem;
    box-shadow: var(--mungo-shadow-soft);
}

.tl-archive-kicker {
    margin: 0 0 0.4rem;
    color: var(--mungo-color-primary);
    font-size: 0.9rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* v0.2.4: restrained colour and clearer white-background image boundaries. */
body {
    background:
        linear-gradient(180deg, #ffffff 0, #ffffff 30rem, #f8fbf9 100%);
}

.site-header {
    border-bottom: 1px solid #d8e6dd;
    box-shadow: 0 7px 24px rgba(15, 91, 51, 0.055);
}

.site-main :where(h1, h2, .entry-title, .page-title) {
    color: #123f29;
}

.site-main :where(a:not(.button):not(.wp-block-button__link):not(.gdir-btn)) {
    text-decoration-color: rgba(223, 138, 0, 0.48);
    text-underline-offset: 0.16em;
}

.gdir-box,
.gdir-card,
.tl-featured-rebuilt-card,
.tl-latest-post-card {
    border-color: #d6e4dc !important;
    background: linear-gradient(180deg, #ffffff 0%, #fcfefc 100%);
    box-shadow: 0 13px 32px rgba(15, 91, 51, 0.075);
}

.gdir-card-loc,
.tl-featured-rebuilt-card__location {
    color: #0f5b33;
}

.gdir-meta,
.gdir-faq,
.tl-clean-faq details {
    border-color: #dce8e1 !important;
    background: #f6faf7;
}

/*
 * Minimalist images often have white edges. The border defines the exact end
 * of the artwork, while the directional shadow separates its lower edge from
 * the white card or single-listing panel beneath it.
 */
.gdir-card-img,
.gdir-hero-img,
.tl-featured-rebuilt-card__image,
.tl-latest-post-card__image,
.tl-archive-card__image,
.post-thumbnail {
    position: relative;
    background: #f4f8f5;
    border-bottom: 1px solid rgba(15, 91, 51, 0.24) !important;
    box-shadow:
        0 13px 18px -16px rgba(15, 61, 39, 0.92),
        0 5px 8px -7px rgba(15, 91, 51, 0.46);
}

.gdir-card-img img,
.gdir-hero-img img,
.tl-featured-rebuilt-card__image img,
.tl-latest-post-card__image img,
.tl-archive-card__image img,
.post-thumbnail img {
    display: block;
}

.gdir-hero-img {
    margin-bottom: 1.45rem;
    border: 1px solid #d6e4dc !important;
    box-shadow:
        0 18px 26px -21px rgba(15, 61, 39, 0.9),
        0 7px 12px -10px rgba(15, 91, 51, 0.5);
}

.gdir-card:hover,
.tl-featured-rebuilt-card:hover,
.tl-latest-post-card:hover {
    border-color: #b9d2c3 !important;
    box-shadow: 0 17px 38px rgba(15, 91, 51, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
    .gdir-card,
    .tl-featured-rebuilt-card,
    .tl-latest-post-card {
        transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    }

    .gdir-card:hover,
    .tl-featured-rebuilt-card:hover,
    .tl-latest-post-card:hover {
        transform: translateY(-2px);
    }
}

/* v0.2.5: boxed homepage, image-led hero and controlled card grids. */
.home .site-main,
.front-page .site-main {
    padding: clamp(1rem, 2.5vw, 2.5rem) clamp(0.75rem, 2vw, 1.5rem) clamp(3rem, 6vw, 6rem);
    background: #f4f8f5;
}

.home .entry-content,
.front-page .entry-content,
.home .entry-content > .tl-homepage-clean,
.front-page .entry-content > .tl-homepage-clean,
.tl-homepage-clean {
    width: 100% !important;
    max-width: 1360px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.tl-homepage-clean,
.tl-homepage-clean * {
    box-sizing: border-box;
}

.tl-homepage-clean {
    display: grid;
    gap: clamp(1.1rem, 2vw, 1.75rem);
}

.tl-clean-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    min-height: clamp(390px, 38vw, 540px);
    overflow: hidden;
    border: 1px solid #cfe0d5;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #eaf4ed 0%, #fff9ef 100%);
    box-shadow: 0 24px 60px rgba(15, 91, 51, 0.13);
}

.tl-clean-hero__copy {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 5rem);
}

.tl-clean-eyebrow {
    margin: 0 0 0.8rem;
    color: #b66d00;
    font-size: 0.85rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tl-clean-hero h1 {
    max-width: 720px;
    margin: 0;
    color: #103d28;
    font-size: clamp(2.35rem, 4.7vw, 4.85rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.tl-clean-hero__copy > p:not(.tl-clean-eyebrow) {
    max-width: 620px;
    margin: 1.2rem 0 0;
    color: #365444;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.6;
}

.tl-clean-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.65rem;
}

.tl-clean-hero__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 0.75rem 1.15rem;
    font-weight: 850;
    text-decoration: none !important;
}

.tl-clean-hero__primary {
    background: #0f5b33;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 91, 51, 0.2);
}

.tl-clean-hero__secondary {
    border: 1px solid #b9d1c2;
    background: rgba(255, 255, 255, 0.82);
    color: #0f5b33 !important;
}

.tl-clean-hero__image {
    min-height: 100%;
    overflow: hidden;
    background: #dfeae2;
}

.tl-clean-hero__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}

.tl-clean-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border: 1px solid #d8e5dd;
    border-radius: 1.45rem;
    padding: clamp(1.15rem, 2.8vw, 2rem);
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 91, 51, 0.07);
}

.tl-clean-search {
    position: relative;
    z-index: 2;
    margin-top: clamp(-2.4rem, -3vw, -1.25rem) !important;
    border-top: 4px solid #df8a00;
}

.tl-clean-section__head {
    margin-bottom: 1.2rem;
}

.tl-clean-section__head h2,
.tl-clean-section > h2 {
    margin-top: 0;
}

.tl-featured-rebuilt-grid,
.tl-latest-posts__grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(1rem, 2vw, 1.35rem) !important;
    width: 100% !important;
    transform: none !important;
}

.tl-featured-rebuilt-card,
.tl-latest-post-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: hidden;
    border: 1px solid #d6e4dc;
    border-radius: 1.2rem;
    background: #ffffff;
}

.tl-featured-rebuilt-card__image,
.tl-latest-post-card__image {
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.tl-featured-rebuilt-card__image img,
.tl-latest-post-card__image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover;
}

.tl-featured-rebuilt-card__body,
.tl-latest-post-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.7rem;
    padding: clamp(1rem, 2vw, 1.25rem) !important;
}

.tl-featured-rebuilt-card__location,
.tl-featured-rebuilt-card__title,
.tl-featured-rebuilt-card__excerpt {
    margin: 0;
}

.tl-featured-rebuilt-card__title {
    font-size: clamp(1.12rem, 1.5vw, 1.42rem);
    line-height: 1.2;
}

.tl-featured-rebuilt-card__title a {
    color: #0f5b33;
}

.tl-featured-rebuilt-card__excerpt {
    color: #405348;
    line-height: 1.55;
}

.tl-featured-rebuilt-card__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.45rem;
}

.tl-featured-rebuilt-card__view,
.tl-featured-rebuilt-card__claim {
    border-radius: 999px;
    padding: 0.62rem 0.95rem;
    font-weight: 800;
    text-decoration: none !important;
}

.tl-featured-rebuilt-card__view {
    background: #df8a00;
    color: #ffffff !important;
}

.tl-featured-rebuilt-card__claim {
    border: 1px solid #d5a75c;
    background: #fff8ec;
    color: #8b5300 !important;
}

.tl-clean-therapy-types,
.tl-clean-trust,
.tl-clean-blog {
    background: #ffffff;
}

.tl-clean-support,
.tl-clean-faq {
    background: #f7fbf8;
}

.tl-clean-cities {
    border-color: #ecd09e;
    background: #fff8ea;
}

@media (max-width: 980px) {
    .tl-clean-hero {
        grid-template-columns: 1fr;
    }

    .tl-clean-hero__image {
        min-height: 320px;
        max-height: 440px;
        order: -1;
    }

    .tl-clean-hero__copy {
        padding: clamp(1.6rem, 5vw, 3.25rem);
    }

    .tl-featured-rebuilt-grid,
    .tl-latest-posts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .home .site-main,
    .front-page .site-main {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .tl-clean-hero {
        min-height: 0;
        border-radius: 1.25rem;
    }

    .tl-clean-hero__image {
        min-height: 230px;
    }

    .tl-clean-hero h1 {
        font-size: clamp(2.15rem, 12vw, 3.35rem);
    }

    .tl-clean-hero__actions,
    .tl-clean-hero__actions a {
        width: 100%;
    }

    .tl-clean-search {
        margin-top: -0.4rem !important;
    }

    .tl-clean-section {
        border-radius: 1.1rem;
        padding: 1rem;
    }

    .tl-featured-rebuilt-grid,
    .tl-latest-posts__grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* v0.2.6: trust image and icon-heading alignment. */
.tl-clean-trust__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(310px, 0.82fr);
    align-items: stretch;
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.tl-clean-trust__content {
    min-width: 0;
}

.tl-clean-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 1.8vw, 1.2rem);
}

.tl-clean-trust-card {
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.45rem;
    min-width: 0;
    border: 1px solid #dce8e1;
    border-radius: 1rem;
    padding: 1rem;
    background: #ffffff;
}

.tl-clean-trust-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: 1;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
    background: #e6f2ea;
    color: #0f5b33;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.tl-clean-trust-card > h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    color: #123f29;
    font-size: clamp(1.05rem, 1.4vw, 1.28rem);
    line-height: 1.2;
}

.tl-clean-trust-card > p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    color: #405348;
    line-height: 1.55;
}

.tl-clean-trust__image {
    min-height: 100%;
    overflow: hidden;
    border: 1px solid #cfe0d5;
    border-radius: 1.25rem;
    background: #e8f0ea;
    box-shadow: 0 16px 36px rgba(15, 91, 51, 0.12);
}

.tl-clean-trust__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 1050px) {
    .tl-clean-trust__layout {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    }

    .tl-clean-trust-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .tl-clean-trust__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .tl-clean-trust__image {
        min-height: 320px;
        max-height: 520px;
    }

    .tl-clean-trust__image img {
        object-position: center 35%;
    }
}

@media (max-width: 480px) {
    .tl-clean-trust-card {
        grid-template-columns: 2.4rem minmax(0, 1fr);
        column-gap: 0.65rem;
        padding: 0.85rem;
    }

    .tl-clean-trust-card > span {
        width: 2.4rem;
        height: 2.4rem;
    }

    .tl-clean-trust__image {
        min-height: 280px;
    }
}
