/**
 * Trusted by Brands Section Styles - Mobile First
 * 
 * Horizontal auto-scrolling brand logos carousel
 * Professional white rounded cards with subtle shadows
 * Uses Palette A CSS variables for consistent theming
 *
 * @package Garage_At_Home
 */

/* Palette A CSS Variables */
:root {
	--gh-bg: #0F1113;
	--gh-surface: #141618;
	--gh-accent: #C62828;
	--gh-accent-2: #FF6F61;
	--gh-text: #F5F6F7;
	--gh-muted: #BFC4C6;
}

/* Trusted Section Container - Standardized */
.gh-trusted-section {
	background-color: var(--gh-bg);
	padding: 2rem 0;
	position: relative;
	width: 100%;
	max-width: 100vw;
	overflow-x: hidden;
	box-sizing: border-box;
}

/* Mobile: Consistent padding */
@media (max-width: 767px) {
	.gh-trusted-section {
		padding: 1.5rem 0;
	}
}

.gh-trusted-container {
	max-width: min(1400px, 100%);
	margin: 0 auto;
	padding: 0 1.5rem;
	width: 100%;
	box-sizing: border-box;
}

/* Trusted Header */
.gh-trusted-header {
	margin-bottom: 1.5rem;
	text-align: center;
}

/* Mobile: Reduce trusted header margin */
@media (max-width: 767px) {
	.gh-trusted-header {
		margin-bottom: 1.25rem;
	}
}

.gh-trusted-title {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	letter-spacing: -0.3px;
	color: var(--gh-text);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.375rem;
}

.gh-trusted-title-accent {
	color: var(--gh-accent-2);
	font-weight: 800;
}

/* Trusted Wrapper */
.gh-trusted-wrapper {
	position: relative;
	width: 100%;
}

/* Track Wrapper */
.gh-trusted-track-wrapper {
	overflow: hidden;
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Track */
.gh-trusted-track {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	gap: 2rem !important;
	column-gap: 2rem !important;
	row-gap: 0 !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	width: max-content;
	will-change: transform;
	transition: transform 0.5s ease;
}

.gh-trusted-track > *,
.gh-trusted-track > li,
.gh-trusted-track li {
	margin-left: 0 !important;
	margin-right: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Trusted Item - Fixed Size White Card Container */
.gh-trusted-item,
.gh-trusted-track > li,
.gh-trusted-track li {
	flex: 0 0 auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	overflow: hidden;
	margin: 0 !important;
	padding: 0.75rem 1rem !important;
	background: #FFFFFF !important;
	border-radius: 10px !important;
	box-shadow: 
		0 1px 3px rgba(0, 0, 0, 0.08), 
		0 1px 2px rgba(0, 0, 0, 0.06),
		inset 0 0 0 1px rgba(0, 0, 0, 0.03) !important;
	transition: all 0.25s ease;
	width: calc(100% / 2) !important;
	min-width: calc(100% / 2) !important;
	max-width: calc(100% / 2) !important;
	flex-basis: calc(100% / 2) !important;
	height: 70px !important;
	min-height: 70px !important;
	max-height: 70px !important;
	list-style: none !important;
	position: relative;
}

.gh-trusted-item:hover {
	box-shadow: 
		0 4px 12px rgba(0, 0, 0, 0.12), 
		0 2px 6px rgba(0, 0, 0, 0.08),
		inset 0 0 0 1px rgba(198, 40, 40, 0.1) !important;
	transform: translateY(-2px);
	background: #FFFFFF !important;
}

/* Trusted Link */
.gh-trusted-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
	outline: none;
	transition: all 0.25s ease;
	margin: 0 !important;
	padding: 0 !important;
}

.gh-trusted-link:hover {
	transform: none;
	opacity: 1;
}

.gh-trusted-link:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 3px;
	border-radius: 10px;
}

/* Trusted Figure - Logo Container */
.gh-trusted-figure {
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	position: relative;
}

/* Trusted Logo - Responsive within fixed container */
.gh-trusted-logo,
.gh-trusted-item img,
.gh-trusted-figure img,
.gh-trusted-link img,
.gh-trusted-section img,
.gh-trusted-wrapper img,
.gh-trusted-track img {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	object-fit: contain !important;
	object-position: center !important;
	border-radius: 0 !important;
	background: transparent !important;
	padding: 0 !important;
	box-shadow: none !important;
	transition: all 0.25s ease;
	display: block !important;
	box-sizing: border-box !important;
	margin: 0 auto !important;
	filter: none !important;
	opacity: 1 !important;
}

.gh-trusted-logo:hover {
	filter: none;
	opacity: 1;
	transform: scale(1.05);
}

/* Placeholder styling */
.gh-trusted-logo[data-placeholder] {
	background: var(--gh-surface);
	border: 1px dashed rgba(255, 111, 97, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gh-muted);
	font-size: 0.6875rem;
	text-align: center;
	padding: 0.5rem;
	border-radius: 6px;
	min-height: 30px;
	min-width: 80px;
}

.gh-trusted-logo[data-placeholder]::after {
	content: attr(data-placeholder);
	font-weight: 500;
	opacity: 0.5;
}

/* Mobile: 2 visible logos - Fixed box size */
.gh-trusted-item {
	height: 60px !important;
	min-height: 60px !important;
	max-height: 60px !important;
	padding: 0.625rem 0.75rem !important;
}

.gh-trusted-logo,
.gh-trusted-item img,
.gh-trusted-figure img,
.gh-trusted-link img {
	max-width: calc(100% - 1.5rem) !important;
	max-height: calc(100% - 1.25rem) !important;
	width: auto !important;
	height: auto !important;
}

/* Auto-scroll animation for mobile */
.gh-trusted-track.gh-trusted-autoplay {
	animation: scrollTrusted 30s linear infinite;
}

.gh-trusted-track.gh-trusted-autoplay:hover {
	animation-play-state: paused;
}

/* Tablet: 4 visible logos */
@media (min-width: 768px) {
	.gh-trusted-section {
		padding: 3.5rem 0;
	}
	
	.gh-trusted-container {
		padding: 0 2rem;
		max-width: min(1400px, calc(100% - 4rem));
	}
	
	.gh-trusted-header {
		margin-bottom: 2.25rem;
	}
	
	.gh-trusted-title {
		font-size: 1.75rem;
		gap: 0.5rem;
	}
	
	.gh-trusted-item {
		width: calc(100% / 4) !important;
		min-width: calc(100% / 4) !important;
		max-width: calc(100% / 4) !important;
		flex-basis: calc(100% / 4) !important;
		height: 70px !important;
		min-height: 70px !important;
		max-height: 70px !important;
		padding: 0.75rem 1rem !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	.gh-trusted-logo,
	.gh-trusted-item img,
	.gh-trusted-figure img,
	.gh-trusted-link img {
		max-width: calc(100% - 2rem) !important;
		max-height: calc(100% - 1.5rem) !important;
		width: auto !important;
		height: auto !important;
	}
	
	.gh-trusted-track {
		gap: 1rem !important;
		column-gap: 1rem !important;
	}
	
	/* Auto-scroll animation for tablet */
	.gh-trusted-track.gh-trusted-autoplay {
		animation: scrollTrusted 30s linear infinite;
	}
	
	.gh-trusted-track.gh-trusted-autoplay:hover {
		animation-play-state: paused;
	}
}

/* Desktop: 5 visible logos */
@media (min-width: 1024px) {
	.gh-trusted-section {
		padding: 4rem 0;
	}
	
	.gh-trusted-header {
		margin-bottom: 2.5rem;
	}
	
	.gh-trusted-title {
		font-size: 2rem;
		gap: 0.625rem;
	}
	
	.gh-trusted-item {
		width: calc(100% / 5) !important;
		min-width: calc(100% / 5) !important;
		max-width: calc(100% / 5) !important;
		flex-basis: calc(100% / 5) !important;
		height: 80px !important;
		min-height: 80px !important;
		max-height: 80px !important;
		padding: 0.875rem 1.25rem !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	.gh-trusted-logo,
	.gh-trusted-item img,
	.gh-trusted-figure img,
	.gh-trusted-link img {
		max-width: calc(100% - 2.5rem) !important;
		max-height: calc(100% - 1.75rem) !important;
		width: auto !important;
		height: auto !important;
	}
	
	.gh-trusted-track {
		gap: 1rem !important;
		column-gap: 1rem !important;
	}
	
	/* Auto-scroll animation */
	.gh-trusted-track.gh-trusted-autoplay {
		animation: scrollTrusted 30s linear infinite;
	}
	
	.gh-trusted-track.gh-trusted-autoplay:hover {
		animation-play-state: paused;
	}
}

/* Auto-scroll animation */
@keyframes scrollTrusted {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* Large Desktop: 5 visible logos */
@media (min-width: 1280px) {
	.gh-trusted-container {
		padding: 0 2.5rem;
		max-width: min(1400px, calc(100% - 5rem));
	}
	
	.gh-trusted-item {
		width: calc(100% / 5) !important;
		min-width: calc(100% / 5) !important;
		max-width: calc(100% / 5) !important;
		flex-basis: calc(100% / 5) !important;
		height: 85px !important;
		min-height: 85px !important;
		max-height: 85px !important;
		padding: 1rem 1.5rem !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	.gh-trusted-logo,
	.gh-trusted-item img,
	.gh-trusted-figure img,
	.gh-trusted-link img {
		max-width: calc(100% - 3rem) !important;
		max-height: calc(100% - 2rem) !important;
		width: auto !important;
		height: auto !important;
	}
	
	.gh-trusted-track {
		gap: 1rem !important;
		column-gap: 1rem !important;
	}
}

/* Small Mobile: 2 visible logos */
@media (max-width: 480px) {
	.gh-trusted-section {
		padding: 2rem 0;
	}
	
	.gh-trusted-container {
		padding: 0 1rem;
	}
	
	.gh-trusted-header {
		margin-bottom: 1.75rem;
	}
	
	.gh-trusted-title {
		font-size: 1.25rem;
		gap: 0.25rem;
	}
	
	.gh-trusted-item {
		width: calc(100% / 2) !important;
		min-width: calc(100% / 2) !important;
		max-width: calc(100% / 2) !important;
		flex-basis: calc(100% / 2) !important;
		height: 55px !important;
		min-height: 55px !important;
		max-height: 55px !important;
		padding: 0.5rem 0.625rem !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	.gh-trusted-logo,
	.gh-trusted-item img,
	.gh-trusted-figure img,
	.gh-trusted-link img {
		max-width: calc(100% - 1.25rem) !important;
		max-height: calc(100% - 1rem) !important;
		width: auto !important;
		height: auto !important;
	}
	
	.gh-trusted-track {
		gap: 1rem !important;
		column-gap: 1rem !important;
	}
}

/* Keyboard Navigation Enhancement */
.gh-trusted-item:focus-visible,
.gh-trusted-link:focus-visible {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 3px;
	border-radius: 10px;
}

/* Smooth transitions */
.gh-trusted-logo,
.gh-trusted-link,
.gh-trusted-item {
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance optimization */
.gh-trusted-track {
	backface-visibility: hidden;
	perspective: 1000px;
}

.gh-trusted-logo {
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
}

/* Force zero spacing between all items - ULTRA AGGRESSIVE OVERRIDE */
.gh-trusted-section *,
.gh-trusted-section *::before,
.gh-trusted-section *::after {
	box-sizing: border-box !important;
}

.gh-trusted-track li + li,
.gh-trusted-track > li + li,
.gh-trusted-item + .gh-trusted-item,
.gh-trusted-track > * + * {
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Remove any potential spacing from figure and link elements */
.gh-trusted-figure,
.gh-trusted-link {
	margin: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
