/**
 * Service Areas Section Styles - Mobile First
 * 
 * Professional responsive service areas grid with clickable city cards
 * 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;
}

/* Service Areas Section Container - Standardized */
.gh-areas-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-areas-section {
		padding: 1.5rem 0;
	}
}

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

/* Areas Header - Standardized */
.gh-areas-header {
	margin-bottom: 1.5rem;
	text-align: center;
	position: relative;
	padding: 1.5rem 1rem;
	background: 
		radial-gradient(circle at 20% 50%, rgba(198, 40, 40, 0.08) 0%, transparent 50%),
		radial-gradient(circle at 80% 50%, rgba(255, 111, 97, 0.06) 0%, transparent 50%),
		linear-gradient(180deg, transparent 0%, rgba(198, 40, 40, 0.03) 100%);
	border-radius: 12px;
	border: 1px solid rgba(198, 40, 40, 0.1);
}

/* Mobile: Consistent spacing */
@media (max-width: 767px) {
	.gh-areas-header {
		margin-bottom: 1.25rem;
		padding: 1.25rem 0.875rem;
		border-radius: 10px;
	}
}

.gh-areas-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent 0%, var(--gh-accent) 50%, transparent 100%);
	border-radius: 16px 16px 0 0;
}

.gh-areas-title {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 0.75rem 0;
	letter-spacing: -0.5px;
	color: var(--gh-text);
	position: relative;
	display: inline-block;
}

/* Mobile: Smaller areas title */
@media (max-width: 767px) {
	.gh-areas-title {
		font-size: 1.375rem;
		margin: 0 0 0.5rem 0;
	}
}

.gh-areas-title::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background: linear-gradient(90deg, var(--gh-accent) 0%, var(--gh-accent-2) 100%);
	border-radius: 2px;
}

.gh-areas-subtitle {
	font-size: 0.875rem;
	color: var(--gh-muted);
	margin: 1.25rem 0 0 0;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0.3px;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	position: relative;
}

/* Areas Wrapper */
.gh-areas-wrapper {
	width: 100%;
	overflow: hidden;
	box-sizing: border-box;
	position: relative;
}

/* Areas Grid - Mobile: Auto-scrolling horizontal */
.gh-areas-grid {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 1rem;
	width: max-content;
	padding: 0 1rem;
	margin: 0;
	list-style: none;
	box-sizing: border-box;
	animation: scrollAreas 35s linear infinite;
}

.gh-areas-grid:hover {
	animation-play-state: paused;
}

.gh-areas-grid .gh-area-card {
	flex: 0 0 auto;
	width: 160px;
	min-width: 160px;
	max-width: 160px;
}

/* Area Card - Enhanced Professional Design with Better Graphics */
.gh-area-card {
	background: 
		linear-gradient(135deg, rgba(245, 246, 247, 0.98) 0%, rgba(255, 255, 255, 1) 100%),
		radial-gradient(circle at 30% 20%, rgba(198, 40, 40, 0.04) 0%, transparent 50%),
		radial-gradient(circle at 70% 80%, rgba(255, 111, 97, 0.03) 0%, transparent 50%);
	border-radius: 16px;
	padding: 1.25rem 1rem;
	box-shadow: 
		inset 0 1px 3px rgba(255, 255, 255, 0.8),
		inset 0 -1px 2px rgba(0, 0, 0, 0.05),
		0 3px 8px rgba(0, 0, 0, 0.06),
		0 1px 3px rgba(0, 0, 0, 0.04);
	transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
	border: 1px solid rgba(198, 40, 40, 0.12);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	cursor: pointer;
	outline: none;
	min-height: 160px;
	text-decoration: none;
	color: inherit;
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

/* Card Background Pattern Overlay */
.gh-area-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--gh-accent) 0%, var(--gh-accent-2) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 1;
}

.gh-area-card::after {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 150px;
	height: 150px;
	background: radial-gradient(circle, rgba(198, 40, 40, 0.06) 0%, transparent 70%);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 0;
}

.gh-area-card:hover::before {
	opacity: 1;
}

.gh-area-card:hover::after {
	opacity: 1;
}

.gh-area-card:hover {
	transform: translateY(-4px) scale(1.01);
	background: 
		linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(245, 246, 247, 0.98) 100%),
		radial-gradient(circle at 30% 20%, rgba(198, 40, 40, 0.08) 0%, transparent 50%),
		radial-gradient(circle at 70% 80%, rgba(255, 111, 97, 0.06) 0%, transparent 50%);
	box-shadow: 
		inset 0 1px 3px rgba(255, 255, 255, 0.9),
		inset 0 -1px 2px rgba(0, 0, 0, 0.05),
		0 8px 16px rgba(198, 40, 40, 0.12),
		0 4px 8px rgba(0, 0, 0, 0.08);
	border-color: rgba(198, 40, 40, 0.2);
}

.gh-area-card:hover .gh-area-media {
	transform: scale(1.1);
	box-shadow: 0 8px 16px rgba(198, 40, 40, 0.2);
}

.gh-area-card:hover .gh-area-city {
	color: var(--gh-accent);
}

.gh-area-card:focus-visible {
	outline: 3px solid var(--gh-accent);
	outline-offset: 4px;
	box-shadow: 
		inset 0 2px 8px rgba(0, 0, 0, 0.06),
		0 0 0 4px rgba(255, 111, 97, 0.3),
		0 8px 16px rgba(198, 40, 40, 0.15);
}

.gh-area-card:active {
	transform: translateY(-3px) scale(1.01);
}

/* All cards are now clickable - removed placeholder styles */

/* Area Media - Enhanced Circular Sticker Container */
.gh-area-media {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: 
		linear-gradient(135deg, rgba(198, 40, 40, 0.1) 0%, rgba(255, 111, 97, 0.08) 100%),
		radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.875rem;
	overflow: hidden;
	position: relative;
	flex-shrink: 0;
	transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
	border: 2px solid rgba(198, 40, 40, 0.15);
	box-shadow: 
		inset 0 2px 4px rgba(255, 255, 255, 0.5),
		inset 0 -1px 2px rgba(0, 0, 0, 0.1),
		0 3px 6px rgba(0, 0, 0, 0.1);
}

.gh-area-media::after {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.gh-area-card:hover .gh-area-media::after {
	opacity: 1;
}

.gh-area-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	position: relative;
	z-index: 1;
	transition: transform 0.4s ease;
}

.gh-area-card:hover .gh-area-media img {
	transform: scale(1.05);
}

.gh-area-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(198, 40, 40, 0.12) 0%, rgba(255, 111, 97, 0.12) 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
}

.gh-area-placeholder::before {
	content: '📍';
	font-size: 2.5rem;
	opacity: 0.4;
	filter: grayscale(0.3);
	transition: transform 0.4s ease, opacity 0.4s ease;
}

.gh-area-card:hover .gh-area-placeholder::before {
	transform: scale(1.1);
	opacity: 0.5;
}

/* Area Content */
.gh-area-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	position: relative;
	z-index: 2;
}

.gh-area-city {
	font-size: 1rem;
	font-weight: 700;
	color: var(--gh-bg);
	margin: 0 0 0.5rem 0;
	line-height: 1.3;
	letter-spacing: 0.2px;
	transition: color 0.3s ease;
}

.gh-area-sub {
	font-size: 0.8125rem;
	color: #5A5A5A;
	margin: 0;
	line-height: 1.4;
	font-weight: 400;
	letter-spacing: 0.15px;
}

.gh-area-city-part {
	color: var(--gh-accent);
	font-weight: 600;
	transition: color 0.3s ease;
}

.gh-area-card:hover .gh-area-city-part {
	color: var(--gh-accent-2);
}

/* Tablet Layout - Auto-scrolling horizontal */
@media (min-width: 768px) {
	.gh-areas-section {
		padding: 4.5rem 0;
	}
	
	.gh-areas-container {
		padding: 0 2rem;
		max-width: min(1200px, calc(100% - 4rem));
	}
	
	.gh-areas-header {
		margin-bottom: 2.5rem;
		padding: 2.5rem 1.5rem;
		border-radius: 20px;
	}
	
	.gh-areas-title {
		font-size: 2rem;
		margin-bottom: 1rem;
	}
	
	.gh-areas-title::after {
		width: 80px;
		height: 4px;
	}
	
	.gh-areas-subtitle {
		font-size: 0.9375rem;
		line-height: 1.6;
		margin-top: 1.5rem;
	}
	
	.gh-areas-grid {
		gap: 1.25rem;
		animation: scrollAreas 38s linear infinite;
		padding: 0 1.25rem;
	}
	
	.gh-areas-grid .gh-area-card {
		width: 200px;
		min-width: 200px;
		max-width: 200px;
	}
	
	.gh-area-card {
		padding: 1.5rem 1.25rem;
		min-height: 170px;
		border-radius: 18px;
	}
	
	.gh-area-media {
		width: 80px;
		height: 80px;
		margin-bottom: 1rem;
		border-width: 2.5px;
	}
	
	.gh-area-city {
		font-size: 1.125rem;
		margin-bottom: 0.625rem;
	}
	
	.gh-area-sub {
		font-size: 0.875rem;
		line-height: 1.5;
	}
}

/* Desktop Layout - 4 columns or horizontal scroll */
@media (min-width: 1024px) {
	.gh-areas-section {
		padding: 5rem 0;
	}
	
	.gh-areas-container {
		padding: 0 2rem;
		max-width: min(1200px, calc(100% - 4rem));
	}
	
	.gh-areas-header {
		margin-bottom: 3rem;
		padding: 3rem 2rem;
		border-radius: 24px;
	}
	
	.gh-areas-title {
		font-size: 2.25rem;
	}
	
	.gh-areas-title::after {
		width: 100px;
		height: 4px;
	}
	
	.gh-areas-subtitle {
		font-size: 1rem;
		margin-top: 1.75rem;
	}
	
	/* Grid Layout - Auto-scrolling (converted to horizontal) */
	.gh-areas-grid.layout-grid {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 1.5rem;
		width: max-content;
		animation: scrollAreas 40s linear infinite;
		padding: 0 1.5rem;
	}
	
	.gh-areas-grid.layout-grid:hover {
		animation-play-state: paused;
	}
	
	.gh-areas-grid.layout-grid .gh-area-card {
		flex: 0 0 auto;
		width: 240px;
		min-width: 240px;
		max-width: 240px;
	}
	
	/* Horizontal Scroll Layout - Auto-scrolling */
	.gh-areas-grid.layout-scroll {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 1.5rem;
		width: max-content;
		animation: scrollAreas 40s linear infinite;
		padding: 0 1.5rem;
	}
	
	.gh-areas-grid.layout-scroll:hover {
		animation-play-state: paused;
	}
	
	.gh-areas-grid.layout-scroll .gh-area-card {
		flex: 0 0 auto;
		width: 240px;
		min-width: 240px;
		max-width: 240px;
	}
	
	.gh-area-card {
		padding: 1.75rem 1.5rem;
		min-height: 180px;
		border-radius: 20px;
	}
	
	.gh-area-media {
		width: 90px;
		height: 90px;
		margin-bottom: 1.125rem;
		border-width: 2.5px;
	}
	
	.gh-area-city {
		font-size: 1.25rem;
		margin-bottom: 0.625rem;
	}
	
	.gh-area-sub {
		font-size: 0.9375rem;
		line-height: 1.5;
	}
}

/* Large Desktop */
@media (min-width: 1280px) {
	.gh-areas-section {
		padding: 6rem 0;
	}
	
	.gh-areas-grid.layout-grid {
		gap: 2.5rem;
	}
	
	.gh-areas-grid.layout-scroll {
		gap: 2.5rem;
	}
	
	.gh-areas-grid.layout-scroll .gh-area-card,
	.gh-areas-grid.layout-grid .gh-area-card {
		width: 260px;
		min-width: 260px;
		max-width: 260px;
	}
	
	.gh-area-card {
		padding: 2rem 1.75rem;
		min-height: 190px;
	}
	
	.gh-area-media {
		width: 100px;
		height: 100px;
	}
	
	.gh-area-city {
		font-size: 1.375rem;
	}
	
	.gh-area-sub {
		font-size: 1rem;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.gh-areas-section {
		padding: 2.5rem 0;
	}
	
	.gh-areas-container {
		padding: 0 1rem;
		max-width: calc(100% - 2rem);
	}
	
	.gh-areas-header {
		margin-bottom: 1.75rem;
		padding: 1.75rem 1rem;
		border-radius: 14px;
	}
	
	.gh-areas-title {
		font-size: 1.375rem;
		margin-bottom: 0.75rem;
	}
	
	.gh-areas-title::after {
		width: 50px;
		height: 2px;
		bottom: -6px;
	}
	
	.gh-areas-subtitle {
		font-size: 0.8125rem;
		line-height: 1.5;
		margin-top: 1rem;
	}
	
	.gh-areas-grid {
		gap: 0.875rem;
		animation: scrollAreas 32s linear infinite;
		padding: 0 0.875rem;
	}
	
	.gh-areas-grid .gh-area-card {
		width: 150px;
		min-width: 150px;
		max-width: 150px;
	}
	
	.gh-area-card {
		padding: 1.25rem 1rem;
		min-height: 150px;
		border-radius: 16px;
	}
	
	.gh-area-media {
		width: 65px;
		height: 65px;
		margin-bottom: 0.875rem;
		border-width: 2px;
	}
	
	.gh-area-placeholder::before {
		font-size: 1.75rem;
	}
	
	.gh-area-city {
		font-size: 0.9375rem;
		margin-bottom: 0.5rem;
	}
	
	.gh-area-sub {
		font-size: 0.75rem;
		line-height: 1.4;
	}
}

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

/* Keyboard Navigation Enhancement */
.gh-area-card:focus-visible {
	outline: 3px solid var(--gh-accent);
	outline-offset: 4px;
	box-shadow: 
		inset 0 2px 8px rgba(0, 0, 0, 0.06),
		0 0 0 4px rgba(255, 111, 97, 0.3),
		0 8px 16px rgba(198, 40, 40, 0.15);
}

/* Ensure minimum touch target size (44px) */
@media (max-width: 768px) {
	.gh-area-card {
		min-height: 180px;
	}
	
	.gh-area-media {
		min-width: 44px;
		min-height: 44px;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.gh-area-card,
	.gh-area-media,
	.gh-area-media img,
	.gh-area-placeholder::before {
		transition: none;
	}
	
	.gh-area-card:hover {
		transform: none;
	}
	
	.gh-areas-grid.layout-grid,
	.gh-areas-grid.layout-scroll {
		animation: none;
	}
}
