/**
 * Car Directory Page Styles
 *
 * The /car-directory/ HTML sitemap. Mobile-first; native <details> accordions
 * keep every link in the DOM at page load (crawlable while collapsed).
 *
 * @package AutomotarGPChild
 */

/* =====================================================================
   Design Tokens (mirrors cars-hub.css :root — not loaded on this template)
   ===================================================================== */

:root {
	--automotar-primary: #3b82f6;
	--automotar-primary-hover: #2563eb;
	--automotar-text-primary: #111827;
	--automotar-text-secondary: #4b5563;
	--automotar-text-muted: #6b7280;
	--automotar-border: #e5e7eb;
	--automotar-border-light: #f3f4f6;
	--automotar-bg-card: #ffffff;
	--automotar-bg-secondary: #f9fafb;
	--automotar-radius: 0.5rem;
	--automotar-spacing-xs: 0.25rem;
	--automotar-spacing-sm: 0.5rem;
	--automotar-spacing-md: 1rem;
	--automotar-spacing-lg: 1.5rem;
	--automotar-spacing-xl: 2rem;
}

/* =====================================================================
   Page wrapper + hero
   ===================================================================== */

.car-directory {
	max-width: 1100px;
	margin: 0 auto;
	padding: var(--automotar-spacing-lg) var(--automotar-spacing-md) var(--automotar-spacing-xl);
	color: var(--automotar-text-primary);
}

.car-directory__breadcrumb {
	font-size: 0.875rem;
	color: var(--automotar-text-muted);
	display: flex;
	gap: var(--automotar-spacing-xs);
	align-items: center;
	margin-bottom: var(--automotar-spacing-md);
}

.car-directory__breadcrumb a {
	color: var(--automotar-text-secondary);
	text-decoration: none;
}

.car-directory__breadcrumb a:hover {
	color: var(--automotar-primary);
	text-decoration: underline;
}

.car-directory__title {
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	line-height: 1.2;
	margin: 0 0 var(--automotar-spacing-md);
}

.car-directory__jumplinks {
	font-size: 0.95rem;
	color: var(--automotar-text-secondary);
	padding-bottom: var(--automotar-spacing-md);
	border-bottom: 1px solid var(--automotar-border-light);
}

.car-directory__jumplinks a {
	color: var(--automotar-primary-hover); /* #2563eb — WCAG AA on white at body size */
	text-decoration: none;
	font-weight: 600;
}

.car-directory__jumplinks a:hover {
	text-decoration: underline;
}

/* =====================================================================
   Sections
   ===================================================================== */

.car-directory__section {
	margin: var(--automotar-spacing-xl) 0;
	scroll-margin-top: 80px;
}

.car-directory__section-title {
	font-size: clamp(1.25rem, 3vw, 1.625rem);
	margin: 0 0 var(--automotar-spacing-sm);
}

.car-directory__intro {
	color: var(--automotar-text-secondary);
	max-width: 70ch;
	margin-bottom: var(--automotar-spacing-md);
}

.car-directory__intro p {
	margin: 0 0 var(--automotar-spacing-sm);
}

/* =====================================================================
   Models
   ===================================================================== */

.car-directory__model-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--automotar-spacing-sm);
}

@media (min-width: 640px) {
	.car-directory__model-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

.car-directory__model-item a {
	font-weight: 600;
	color: var(--automotar-primary-hover); /* #2563eb — WCAG AA on white */
	text-decoration: none;
}

.car-directory__model-item a:hover {
	text-decoration: underline;
}

.car-directory__model-tagline {
	color: var(--automotar-text-muted);
	font-weight: 400;
	font-size: 0.9rem;
}

/* =====================================================================
   Cities — state accordions
   ===================================================================== */

.car-directory__state {
	border: 1px solid var(--automotar-border);
	border-radius: var(--automotar-radius);
	margin-bottom: var(--automotar-spacing-sm);
	background: var(--automotar-bg-card);
}

.car-directory__state-summary {
	cursor: pointer;
	padding: var(--automotar-spacing-md);
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--automotar-spacing-sm);
	list-style: none;
}

.car-directory__state-summary::-webkit-details-marker {
	display: none;
}

.car-directory__state-summary::after {
	content: "+";
	color: var(--automotar-text-muted);
	font-size: 1.25rem;
	line-height: 1;
}

.car-directory__state[open] > .car-directory__state-summary::after {
	content: "\2013"; /* en dash */
}

.car-directory__state-count {
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--automotar-text-muted);
	margin-left: auto;
	margin-right: var(--automotar-spacing-sm);
}

.car-directory__state-body {
	padding: 0 var(--automotar-spacing-md) var(--automotar-spacing-md);
	border-top: 1px solid var(--automotar-border-light);
}

.car-directory__city {
	padding-top: var(--automotar-spacing-md);
}

.car-directory__city-hub {
	font-weight: 600;
	color: var(--automotar-text-primary);
	text-decoration: none;
}

.car-directory__city-hub:hover {
	color: var(--automotar-primary);
	text-decoration: underline;
}

.car-directory__leaf-list {
	list-style: none;
	margin: var(--automotar-spacing-xs) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--automotar-spacing-xs);
}

@media (min-width: 640px) {
	.car-directory__leaf-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.car-directory__leaf-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

.car-directory__leaf-list a {
	font-size: 0.9rem;
	color: var(--automotar-primary-hover); /* #2563eb — WCAG AA on white */
	text-decoration: none;
}

.car-directory__leaf-list a:hover {
	text-decoration: underline;
}

/* =====================================================================
   Guides + Brands
   ===================================================================== */

.car-directory__cluster {
	margin-bottom: var(--automotar-spacing-lg);
}

.car-directory__cluster-title {
	font-size: 1.125rem;
	margin: 0 0 var(--automotar-spacing-xs);
}

.car-directory__cluster-title a {
	color: var(--automotar-text-primary);
	text-decoration: none;
}

.car-directory__cluster-title a:hover {
	color: var(--automotar-primary);
	text-decoration: underline;
}

.car-directory__post-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--automotar-spacing-xs);
}

@media (min-width: 640px) {
	.car-directory__post-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

.car-directory__post-list a {
	font-size: 0.9rem;
	color: var(--automotar-primary-hover); /* #2563eb — WCAG AA on white */
	text-decoration: none;
}

.car-directory__post-list a:hover {
	text-decoration: underline;
}
