/* Supplemental styles for things theme.json can't express.
   Soft modern: white cards, rounded corners, subtle layered shadows. */

/* Hero card — sits above the post list in the center column */
.jm-hero {
	background: var(--wp--preset--color--card);
	border: 1px solid rgba(42, 42, 42, 0.06);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--50);
	box-shadow: 0 1px 2px rgba(42, 42, 42, 0.05), 0 4px 12px rgba(42, 42, 42, 0.04);
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Three-column shell: sidebar (profile+nav) / content / right rail (widgets) */
.jm-shell {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr) 280px;
	gap: var(--wp--preset--spacing--50);
	align-items: start;
	max-width: 1400px;
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--40);
}

/* Top spacing lives on the shell itself (above) so all three columns start
   flush with each other — templates must not add their own padding-top to
   .jm-main-col. */

/* WordPress emulates blockGap on "flow" layout groups via a margin-top on
   every child but the first (:where(.is-layout-flow) > * in core CSS). jm-shell
   uses real grid `gap` for spacing instead, so that margin just pushes the
   2nd/3rd columns down relative to the 1st — cancel it out here. */
.jm-shell > * {
	margin-block-start: 0;
}

@media (max-width: 1100px) {
	.jm-shell {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.jm-right-sidebar {
		display: none;
	}
}

@media (max-width: 760px) {
	.jm-shell {
		grid-template-columns: 1fr;
	}
}

/* Left sidebar — profile card + vertical nav */
.jm-sidebar {
	background: var(--wp--preset--color--card);
	border: 1px solid rgba(42, 42, 42, 0.06);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: 0 1px 2px rgba(42, 42, 42, 0.05), 0 4px 12px rgba(42, 42, 42, 0.04);
}

.jm-sidebar-profile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.35rem;
	margin-bottom: var(--wp--preset--spacing--40);
}

.jm-sidebar-avatar {
	margin: 0 0 var(--wp--preset--spacing--20);
}

.jm-sidebar-avatar img {
	display: block;
	margin: 0 auto;
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 999px;
	border: 3px solid var(--wp--preset--color--base-2);
}

.jm-sidebar-social {
	justify-content: center;
	margin-top: var(--wp--preset--spacing--20);
}

.jm-sidebar-nav .wp-block-navigation__container {
	flex-direction: column;
	align-items: stretch;
	gap: 0.35rem;
}

.jm-sidebar-nav a.wp-block-navigation-item__content {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
}

.jm-sidebar-nav a.wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--base-2);
}

/* Right rail — stacked widget cards */
.jm-right-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

.jm-widget {
	background: var(--wp--preset--color--card);
	border: 1px solid rgba(42, 42, 42, 0.06);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: 0 1px 2px rgba(42, 42, 42, 0.05), 0 4px 12px rgba(42, 42, 42, 0.04);
}

.jm-widget-title {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--wp--preset--color--contrast-2);
	margin: 0 0 var(--wp--preset--spacing--20);
}

.jm-widget-title i {
	margin-right: 0.4rem;
	color: var(--wp--preset--color--primary);
}

.jm-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.jm-widget ul a {
	font-size: 0.85rem;
}

.jm-widget .wp-block-latest-posts__post-date {
	display: block;
	font-size: 0.75rem;
	color: var(--wp--preset--color--contrast-2);
}

.jm-widget-course + .jm-widget-course {
	margin-top: var(--wp--preset--spacing--20);
}

.jm-widget-course .wp-block-post-title {
	font-size: 0.85rem;
}

.wp-block-tag-cloud a {
	display: inline-block;
	margin: 0.2rem 0.3rem 0.2rem 0;
}

/* Blog list cards with a featured image: text on the left, image on the right */
.jm-post-card-media {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
}

.jm-post-card-media .jm-post-card-text {
	flex: 1 1 auto;
	min-width: 0;
}

.jm-post-card-media .jm-post-thumb {
	flex: 0 0 240px;
	margin: 0;
}

.jm-post-card-media .jm-post-thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 12px;
}

@media (max-width: 600px) {
	.jm-post-card-media {
		flex-direction: column;
		align-items: stretch;
	}

	.jm-post-card-media .jm-post-thumb {
		flex-basis: auto;
	}
}

/* Post cards — white, rounded, soft shadow, gentle lift on hover */
.jm-post-card {
	background: var(--wp--preset--color--card);
	border: 1px solid rgba(42, 42, 42, 0.06);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: 0 1px 2px rgba(42, 42, 42, 0.05), 0 4px 12px rgba(42, 42, 42, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jm-post-card:hover {
	box-shadow: 0 2px 4px rgba(42, 42, 42, 0.06), 0 12px 28px rgba(42, 42, 42, 0.09);
	transform: translateY(-2px);
}

/* Post/page titles in the center column — list-preview titles and the real
   single post/page H1 title both match the homepage list's size. */
.jm-main-col .wp-block-post-title {
	font-size: 0.9rem;
}

.jm-post-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.jm-post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* Real article body text matches the homepage list's excerpt styling
   (smaller, muted gray) per user request, so preview and full article read
   the same. */
.wp-block-post-content p {
	font-size: 0.95rem;
	color: var(--wp--preset--color--contrast-2);
}

/* Course cards — same soft card, light-blue key line on top */
.jm-course-card {
	background: var(--wp--preset--color--card);
	border: 1px solid rgba(42, 42, 42, 0.06);
	border-top: 3px solid var(--wp--preset--color--accent-2);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: 0 1px 2px rgba(42, 42, 42, 0.05), 0 4px 12px rgba(42, 42, 42, 0.04);
	height: 100%;
}

.jm-course-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.jm-course-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

.jm-course-meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
	font-weight: 500;
}

/* Icon + text pairing for post/course meta (date, category, tags, course fields) */
.jm-meta {
	gap: 0.75rem;
}

.jm-meta-item {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.jm-meta-icon {
	color: var(--wp--preset--color--contrast-2);
	font-size: 0.85em;
}

/* Eyebrow label above section headings */
.jm-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* Tag pills */
.wp-block-post-terms a {
	display: inline-block;
	background: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--contrast-2);
	border-radius: 999px;
	padding: 0.15em 0.8em;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.wp-block-post-terms a:hover {
	background: var(--wp--preset--color--primary);
	color: #ffffff;
}

/* Inline code readable on light background */
:not(pre) > code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9em;
	background: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--accent);
	padding: 0.1em 0.4em;
	border-radius: 6px;
}

/* Teaching summary tables ([jm_teaching_summary] shortcode) */
.jm-teaching-summary h2 {
	margin-top: var(--wp--preset--spacing--50);
}

.jm-summary-scroll {
	overflow-x: auto;
	background: var(--wp--preset--color--card);
	border: 1px solid rgba(42, 42, 42, 0.06);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(42, 42, 42, 0.05), 0 4px 12px rgba(42, 42, 42, 0.04);
}

.jm-summary-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.jm-summary-table th,
.jm-summary-table td {
	text-align: left;
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--base-2);
}

.jm-summary-table th {
	font-weight: 600;
	color: var(--wp--preset--color--contrast-2);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.78rem;
}

.jm-summary-table .jm-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.jm-summary-table tfoot td {
	border-bottom: none;
	font-weight: 600;
	background: var(--wp--preset--color--base-2);
}

.jm-summary-table tfoot td:first-child { border-radius: 0 0 0 16px; }
.jm-summary-table tfoot td:last-child { border-radius: 0 0 16px 0; }

.jm-summary-total {
	margin-top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
}

/* Search input matches the soft card look */
.wp-block-search__input {
	border-radius: 10px;
	border: 1px solid rgba(42, 42, 42, 0.12);
	background: var(--wp--preset--color--card);
}
