/**
 * Locations Hub Page Styles
 * Styles for the /locations/ hub page listing all service areas
 */

/* ==========================================================================
   Page Container
   ========================================================================== */


/* ==========================================================================
   Hero Section - Compact with integrated map
   ========================================================================== */

.locations-hero {
	padding-bottom: 2.5rem;
}

.locations-hero h1 {
	margin-bottom: 0.75rem;
}

.locations-hero .page-hero-subtitle {
	margin-bottom: 1.25rem;
	max-width: 540px;
	margin-left: auto;
	margin-right: auto;
}

/* Trust Items - tighter variant for hub page */
.locations-hero .trust-items {
	gap: 1rem 1.5rem;
	font-size: 0.875rem;
}

.locations-hero .trust-item {
	gap: 0.375rem;
}

.locations-hero .trust-icon {
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   Map Section - Cleaner placeholder
   ========================================================================== */

.locations-map {
	max-width: 1000px;
	margin: 0 auto 0;
	padding: 0;
}

.locations-map-placeholder {
	background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
	border-radius: var(--card-radius);
	padding: 2rem 2rem;
	text-align: center;
	color: var(--wp--preset--color--text);
	position: relative;
	overflow: hidden;
}

/* Subtle grid pattern overlay */
.locations-map-placeholder::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
	background-size: 24px 24px;
	pointer-events: none;
}

.locations-map-placeholder svg {
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.75rem;
	opacity: 0.8;
}

.locations-map-placeholder p {
	margin: 0;
	font-size: 0.875rem;
	opacity: 0.7;
}

/* ==========================================================================
   Google Map Container
   ========================================================================== */

#locations-map-container {
	width: 100%;
	height: 400px;
	border-radius: var(--card-radius);
	box-shadow: var(--card-shadow);
	overflow: hidden;
}

/* ==========================================================================
   Map Tooltip Styles (InfoWindow content)
   ========================================================================== */

.map-tooltip {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	padding: 0.125rem 0;
	font-family: inherit;
}

.map-tooltip-name {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	white-space: nowrap;
}

.map-tooltip-subtitle {
	font-size: 0.6875rem;
	color: var(--wp--preset--color--text);
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

/* Override Google Maps InfoWindow default styles */
.gm-style .gm-style-iw-c {
	padding: 0.5rem 0.75rem !important;
	border-radius: 8px !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.gm-style .gm-style-iw-d {
	overflow: hidden !important;
}

/* Hide InfoWindow close button */
.gm-style .gm-style-iw-c button[aria-label="Close"] {
	display: none !important;
}

/* InfoWindow tail/arrow shadow */
.gm-style .gm-style-iw-tc {
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* ==========================================================================
   Our Location — Office Cards
   ========================================================================== */

.locations-offices-section {
	max-width: 1000px;
	margin: 2.5rem auto 0;
	padding: 0 0 2.5rem;
}

.locations-offices-section h2 {
	text-align: center;
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
}

.locations-offices-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
	max-width: 1000px;
	margin: 0 auto;
}

.locations-offices-grid > * {
	margin-block-start: 0;
}

.office-card {
	display: flex;
	flex-direction: column;
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 0 8px 8px 0;
	padding: 1.5rem 1.5rem 1.25rem;
	background: var(--wp--preset--color--base);
	box-shadow: var(--card-shadow);
}

.office-card-header {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.office-card-name {
	font-size: 1.5rem;
	margin: 0;
	color: var(--wp--preset--color--contrast);
}

.office-card-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--primary);
}

.office-card-address {
	font-style: normal;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--wp--preset--color--text);
	margin-bottom: 0.5rem;
}

.office-card-phone {
	display: inline-block;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	margin-bottom: 1rem;
}

.office-card-phone:hover {
	text-decoration: underline;
}

.office-card-links {
	display: flex;
	gap: 1.25rem;
	margin-top: auto;
}

.office-card-links a {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.office-card-links a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Locations Grid Section
   ========================================================================== */

/* Uses .full-width-bg from base.css for breakout */
.locations-grid-section {
	background: var(--wp--preset--color--neutral);
	margin-top: 2rem;
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

.locations-grid-section h2 {
	text-align: center;
	margin-bottom: 1.75rem;
	font-size: 1.5rem;
}

/* Card Grid - 4 columns on large screens */
.locations-card-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.875rem;
	max-width: 1000px;
	margin: 0 auto;
}

/* ==========================================================================
   Location Card - Refined
   ========================================================================== */

.location-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--wp--preset--color--base);
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 0.875rem 1rem;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.location-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	border-color: var(--wp--preset--color--primary);
}

/* Card content */
.location-card-name {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	display: flex;
	align-items: center;
	white-space: nowrap;
}

.location-card-arrow {
	color: var(--wp--preset--color--primary);
	flex-shrink: 0;
	opacity: 0.6;
	transition: transform 0.15s ease, opacity 0.15s ease;
	width: 18px;
	height: 18px;
}

.location-card:hover .location-card-arrow {
	transform: translateX(3px);
	opacity: 1;
}

/* ==========================================================================
   Tablet Styles
   ========================================================================== */

@media (max-width: 1023px) {
	.locations-card-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 0.75rem;
	}

}

/* ==========================================================================
   Mobile Styles
   ========================================================================== */

@media (max-width: 767px) {
	.locations-offices-section {
		margin-top: 2rem;
	}

	.locations-offices-section h2 {
		font-size: 1.25rem;
		margin-bottom: 1.25rem;
	}

	.locations-offices-grid {
		grid-template-columns: 1fr;
	}

	.office-card {
		padding: 1.25rem 1.25rem 1rem;
	}

	.office-card-name {
		font-size: 1.25rem;
	}

	.office-card-address,
	.office-card-phone {
		font-size: 0.875rem;
	}

	.locations-hero {
		padding-bottom: 2rem;
	}

	.locations-hero .page-hero-subtitle {
		margin-bottom: 1rem;
	}

	.locations-hero .trust-items {
		gap: 0.5rem;
	}

	.locations-map-placeholder {
		padding: 1.5rem 1rem;
	}

	.locations-map-placeholder svg {
		width: 36px;
		height: 36px;
	}

	#locations-map-container {
		height: 300px;
		border-radius: 8px;
	}

	/* Full-width breakout handled by .full-width-bg in base.css */
	.locations-grid-section {
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
	}

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

	.locations-grid-section h2 {
		font-size: 1.25rem;
		margin-bottom: 1.25rem;
	}

	.location-card {
		padding: 0.75rem 0.875rem;
	}

	.location-card-name {
		font-size: 0.875rem;
	}

	.location-card-arrow {
		width: 16px;
		height: 16px;
	}
}

/* Very small screens - single column */
@media (max-width: 400px) {
	.locations-card-grid {
		grid-template-columns: 1fr;
	}

}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.location-card,
	.location-card-arrow {
		transition: none;
	}

	.location-card:hover {
		transform: none;
	}

	.location-card:hover .location-card-arrow {
		transform: none;
	}
}
