/**
 * Hassan Lab plugin-owned component styles.
 *
 * The theme supplies site-wide typography and brand tokens. These rules define
 * only CPT templates, listing blocks, and field components so frontend and
 * editor previews share the same presentation.
 */

/* Keep white page titles readable before cover images load and expose a
 * deterministic contrast value to accessibility tools. The current theme
 * image and maroon overlay continue to render above this fallback. */
.wp-block-cover.is-style-page-header {
	background-color: var(--agrilife-accent-color, #740f2f);
}

:where(.hassan-cpt-listing-block, .hassan-cpt-query, .hassan-cpt-grid, .hassan-cpt-card, .hassan-single) {
  box-sizing: border-box;
}

.hassan-cpt-listing-block,
.hassan-cpt-query {
  max-width: 1200px;
  margin-inline: auto !important;
}

.hassan-cpt-query {
	margin-top: 0 !important;
}

.hassan-cpt-grid {
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem) !important;
}

.hassan-cpt-grid > li {
  min-width: 0;
}

.hassan-cpt-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100% !important;
  overflow: hidden;
  overflow-wrap: anywhere;
  background: var(--hassan-brand-white, #fff);
  color: #242424 !important;
  border-color: var(--hassan-brand-gray, #84888b) !important;
  border-left: 5px solid #740f2f !important;
  box-shadow: 0 2px 8px rgb(3 0 0 / 8%);
}

.hassan-cpt-card > * {
  min-width: 0;
  max-width: 100%;
}

.hassan-cpt-card__image {
  flex: 0 0 auto;
  margin-bottom: 0.75rem !important;
  overflow: hidden;
}

.hassan-cpt-card__image img {
  display: block;
  width: 100%;
}

.hassan-cpt-card__title {
  line-height: 1.25;
  overflow-wrap: anywhere;
  color: #030000 !important;
}

.hassan-cpt-card__title a,
.hassan-cpt-card :where(.hassan-content-field, .wp-block-post-content, .wp-block-post-excerpt) a {
  color: #030000 !important;
}

.hassan-cpt-card__title a:hover {
  color: var(--agrilife-accent-color, #740f2f) !important;
  text-decoration-thickness: 0.12em;
}

.hassan-cpt-card :where(.wp-block-post-content, .hassan-content-field) {
  max-width: none !important;
  overflow-wrap: anywhere;
}

/* Publications listing. */
.hassan-cpt-grid--publication {
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: clamp(1.5rem, 3vw, 2rem) !important;
}

.hassan-cpt-card--publication {
  display: grid;
  grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: start;
  height: auto !important;
  padding: clamp(1rem, 2vw, 1.5rem) !important;
}

.hassan-cpt-card--publication .hassan-cpt-card__image {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 100% !important;
  margin: 0 !important;
  aspect-ratio: 1;
  background: var(--hassan-brand-white, #fff);
}

.hassan-cpt-card--publication .hassan-cpt-card__image img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 !important;
  object-fit: contain !important;
  background: var(--hassan-brand-white, #fff);
}

.hassan-cpt-card--publication .hassan-cpt-card__title {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 0.35rem !important;
  font-size: clamp(1.1rem, 1.35vw, 1.3rem) !important;
}

.hassan-cpt-card--publication > .wp-block-post-content {
  grid-column: 2;
  grid-row: 2;
  margin: 0 !important;
	font-size: 0.975rem;
	line-height: 1.5;
}

.hassan-cpt-card--publication .wp-block-post-content p {
  margin-block: 0.35rem;
}

.hassan-cpt-card--publication .wp-block-post-content p:last-child {
  margin-block: 0.75rem 0;
}

/* When the migrated record only has the generic placeholder image, the
 * server omits it and the existing publication information uses the card. */
.hassan-cpt-card--publication:not(:has(> .hassan-cpt-card__image)) {
	grid-template-columns: minmax(0, 1fr);
}

.hassan-cpt-card--publication:not(:has(> .hassan-cpt-card__image)) > :where(.hassan-cpt-card__title, .wp-block-post-content) {
	grid-column: 1;
}

/* News listing. Explicit containment prevents inner Post Content from
 * extending below equal-height grid cards. */
.hassan-cpt-grid--news {
	grid-template-columns: minmax(0, 1fr) !important;
	gap: clamp(1rem, 2vw, 1.5rem) !important;
	width: 100%;
	max-width: 1040px;
	margin-inline: auto !important;
}

.hassan-cpt-query--news {
	max-width: 1040px !important;
	margin-inline: auto !important;
}

.hassan-cpt-card--news {
	display: grid;
	grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
	grid-template-rows: auto auto 1fr;
	column-gap: clamp(1rem, 2.5vw, 1.75rem);
	align-items: start;
	height: auto !important;
	padding: clamp(0.9rem, 1.8vw, 1.25rem) !important;
}

.hassan-cpt-card--news .hassan-cpt-card__image {
	grid-column: 1;
	grid-row: 1 / 4;
	width: 100% !important;
	margin: 0 !important;
	aspect-ratio: 4 / 3 !important;
	background: #f4f4f4;
}

.hassan-cpt-card--news .hassan-cpt-card__image img {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: auto !important;
	object-fit: contain !important;
	object-position: center !important;
}

.hassan-cpt-card--news-summary .hassan-cpt-card__image {
	width: 100% !important;
	margin-bottom: 0.65rem !important;
}

.hassan-cpt-card--news-summary .hassan-cpt-card__image img {
	width: 100% !important;
	height: clamp(9rem, 14vw, 10.75rem) !important;
	aspect-ratio: auto !important;
	object-fit: contain !important;
	object-position: center !important;
	background: #f4f4f4;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary) > .hassan-content-field {
	width: 100% !important;
	margin: 0.1rem 0 0 !important;
	color: #54575a !important;
	font-size: 0.875rem;
	line-height: 1.4;
	text-align: left;
}

.hassan-cpt-card--news > :where(.hassan-content-field, .hassan-cpt-card__title, .hassan-cpt-card__excerpt) {
	grid-column: 2;
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
	padding-inline: 0;
	box-sizing: border-box;
}

.hassan-cpt-card--news .hassan-cpt-card__title,
.hassan-cpt-card--news-summary .hassan-cpt-card__title {
  margin-block: 0.35rem 0;
	font-size: clamp(1.05rem, 1.2vw, 1.2rem) !important;
	line-height: 1.28;
}

.hassan-cpt-card--news .hassan-cpt-card__title {
	font-size: clamp(1.2rem, 1.65vw, 1.45rem) !important;
	line-height: 1.25;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary) > :where(.wp-block-post-content, .wp-block-post-excerpt) {
  flex: 1 1 auto;
  width: 100% !important;
  margin-block-start: 0.75rem !important;
  font-size: 0.95rem;
  line-height: 1.5;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary) :where(.wp-block-post-content, .wp-block-post-excerpt) > :first-child {
  margin-top: 0;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary) :where(.wp-block-post-content, .wp-block-post-excerpt) > :last-child {
  margin-bottom: 0;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary) .wp-block-post-excerpt__more-text {
  margin-top: 0.75rem;
  font-weight: 600;
}

/* News interaction is intentionally limited to the descriptive linked
 * headline. Images and card surfaces remain noninteractive. */
:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary) {
	cursor: default;
	transform: none !important;
	transition: none !important;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary):hover {
	transform: none !important;
	box-shadow: 0 2px 8px rgb(3 0 0 / 8%);
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary)
	.hassan-cpt-card__title a {
	text-underline-offset: 0.16em;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary)
	.hassan-cpt-card__title a:hover {
	color: #740f2f !important;
	text-decoration-thickness: 0.12em;
}

:where(.hassan-cpt-card--news, .hassan-cpt-card--news-summary)
	.hassan-cpt-card__title a:focus-visible {
	color: #030000 !important;
	outline: 3px solid #740f2f;
	outline-offset: 3px;
	border-radius: 2px;
}

/* Group listing and lead-person hierarchy. */
.hassan-group-section-title {
	max-width: 1200px;
	margin: clamp(1.75rem, 3vw, 2.5rem) auto 1rem !important;
	color: #030000 !important;
	font-size: clamp(1.5rem, 2.25vw, 1.9rem) !important;
	line-height: 1.2;
}

.hassan-group-section-title--principal-investigator {
	width: min(100%, 46rem) !important;
	text-align: center;
}

.hassan-cpt-query--person-pi {
	width: min(100%, 46rem) !important;
	max-width: 46rem !important;
	margin-inline: auto !important;
}

.hassan-cpt-grid--person-pi .hassan-cpt-card--person {
	grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr);
}

.hassan-cpt-grid--person-pi .hassan-cpt-card__title {
	font-size: clamp(1.3rem, 1.8vw, 1.55rem) !important;
}

.hassan-cpt-grid--person {
	align-items: start !important;
	gap: clamp(0.9rem, 1.75vw, 1.35rem) !important;
}

.hassan-cpt-card--person {
	display: grid;
	grid-template-columns: minmax(7.25rem, 8.25rem) minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	column-gap: clamp(0.8rem, 1.25vw, 1rem);
	align-items: start;
	height: auto !important;
	padding: clamp(0.8rem, 1.25vw, 1rem) !important;
}

.hassan-cpt-card--person .hassan-cpt-card__image {
	grid-column: 1;
	grid-row: 1 / 3;
	width: 100% !important;
  aspect-ratio: 1;
	margin: 0 !important;
  background: var(--hassan-brand-white, #fff);
}

.hassan-cpt-card--person .hassan-cpt-card__image img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 !important;
  object-fit: cover !important;
  object-position: center top;
}

.hassan-cpt-card--person .hassan-cpt-card__title {
	grid-column: 2;
	grid-row: 1;
	margin: 0 0 0.35rem !important;
	font-size: clamp(1.15rem, 1.45vw, 1.35rem) !important;
  line-height: 1.2;
}

.hassan-cpt-card--person > :where(.hassan-person-card-fields, .wp-block-post-content) {
	grid-column: 2;
	grid-row: 2;
  flex: 1 1 auto;
	margin: 0 !important;
	padding: 0 !important;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hassan-cpt-card--person :where(.hassan-person-card-fields, .wp-block-post-content) p {
  margin-block: 0.28rem;
}

.hassan-person-card-fields .hassan-content-field__label {
	font-weight: 600;
}

.hassan-person-card-fields a {
	color: #030000 !important;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
	overflow-wrap: anywhere;
}

.hassan-person-card-fields a:hover {
	color: #740f2f !important;
	text-decoration-thickness: 0.12em;
}

.hassan-person-card-fields a:focus-visible {
	outline: 3px solid #740f2f;
	outline-offset: 3px;
	border-radius: 2px;
}

/* Homepage CPT summaries. */
.hassan-home-cpt-sections .hassan-home-heading {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(0.75rem, 2vw, 1.25rem) !important;
  color: #030000 !important;
}

.hassan-home-cpt-sections {
  color: #242424 !important;
}

.hassan-home-cpt-sections .hassan-home-heading--secondary {
  font-size: clamp(1.65rem, 2.5vw, 2.05rem) !important;
  line-height: 1.15;
}

:is(.hassan-home-cpt-sections, .hassan-cpt-listing-block--recent-publications, .hassan-cpt-listing-block--recent-news) .hassan-cpt-grid {
  align-items: stretch;
}

:is(.hassan-home-cpt-sections, .hassan-cpt-listing-block--recent-publications, .hassan-cpt-listing-block--recent-news) .hassan-cpt-card {
  padding: 1rem !important;
}

:is(.hassan-home-cpt-sections, .hassan-cpt-listing-block--recent-publications, .hassan-cpt-listing-block--recent-news) .hassan-cpt-card__image img {
  width: 100%;
  max-height: 15rem;
  aspect-ratio: 16 / 9 !important;
}

.hassan-home-publications .hassan-cpt-card__image img {
  object-fit: contain !important;
}

.hassan-home-news .hassan-cpt-card__image img {
  object-fit: cover !important;
}

:is(.hassan-home-cpt-sections, .hassan-cpt-listing-block--recent-publications, .hassan-cpt-listing-block--recent-news) .hassan-cpt-card__title {
  margin-top: 0.5rem;
  font-size: 1.1rem !important;
  line-height: 1.3;
}

.hassan-home-section-button {
  padding-block: 1.25rem 2rem !important;
}

.hassan-home-section-button .wp-block-button {
  width: auto !important;
  min-width: min(18rem, 100%);
}

.hassan-home-section-button .wp-block-button__link {
  background-color: var(--agrilife-accent-color, #740f2f) !important;
  color: #fff !important;
}

.hassan-home-section-button .wp-block-button__link:hover,
.hassan-home-section-button .wp-block-button__link:focus-visible {
  background-color: var(--agrilife-primary-color, #000) !important;
}

/* Single-record templates. */
.hassan-single {
  margin-top: clamp(1.75rem, 3vw, 3rem) !important;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  overflow-wrap: anywhere;
  color: #242424 !important;
}

.hassan-single .wp-block-post-title {
  max-width: 30ch;
	margin-bottom: clamp(2rem, 4vw, 3rem) !important;
  font-size: clamp(2rem, 3.4vw, 2.8rem) !important;
  line-height: 1.12;
  color: #030000 !important;
}

.hassan-single--publication .wp-block-post-featured-image img {
  max-height: 36rem;
  object-fit: contain;
}

.hassan-single--lab_news > .hassan-single__featured-image {
	grid-column: 1;
	grid-row: 2 / 4;
	width: min(100%, 20rem) !important;
	max-width: 20rem !important;
	margin: 0 !important;
}

.hassan-single--lab_news > .hassan-single__featured-image img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
	max-height: 24rem;
	margin-inline: auto;
	object-fit: contain !important;
}

.hassan-single--lab_news {
	display: grid;
	grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
	column-gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
	max-width: 1000px !important;
	margin-top: 0 !important;
	padding-top: 0;
}

/* The single-story title follows the same Madla Maroon interior-page band as
 * the landing pages while retaining the complete existing headline. */
.hassan-single--lab_news > .wp-block-post-title {
	grid-column: 1 / -1;
	width: auto;
	max-width: none;
	margin: 0 0 clamp(1.5rem, 3vw, 2.25rem) !important;
	padding: clamp(1.35rem, 3vw, 2rem) max(1rem, calc((100vw - 1200px) / 2));
	background: #740f2f;
	box-shadow: 0 0 0 100vmax #740f2f;
	clip-path: inset(0 -100vmax);
	color: #fff !important;
	font-size: clamp(1.85rem, 3vw, 2.6rem) !important;
}

.hassan-single--lab_news > .hassan-news-details {
	grid-column: 2;
	grid-row: 2;
	margin: 0 0 0.75rem !important;
	color: #54575a;
}

.hassan-single--lab_news > .wp-block-post-content {
	grid-column: 2;
	grid-row: 3;
	margin: 0 !important;
	font-size: 1.05rem;
	line-height: 1.65;
}

.hassan-single :where(.hassan-publication-details, .hassan-news-details, .hassan-person-details) {
  max-width: none;
}

/* Migrated Contact components. */
.hassan-contact-hero {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-block: 0 !important;
  padding-inline: 0 !important;
  background-color: #fff !important;
}

.hassan-contact-hero h1 {
  width: 100%;
  max-width: 1200px !important;
	margin: clamp(1.75rem, 3vw, 3rem) auto clamp(2rem, 4vw, 3rem) !important;
  padding: 0 !important;
  color: #030000 !important;
  font-size: clamp(2.35rem, 4vw, 3.25rem) !important;
  line-height: 1.08;
  text-align: left !important;
}

.hassan-contact-details {
	width: min(100%, 50rem) !important;
	margin-inline: auto !important;
	display: block !important;
	overflow: hidden;
	padding: 0 !important;
	border: 1px solid #c7c9ca;
	border-left: 5px solid #740f2f;
	border-radius: 0 8px 8px 0;
	background: #fff;
	box-shadow: 0 4px 18px rgb(3 0 0 / 10%);
  color: #242424 !important;
}

.hassan-contact-row {
	display: grid !important;
	grid-template-columns: minmax(11rem, 1fr) minmax(0, 2fr);
	align-items: stretch !important;
	gap: 0 !important;
	width: 100% !important;
	height: auto;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.hassan-contact-row > .wp-block-column {
	flex-basis: auto !important;
	width: 100%;
}

.hassan-contact-row > .wp-block-column:first-child {
	display: flex;
	align-items: flex-start;
	padding: clamp(1rem, 2vw, 1.4rem);
	background: #f4f4f4;
}

.hassan-contact-row > .wp-block-column:last-child {
	padding: clamp(1rem, 2vw, 1.4rem);
}

.hassan-contact-row h2 {
	margin: 0 !important;
	padding: 0;
	border: 0;
  color: #030000 !important;
	font-size: clamp(1.1rem, 1.4vw, 1.25rem) !important;
  line-height: 1.2;
}

.hassan-contact-row p {
	margin-block: 0.1rem;
	line-height: 1.5;
}

.hassan-contact-row .wp-block-column:last-child p:first-child {
  margin-top: 0;
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 600;
}

.hassan-contact-row a {
	color: #030000 !important;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
	overflow-wrap: anywhere;
}

.hassan-contact-row a:hover {
	color: #740f2f !important;
	text-decoration-thickness: 0.12em;
}

.hassan-contact-row a:focus-visible {
	color: #030000 !important;
	outline: 3px solid #740f2f;
	outline-offset: 3px;
	border-radius: 2px;
}

.hassan-contact-row:first-child > .wp-block-column:last-child {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem 0.6rem;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p {
	margin: 0;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p:first-child {
	grid-column: 1 / -1;
	margin-bottom: 0.15rem;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(2),
.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(3) {
	padding: 0.45rem 0.6rem;
	border-left: 3px solid #84888b;
	background: #f4f4f4;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(4),
.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(5) {
	margin-top: 0.25rem;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(4) a,
.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(5) a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 0.4rem 0.6rem;
	border: 2px solid #740f2f;
	border-radius: 4px;
	color: #740f2f !important;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(4) a:hover,
.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(5) a:hover {
	background: #740f2f;
	color: #fff !important;
}

.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(4) a:focus-visible,
.hassan-contact-row:first-child > .wp-block-column:last-child p:nth-child(5) a:focus-visible {
	outline-color: #030000;
	outline-offset: 3px;
}

/* Reusable person-contact layout for additional contact rows. */
.hassan-contact-row--person > .wp-block-column:last-child {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
	gap: 0.45rem 0.6rem;
}

.hassan-contact-row--person > .wp-block-column:last-child p {
	margin: 0;
}

.hassan-contact-row--person .hassan-contact-name,
.hassan-contact-row--person .hassan-contact-context {
	grid-column: 1 / -1;
}

.hassan-contact-row--person .hassan-contact-name {
	margin-bottom: 0.15rem;
}

.hassan-contact-row--person .hassan-contact-action {
	margin-top: 0.25rem;
}

.hassan-contact-row--person .hassan-contact-action a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 0.4rem 0.6rem;
	border: 2px solid #740f2f;
	border-radius: 4px;
	color: #740f2f !important;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

.hassan-contact-row--person .hassan-contact-action a:hover {
	background: #740f2f;
	color: #fff !important;
}

.hassan-contact-row--person .hassan-contact-action a:focus-visible {
	outline-color: #030000;
	outline-offset: 3px;
}

.hassan-contact-details > .wp-block-separator {
  display: none;
}

.hassan-contact-details > .wp-block-separator + .hassan-contact-row {
	border-top: 1px solid #d5d5d5;
}

@media (max-width: 781px) {
	/* Preserve the 24px menu glyph but provide a comfortable touch target. */
	.site-navigation .wp-block-navigation__responsive-container-open {
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	.hassan-cpt-grid.is-layout-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
  .hassan-cpt-card--publication {
    grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
    column-gap: 1rem;
  }

  .hassan-cpt-card--person .hassan-cpt-card__image img {
    width: 100% !important;
    height: 100% !important;
  }

	.hassan-cpt-card--news,
	.hassan-cpt-card--person {
		display: flex;
	}

	.hassan-cpt-card--news .hassan-cpt-card__image {
		width: min(100%, 24rem) !important;
		margin: 0 0 0.75rem !important;
		aspect-ratio: 4 / 3 !important;
	}

	.hassan-cpt-card--person .hassan-cpt-card__image {
		width: min(100%, 12rem) !important;
		margin: 0 auto 0.9rem !important;
	}

	.hassan-cpt-query--news {
		max-width: 520px !important;
	}

  .hassan-single .wp-block-post-title {
    font-size: clamp(1.9rem, 9vw, 2.5rem) !important;
  }

	.hassan-single--lab_news {
		display: block;
	}

	.hassan-single--lab_news > .hassan-single__featured-image {
		width: min(100%, 20rem) !important;
		margin: 0 auto 1.25rem !important;
	}

	.hassan-single--lab_news > .hassan-news-details,
	.hassan-single--lab_news > .wp-block-post-content {
		width: min(100%, 42rem) !important;
		margin-inline: auto !important;
	}

  .hassan-contact-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 0 !important;
  }

	.hassan-contact-row > .wp-block-column:first-child,
	.hassan-contact-row > .wp-block-column:last-child {
		padding: 1rem 1.15rem;
	}

	.hassan-contact-row:first-child > .wp-block-column:last-child {
		grid-template-columns: minmax(0, 1fr);
	}

	.hassan-contact-row--person > .wp-block-column:last-child {
		grid-template-columns: minmax(0, 1fr);
	}

	.hassan-contact-row:first-child > .wp-block-column:last-child p:first-child {
		grid-column: 1;
	}

	.hassan-contact-row--person .hassan-contact-name,
	.hassan-contact-row--person .hassan-contact-context {
		grid-column: 1;
	}

	.hassan-contact-details {
		width: min(100%, 34rem) !important;
	}

}

@media (min-width: 600px) and (max-width: 781px) {
	.hassan-cpt-grid.hassan-cpt-grid--news.is-layout-grid,
	.hassan-cpt-grid.hassan-cpt-grid--news-summary.is-layout-grid,
	.hassan-cpt-grid.hassan-cpt-grid--publication-summary.is-layout-grid,
	.hassan-cpt-grid.hassan-cpt-grid--person:not(.hassan-cpt-grid--person-pi).is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 782px) and (max-width: 980px) {
	.hassan-cpt-grid--person {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 520px) {
  .hassan-cpt-card--publication {
    display: flex;
  }

  .hassan-cpt-card--publication .hassan-cpt-card__image {
    width: min(100%, 12rem) !important;
    margin: 0 auto 0.75rem !important;
  }
}

/* CPT field preview in the Site Editor. */
.hassan-content-field-editor {
	display: grid;
	gap: 0.25rem;
	min-height: 3.5rem;
	padding: 0.75rem 1rem;
	border: 1px dashed var(--agrilife-accent-color, #740f2f);
	border-radius: 4px;
	background: #fff;
	color: #242424;
}

.hassan-content-field-editor__type {
	color: var(--agrilife-accent-color, #740f2f);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hassan-content-field-editor__label {
	display: block;
}

.hassan-content-field-editor__value {
	display: block;
	white-space: pre-line;
}

/* Structured record editor used only inside Publication, News, and Lab Person
 * editing canvases. The saved block renders only its preserved inner content. */
.hassan-record-editor {
	width: min(100%, 52rem);
	margin: clamp(1.5rem, 4vw, 3rem) auto !important;
	overflow: hidden;
	border: 1px solid #84888b;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 10px rgb(3 0 0 / 10%);
	color: #242424;
}

.hassan-record-editor__header {
	padding: 1.25rem clamp(1rem, 3vw, 1.75rem);
	border-bottom: 4px solid var(--agrilife-accent-color, #740f2f);
	background: #f5f5f5;
}

.hassan-record-editor__eyebrow {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--agrilife-accent-color, #740f2f);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hassan-record-editor__title {
	margin: 0 !important;
	color: #030000 !important;
	font-size: clamp(1.4rem, 3vw, 1.85rem) !important;
	line-height: 1.2;
}

.hassan-record-editor__description,
.hassan-record-editor__content-help {
	margin: 0.5rem 0 0 !important;
	color: #54575a;
	font-size: 0.925rem;
	line-height: 1.5;
}

.hassan-record-editor__fields,
.hassan-record-editor__content {
	padding: clamp(1rem, 3vw, 1.75rem);
}

.hassan-record-editor__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem 1.25rem;
}

.hassan-record-editor__fields > * {
	min-width: 0;
}

.hassan-record-editor__content {
	border-top: 1px solid #d9d9d9;
}

.hassan-record-editor__content > h3 {
	margin: 0 !important;
	font-size: 1.15rem !important;
}

.hassan-record-editor__content .block-editor-block-list__layout {
	margin-top: 1rem;
}

@media (max-width: 600px) {
	.hassan-record-editor__fields {
		grid-template-columns: 1fr;
	}
}
