/**
 * City Line Content Types — front-end styles.
 *
 * Theme-agnostic, neutral styling for the three listing shortcodes
 * ([clc_articles], [clc_press_releases], [clc_jobs]), their card/list markup,
 * and the single/archive template helpers. Colors lean on `currentColor` and
 * neutral grays so the active theme's palette shows through; no !important is
 * used, sizes are in rem/%, images cap at 100% width, and nothing is allowed
 * to force a horizontal scrollbar on small screens.
 *
 * @package CityLineContent
 */

/* -------------------------------------------------------------------------
 * Grid — responsive card layout
 * ------------------------------------------------------------------------- */
.clc-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin: 0 0 1.5rem;
}

/* Extra breathing room above the article listing grid on its page. */
.clc-articles {
	padding-top: 25px;
}

.clc-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clc-grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clc-grid--cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Collapse every multi-column grid to a single column on narrow viewports. */
@media (max-width: 600px) {
	.clc-grid--cols-2,
	.clc-grid--cols-3,
	.clc-grid--cols-4 {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
 * Card — shared article / press-release card
 * ------------------------------------------------------------------------- */
.clc-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.5rem;
	overflow: hidden;
	background: transparent;
}

.clc-card__thumb {
	display: block;
	line-height: 0;
	/* Fixed ratio so a grid of differently sized images (e.g. article
	   screenshots) renders as even rows. object-fit does the cropping. */
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.clc-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	/* Screenshots read best cropped from the top (headline/masthead visible). */
	object-position: top;
}

.clc-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.25rem 1.25rem;
	min-width: 0;
}

.clc-card__title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.clc-card__title a {
	color: inherit;
	text-decoration: none;
}

.clc-card__title a:hover,
.clc-card__title a:focus {
	text-decoration: underline;
}

.clc-card__subtitle {
	margin: 0;
	font-size: 0.95rem;
	font-style: italic;
	opacity: 0.85;
}

.clc-card__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0;
}

.clc-card__excerpt {
	margin: 0;
	line-height: 1.5;
}

.clc-card__date {
	margin: 0;
	font-size: 0.85rem;
	opacity: 0.7;
}

.clc-card__location {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.8;
}

/* Press-release cards are text-only; keep them tidy without a thumbnail rail.
   The whole card is clickable via a stretched title link. */
.clc-card--press {
	padding: 1rem 1.25rem 1.25rem;
	gap: 0.5rem;
	position: relative;
}

.clc-card--press .clc-card__title {
	margin: 0;
	padding-bottom: 20px;
}

/* Stretch the title's link across the whole card so a click anywhere on the
   card follows it. */
.clc-card--press .clc-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* -------------------------------------------------------------------------
 * Badges — small neutral pills (topics, employment type, departments)
 * ------------------------------------------------------------------------- */
.clc-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	font-size: 0.75rem;
	line-height: 1.4;
	border: 1px solid currentColor;
	border-radius: 999px;
	white-space: nowrap;
	opacity: 0.85;
}

.clc-badge--type {
	opacity: 1;
}

/* -------------------------------------------------------------------------
 * Press release list
 * ------------------------------------------------------------------------- */
.clc-press-list {
	/* Inherits .clc-grid layout; single column reads best for dated items. */
	grid-template-columns: 1fr;
}

/* -------------------------------------------------------------------------
 * Jobs — filter bar, list, and job rows
 * ------------------------------------------------------------------------- */
.clc-jobs-wrap {
	margin: 0 0 1.5rem;
}

.clc-jobs-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
}

.clc-jobs-filter__search {
	flex: 1 1 14rem;
	min-width: 0;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 0.375rem;
	box-sizing: border-box;
}

.clc-jobs-filter__dept {
	flex: 0 1 14rem;
	min-width: 0;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 0.375rem;
	box-sizing: border-box;
}

.clc-jobs {
	list-style: none;
	margin: 0;
	padding: 0;
}

.clc-job {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.25rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	min-width: 0;
}

.clc-job:first-child {
	padding-top: 0;
}

.clc-job__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 0.75rem;
}

.clc-job__title {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.3;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.clc-job__title a {
	color: inherit;
	text-decoration: none;
}

.clc-job__title a:hover,
.clc-job__title a:focus {
	text-decoration: underline;
}

.clc-job__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem 0.75rem;
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.85;
}

.clc-job__location {
	white-space: nowrap;
}

.clc-job__dept {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.clc-job__closes {
	margin: 0;
	font-size: 0.85rem;
	opacity: 0.7;
}

.clc-job__excerpt {
	margin: 0;
	line-height: 1.5;
}

.clc-job__actions {
	margin: 0.25rem 0 0;
}

/* -------------------------------------------------------------------------
 * Button — neutral, theme-inheriting call to action
 * ------------------------------------------------------------------------- */
.clc-btn {
	display: inline-block;
	padding: 0.5rem 1.1rem;
	font-size: 0.95rem;
	line-height: 1.4;
	color: inherit;
	text-decoration: none;
	border: 1px solid currentColor;
	border-radius: 0.375rem;
	background: transparent;
	cursor: pointer;
	transition: opacity 0.15s ease-in-out;
}

.clc-btn:hover,
.clc-btn:focus {
	opacity: 0.75;
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * Empty state
 * ------------------------------------------------------------------------- */
.clc-empty {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	font-style: italic;
	opacity: 0.75;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 0.5rem;
}

/* -------------------------------------------------------------------------
 * Single-view + archive helpers
 * ------------------------------------------------------------------------- */
/*
 * Constrain the plugin's single + archive views to the same content container
 * the rest of the site uses (the HighendWP theme caps content at 1240px),
 * centered, so these views line up with normal pages instead of stretching
 * full-bleed. Override --clc-content-width to match a different theme, or set
 * it to none for full width.
 */
.clc-single,
.clc-archive {
	width: 100%;
	max-width: var(--clc-content-width, 1240px);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 30px);
	padding-block: clamp(1.5rem, 4vw, 3rem);
	box-sizing: border-box;
}

.clc-single img {
	max-width: 100%;
	height: auto;
}

/*
 * Featured image on a single view: show the whole image (no crop — screenshots
 * would lose content), centered, but capped so a tall image can't dominate the
 * page.
 */
.clc-single__thumb {
	margin: 0 0 1.75rem;
	text-align: center;
}

.clc-single__thumb img {
	display: inline-block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 70vh;
	border-radius: 0.5rem;
}

.clc-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0 0 1.5rem;
	padding: 0.75rem 0;
	font-size: 0.95rem;
	opacity: 0.9;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Press release dateline: bold date + location, with a "-" between them. */
.clc-single--press .clc-single__date,
.clc-single--press .clc-single__location,
.clc-single--press .clc-single__meta-sep {
	font-weight: 700;
}

/* Breathing room between the dated meta line and the body copy. */
.clc-single__content {
	padding-top: 20px;
}

.clc-single__apply {
	margin-top: 1.5rem;
}

.clc-single__cta {
	margin: 1.75rem 0 0;
}

/* Media contact block (press release single). */
.clc-single__contact {
	padding-top: 20px;
}

/* Match the bold body text (same size, bold). Scoped to two classes so it wins
   over the theme's `h2` rule without needing !important. */
.clc-single__contact .clc-single__contact-title {
	font-size: 1em;
	font-weight: 700;
	line-height: 1.3;
}

.clc-single__contact-name,
.clc-single__contact-email,
.clc-single__contact-phone {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.25rem 0;
}

.clc-single__contact-icon {
	flex: 0 0 auto;
	width: 1.1em;
	height: 1.1em;
	opacity: 0.7;
}

.clc-archive__title {
	margin: 0 0 1.5rem;
}
