/* =========================================================================
   JoMa Healthcare -- header, footer, menu, back-to-top (Unit J1)
   Structure: layout 425 (top strip + main bar), layout 31 (title band),
   a new footer layout, menu 39.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Top strip
   ------------------------------------------------------------------------- */
.johma-topstrip{
	background-color:var(--jm-teal-deep) !important;
	padding-top:0 !important;
	padding-bottom:0 !important;
}
.johma-topstrip .sc_layouts_row_container,
.johma-topstrip .vc_row,
.johma-topstrip .wpb_wrapper,
.johma-topstrip .sc_layouts_item{ padding-top:0 !important; padding-bottom:0 !important; margin-top:0; margin-bottom:0; }
.johma-topstrip__inner{
	display:flex;
	align-items:center;
	justify-content:space-between;
	flex-wrap:wrap;
	gap:6px 24px;
	padding:10px 20px;
	max-width:1170px;
	margin-left:auto;
	margin-right:auto;
	box-sizing:border-box;
	font-size:0.82rem;
	color:rgba(255,255,255,0.92);
}
.johma-topstrip__left,
.johma-topstrip__right{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.johma-topstrip__item{
	display:inline-flex;
	align-items:center;
	gap:7px;
	color:rgba(255,255,255,0.92) !important;
	text-decoration:none;
	white-space:nowrap;
}
a.johma-topstrip__item:hover{ color:var(--jm-aqua) !important; text-decoration:none; }
.johma-topstrip__item svg{ flex:none; opacity:0.9; }
.johma-topstrip__area{ opacity:0.85; }

@media (max-width:1023px){
	.johma-topstrip__email{ display:none; }
}
@media (max-width:767px){
	.johma-topstrip{ display:none !important; }
}

/* -------------------------------------------------------------------------
   2. Main bar (sticky, white)
   ------------------------------------------------------------------------- */
.johma-mainbar{
	background-color:#fff !important;
	border-bottom:1px solid var(--jm-border);
	transition:box-shadow .2s ease;
}
.johma-mainbar.sc_layouts_row_fixed_on{
	box-shadow:0 4px 18px rgba(31,92,96,0.12);
}
/* The theme's .sc_layouts_row_type_compact rule sets a bare 0.4em vertical
   padding on the row itself (no nested "row_container" wrapper here) --
   override it directly on the row, targeted enough (element+2 classes) to
   beat that 1-class rule regardless of load order. */
.johma-mainbar.sc_layouts_row_type_compact{
	padding-top:17px !important; padding-bottom:17px !important;
}
.johma-mainbar .sc_layouts_row_container{
	padding-left:20px !important; padding-right:20px !important;
	max-width:1170px; margin-left:auto; margin-right:auto; box-sizing:border-box;
}

/* Let the menu column claim all the space the logo/CTA columns don't need,
   instead of the fixed 1/4-1/2-1/4 VC grid fractions. WPBakery's inner row
   carries a -15px bootstrap-style gutter margin; add it back plus 20px so
   the logo/CTA keep a real >=20px edge gutter. */
.johma-mainbar .vc_inner{
	display:flex; align-items:center;
	padding-left:35px !important; padding-right:35px !important;
	box-sizing:border-box;
}
.johma-mainbar .johma-logo-col,
.johma-mainbar .johma-cta-col{ flex:0 0 auto; width:auto !important; }
.johma-mainbar .johma-menu-col{ flex:1 1 auto; width:auto !important; min-width:0; }

.johma-logo-col{ display:flex; align-items:center; gap:12px; }
/* The real layout parent is the .wpb_wrapper WPBakery inserts around the
   column's shortcode output (the logo <a> and the wordmark raw-html block
   are its two block-level children, so they stack by default). Force it
   into a horizontal, vertically-centred lockup. Scoped to this column only
   -- .wpb_wrapper is a generic WPBakery class used everywhere else. */
.johma-logo-col .vc_column-inner > .wpb_wrapper{
	display:flex !important;
	align-items:center !important;
	gap:10px;
}
.johma-logo-col .sc_layouts_item{ margin:0 !important; }
.johma-logo-col .sc_layouts_logo{ display:inline-flex; align-items:center; margin:0; }
.johma-logo-col .sc_layouts_logo img{ max-height:44px; width:auto; display:block; }

.johma-wordmark{
	display:flex;
	flex-direction:column;
	line-height:1.15;
	text-decoration:none !important;
}
.johma-wordmark__title{
	font-family:var(--jm-font-head);
	font-weight:700;
	font-size:1.28rem;
	color:var(--jm-teal-deep) !important;
	white-space:nowrap;
}
.johma-wordmark__tag{
	font-family:var(--jm-font-body);
	font-weight:600;
	font-size:0.72rem;
	letter-spacing:0.4px;
	color:var(--jm-text-muted);
	white-space:nowrap;
}

.johma-menu-col{ display:flex; align-items:center; justify-content:center; }
.johma-cta-col{ display:flex; align-items:center; justify-content:flex-end; }
.johma-cta-col__inner{ display:flex; align-items:center; gap:10px; }
.johma-header-cta{ white-space:nowrap; }
.johma-mobile-call,
.johma-compact-book{
	display:none;
	align-items:center;
	justify-content:center;
}
.johma-mobile-call{
	width:44px;
	height:44px;
	border-radius:50%;
	background:var(--jm-coral-cta);
	color:#fff !important;
}
.johma-mobile-call svg{ width:18px; height:18px; }
.johma-compact-book{
	height:44px;
	padding:0 16px;
	border-radius:var(--jm-radius-sm);
	background:var(--jm-coral-cta);
	color:#fff !important;
	font-family:var(--jm-font-body);
	font-weight:700;
	font-size:0.9rem;
	white-space:nowrap;
	text-decoration:none !important;
}
.johma-compact-book:hover{ background:var(--jm-coral-cta-hover); }

/* Six top-level items + logo + the full CTA button don't reliably fit on
   one line until ~1280px (measured: still wraps at 1100 and 1180px).
   Rather than let it wrap, switch to the same compact header used on
   phones -- logo, a compact "Book" button, a round call button and the
   burger -- from 767px right up to 1279px, and only show the full inline
   menu + full CTA at >=1280px where there's guaranteed room. */
@media (max-width:1279px){
	.johma-wordmark__tag{ display:none; }
	.johma-header-cta{ display:none !important; }
	.johma-mobile-call,
	.johma-compact-book{ display:inline-flex; }
	.johma-menu-col .sc_layouts_menu_nav{ display:none !important; }
	.sc_layouts_menu_mobile_button{ display:flex !important; }
	/* Logo left; Book + Call + hamburger grouped together on the right
	   (the burger lives inside .johma-menu-col, between logo and CTA in
	   DOM order, so re-order the three flex children visually). */
	.johma-mainbar .johma-cta-col{ order:2; margin-left:auto; }
	.johma-mainbar .johma-menu-col{ order:3; flex:0 0 auto !important; justify-content:flex-end; }
	.johma-cta-col__inner{ gap:8px; }
}
@media (max-width:767px){
	.johma-wordmark__title{ font-size:1.1rem; }
	.johma-compact-book{ display:none; } /* phones: call + burger only, kept compact */
	.johma-logo-col{ gap:8px; }
	.johma-logo-col .sc_layouts_logo img{ max-height:36px; }
}
@media (max-width:400px){
	.johma-wordmark__title{ font-size:0.98rem; }
}

/* -------------------------------------------------------------------------
   3. Main menu + dropdown (desktop)
   ------------------------------------------------------------------------- */
.johma-menu-col .sc_layouts_menu_nav>li>a,
.johma-menu-col .sc_layouts_menu_nav>li.menu-item-has-children>a{
	font-family:var(--jm-font-body);
	font-weight:700;
	font-size:0.95rem;
	color:var(--jm-text);
	padding-top:10px !important;
	padding-bottom:10px !important;
	display:inline-flex;
	align-items:center;
}
.johma-menu-col .sc_layouts_menu_nav>li>a:hover,
.johma-menu-col .sc_layouts_menu_nav>li.current-menu-item>a,
.johma-menu-col .sc_layouts_menu_nav>li.current-menu-parent>a{
	color:var(--jm-coral-cta) !important;
}
.johma-menu-col .sc_layouts_menu_nav>li>ul{
	background:#fff;
	border-radius:var(--jm-radius);
	box-shadow:var(--jm-shadow-lg);
	border:1px solid var(--jm-border);
	padding:10px 0;
	overflow:hidden;
	text-align:left;
	min-width:280px;
}
.johma-menu-col .sc_layouts_menu_nav>li>ul:before{ display:none; }
.johma-menu-col .sc_layouts_menu_nav>li li{ text-align:left; }
.johma-menu-col .sc_layouts_menu_nav>li li>a{
	font-family:var(--jm-font-body);
	font-weight:600;
	font-size:0.92rem;
	color:var(--jm-text);
	padding:10px 22px;
	text-align:left;
}
/* Services dropdown grouping: "All Services" (item 1), then 6 everyday
   items, then a divider before the 5 specialist/24-7 items (items 8-12),
   in the fixed order menu 39's children were created in. */
.johma-menu-col .sc_layouts_menu_nav>li li:nth-child(2)>a{
	position:relative;
	padding-top:16px;
}
.johma-menu-col .sc_layouts_menu_nav>li li:nth-child(2)>a:before{
	content:"Everyday care";
	display:block;
	margin:-4px 0 8px;
	font-size:0.7rem;
	font-weight:700;
	letter-spacing:0.6px;
	text-transform:uppercase;
	color:var(--jm-text-muted);
}
.johma-menu-col .sc_layouts_menu_nav>li li:nth-child(8)>a{
	position:relative;
	padding-top:16px;
	margin-top:6px;
	border-top:1px solid var(--jm-border);
}
.johma-menu-col .sc_layouts_menu_nav>li li:nth-child(8)>a:before{
	content:"Specialist & 24/7";
	display:block;
	margin:6px 0 8px;
	font-size:0.7rem;
	font-weight:700;
	letter-spacing:0.6px;
	text-transform:uppercase;
	color:var(--jm-text-muted);
}
.johma-menu-col .sc_layouts_menu_nav>li li>a:hover,
.johma-menu-col .sc_layouts_menu_nav>li li.current-menu-item>a{
	color:var(--jm-coral-cta) !important;
	background-color:var(--jm-cream) !important;
}

/* -------------------------------------------------------------------------
   4. Mobile off-canvas menu
   ------------------------------------------------------------------------- */
.menu_mobile,
.menu_mobile_inner{
	background-color:var(--jm-teal-deep) !important;
	color:#fff;
	width:100% !important;
	max-width:100vw !important;
	overflow-x:hidden !important;
	box-sizing:border-box;
}
.menu_mobile_inner{ overflow-y:auto !important; }
/* Remove the theme search form from the mobile menu entirely. */
.menu_mobile .search_wrap{ display:none !important; }

.menu_mobile_close{
	display:inline-flex !important;
	align-items:center;
	justify-content:center;
	color:#fff !important;
}
.menu_mobile .sc_layouts_logo{ padding-left:24px; box-sizing:border-box; }

/* The theme renders this nav in a fixed 320px-tall inner scroll box that's
   also wider than the viewport (clips "Contact" and pushes the submenu
   toggle off-screen). Let it size to its content instead; the outer
   .menu_mobile_inner already scrolls the whole panel if it's ever taller
   than the screen. */
.menu_mobile_nav_area{
	width:100% !important;
	max-width:100% !important;
	max-height:none !important;
	height:auto !important;
	overflow:visible !important;
	box-sizing:border-box;
}
.menu_mobile .sc_layouts_menu_nav{
	width:100% !important;
	padding-left:0; padding-right:0;
	box-sizing:border-box;
}
.menu_mobile .sc_layouts_menu_nav>li{
	width:100% !important;
	padding-left:0 !important; padding-right:0 !important;
	box-sizing:border-box;
}
body.scheme_default.trx_addons_present .menu_mobile_inner a,
.menu_mobile .sc_layouts_menu_nav>li>a{
	display:flex !important;
	align-items:center;
	width:100%;
	min-height:48px;
	box-sizing:border-box;
	font-family:var(--jm-font-body);
	font-weight:700;
	font-size:21px;
	text-transform:none !important;
	color:#fff !important;
	border-color:rgba(255,255,255,0.14);
	padding:13px 24px !important;
}
body.scheme_default.trx_addons_present .menu_mobile_inner a:hover,
body.scheme_default.trx_addons_present .menu_mobile_inner .current-menu-item>a{ color:var(--jm-aqua) !important; }
.menu_mobile .sc_layouts_menu_nav>li ul{
	background-color:rgba(0,0,0,0.15);
	width:100% !important;
	box-sizing:border-box;
}
body.scheme_default.trx_addons_present .menu_mobile_inner li li>a{
	color:rgba(255,255,255,0.85) !important;
	font-size:18px;
	text-transform:none !important;
	padding-left:36px !important;
	font-weight:600;
	min-height:44px;
}
/* The has-children toggle (expands the Services submenu): keep it a real,
   in-viewport, >=44px square tap target instead of an absolutely
   positioned arrow that inherited the old oversized container's width. */
.menu_mobile .sc_layouts_menu_nav>li.menu-item-has-children{ position:relative; }
.menu_mobile .sc_layouts_menu_nav>li>.menu-collapse,
.menu_mobile .sc_layouts_menu_nav>li>a+.menu-collapse{
	position:absolute !important;
	right:0 !important;
	top:0 !important;
	width:48px !important;
	height:48px !important;
	display:flex !important;
	align-items:center;
	justify-content:center;
}
.menu_mobile_button{ color:var(--jm-teal-deep) !important; }
/* Sizing only -- visibility is controlled by the theme (hidden by default,
   >=768px) and by the max-width:1099px rule above (shown <1100px). Forcing
   display:flex here unconditionally would show the burger at every width,
   including alongside the full desktop menu at >=1100px. */
.sc_layouts_menu_mobile_button{
	min-width:44px; min-height:44px;
	align-items:center;
	justify-content:center;
}

/* Coral "Book a Free Assessment" + outline "Call" buttons inside the
   mobile panel only -- two extra menu-39 items (el_class
   johma-mobile-cta-item) hidden from the desktop nav; see COMPONENTS.md. */
.johma-menu-col .johma-mobile-cta-item{ display:none !important; }
.menu_mobile .johma-mobile-cta-item{
	margin:16px 24px 0;
	width:calc(100% - 48px);
}
.menu_mobile .johma-mobile-cta-item>a{
	display:flex !important;
	width:100%;
	min-height:52px !important;
	justify-content:center;
	align-items:center;
	border-radius:var(--jm-radius-sm);
	font-size:17px !important;
	font-weight:700;
	text-align:center;
}
.menu_mobile .johma-mobile-cta-item.johma-mobile-cta-book>a{
	background:var(--jm-coral-cta) !important;
	color:#fff !important;
}
.menu_mobile .johma-mobile-cta-item.johma-mobile-cta-book>a:hover{ background:var(--jm-coral-cta-hover) !important; }
.menu_mobile .johma-mobile-cta-item.johma-mobile-cta-call>a{
	background:transparent !important;
	border:2px solid rgba(255,255,255,0.5);
	color:#fff !important;
	margin-top:10px;
}
.menu_mobile .johma-mobile-cta-item.johma-mobile-cta-call>a:hover{ border-color:#fff; color:var(--jm-aqua) !important; }

/* -------------------------------------------------------------------------
   5. Inner-page title band (replaces bg_title.jpg demo image)
   ------------------------------------------------------------------------- */
.johma-title-band{
	background:linear-gradient(120deg, var(--jm-teal-deep) 0%, var(--jm-teal) 100%) !important;
	background-image:
		radial-gradient(circle at 12% 22%, rgba(255,255,255,0.07) 0, rgba(255,255,255,0) 60%),
		radial-gradient(circle at 88% 78%, rgba(255,255,255,0.06) 0, rgba(255,255,255,0) 55%),
		linear-gradient(120deg, var(--jm-teal-deep) 0%, var(--jm-teal) 100%) !important;
	padding:64px 20px 44px !important;
	box-sizing:border-box;
}
.johma-title-band .sc_content_width_1_1{ max-width:100%; padding-left:20px; padding-right:20px; box-sizing:border-box; }
.johma-title-band .sc_layouts_title_caption{
	color:#fff !important;
	font-family:var(--jm-font-head);
	margin-bottom:0.4rem;
	/* Belt-and-braces: even though the fluid .sc_content_width_1_1 fix in
	   05-system.css already stops this overflowing, clamp the size and
	   allow a hard break as a last resort so a very long service title can
	   never push the title band wider than the viewport. */
	font-size:clamp(1.7rem, 1.3rem + 2.4vw, 3.2rem) !important;
	overflow-wrap:anywhere;
	word-break:break-word;
	max-width:100%;
}
.johma-title-band .sc_layouts_title_breadcrumbs,
.johma-title-band .sc_layouts_title_breadcrumbs *{
	color:rgba(255,255,255,0.78) !important;
	font-size:0.85rem;
}
.johma-title-band .sc_layouts_title_breadcrumbs a:hover{ color:#fff !important; }

/* Allow individual pages to hide the title band (see COMPONENTS.md) */
body.johma-hide-title-band .johma-title-band{ display:none !important; }

/* -------------------------------------------------------------------------
   6. Footer
   ------------------------------------------------------------------------- */
footer .johma-footer,
.johma-footer{
	background:var(--jm-teal-deep) !important;
	color:rgba(255,255,255,0.85);
	position:relative;
	overflow:hidden;
	padding-top:0 !important;
	padding-bottom:0 !important;
}
.johma-footer:before{
	content:"";
	display:block;
	width:100%;
	height:36px;
	background-color:var(--jm-teal-deep);
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath fill='%23FBF6EF' d='M0 0H1200V20C1000 45 800 50 600 30C400 10 200 45 0 20Z'/%3E%3C/svg%3E");
	background-repeat:no-repeat;
	background-size:100% 100%;
}
.johma-footer .wpb_row,
.johma-footer .vc_column-inner,
.johma-footer .wpb_wrapper{ background:transparent !important; }
.johma-footer .container,
.johma-footer > .vc_row,
.johma-footer .wpb_column{ padding-left:20px !important; padding-right:20px !important; box-sizing:border-box; }
.johma-footer__top{ padding:68px 20px 40px !important; max-width:1170px; margin-left:auto; margin-right:auto; box-sizing:border-box; }
/* CSS Grid, not flex-wrap: with flex-wrap, any column whose flex-basis
   doesn't fit the leftover row width wraps onto its own row and then
   stretches to fill it (this is what made the Contact column balloon to
   ~1090px wide at 1280). Grid columns don't have that failure mode --
   they always share the row in the given ratio. Brand+mission (wide) /
   Services / Company / Contact -- roughly 4:3:3:3, giving Company (the
   column with "Areas We Cover" and "Privacy Policy") enough room that
   those don't wrap into orphan second lines. */
.johma-footer .johma-footer__grid.vc_inner{
	display:grid !important;
	grid-template-columns:4fr 3fr 3fr 3fr;
	gap:40px;
}
.johma-footer .johma-footer__grid.vc_inner > .wpb_column{
	width:auto !important;
	min-width:0;
}
.johma-footer h4{
	color:#fff !important;
	font-family:var(--jm-font-head);
	font-size:1.05rem;
	margin-bottom:1.1rem;
}
.johma-footer__brand .johma-wordmark__title{ color:#fff !important; font-size:1.3rem; }
.johma-footer__brand .johma-wordmark__tag{ color:rgba(255,255,255,0.7) !important; }
.johma-footer__logo{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.johma-footer__logo img{ height:40px; width:auto; display:block; }
.johma-footer__mission{ color:rgba(255,255,255,0.82) !important; line-height:1.65; margin-bottom:14px; max-width:44ch; }
.johma-footer__ciw{
	display:inline-flex;
	align-items:center;
	gap:8px;
	font-size:0.85rem;
	color:rgba(255,255,255,0.78) !important;
}
.johma-footer__ciw svg{ flex:none; color:var(--jm-aqua); }
.johma-footer ul{ list-style:none; margin:0; padding:0; }
.johma-footer ul li{ margin-bottom:0; }
.johma-footer ul li a{
	color:rgba(255,255,255,0.82) !important;
	text-decoration:none;
	display:flex;
	align-items:center;
	min-height:44px;
}
.johma-footer ul li a:hover{ color:var(--jm-aqua) !important; }
.johma-footer__contact li{ display:flex; gap:10px; align-items:flex-start; color:rgba(255,255,255,0.82) !important; font-size:0.95rem; }
.johma-footer__contact svg{ flex:none; margin-top:3px; color:var(--jm-aqua); }
.johma-footer__contact a{ color:rgba(255,255,255,0.82) !important; text-decoration:none; }
.johma-footer__contact a:hover{ color:var(--jm-aqua) !important; }
.johma-footer__cta{ margin-top:6px; white-space:nowrap; }

.johma-footer__bottom{
	border-top:1px solid rgba(255,255,255,0.14);
	padding:20px 20px;
	max-width:1170px;
	margin-left:auto;
	margin-right:auto;
	box-sizing:border-box;
	display:flex;
	flex-wrap:wrap;
	gap:10px 24px;
	align-items:center;
	justify-content:center;
	text-align:center;
	font-size:0.82rem;
	color:rgba(255,255,255,0.68) !important;
}
.johma-footer__bottom a{ color:rgba(255,255,255,0.68) !important; }
.johma-footer__bottom a:hover{ color:#fff !important; }

@media (max-width:1023px){
	.johma-footer .johma-footer__grid.vc_inner{ grid-template-columns:1fr 1fr; row-gap:36px; }
	.johma-footer__mission{ max-width:none; }
}
@media (max-width:639px){
	.johma-footer .johma-footer__grid.vc_inner{ grid-template-columns:1fr; }
	.johma-footer__top{ padding:48px 0 28px !important; }
	.johma-footer__bottom{ flex-direction:column; text-align:center; gap:8px; }
}

/* -------------------------------------------------------------------------
   7. Back to top
   ------------------------------------------------------------------------- */
.trx_addons_scroll_to_top{
	border-radius:50% !important;
	box-shadow:var(--jm-shadow-md);
}
