/* Bootstrap 5 integration overrides for the locally restored Take My Hand theme. */
body.tmh-content.site-themed {
    --tmh-ink: var(--bs-emphasis-color);
    --tmh-link: var(--bs-link-color);
    color: var(--tmh-ink);
    background: var(--bs-body-bg) var(--tmh-page-art, none) no-repeat center 90px / contain;
    font-family: var(--bs-body-font-family) !important; /* Overrides the imported body font. */
    line-height: 1.75;
}

html[data-site-theme="tmh"][data-bs-theme="light"] .tmh-content {
    --tmh-page-art: url('../assets/img/gold-bg.jpg');
}

html[data-site-theme="lavender"][data-bs-theme="light"] body.tmh-content.tmh-original-home {
    background:
        radial-gradient(circle at 85% 10%, rgb(217 211 230 / .58), transparent 32rem),
        linear-gradient(135deg, #f8f6fb 0%, #f2eff8 55%, #ece7f3 100%);
}

html[data-site-theme="lavender"][data-bs-theme="dark"] body.tmh-content.tmh-original-home {
    background:
        radial-gradient(circle at 85% 10%, rgb(80 74 94 / .55), transparent 32rem),
        linear-gradient(135deg, #2d2937 0%, #272431 55%, #211f2a 100%);
}

html[data-site-theme="lavender"] body.tmh-content.tmh-original-home .tmh-legacy .hero-container {
    padding-inline: clamp(1rem, 3vw, 3rem);
    background-color: var(--tmh-home-surface);
    border: 1px solid var(--tmh-home-border);
    border-radius: 1.5rem;
    box-shadow: 0 1rem 2.5rem rgb(47 43 58 / .1);
}

html[data-site-theme="lavender"] body.tmh-content.tmh-original-home .tmh-legacy .hero-container::before {
    content: none;
    background-color: var(--tmh-home-surface);
}

html[data-site-theme="lavender"][data-bs-theme="dark"] body.tmh-content.tmh-original-home .tmh-legacy .hero-container {
    box-shadow: 0 1rem 2.5rem rgb(0 0 0 / .32);
}

html[data-site-theme="lavender"] body.tmh-content.tmh-original-home .tmh-legacy
    :is(.how-it-works, .notice-p, .carousel-card, .yellow-container, .testimonial-container) {
    border: 1px solid var(--tmh-home-border);
    box-shadow: 0 .5rem 1.5rem rgb(47 43 58 / .06);
}

html[data-site-theme="lavender"][data-bs-theme="dark"] body.tmh-content.tmh-original-home .tmh-legacy
    :is(.how-it-works, .notice-p, .carousel-card, .yellow-container, .testimonial-container) {
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .2);
}

.tmh-content :is(h1, h2, h3, h4, h5, h6) {
    color: var(--tmh-ink);
    font-weight: 800;
    letter-spacing: -.02em;
}

.tmh-content .tmh-hero h1 {
    font-size: clamp(2rem, 4vw, 3.75rem);
}

.tmh-content a:not(.btn) {
    color: var(--tmh-link);
    text-underline-offset: .2em;
}

html[data-site-theme="lavender"] .tmh-content main :is(p, li, dd, blockquote) a:not(.btn) {
    text-decoration-line: underline;
    text-decoration-thickness: .08em;
}

.tmh-content .tmh-brand {
    display: block;
    width: auto;
    max-height: 63px;
    max-width: 100%;
    height: auto;
}

.tmh-content .tmh-hero {
    padding-block: clamp(2rem, 5vw, 4rem);
}

.tmh-content .card {
    border-radius: 1.25rem;
    overflow: hidden;
}

.tmh-content .btn-primary {
    border-radius: 2rem;
    padding-inline: 1.5rem;
}

.tmh-content img {
    max-width: 100%;
}

.tmh-landing { overflow: clip; }
.tmh-legacy { display: flow-root; }
.tmh-legacy :is(a, button, input, summary):focus-visible { outline: 3px solid var(--tmh-link); outline-offset: 3px; }
.tmh-legacy .row > * { position: relative; } /* Former Bootstrap 4 positioning for section artwork. */
.tmh-legacy .container { max-width: min(1260px, 100%); }
.tmh-legacy .hero-text h1 {
    width: 100%; height: auto; padding: 0;
    font-size: clamp(2.5rem, 4.5vw, 4rem); line-height: 1.15;
}
.tmh-legacy .hero-text h1 :is(.mobile-to, .uplift-text, .you-text) {
    position: static; display: inline; margin: 0;
}
.tmh-legacy .hero-text h1 .mobile-to::before { content: ''; display: block; }
.tmh-legacy .hero-container .carousel { margin-top: 0 !important; }
.tmh-legacy .hero-container .carousel-indicators { left: 0; bottom: -2.75rem; }
/* Adapt known imported sections without rewriting the CMS's stored HTML. */
.tmh-content .tmh-legacy :is(.how-it-works, .notice-p, .carousel-card) {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
.tmh-content .tmh-legacy :is(.yellow-container, .testimonial-container, .hw-n) {
    background-color: var(--tmh-gold, var(--bs-warning-bg-subtle));
    color: var(--bs-body-color);
}
.tmh-content .tmh-legacy .hw-n { border-color: var(--bs-body-bg); }
.tmh-content .tmh-legacy .hw-2 .hw-n { background-color: var(--tmh-coral, var(--bs-primary-bg-subtle)); }
.tmh-content .tmh-legacy .hw-3 .hw-n { background-color: var(--bs-info-bg-subtle); }
.tmh-content .tmh-legacy .how-it-works-container,
.tmh-content .tmh-legacy .how-it-works-container::before { background-color: var(--bs-body-bg); }
.tmh-content .tmh-legacy :is(.heading-text, p.intro, .we-offer, .you-text, .carousel-card p) { color: var(--bs-body-color); }
.tmh-content .tmh-legacy :is(.uplift-text, .benefits-list li) { color: var(--bs-link-color); }
.tmh-content .tmh-legacy .carousel-item { color: var(--bs-link-color) !important; }
.tmh-site-footer { margin-top: 3rem; background: var(--tmh-footer-bg, var(--bs-tertiary-bg)); border-top: 4px solid var(--tmh-coral, var(--bs-primary-border-subtle)); color: var(--tmh-ink); overflow-wrap: anywhere; }
.tmh-site-footer > .container { max-width: 1260px; }
.tmh-footer-brand img { width: auto; height: auto; max-width: 240px; max-height: 80px; }
.tmh-footer-body { font-size: .95rem; }
.tmh-footer-body h3 { font-size: 1.2rem; margin-bottom: 1.25rem; }
.tmh-footer-body p { max-width: 58ch; }
.tmh-footer-body p > strong { margin-inline-end: .35rem; }
.tmh-footer-links { list-style: none; padding: 0; columns: 2; column-gap: 1.5rem; }
.tmh-footer-links li { break-inside: avoid; margin-bottom: .6rem; }
.tmh-footer-links a { display: inline-block; padding-block: .25rem; }
.tmh-footer-bar { border-top: 1px solid var(--bs-border-color); font-size: .875rem; }
.tmh-footer-bar .row { align-items: center; }
.tmh-footer-bar p { margin: 0; }
.tmh-footer-social { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.tmh-content .tmh-footer-social-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--bs-border-color); border-radius: 50%; background: var(--bs-body-bg); text-decoration: none; }
.tmh-footer-social-link .bi { margin: 0 !important; }
.tmh-content .tmh-footer-social-link:hover { background: var(--tmh-coral, var(--bs-primary-bg-subtle)); }
.tmh-site-footer a:focus-visible { outline: 3px solid var(--tmh-link); outline-offset: 4px; border-radius: .25rem; }
@media (min-width: 768px) {
    .tmh-footer-body > .row { --bs-gutter-x: 5rem; }
    .tmh-footer-bar .row > :last-child { text-align: right; }
}
.tmh-site-header { min-height: 90px; z-index: 1030; }
.tmh-site-header > .container { max-width: 1260px; }
.tmh-nav-list, .tmh-submenu { list-style: none; padding-left: 0; margin-bottom: 0; }
.tmh-nav-item { position: relative; }
.tmh-nav-row { display: flex; align-items: center; }
.tmh-content .tmh-nav-row a { color: var(--bs-body-color); text-decoration: none; font-weight: 600; font-size: .875rem; }
.tmh-content .tmh-nav-active > .tmh-nav-row > a { color: var(--bs-link-color); }
.tmh-nav-row a { flex: 1; padding: .65rem .5rem; overflow-wrap: anywhere; }
.tmh-site-header .tmh-submenu-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--bs-link-color);
    transition: color .2s ease, background-color .2s ease;
}
.tmh-site-header .tmh-submenu-toggle:hover,
.tmh-site-header .tmh-submenu-toggle:focus-visible,
.tmh-site-header .tmh-submenu-toggle[aria-expanded="true"] {
    background-color: var(--bs-tertiary-bg);
    box-shadow: inset 0 0 0 1px var(--bs-border-color);
    color: var(--bs-link-hover-color);
}
.tmh-site-header .tmh-submenu-toggle:focus-visible { outline: 3px solid var(--bs-link-color); outline-offset: 2px; }
.tmh-site-header .tmh-submenu-toggle > i { display: inline-block; transition: transform .2s ease; }
.tmh-site-header .tmh-submenu-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }
.tmh-submenu { padding: .25rem .75rem; background: var(--bs-body-bg); border-left: 2px solid var(--tmh-gold, var(--bs-border-color)); }
.tmh-submenu[hidden], .tmh-submenu-toggle[hidden] { display: none !important; }
.tmh-submenu .tmh-nav-row a { white-space: normal; }
.tmh-site-header:not(.tmh-nav-enhanced) .navbar-collapse { display: block; }
.tmh-site-header:not(.tmh-nav-enhanced) .navbar-toggler { display: none; }
@media (min-width: 1200px) {
    .tmh-nav-enhanced .tmh-nav-list > .tmh-nav-item > .tmh-submenu {
        position: absolute; top: 100%; right: 0; width: min(22rem, calc(100vw - 2rem));
        max-height: 75vh; overflow-y: auto; border: 1px solid var(--bs-border-color);
        box-shadow: 0 .5rem 1.5rem #0002; border-radius: .25rem;
    }
}
@media (max-width: 1199.98px) {
    .tmh-site-header .navbar-collapse { max-height: 75vh; overflow-y: auto; }
    .tmh-submenu { margin-left: .5rem; }
}
@media (max-width: 991.98px) {
    .tmh-content .tmh-legacy .hero-container,
    .tmh-content .tmh-legacy .hero-container::before {
        background-color: var(--tmh-gold, var(--bs-warning-bg-subtle));
    }
}
@media (max-width: 767.98px) {
    .tmh-site-header { min-height: 70px; }
    .tmh-content .tmh-brand { max-height: 44px; }
    .tmh-legacy .hero-text h1 { max-width: 100%; }
    .tmh-legacy .hero-container { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tmh-site-header .tmh-submenu-toggle,
    .tmh-site-header .tmh-submenu-toggle > i { transition: none; }
    .tmh-content *,
    .tmh-content *::before,
    .tmh-content *::after {
        scroll-behavior: auto !important;
    }
}
