/* ==========================================================================
   content.css — Genva Interior

   The parts that carry the shop's own posts: the work example listing, one
   work example, the comment area, the search form, the pagination and the 404
   page. The front page sections are not here; each of those brings its own
   stylesheet.

   The visual language follows the mock's work cards, so an archive page and
   the front page look like the same site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Listing

   wp:post-template with columnCount writes a fixed
   `grid-template-columns: repeat(3, minmax(0,1fr))` and never wraps on its
   own. Core also puts a columns-3 class on the element, so the override is
   written as three chained classes, specificity 0-3-0, which beats core's own
   container rule no matter which stylesheet loads first.
   -------------------------------------------------------------------------- */
.worklist__grid {
	gap: var(--space-lg);
}

@media (width < 1024px) {

	.wp-block-post-template.is-layout-grid.columns-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (width < 600px) {

	.wp-block-post-template.is-layout-grid.columns-3 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.worklist__grid > li {
	list-style: none;
	margin: 0;
}

.workcard {
	height: 100%;
	background: var(--surface-container-lowest);
	border-radius: var(--rounded-xl);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
}

.workcard__media {
	margin: 0;
}

.workcard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* A work example with no featured image must not collapse to a bare title:
   the placeholder keeps the card the same height as the ones beside it. */
.workcard__media:empty {
	aspect-ratio: 4 / 3;
	background: var(--surface-container);
}

.workcard__body {
	padding: var(--space-lg);
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
}

@media (width < 782px) {

	.workcard__body {
		padding: var(--space-md);
	}
}

.workcard__date {
	margin: 0;
	color: var(--on-surface-variant);
	font-family: var(--font-number);
}

.workcard__title {
	margin: 0;
	color: var(--on-surface);
	font-weight: 700;
}

.workcard__title a {
	color: inherit;
	text-decoration: none;
	transition: color 150ms ease;
}

.workcard__title a:hover {
	color: var(--secondary);
}

.workcard__excerpt {
	margin: 0;
	color: var(--on-surface-variant);
}

.workcard__excerpt a {
	color: var(--secondary);
}

/* --------------------------------------------------------------------------
   One work example
   -------------------------------------------------------------------------- */
.single__media {
	margin: 0 0 var(--space-lg);
	border-radius: var(--rounded-xl);
	overflow: hidden;
}

.single__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single__title {
	margin: 0 0 var(--space-sm);
	color: var(--on-surface);
}

:root :where(.is-layout-flex).single__meta {
	gap: var(--space-md);
}

.single__meta {
	margin-bottom: var(--space-xl);
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--outline-variant);
	color: var(--on-surface-variant);
	font-family: var(--font-number);
}

.single__meta a {
	color: var(--on-surface-variant);
	text-decoration: none;
}

.single__meta a:hover {
	color: var(--secondary);
}

.single__content > * + * {
	margin-top: var(--space-md);
}

.single__content img {
	border-radius: var(--rounded-lg);
}

.single__nav {
	margin-top: var(--space-2xl);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--outline-variant);
}

:root :where(.is-layout-flex).single__nav {
	gap: var(--space-md);
}

.single__nav a {
	color: var(--on-surface-variant);
	text-decoration: none;
	transition: color 150ms ease;
}

.single__nav a:hover {
	color: var(--secondary);
}

/* --------------------------------------------------------------------------
   Pagination

   Shared by the post listing and the comment listing.
   -------------------------------------------------------------------------- */
.pagination {
	margin-top: var(--space-2xl);
}

:root :where(.is-layout-flex).pagination {
	gap: var(--space-xs);
}

.pagination a,
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding-inline: var(--space-xs);
	border-radius: var(--rounded);
	color: var(--on-surface-variant);
	text-decoration: none;
	transition: background 150ms ease, color 150ms ease;
}

.pagination a:hover {
	background: var(--surface-container);
	color: var(--on-surface);
}

.pagination .current {
	background: var(--secondary);
	color: var(--on-secondary);
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Search form
   -------------------------------------------------------------------------- */
.searchform {
	max-width: 28rem;
}

.searchform .wp-block-search__input {
	min-height: 44px;
	padding: var(--space-xs) var(--space-sm);
	border: 1px solid var(--outline-variant);
	border-radius: var(--rounded);
	background: var(--surface-container-lowest);
	color: var(--on-surface);
	font-family: var(--font-body);
	font-size: var(--body-lg-size);
}

.searchform .wp-block-search__button {
	min-height: 44px;
	padding-inline: var(--space-md);
	border: none;
	border-radius: var(--rounded);
	background: var(--secondary);
	color: var(--on-secondary);
	font-family: var(--font-heading);
	font-weight: 600;
	cursor: pointer;
}

.searchform .wp-block-search__button:hover {
	background: var(--on-secondary-fixed-variant);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.notfound {
	max-width: 40rem;
}

.notfound__title {
	margin: 0 0 var(--space-md);
	color: var(--on-surface);
}

.notfound__lead {
	margin: 0 0 var(--space-lg);
	color: var(--on-surface-variant);
}

.notfound__tel {
	margin-block: var(--space-lg);
	padding: var(--space-md);
	border-radius: var(--rounded-lg);
	background: var(--surface-container-low);
}

:root :where(.is-layout-flex).notfound__tel {
	gap: 0.125rem;
}

.notfound__tel p:first-child {
	color: var(--on-surface-variant);
}

.notfound__number {
	font-family: var(--font-number);
	font-weight: 700;
}

.notfound__number a {
	color: var(--on-surface);
	text-decoration: none;
}

.notfound__number a:hover {
	color: var(--secondary);
}

/* --------------------------------------------------------------------------
   Comments

   Work example posts usually have comments closed, in which case none of this
   renders at all.
   -------------------------------------------------------------------------- */
.commentarea {
	margin-top: var(--space-2xl);
}

.comment {
	padding-block: var(--space-md);
	border-top: 1px solid var(--outline-variant);
}

:root :where(.is-layout-flex).comment {
	gap: var(--space-md);
	align-items: flex-start;
}

.comment__avatar img {
	border-radius: var(--rounded-full);
}

.comment__body {
	flex: 1;
	min-width: 0;
}

.comment__body > * + * {
	margin-top: var(--space-2xs);
}

.commentform input[type="text"],
.commentform input[type="email"],
.commentform input[type="url"],
.commentform textarea {
	width: 100%;
	min-height: 44px;
	padding: var(--space-xs) var(--space-sm);
	border: 1px solid var(--outline-variant);
	border-radius: var(--rounded);
	background: var(--surface-container-lowest);
	color: var(--on-surface);
	font-family: var(--font-body);
	font-size: var(--body-lg-size);
}

.commentform .submit {
	min-height: 44px;
	padding-inline: var(--space-lg);
	border: none;
	border-radius: var(--rounded);
	background: var(--secondary);
	color: var(--on-secondary);
	font-family: var(--font-heading);
	font-weight: 600;
	cursor: pointer;
}

.commentform .submit:hover {
	background: var(--on-secondary-fixed-variant);
}
