/*!
Theme Name: Instilled Kadence Child for Aceso Homecare
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Instilled Ltd
Author URI: https://instilled.co.uk/
Description: A child theme for Acesco Homecare using the Kadence Parent Theme.
Version: 1.1.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Widget container for Homecare Widget
-------------------------------------------------------------- */

.tg-review-carousel-widget-container {
	background-color: rgba(255, 255, 255, 0) !important;
}

/* Gravity Forms
-------------------------------------------------------------- */

.gform_required_legend {
	display: none;
}

/* Kadence Buttons
-------------------------------------------------------------- */

.kt-button {
	transition: transform 0.25s ease;
}

.kt-button:hover,
.kt-button:focus {
	transform: scale(1.03);
}

.mega-menu .kb-nav-link-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Mega Menu
-------------------------------------------------------------- */

.mega-menu .kb-nav-link-content::after {
	content: '';
	display: inline-block;
	width: 1.5em;
	height: 1.5em;
	flex-shrink: 0;
	margin-left: 0.75em;
	margin-right: 2px;
	border-radius: 3px;
	background-color: var(--global-palette1);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M10 14.25C9.58579 14.25 9.25 14.5858 9.25 15C9.25 15.4142 9.58579 15.75 10 15.75L10 15L10 14.25ZM21.5303 15.5303C21.8232 15.2374 21.8232 14.7626 21.5303 14.4697L16.7574 9.6967C16.4645 9.40381 15.9896 9.40381 15.6967 9.6967C15.4038 9.98959 15.4038 10.4645 15.6967 10.7574L19.9393 15L15.6967 19.2426C15.4038 19.5355 15.4038 20.0104 15.6967 20.3033C15.9896 20.5962 16.4645 20.5962 16.7574 20.3033L21.5303 15.5303ZM10 15L10 15.75L21 15.75L21 15L21 14.25L10 14.25L10 15Z' fill='white'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.43125em;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.mega-menu .kb-nav-link-content:hover::after {
	transform: translateX(2px);
	background-color: var(--global-palette2);
}

.mega-posts .kb-advanced-heading-link,
a.mega-single-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mega-posts .kb-advanced-heading-link {
	padding-bottom: var(--kb-nav-link-padding-bottom, 0.6em);
}

.mega-posts .kb-advanced-heading-link,
a.mega-single-link {
	border-bottom: 1px solid var(--global-palette8);
	transition: border-color 0.2s ease;
}

.mega-posts .kb-advanced-heading-link:hover,
a.mega-single-link:hover {
	border-bottom-color: var(--global-palette11);
}

.mega-posts .kb-advanced-heading-link::after,
a.mega-single-link::after {
	content: '';
	display: inline-block;
	width: 1.5em;
	height: 1.5em;
	flex-shrink: 0;
	margin-left: 0.75em;
	margin-right: 2px;
	border-radius: 3px;
	background-color: var(--global-palette1);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M10 14.25C9.58579 14.25 9.25 14.5858 9.25 15C9.25 15.4142 9.58579 15.75 10 15.75L10 15L10 14.25ZM21.5303 15.5303C21.8232 15.2374 21.8232 14.7626 21.5303 14.4697L16.7574 9.6967C16.4645 9.40381 15.9896 9.40381 15.6967 9.6967C15.4038 9.98959 15.4038 10.4645 15.6967 10.7574L19.9393 15L15.6967 19.2426C15.4038 19.5355 15.4038 20.0104 15.6967 20.3033C15.9896 20.5962 16.4645 20.5962 16.7574 20.3033L21.5303 15.5303ZM10 15L10 15.75L21 15.75L21 15L21 14.25L10 14.25L10 15Z' fill='white'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.43125em;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.mega-posts .kb-advanced-heading-link:hover::after,
a.mega-single-link:hover::after {
	transform: translateX(2px);
	background-color: var(--global-palette2);
}


/* Headings Flower Decoration
-------------------------------------------------------------- */

.icon-decoration::before {
	content: url('images/aceso-burst.svg');
	display: block;
	max-width: 80px;
	height: auto;
}

@media (min-width: 1200px) {
	.icon-decoration::before {
		margin-left: -66px;
		margin-bottom: -36px;
	}
}

@media (max-width: 1199px) {
	.icon-decoration::before {
		margin-bottom: -19px;
		margin-left: -38px;
	}
}

@media (max-width: 859px) {
	.icon-decoration::before {
		max-width: 60px;
		margin-bottom: -14px;
		margin-left: -26px;
	}
}


/* Marquee Text
-------------------------------------------------------------- */

:has(> .marquee-text) {
	overflow: hidden;
}

.marquee-text {
	display: block;
	width: 100%;
	white-space: nowrap;
	transform: translateX(100%);
	animation: marquee-scroll 50s linear infinite;
}

@keyframes marquee-scroll {
	0% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(-100%);
	}
}

.kb-slider-arrow-position-outside-bottom-right .splide__arrows {
	bottom: -60px;
	right: 0;
}

/* Template Pages Content
-------------------------------------------------------------- */

.error404 .content-area,
.single-job .content-area {
	margin-top: 0px;
}

/* Office map (MapLibre): popup and controls aligned to the brand palette.
-------------------------------------------------------------- */
.aceso-map-pin-wrapper {
	background: none;
	border: none;
}

.aceso-map-pin-badge {
	box-sizing: border-box;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	border-radius: 8px;
	background-color: var(--global-palette10);
	box-shadow: 0 2px 8px rgba(5, 32, 41, 0.45);
}

.aceso-map-pin-badge::after {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--global-palette4);
}

.aceso-map-pin-tail {
	width: 0;
	height: 0;
	margin: -2px auto 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 8px solid var(--global-palette10);
}

.maplibregl-popup-content {
	padding: 14px 16px;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(5, 32, 41, 0.18);
	color: var(--global-palette4);
	font-size: 0.9rem;
	line-height: 1.5;
}

.maplibregl-popup-content strong {
	display: block;
	margin-bottom: 4px;
	color: var(--global-palette3);
	font-size: 1rem;
}

.maplibregl-popup-content a {
	color: var(--global-palette1);
}

.maplibregl-popup-content a.aceso-map-directions {
	display: inline-block;
	margin-top: 8px;
	font-weight: 600;
}

.maplibregl-popup-close-button {
	width: 26px;
	height: 26px;
	color: var(--global-palette6);
	font-size: 18px;
	line-height: 1;
}

.maplibregl-popup-close-button:hover {
	background: transparent;
	color: var(--global-palette1);
}

.maplibregl-ctrl-group {
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(5, 32, 41, 0.15);
}

/* ---------------------------------------------------------------------------
   Live In Care Header (kadence_header CPT 3027 - pages 228 and 921).
   These pages run the alternate gold brand, so the "medium text" palette slot is remapped to the gold within this header only.
   --------------------------------------------------------------------------- */
.wp-block-kadence-header3027-cpt-id {
	--global-palette5: var(--global-palette15);
	--wp--preset--color--theme-palette-5: var(--global-palette15);
}

/* Arrow badges within the Live In Care header (3027) - gold instead of the
   site teal. The base rules in this file paint these with --global-palette1 and shift to --global-palette2 on hover; both are remapped to the gold here. Scoped by the header wrapper rather than by the badge selectors alone, because the mega-menu navigation block is shared with the Main Header (1125) and an unscoped override would recolour the whole site. The badge glyph is white: 4.28:1 on the gold, vs 4.04:1 on the teal. */
.wp-block-kadence-header3027-cpt-id .mega-menu .kb-nav-link-content::after,
.wp-block-kadence-header3027-cpt-id .mega-posts .kb-advanced-heading-link::after,
.wp-block-kadence-header3027-cpt-id a.mega-single-link::after {
	background-color: var(--global-palette15);
}

/* Hover keeps the gold - the existing translateX nudge still gives feedback. A lighter gold (--global-palette11, #C9AC68) would drop the white glyph to 2.19:1, so it is deliberately not used here. */
.wp-block-kadence-header3027-cpt-id .mega-menu .kb-nav-link-content:hover::after,
.wp-block-kadence-header3027-cpt-id .mega-posts .kb-advanced-heading-link:hover::after,
.wp-block-kadence-header3027-cpt-id a.mega-single-link:hover::after {
	background-color: var(--global-palette15);
}

/* Navigation link hover/focus within the Live In Care header (3027).
   Kadence paints these from a variable chain (--kb-nav-link-color-hover-lv -> --kb-nav-link-color-active-lv -> --kb-nav-link-color -> inherit) at (0,3,0); adding the header wrapper takes this to (0,4,0) so it wins without !important.
    Scoped to 3027 on purpose: this navigation block is shared with the Main Header (1125), so the unscoped selector would turn the whole site's nav hover gold. */
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .kb-nav-link-content:hover,
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .kb-nav-link-content:focus {
	color: var(--global-palette11);
}

/* Icon links inside the Live In Care mega menus (3027): "Read our Reviews", "Read our FAQ's", "Make an Enquiry" - six in total across the two panels. Kadence emits no colour rule for these at all (only text-decoration), so they were inheriting and no earlier override reached them.

   Matched by .hls-hover_underline (the panel headings are .hls-none) AND by the .mega-menu ancestor - the ancestor is required, not decorative, because a top-bar phone-number anchor in the tablet header markup also carries .hls-hover_underline and must not be recoloured.
   
   The icon is fill="currentColor", so it follows the text colour. */

.wp-block-kadence-header3027-cpt-id .mega-menu a.kb-advanced-heading-link.hls-hover_underline {
	color: var(--global-palette15);
}

.wp-block-kadence-header3027-cpt-id .mega-menu a.kb-advanced-heading-link.hls-hover_underline:hover,
.wp-block-kadence-header3027-cpt-id .mega-menu a.kb-advanced-heading-link.hls-hover_underline:focus {
	color: var(--global-palette11);
}

/* Dropdown indicator hover within the Live In Care header (3027).
   The arrow is an <svg fill="currentColor"> inside a sibling <button>, so it follows the button's colour. Kadence sets that button to color:inherit at (0,3,0) and never gives it a hover colour, so this adds one at (0,4,0). */
   
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .kb-link-wrap:hover .kb-nav-dropdown-toggle-btn,
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .kb-nav-dropdown-toggle-btn:hover,
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .kb-nav-dropdown-toggle-btn:focus {
	color: var(--global-palette11);
}

/* Current-page menu item within the Live In Care header (3027).
   Kadence resolves the active colour through its own chain */
   
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .menu-container > .menu > .menu-item > .kb-link-wrap,
.wp-block-kadence-header3027-cpt-id .wp-block-kadence-navigation .sub-menu > .menu-item > .kb-link-wrap {
	--kb-nav-link-color-active: var(--global-palette11);
}