/**
 * Footer Styles - Sparkle Service
 * Consistent with header.css styling approach
 */

/* ========================================
   PRE-FOOTER CTA BAR
   ======================================== */

.pre-footer-cta {
	padding: 20px 0 !important;
}

.pre-footer-cta > .wp-block-group {
	gap: 24px;
	align-items: center;
}

.pre-footer-cta p {
	margin: 0 !important;
	color: var(--wp--preset--color--base) !important;
}

.pre-footer-cta p a {
	color: var(--wp--preset--color--base) !important;
	text-decoration: none !important;
	transition: opacity 0.15s ease;
}

.pre-footer-cta p a:hover {
	opacity: 0.85;
}

/* Inverted button on red background */
.pre-footer-cta .wp-block-button__link {
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--primary) !important;
	font-weight: 700;
	padding: 12px 24px !important;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.pre-footer-cta .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.9) !important;
	transform: scale(1.02);
}

/* ========================================
   TRUST BAR
   ======================================== */

.trust-bar {
	padding: 12px 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-bar > .wp-block-group {
	gap: 6px;
}

.trust-bar p {
	margin: 0 !important;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.7) !important;
	font-size: 13px;
	letter-spacing: 0.02em;
}

.trust-bar .separator {
	opacity: 0.4;
	font-size: 8px;
	margin: 0 8px;
}

/* ========================================
   MAIN FOOTER
   ======================================== */

.site-footer {
	padding: 48px 0 40px !important;
}

/* Footer Columns Container */
.footer-columns {
	gap: 40px 48px !important;
	align-items: flex-start !important;
}

/* Individual Columns */
.footer-column {
	min-width: 140px;
}

.footer-column-brand {
	flex: 0 0 200px;
	max-width: 200px;
}

.footer-column-services {
	flex: 1;
	min-width: 160px;
}

.footer-column-locations {
	flex: 1;
	min-width: 140px;
}

.footer-column-company {
	flex: 1;
	min-width: 120px;
}

/* ========================================
   FOOTER LOGO
   ======================================== */

.footer-logo-link {
	display: inline-block;
	line-height: 0;
	margin-bottom: 20px;
}

.footer-logo {
	width: 100px !important;
	height: auto !important;
}

/* ========================================
   FOOTER CONTACT INFO
   ======================================== */

.footer-contact {
	margin-bottom: 16px;
}

.footer-contact p {
	margin: 0 0 6px 0 !important;
	line-height: 1.5;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65) !important;
}

.footer-contact a {
	color: rgba(255, 255, 255, 0.85) !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
}

.footer-contact a:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* ========================================
   SOCIAL ICONS
   ======================================== */

.footer-social {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}

.footer-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.7);
	transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.footer-social a:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	transform: scale(1.08);
}

.footer-social svg {
	width: 16px;
	height: 16px;
}

/* ========================================
   FOOTER HEADINGS
   ======================================== */

.footer-heading {
	font-size: 12px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--base) !important;
	margin: 0 0 16px 0 !important;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--wp--preset--color--primary);
}

/* ========================================
   FOOTER SUBHEADINGS
   ======================================== */

.footer-subheading {
	font-size: 11px !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.5) !important;
	margin: 16px 0 8px 0 !important;
}

.footer-subheading:first-child {
	margin-top: 0 !important;
}

/* ========================================
   FOOTER LINKS
   ======================================== */

.footer-links {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.footer-links li {
	margin: 0 !important;
}

.footer-links a {
	display: block;
	padding: 8px 0;
	color: rgba(255, 255, 255, 0.75) !important;
	text-decoration: none !important;
	font-size: 14px;
	line-height: 1.4;
	transition: color 0.15s ease;
}

.footer-links a:hover {
	color: var(--wp--preset--color--base) !important;
}

/* WordPress Menu Output (same styles as .footer-links) */
.footer-links-group {
	margin-top: 0 !important;
}

.footer-links-group > .wp-block-html {
	margin: 0 !important;
}

.footer-links-group .menu {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.footer-links-group .menu li {
	margin: 0 !important;
}

.footer-links-group .menu a {
	display: block;
	padding: 8px 0;
	color: rgba(255, 255, 255, 0.75) !important;
	text-decoration: none !important;
	font-size: 14px;
	line-height: 1.4;
	transition: color 0.15s ease;
}

.footer-links-group .menu a:hover {
	color: var(--wp--preset--color--base) !important;
}

/* View All Link */
.footer-view-all {
	display: inline-block;
	margin-top: 4px;
	color: var(--wp--preset--color--primary) !important;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 600;
	transition: color 0.15s ease;
}

.footer-view-all:hover {
	color: #d63520 !important;
}

/* ========================================
   FOOTER ACCORDION (Desktop - show as normal columns)
   ======================================== */

/* On desktop, show header as static element (not button) */
.footer-accordion-header {
	display: block;
	background: none;
	border: none;
	padding: 0;
	margin: 0 0 16px 0;
	cursor: default;
	text-align: left;
}

/* Hide the +/- icon on desktop */
.footer-accordion-icon {
	display: none;
}

/* Heading styles on desktop */
.footer-accordion-header .footer-heading {
	display: inline-block;
	font-size: 12px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--base) !important;
	margin: 0;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--wp--preset--color--primary);
}

.footer-accordion-content {
	max-height: none; /* Always visible on desktop */
}

/* ========================================
   FOOTER CTA (Mobile Only)
   ======================================== */

.footer-cta-mobile {
	display: none !important;
	margin-top: 20px !important;
}

.footer-cta-mobile .wp-block-button__link {
	width: 100%;
	text-align: center;
}

/* ========================================
   BOTTOM BAR
   ======================================== */

.footer-bottom {
	padding: 20px 0 !important;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom > .wp-block-group {
	gap: 16px;
}

.footer-bottom p {
	margin: 0 !important;
	color: rgba(255, 255, 255, 0.5) !important;
}

.footer-bottom a {
	color: rgba(255, 255, 255, 0.5) !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
}

.footer-bottom a:hover {
	color: var(--wp--preset--color--base) !important;
}

/* ========================================
   FOCUS STATES (Accessibility)
   ======================================== */

.footer-contact a:focus,
.footer-social a:focus,
.footer-links a:focus,
.footer-view-all:focus,
.footer-bottom a:focus,
.pre-footer-cta a:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.pre-footer-cta .wp-block-button__link:focus {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: 2px;
}

/* ========================================
   TABLET STYLES
   ======================================== */

@media (max-width: 1023px) {
	/* Add horizontal padding to match header/other sections */
	.pre-footer-cta > .wp-block-group,
	.trust-bar > .wp-block-group,
	.site-footer > .footer-columns,
	.footer-bottom > .wp-block-group {
		padding-left: clamp(1rem, 5vw, 2rem);
		padding-right: clamp(1rem, 5vw, 2rem);
	}

	.site-footer {
		padding: 48px 0 40px !important;
	}

	.footer-columns {
		gap: 40px 24px !important;
	}

	.footer-column-brand {
		flex: 1 1 100%;
		max-width: 100%;
		text-align: center;
		margin-bottom: 16px;
	}

	.footer-logo-link {
		margin-bottom: 16px;
	}

	.footer-contact {
		margin-bottom: 16px;
	}

	.footer-social {
		justify-content: center;
		gap: 6px;
	}

	.footer-social a {
		width: 40px;
		height: 40px;
	}

	.footer-social svg {
		width: 18px;
		height: 18px;
	}

	.footer-column-services,
	.footer-column-locations,
	.footer-column-company {
		flex: 1 1 calc(33.333% - 16px);
		min-width: 140px;
	}

	.footer-heading {
		text-align: left;
	}
}

/* ========================================
   MOBILE STYLES
   ======================================== */

@media (max-width: 767px) {
	/* Adjust horizontal padding for mobile */
	.pre-footer-cta > .wp-block-group,
	.trust-bar > .wp-block-group,
	.site-footer > .wp-block-group,
	.footer-bottom > .wp-block-group {
		padding-left: 20px;
		padding-right: 20px;
	}

	/* Pre-footer CTA */
	.pre-footer-cta {
		padding: 24px 0 !important;
	}

	.pre-footer-cta > .wp-block-group {
		flex-direction: column !important;
		text-align: center;
		gap: 12px;
	}

	.pre-footer-cta > .wp-block-group > .wp-block-group {
		flex-direction: column !important;
		gap: 2px;
	}

	.pre-footer-cta .wp-block-buttons {
		width: 100%;
		margin-top: 4px;
	}

	.pre-footer-cta .wp-block-button {
		width: 100%;
	}

	/* Ensure button is filled white on mobile */
	.pre-footer-cta .wp-block-button__link {
		width: 100%;
		text-align: center;
		background: var(--wp--preset--color--base) !important;
		color: var(--wp--preset--color--primary) !important;
		border: none !important;
		padding: 14px 24px !important;
		font-weight: 700;
	}

	/* Trust bar */
	.trust-bar {
		padding: 16px 0 !important;
	}

	.trust-bar > .wp-block-group {
		flex-direction: column !important;
		gap: 2px;
	}

	.trust-bar p {
		font-size: 12px;
	}

	.trust-bar .separator {
		display: none;
	}

	/* Main footer */
	.site-footer {
		padding: 28px 0 24px !important;
	}

	.footer-columns {
		flex-direction: column !important;
		gap: 0 !important; /* Accordions handle their own spacing */
	}

	.footer-column {
		width: 100%;
		min-width: 100% !important;
		max-width: 100% !important;
	}

	/* Brand column - more compact */
	.footer-column-brand {
		text-align: center;
		padding-bottom: 20px;
		margin-bottom: 4px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.footer-logo {
		width: 90px !important;
	}

	.footer-logo-link {
		margin-bottom: 16px;
	}

	.footer-contact {
		margin-bottom: 12px;
	}

	.footer-contact p {
		margin-bottom: 4px !important;
	}

	/* Larger touch targets for social icons */
	.footer-social {
		gap: 10px;
		margin-top: 8px;
	}

	.footer-social a {
		width: 44px;
		height: 44px;
	}

	.footer-social svg {
		width: 20px;
		height: 20px;
	}

	/* ========================================
	   MOBILE ACCORDION STYLES
	   ======================================== */

	.footer-accordion {
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		padding-bottom: 0;
	}

	.footer-accordion:last-of-type {
		border-bottom: none;
	}

	.footer-accordion-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 12px 0 0 0;
		background: transparent;
		border: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.footer-accordion-header:focus:not(:focus-visible) {
		outline: none;
	}

	.footer-accordion-header:focus-visible {
		outline: 2px solid var(--wp--preset--color--primary);
		outline-offset: 2px;
	}

	.footer-accordion-header .footer-heading {
		display: block;
		line-height: 36px;
		margin: 0 !important;
		padding: 0 !important;
		border: none !important;
		font-size: 12px !important;
		font-weight: 700 !important;
		text-transform: uppercase;
		letter-spacing: 0.08em;
		color: var(--wp--preset--color--base) !important;
	}

	/* Plus/minus icon - more prominent */
	.footer-accordion-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		background: rgba(255, 255, 255, 0.1);
		border-radius: 50%;
		flex-shrink: 0;
		position: relative;
	}

	.footer-accordion-icon::before,
	.footer-accordion-icon::after {
		content: '';
		position: absolute;
		background: var(--wp--preset--color--base);
		transition: transform 0.25s ease, opacity 0.25s ease;
	}

	/* Horizontal line */
	.footer-accordion-icon::before {
		width: 12px;
		height: 2px;
	}

	/* Vertical line */
	.footer-accordion-icon::after {
		width: 2px;
		height: 12px;
	}

	/* When expanded, rotate vertical line (+ becomes -) */
	.footer-accordion.is-expanded .footer-accordion-icon::after {
		transform: rotate(90deg);
		opacity: 0;
	}

	.footer-accordion.is-expanded .footer-accordion-icon {
		background: rgba(223, 59, 38, 0.2);
	}

	/* Accordion content */
	.footer-accordion-content {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
		margin-top: 0 !important;
	}

	.footer-accordion.is-expanded .footer-accordion-content {
		padding-bottom: 0;
	}

	/* Links inside accordion */
	.footer-accordion .footer-links-group .menu a {
		padding: 10px 0;
		font-size: 15px;
	}

	/* View all link in accordion */
	.footer-accordion .footer-view-all {
		margin-top: 8px;
		margin-bottom: 4px;
		font-size: 14px;
	}

	/* Mobile CTA button - filled red, centered */
	.footer-cta-mobile {
		display: flex !important;
		justify-content: center;
		margin-top: 24px !important;
		width: 100%;
	}

	.footer-cta-mobile .wp-block-button__link {
		background: var(--wp--preset--color--primary) !important;
		color: var(--wp--preset--color--base) !important;
		border: none !important;
		padding: 16px 32px !important;
		font-weight: 700;
		font-size: 15px;
	}

	/* Bottom bar */
	.footer-bottom {
		padding: 16px 0 !important;
	}

	.footer-bottom > .wp-block-group {
		flex-direction: column !important;
		text-align: center;
		gap: 6px;
	}

	.footer-bottom p {
		font-size: 13px;
	}
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
	.pre-footer-cta p a,
	.pre-footer-cta .wp-block-button__link,
	.footer-contact a,
	.footer-social a,
	.footer-links a,
	.footer-links-group .menu a,
	.footer-view-all,
	.footer-bottom a,
	.footer-accordion-content,
	.footer-accordion-icon::before,
	.footer-accordion-icon::after {
		transition: none;
	}

	.pre-footer-cta .wp-block-button__link:hover,
	.footer-social a:hover {
		transform: none;
	}
}
