/**
 * Counters Section Styles
 *
 * Brand-aligned counter statistics component for Automuseums.
 *
 * @package Automuseums
 * @author  Synergy Marketing
 * @since   1.0.0
 */

/* ============================================
   COUNTERS SECTION
   ============================================ */

.automuseums-counters-section {
	background-color: #F3F4F6;
	padding: 64px 24px;
	margin: 0;
}

.counters-container {
	max-width: 1200px;
	margin: 0 auto;
}

.counters-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}

/* ============================================
   COUNTER ITEM
   ============================================ */

.counter-item {
	background: #FFFFFF;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 32px;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.counter-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* ============================================
   COUNTER ELEMENTS
   ============================================ */

.counter-icon {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 16px auto;
	color: #2563EB;
	transition: transform 0.3s ease, color 0.3s ease;
}

/* SVG icons inherit size from parent */
.counter-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Hover effect - slightly enlarge and darken */
.counter-item:hover .counter-icon {
	transform: scale(1.1);
	color: #1D4ED8;
}

.counter-number {
	display: block;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 36px;
	font-weight: 700;
	color: #1F2937;
	line-height: 1.2;
	margin-bottom: 8px;
	transition: transform 100ms ease-out;
}

/* Animation state during counting */
.counter-number.counting {
	color: #2563EB;
	transform: scale(1.05);
}

.counter-label {
	display: block;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #6B7280;
	line-height: 1.5;
	text-transform: capitalize;
}

/* ============================================
   LAYOUT VARIATIONS
   ============================================ */

/* Vertical Layout - Stack all counters vertically */
.automuseums-counters-section.layout-vertical .counters-grid {
	grid-template-columns: 1fr;
	max-width: 400px;
	margin: 0 auto;
}

.automuseums-counters-section.layout-vertical .counter-item {
	text-align: left;
	display: flex;
	align-items: center;
	gap: 16px;
}

.automuseums-counters-section.layout-vertical .counter-icon {
	margin-bottom: 0;
	flex-shrink: 0;
}

.automuseums-counters-section.layout-vertical .counter-number,
.automuseums-counters-section.layout-vertical .counter-label {
	text-align: left;
}

/* Inline Layout - Compact horizontal display */
.automuseums-counters-section.layout-inline {
	padding: 32px 24px;
}

.automuseums-counters-section.layout-inline .counters-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 48px;
}

.automuseums-counters-section.layout-inline .counter-item {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	transition: transform 0.3s ease;
}

.automuseums-counters-section.layout-inline .counter-item:hover {
	transform: scale(1.05);
	box-shadow: none;
}

.automuseums-counters-section.layout-inline .counter-icon {
	width: 40px;
	height: 40px;
	margin: 0;
	flex-shrink: 0;
}

.automuseums-counters-section.layout-inline .counter-number {
	font-size: 28px;
	margin-bottom: 0;
}

.automuseums-counters-section.layout-inline .counter-label {
	font-size: 14px;
}

/* ============================================
   RESPONSIVE: TABLET (768px - 1023px)
   ============================================ */

@media (max-width: 1023px) {
	.counters-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.automuseums-counters-section {
		padding: 48px 20px;
	}

	.counter-item {
		padding: 24px;
	}

	.counter-icon {
		width: 56px;
		height: 56px;
		margin-bottom: 12px;
	}

	.counter-number {
		font-size: 32px;
	}
}

/* ============================================
   RESPONSIVE: MOBILE (< 768px)
   ============================================ */

@media (max-width: 767px) {
	.counters-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.automuseums-counters-section {
		padding: 40px 16px;
	}

	.counter-item {
		padding: 24px 16px;
	}

	.counter-icon {
		width: 48px;
		height: 48px;
		margin-bottom: 12px;
	}

	.counter-number {
		font-size: 30px;
	}

	.counter-label {
		font-size: 14px;
	}
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Ensure sufficient color contrast */
.counter-number {
	/* #1F2937 on #FFFFFF = 13.11:1 (WCAG AAA) */
}

.counter-label {
	/* #6B7280 on #FFFFFF = 5.74:1 (WCAG AA) */
}

/* Focus states for keyboard navigation */
.counter-item:focus-within {
	outline: 2px solid #2563EB;
	outline-offset: 2px;
}

/* Reduce motion for users with vestibular disorders */
@media (prefers-reduced-motion: reduce) {
	.counter-item {
		transition: none;
	}

	.counter-item:hover {
		transform: none;
	}

	.counter-icon {
		transition: none;
	}

	.counter-item:hover .counter-icon {
		transform: none;
	}

	.counter-number {
		transition: none;
	}

	.counter-number.counting {
		transform: none;
	}
}