/* ============================================
   ECC Wildkin Profiles — Front-End Styles
   ============================================ */

/* Profile wrapper */
.ecc-wildkin-profile {
	/* max-width removed -- profile fills content area */
}

/* Scientific name */
.wildkin-scientific-name {
	font-size: 1.1em;
	color: #555;
	margin-top: -0.5em;
	margin-bottom: 1.5em;
}

/* Featured photo */
.wildkin-photo {
	margin: 0 0 2em;
}

.wildkin-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.wildkin-photo-credit {
	font-size: 0.85em;
	color: #666;
	margin-top: 0.4em;
	font-style: italic;
}

/* Facts section (dl layout) */
.wildkin-facts {
	background: #f7f7f5;
	border-left: 4px solid #4a7c59;
	padding: 1.2em 1.5em;
	margin-bottom: 2em;
	border-radius: 0 4px 4px 0;
}

.wildkin-facts h2 {
	margin-top: 0;
	font-size: 1.15em;
}

.wildkin-facts-list {
	margin: 0;
}

.wildkin-facts-list dt {
	font-weight: 700;
	float: left;
	clear: left;
	min-width: 100px;
	margin-right: 0.5em;
}

.wildkin-facts-list dd {
	margin-left: 110px;
	margin-bottom: 0.5em;
}

/* Intro and section 2 */
.wildkin-intro,
.wildkin-section-2-body {
	line-height: 1.75;
}

/* Ensure headings inside the profile have breathing room above them */
.ecc-wildkin-profile h2 {
	margin-top: 1.75em;
}

.ecc-wildkin-profile .wildkin-facts + *,
.ecc-wildkin-profile h2:first-child {
	margin-top: 0;
}

/* What You Can Do -- styled as a plain section, same as other headings */
.wildkin-cta {
	margin-top: 1.5em;
}

/* Back link */
.wildkin-back-link {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 1px solid #ddd;
}

/* Breadcrumb */
.wildkin-breadcrumb ol {
	list-style: none;
	padding: 0;
	margin: 0 0 1em;
	display: flex;
	gap: 0.4em;
	font-size: 0.9em;
	color: #666;
}

.wildkin-breadcrumb li + li::before {
	content: "›";
	margin-right: 0.4em;
}

/* ============================================
   Admin — meta box field styles
   (loaded only on wildkin edit screens)
   ============================================ */

.post-type-wildkin .ecc-wildkin-field {
	margin-bottom: 18px;
}

.post-type-wildkin .ecc-wildkin-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.post-type-wildkin .ecc-wildkin-field .description {
	color: #757575;
	font-style: italic;
	font-size: 12px;
	margin-top: 4px;
}

/* Thumbnail column width in list table */
.column-wildkin_photo {
	width: 70px;
}

/* ============================================
   Wildkin Grid + Cards
   Mirrors the ECC Artist Profiles card style exactly.
   ============================================ */

/* ---- Grid wrapper ---- */
.ecc-wildkin-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat( 1, 1fr );
}

.ecc-wildkin-grid--cols-1 { grid-template-columns: repeat( 1, 1fr ); }

@media ( min-width: 600px ) {
	.ecc-wildkin-grid--cols-2,
	.ecc-wildkin-grid--cols-3,
	.ecc-wildkin-grid--cols-4 { grid-template-columns: repeat( 2, 1fr ); }
}

@media ( min-width: 900px ) {
	.ecc-wildkin-grid--cols-3 { grid-template-columns: repeat( 3, 1fr ); }
	.ecc-wildkin-grid--cols-4 { grid-template-columns: repeat( 4, 1fr ); }
}

/* ---- Base card ---- */
.ecc-wildkin-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

/* ---- Photo ---- */
.ecc-wildkin-card__photo-link {
	display: block;
	text-decoration: none;
}

.ecc-wildkin-card--vertical .ecc-wildkin-card__photo {
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.ecc-wildkin-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.ecc-wildkin-card__photo-link:hover img {
	transform: scale( 1.03 );
}

.ecc-wildkin-card__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	aspect-ratio: 1 / 1;
}

.ecc-wildkin-card__photo--placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #9ca3af;
}

/* ---- Card body ---- */
.ecc-wildkin-card__body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ecc-wildkin-card__name {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	line-height: 1.3;
}

.ecc-wildkin-card__name a {
	text-decoration: none;
	color: inherit;
}

.ecc-wildkin-card__name a:hover {
	text-decoration: underline;
}

/* ---- Intro / bio ---- */
.ecc-wildkin-card__bio {
	font-size: 0.9rem;
	line-height: 1.6;
	color: #4b5563;
	flex: 1;
	margin-bottom: 1rem;
}

/* ---- Learn More link ---- */
.ecc-wildkin-card__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: auto;
}

.ecc-wildkin-card__link {
	display: inline-block;
	font-size: 0.8rem;
	padding: 0.3rem 0.75rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	text-decoration: none;
	color: #1d7a4e;
	transition: background-color 0.2s, color 0.2s;
	white-space: nowrap;
}

.ecc-wildkin-card__link:hover {
	background-color: #1d7a4e;
	color: #ffffff;
}

/* ---- Horizontal card: photo left, body right ---- */
.ecc-wildkin-grid--horizontal .ecc-wildkin-card,
.ecc-wildkin-card--horizontal {
	flex-direction: row;
	align-items: stretch;
}

.ecc-wildkin-card--horizontal .ecc-wildkin-card__photo-link {
	flex: 0 0 220px;
	width: 220px;
}

.ecc-wildkin-card--horizontal .ecc-wildkin-card__photo {
	aspect-ratio: unset;
	height: 100%;
	width: 100%;
}

@media ( max-width: 599px ) {
	.ecc-wildkin-card--horizontal {
		flex-direction: column;
	}
	.ecc-wildkin-card--horizontal .ecc-wildkin-card__photo-link {
		flex: none;
		width: 100%;
	}
	.ecc-wildkin-card--horizontal .ecc-wildkin-card__photo {
		aspect-ratio: 16 / 9;
		height: auto;
	}
}


/* ============================================
   Single Wildkin profile layout fix.

   BACKGROUND: Astra applies ast-separate-container and ast-two-container
   to the body on single Wildkin posts, placing content inside .ast-container
   (max-width: 1240px). This is different from page-builder pages (like /about/)
   which use ast-page-builder-template and skip .ast-container entirely.

   We do NOT override .ast-container's max-width — that breaks the contained
   appearance. Instead we fix the two actual causes of visible gaps:

   1. article.ast-article-single has 48px padding on all sides by default.
      This creates a visible gap between the content and the right edge of
      the container that looks like a sidebar remnant but is just padding.

   2. .ecc-wildkin-profile had max-width: 780px in earlier versions of this
      file, which prevented the profile from filling the entry-content area.

   Debugging tip: walk ancestors from .entry-content in DevTools Console
   and compare to /about/ to find unexpected width/padding constraints.
   ============================================ */

.single-wildkin article.ast-article-single {
	padding: 0 !important;
}

.single-wildkin .entry-content,
.single-wildkin .ecc-wildkin-profile {
	max-width: 100% !important;
	width: 100% !important;
}
