/*
 * Single Centre — hub page styles
 * Enqueued by single-centre.php
 */

.cjdng-centre {
	--cjdng-c-accent: var(--e-global-color-primary, #2563eb);
	--cjdng-c-accent-soft: color-mix(in srgb, var(--cjdng-c-accent) 9%, transparent);
	--cjdng-c-text: var(--e-global-color-text, #1f2937);
	--cjdng-c-muted: color-mix(in srgb, var(--cjdng-c-text) 60%, transparent);
	--cjdng-c-border: #e5e7eb;
	--cjdng-c-bg: #fafbfd;

	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--cjdng-c-text);
	max-width: 1100px;
	margin: 2rem auto;
	padding: 0 1.25rem;
}

/* Header */
.cjdng-centre-header { margin-bottom: 1.25rem; }

.cjdng-centre-title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-weight: var(--e-global-typography-primary-font-weight, 700);
	font-size: clamp(1.9rem, 3.2vw, 2.6rem);
	line-height: 1.18;
	margin: 0 0 0.35rem;
}

.cjdng-centre-address-line {
	color: var(--cjdng-c-muted);
	font-size: 1rem;
	margin: 0;
}

/* Hero image */
.cjdng-centre-hero {
	margin: 0 0 2rem;
	border-radius: 14px;
	overflow: hidden;
}
.cjdng-centre-hero img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* Sections */
.cjdng-centre-section {
	margin: 0 0 2.25rem;
	scroll-margin-top: 90px; /* offset for sticky site header when arriving on a section anchor */
}

/* Mission / Vision callout */
.cjdng-centre-mission { margin-bottom: 2.25rem; }
.cjdng-centre-mission-box {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem 2rem;
	padding: 1.6rem 1.8rem;
	border-radius: 14px;
	border-left: 4px solid var(--cjdng-c-accent);
	background: var(--cjdng-c-accent-soft);
}
.cjdng-centre-mission-label {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: 1rem;
	font-weight: 700;
	color: var(--cjdng-c-accent);
	margin: 0 0 0.5rem;
	padding: 0;
	border: 0;
}
.cjdng-centre-mission-text {
	font-size: 1.12rem;
	line-height: 1.6;
}
.cjdng-centre-mission-text p { margin: 0 0 0.6rem; }
.cjdng-centre-mission-text p:last-child { margin-bottom: 0; }

.cjdng-centre-section > h2 {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: clamp(1.3rem, 2vw, 1.6rem);
	font-weight: 700;
	margin: 0 0 1rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--cjdng-c-accent-soft);
}

.cjdng-centre-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}
.cjdng-centre-section-head > h2 {
	margin: 0;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--cjdng-c-accent-soft);
	flex: 1 1 auto;
}
.cjdng-centre-viewall {
	font-weight: 600;
	font-size: 0.92rem;
	white-space: nowrap;
	text-decoration: none;
	color: var(--cjdng-c-accent);
}
.cjdng-centre-viewall:hover { text-decoration: underline; }

/* About */
.cjdng-centre-lede {
	font-size: 1.08rem;
	line-height: 1.65;
	margin: 0 0 0.75rem;
}
.cjdng-centre-readmore { margin: 0; }
.cjdng-centre-readmore a {
	font-weight: 600;
	color: var(--cjdng-c-accent);
	text-decoration: none;
}
.cjdng-centre-readmore a:hover { text-decoration: underline; }
.cjdng-centre-about-content { line-height: 1.7; }

/* Two-column grid for Hours + Contact */
.cjdng-centre-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-bottom: 0.5rem;
}

/* Opening hours table */
.cjdng-centre-hours-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}
.cjdng-centre-hours-table th,
.cjdng-centre-hours-table td {
	text-align: left;
	padding: 0.5rem 0.6rem;
	border-bottom: 1px solid var(--cjdng-c-border);
	vertical-align: top;
}
.cjdng-centre-hours-table th { font-weight: 600; width: 35%; }
.cjdng-centre-hours-time { white-space: nowrap; }
.cjdng-centre-hours-notes { color: var(--cjdng-c-muted); font-size: 0.88rem; }
.cjdng-centre-hours-table tr.is-today {
	background: var(--cjdng-c-accent-soft);
}
.cjdng-centre-hours-table tr.is-today th { color: var(--cjdng-c-accent); }

/* Contact list */
.cjdng-centre-dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.45rem 1rem;
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
}
.cjdng-centre-dl dt { font-weight: 600; color: var(--cjdng-c-muted); }
.cjdng-centre-dl dd { margin: 0; }
.cjdng-centre-dl a { color: var(--cjdng-c-accent); }

/* Map */
.cjdng-centre-map {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--cjdng-c-border);
}
.cjdng-centre-map iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Summary card grids */
.cjdng-centre-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.1rem;
}
.cjdng-centre-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--cjdng-c-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cjdng-centre-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.cjdng-centre-card-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	background-size: cover;
	background-position: center;
	background-color: var(--cjdng-c-bg);
}
.cjdng-centre-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 0.85rem 0.95rem 1rem;
}
.cjdng-centre-card-title { font-weight: 600; line-height: 1.3; }
.cjdng-centre-card-meta {
	font-size: 0.86rem;
	color: var(--cjdng-c-muted);
	line-height: 1.4;
}
.cjdng-centre-pill {
	align-self: flex-start;
	margin-top: 0.15rem;
	padding: 0.18rem 0.55rem;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 600;
	color: #fff;
	background: #6b7280;
}
.cjdng-centre-pill.is-open     { background: #16a34a; }
.cjdng-centre-pill.is-waitlist { background: #d97706; }
.cjdng-centre-pill.is-full     { background: #dc2626; }
.cjdng-centre-pill.is-closed   { background: #4b5563; }
.cjdng-centre-pill.is-soon     { background: #2563eb; }

/* Booking CTA */
.cjdng-centre-booking-cta {
	margin: 1.1rem 0 0;
	font-size: 0.95rem;
	color: var(--cjdng-c-muted);
}
.cjdng-centre-booking-cta a { color: var(--cjdng-c-accent); font-weight: 600; }

@media (max-width: 600px) {
	.cjdng-centre-grid { gap: 1.5rem; }
}

/* Age-group tiles (Activités section, M1.9.3) — colored boxes linking to the
   audience-filtered archives. Mirrors the standalone audience-landing tiles. */
.cjdng-centre-audience-tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}
@media (min-width: 700px) {
	.cjdng-centre-audience-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
	.cjdng-centre-audience-tiles { grid-template-columns: repeat(4, 1fr); }
}
.cjdng-centre-audience-tile {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0.35rem;
	min-height: 120px;
	padding: 1.25rem 1rem;
	border-radius: 14px;
	text-align: center;
	text-decoration: none;
	color: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.cjdng-centre-audience-tile:hover,
.cjdng-centre-audience-tile:focus {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
	color: #fff;
	filter: brightness(1.04);
}
.cjdng-centre-audience-tile-name {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: clamp(1.05rem, 1.5vw, 1.2rem);
	font-weight: 700;
	line-height: 1.2;
}
.cjdng-centre-audience-tile-count {
	font-size: 0.85rem;
	font-weight: 500;
	opacity: 0.92;
}
.cjdng-centre-audience-tile--c0 { background: var(--cjdng-c-accent); }
.cjdng-centre-audience-tile--c1 { background: #0f766e; }
.cjdng-centre-audience-tile--c2 { background: #b45309; }
.cjdng-centre-audience-tile--c3 { background: #4338ca; }
.cjdng-centre-audience-tile--c4 { background: #be123c; }
.cjdng-centre-audience-tile--c5 { background: #166534; }

/* Activities Program PDF link (shared look on hub + activities archive) */
.cjdng-program-pdf {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.25rem 0 1.25rem;
	padding: 0.5rem 0.95rem;
	border: 1px solid var(--e-global-color-primary, #2563eb);
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	color: var(--e-global-color-primary, #2563eb);
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease;
}
.cjdng-program-pdf:hover,
.cjdng-program-pdf:focus {
	background: var(--e-global-color-primary, #2563eb);
	color: #fff;
}
.cjdng-program-archive {
	margin: 0.5rem 0 1.25rem;
	font-size: 0.9rem;
}
.cjdng-program-archive-label {
	display: block;
	font-weight: 600;
	color: color-mix(in srgb, var(--e-global-color-text, #1f2937) 65%, transparent);
	margin-bottom: 0.3rem;
}
.cjdng-program-archive ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1rem;
}
.cjdng-program-archive a {
	color: var(--e-global-color-primary, #2563eb);
	text-decoration: underline;
}
