/**
 * Testimonials Component Styles - Neo-Brutalist Style
 * Modern brutalist testimonial cards with decorative elements
 */

:root {
	--test-black: #0a0a0a;
	--test-cream: #f5f2e8;
	--test-white: #ffffff;
	--test-red: #ff3b3b;
	--test-red-dark: #cc0000;
	--test-yellow: #ffe135;
	--test-blue: #2b4cff;
	--test-shadow-sm: 4px 4px 0 var(--test-black);
	--test-shadow-md: 6px 6px 0 var(--test-black);
	--test-shadow-lg: 8px 8px 0 var(--test-black);
	--test-border: 3px solid var(--test-black);
	--test-border-thick: 4px solid var(--test-black);
	--test-border-chunky: 5px solid var(--test-black);

	/* Fluid spacing */
	--space-xs: clamp(0.5rem, 2vw, 0.75rem);
	--space-sm: clamp(0.75rem, 3vw, 1rem);
	--space-md: clamp(1rem, 4vw, 1.5rem);
	--space-lg: clamp(1.5rem, 5vw, 2.5rem);
	--space-xl: clamp(2rem, 6vw, 4rem);
}

/* Reset */
.testimonials-section *,
.testimonials-section *::before,
.testimonials-section *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Section */
.testimonials-section {
	font-family: 'Darker Grotesque', sans-serif;
	background-color: var(--test-red);
	background-image:
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 40px,
			rgba(0,0,0,0.03) 40px,
			rgba(0,0,0,0.03) 80px
		),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 40px,
			rgba(0,0,0,0.03) 40px,
			rgba(0,0,0,0.03) 80px
		);
	padding: var(--space-xl) var(--space-md);
	position: relative;
	overflow: hidden;
	min-height: 100svh;
	display: flex;
	align-items: center;
}

/* Decorative Elements */
.test-decor {
	position: absolute;
	pointer-events: none;
	z-index: 0;
}

.test-decor-star {
	font-size: clamp(2.5rem, 8vw, 7rem);
	color: var(--test-yellow);
	text-shadow: 3px 3px 0 var(--test-black);
	top: 3%;
	left: 3%;
	animation: testWobble 8s ease-in-out infinite;
}

.test-decor-cross {
	font-size: clamp(2rem, 6vw, 5rem);
	color: var(--test-black);
	bottom: 5%;
	right: 4%;
	font-weight: 900;
	animation: testSpinSlow 20s linear infinite;
}

.test-decor-circle {
	width: clamp(40px, 8vw, 100px);
	height: clamp(40px, 8vw, 100px);
	background: var(--test-yellow);
	border: var(--test-border-thick);
	border-radius: 50%;
	top: 15%;
	right: 8%;
	animation: testBounceSoft 4s ease-in-out infinite;
}

.test-decor-square {
	width: clamp(25px, 5vw, 60px);
	height: clamp(25px, 5vw, 60px);
	background: var(--test-black);
	bottom: 15%;
	left: 5%;
	transform: rotate(15deg);
}

@keyframes testWobble {
	0%, 100% { transform: rotate(-5deg); }
	50% { transform: rotate(5deg); }
}

@keyframes testSpinSlow {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

@keyframes testBounceSoft {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-15px); }
}

/* Container */
.testimonials-container {
	max-width: 1100px;
	width: 100%;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

/* Header */
.testimonials-header {
	text-align: center;
	margin-bottom: var(--space-lg);
}

.testimonials-eyebrow {
	font-family: 'Space Mono', monospace;
	font-size: clamp(0.6rem, 1.5vw, 0.85rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--test-black);
	background: var(--test-yellow);
	display: inline-block;
	padding: clamp(0.3rem, 1vw, 0.4rem) clamp(0.8rem, 2vw, 1.2rem);
	border: var(--test-border);
	box-shadow: var(--test-shadow-sm);
	margin-bottom: var(--space-sm);
	transform: rotate(-2deg);
}

.testimonials-title {
	font-size: clamp(1.8rem, 6vw, 4.5rem);
	font-weight: 900;
	line-height: 0.95;
	color: var(--test-cream);
	text-transform: uppercase;
	letter-spacing: -0.02em;
	text-shadow: 3px 3px 0 var(--test-black);
	margin-bottom: var(--space-md);
	padding: 0 var(--space-xs);
}

.testimonials-title-highlight {
	display: inline-block;
	background: var(--test-black);
	color: var(--test-yellow);
	padding: 0.05em 0.2em;
	transform: rotate(1deg);
	text-shadow: none;
	margin-top: 0.1em;
}

.testimonials-source {
	display: inline-block;
	font-family: 'Space Mono', monospace;
	font-size: clamp(0.65rem, 1.8vw, 0.9rem);
	background: var(--test-cream);
	border: var(--test-border);
	box-shadow: var(--test-shadow-sm);
	padding: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.8rem, 2vw, 1.2rem);
	transform: rotate(0.5deg);
	max-width: 90%;
}

.testimonials-source a {
	color: var(--test-black);
	text-decoration: none;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.testimonials-source a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.source-icon {
	font-style: normal;
}

/* Grid */
.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-md);
}

/* Individual Testimonial Card */
.testimonial-card {
	background: var(--test-cream);
	border: var(--test-border-thick);
	box-shadow: var(--test-shadow-lg);
	padding: var(--space-md);
	position: relative;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	display: flex;
	flex-direction: column;
}

/* Alternating rotations */
.testimonial-card:nth-child(odd) {
	transform: rotate(-0.5deg);
}

.testimonial-card:nth-child(even) {
	transform: rotate(0.5deg);
}

.testimonial-card:nth-child(3n+1) {
	transform: rotate(-1deg);
}

.testimonial-card:hover {
	transform: rotate(0deg) translate(-4px, -4px) !important;
	box-shadow: 12px 12px 0 var(--test-black);
	z-index: 10;
}

/* Quote mark decoration */
.testimonial-card::before {
	content: '"';
	position: absolute;
	top: -8px;
	left: 10px;
	font-family: 'Darker Grotesque', sans-serif;
	font-size: clamp(3rem, 8vw, 5rem);
	font-weight: 900;
	color: var(--test-red);
	line-height: 1;
	opacity: 0.25;
	pointer-events: none;
}

/* Color accent strips */
.testimonial-card::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: clamp(4px, 1vw, 6px);
	background: var(--test-red);
}

.testimonial-card:nth-child(2)::after,
.testimonial-card:nth-child(5)::after {
	background: var(--test-yellow);
}

.testimonial-card:nth-child(3)::after,
.testimonial-card:nth-child(6)::after {
	background: var(--test-blue);
}

.testimonial-content {
	font-size: clamp(0.9rem, 2.2vw, 1.15rem);
	font-weight: 700;
	line-height: 1.4;
	color: var(--test-black);
	margin-bottom: auto;
	padding-bottom: var(--space-sm);
	position: relative;
	z-index: 1;
}

.testimonial-author {
	display: flex;
	align-items: center;
	gap: clamp(0.5rem, 2vw, 0.75rem);
	padding-top: var(--space-sm);
	border-top: 2px dashed var(--test-black);
	margin-top: auto;
}

.author-avatar {
	width: clamp(36px, 8vw, 45px);
	height: clamp(36px, 8vw, 45px);
	background: var(--test-black);
	color: var(--test-yellow);
	border: var(--test-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Space Mono', monospace;
	font-weight: 700;
	font-size: clamp(0.7rem, 2vw, 0.85rem);
	flex-shrink: 0;
	box-shadow: 3px 3px 0 var(--test-red);
}

.author-name {
	font-family: 'Space Mono', monospace;
	font-size: clamp(0.7rem, 1.8vw, 0.9rem);
	font-weight: 700;
	color: var(--test-black);
	text-transform: uppercase;
	letter-spacing: 0.01em;
	line-height: 1.3;
	word-break: break-word;
}

/* Warning Badge - adds personality */
.warning-badge {
	position: absolute;
	top: -10px;
	right: -6px;
	background: var(--test-yellow);
	border: var(--test-border);
	padding: clamp(0.15rem, 0.5vw, 0.2rem) clamp(0.4rem, 1vw, 0.6rem);
	font-family: 'Space Mono', monospace;
	font-size: clamp(0.55rem, 1.5vw, 0.65rem);
	font-weight: 700;
	text-transform: uppercase;
	transform: rotate(8deg);
	box-shadow: 2px 2px 0 var(--test-black);
	z-index: 5;
	white-space: nowrap;
}

/* Footer CTA */
.testimonials-footer {
	text-align: center;
	margin-top: var(--space-lg);
}

.testimonials-tagline {
	font-family: 'Space Mono', monospace;
	font-size: clamp(0.8rem, 2.2vw, 1.1rem);
	color: var(--test-cream);
	background: var(--test-black);
	display: inline-block;
	padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.5rem);
	border: var(--test-border-thick);
	box-shadow: var(--test-shadow-md);
	transform: rotate(-1deg);
	max-width: 90%;
}

.testimonials-tagline em {
	color: var(--test-yellow);
	font-style: normal;
	text-decoration: underline;
	text-decoration-style: wavy;
	text-underline-offset: 3px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large tablets / small desktops */
@media (max-width: 1024px) {
	.testimonials-grid {
		gap: var(--space-sm);
	}

	.test-decor-circle {
		right: 3%;
		top: 10%;
	}
}

/* Tablets */
@media (max-width: 900px) {
	.testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.test-decor-circle {
		display: none;
	}

	.test-decor-cross {
		font-size: 2.5rem;
		bottom: 3%;
		right: 3%;
	}
}

/* Large phones / small tablets */
@media (max-width: 680px) {
	.testimonials-section {
		min-height: auto;
		padding: var(--space-lg) var(--space-sm);
	}

	.testimonials-grid {
		grid-template-columns: 1fr;
		max-width: 400px;
		margin: 0 auto;
		gap: var(--space-md);
	}

	.testimonial-card {
		transform: none !important;
	}

	.testimonial-card:hover {
		transform: translate(-3px, -3px) !important;
		box-shadow: var(--test-shadow-lg);
	}

	.test-decor-star {
		top: 1%;
		left: 2%;
	}

	.test-decor-cross,
	.test-decor-square {
		display: none;
	}

	.warning-badge {
		top: -8px;
		right: 8px;
	}

	.testimonials-title-highlight {
		display: block;
		margin-top: 0.15em;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.testimonials-section {
		padding: var(--space-md) var(--space-xs);
	}

	.testimonials-grid {
		max-width: 100%;
	}

	.testimonial-card {
		box-shadow: var(--test-shadow-md);
	}

	.testimonial-card:hover {
		box-shadow: var(--test-shadow-lg);
	}

	.testimonials-source {
		max-width: 100%;
	}

	.testimonials-source a {
		font-size: 0.7rem;
	}

	.source-icon {
		display: none;
	}
}

/* Very small screens */
@media (max-width: 360px) {
	.testimonials-section {
		padding: var(--space-sm) 0.5rem;
	}

	.testimonial-card {
		padding: var(--space-sm);
		border-width: 2px;
	}

	.testimonial-card::after {
		height: 4px;
	}

	.testimonials-eyebrow {
		font-size: 0.6rem;
		padding: 0.25rem 0.6rem;
	}

	.testimonials-title {
		font-size: 1.6rem;
		text-shadow: 2px 2px 0 var(--test-black);
	}

	.author-avatar {
		width: 32px;
		height: 32px;
		font-size: 0.65rem;
		border-width: 2px;
	}

	.author-name {
		font-size: 0.65rem;
	}

	.warning-badge {
		font-size: 0.5rem;
		padding: 0.1rem 0.35rem;
		border-width: 2px;
	}

	.testimonials-tagline {
		font-size: 0.75rem;
		padding: 0.5rem 0.8rem;
		border-width: 3px;
	}

	.test-decor-star {
		font-size: 2rem;
		text-shadow: 2px 2px 0 var(--test-black);
	}
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
	.testimonials-section {
		min-height: auto;
		padding: var(--space-md) var(--space-lg);
	}

	.testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
		max-width: 100%;
	}

	.test-decor-star,
	.test-decor-cross,
	.test-decor-circle,
	.test-decor-square {
		display: none;
	}

	.testimonials-header {
		margin-bottom: var(--space-md);
	}

	.testimonials-footer {
		margin-top: var(--space-md);
	}
}

/* Tall phones (extra long screens) */
@media (min-height: 800px) and (max-width: 480px) {
	.testimonials-section {
		padding-top: var(--space-xl);
		padding-bottom: var(--space-xl);
	}

	.testimonials-grid {
		gap: var(--space-lg);
	}
}

/* High DPI / Retina adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.testimonial-card {
		border-width: 3px;
	}
}

/* Hover-capable devices only */
@media (hover: hover) and (pointer: fine) {
	.testimonial-card:hover {
		transform: rotate(0deg) translate(-4px, -4px) !important;
		box-shadow: 12px 12px 0 var(--test-black);
	}
}

/* Touch devices - disable rotation transforms for cleaner look */
@media (hover: none) and (pointer: coarse) {
	.testimonial-card {
		transform: none !important;
	}

	.testimonial-card:active {
		transform: scale(0.98) !important;
		box-shadow: var(--test-shadow-sm);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.test-decor-star,
	.test-decor-cross,
	.test-decor-circle {
		animation: none;
	}

	.testimonial-card {
		transition: none;
	}
}

/* Print styles */
@media print {
	.testimonials-section {
		background: white;
		padding: 1rem;
	}

	.test-decor {
		display: none;
	}

	.testimonial-card {
		box-shadow: none;
		border: 1px solid #000;
		break-inside: avoid;
	}

	.testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}
