/**
 * CSM Corp — interior pages: division pages, blog, search, leadership, properties.
 * Loaded after theme.css.
 */

/* Paragraph style: "Eyebrow" — small red letter-spaced label above headings. */
p.is-style-eyebrow,
.is-style-eyebrow {
	color: var(--wp--preset--color--red);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.25em;
	line-height: 1.2;
	text-transform: uppercase;
}

.is-style-eyebrow + .wp-block-heading {
	margin-top: 8px !important;
}

.csm-measure-copy {
	max-width: 841px;
}

.csm-measure-narrow-left {
	max-width: 811px;
}

/* Cover: "Page banner" — 274px strip, title lower-left, dark gradient at the bottom. */
.wp-block-cover.is-style-banner {
	isolation: isolate;
}

.wp-block-cover.is-style-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)),
		var(--csm-texture-grid) top left / 100px 100px repeat;
	mix-blend-mode: multiply;
}

.wp-block-cover.is-style-banner.has-custom-content-position .wp-block-cover__inner-container {
	width: 100% !important;
	z-index: 2 !important;
}

/* Cover: photo tile with stat text on a dark bottom gradient (Hotels portfolio). */
.wp-block-cover.csm-photo-stat {
	isolation: isolate;
}

.wp-block-cover.csm-photo-stat::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 70%);
}

.wp-block-cover.csm-photo-stat .wp-block-cover__inner-container {
	width: 100% !important;
	z-index: 2 !important;
}

.wp-block-cover.csm-photo-stat .csm-stat-number {
	margin-bottom: 8px !important;
}

.csm-banner-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--huge) !important;
	font-weight: 400;
	letter-spacing: -0.04em;
	line-height: 1.2;
}

/* Group style: "Card" — white panel with a light border and rounded corners. */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: 25px;
}

/* Stats band, centered variant (Hotel / Commercial). */
.csm-stats-centered .wp-block-column {
	text-align: center;
}

.csm-stats-centered p strong {
	font-weight: 600;
}

/* Text stats (not numbers) wrap in any stats band. */
.csm-stat-number.has-huge-font-size,
.csm-stat-number.has-x-large-font-size {
	line-height: 1.4 !important;
	white-space: normal;
}

.csm-stat-label-upper {
	text-transform: uppercase;
}

.wp-block-columns.is-style-dividers.csm-dividers-white > .wp-block-column + .wp-block-column {
	border-color: rgba(255, 255, 255, 0.85);
}

/* Commercial: property type icon row with faint red dividers. */
.csm-type-row.wp-block-columns.is-style-dividers > .wp-block-column + .wp-block-column {
	border-color: rgba(163, 1, 52, 0.2);
	padding-left: 0;
}

.csm-type-row .wp-block-column {
	padding-block: 20px;
}

.csm-type-row__icon {
	margin-bottom: 24px !important;
}

.csm-type-row__icon img {
	height: 72px !important;
	width: auto !important;
}

.csm-type-row__label {
	margin-top: 0 !important;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.25em;
	line-height: 1.2;
	text-transform: uppercase;
}

@media (max-width: 781px) {
	.csm-type-row.wp-block-columns {
		flex-wrap: wrap !important;
		justify-content: center;
	}

	.csm-type-row.wp-block-columns > .wp-block-column {
		flex: 0 0 45% !important;
		border: 0 !important;
		padding-top: 0;
	}
}

/* Commercial: specialties grid (red icon tiles). */
.csm-spec-grid {
	gap: 56px 119px !important;
}

.csm-value-icon--sm {
	width: 105px;
	height: 105px;
}

.csm-value-icon--sm img {
	max-width: 88px;
	max-height: 72px;
}

@media (max-width: 781px) {
	.csm-spec-grid {
		grid-template-columns: 1fr !important;
		gap: 32px !important;
	}
}

/* Commercial: numbered "Why CSM" list. */
.csm-numbered__item {
	border-top: 1px solid #d0d0d0;
	padding: 24px 0;
}

.csm-numbered__item:last-child {
	border-bottom: 1px solid #d0d0d0;
}

.csm-numbered__item p {
	margin: 0;
}

.csm-numbered__num {
	flex: none;
	min-width: 32px;
	color: var(--wp--preset--color--red);
	font-weight: 700;
}

/* ------------------------------------------------------------------
 * Property cards ("Standout Spaces") and single property
 * ------------------------------------------------------------------ */

.csm-property-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #dedad2;
	border-radius: 2px;
}

.csm-property-card__media,
.csm-post-card__media {
	position: relative;
	overflow: hidden;
}

.csm-property-card__media .wp-block-post-featured-image,
.csm-post-card__media .wp-block-post-featured-image {
	margin: 0;
}

.csm-property-badge,
.csm-post-badge {
	position: absolute;
	z-index: 1;
	margin: 0 !important;
	font-size: 12px;
	line-height: 1;
}

.csm-property-badge {
	top: 14px;
	left: 14px;
}

.csm-property-badge a,
.csm-post-badge a,
.csm-property__status a {
	display: inline-block;
	padding: 5px 10px;
	border-radius: 1px;
	background: #141414;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-decoration: none;
	text-transform: uppercase;
}

/* Only the first term shows as a badge. */
.csm-property-badge .wp-block-post-terms__separator,
.csm-post-badge .wp-block-post-terms__separator,
.csm-property-badge a ~ a,
.csm-post-badge a ~ a {
	display: none;
}

.property_status-now-leasing .csm-property-badge a,
.property_status-now-leasing .csm-property__status a {
	background: var(--wp--preset--color--red);
}

.csm-property-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 20px 0;
}

.csm-property-card__body > * {
	margin-block: 0 !important;
}

.csm-property-card__type {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.csm-property-card__type a,
.csm-property__type a {
	color: #c0272d;
	pointer-events: none;
	text-decoration: none;
}

.csm-property-card__title {
	margin-top: 4px !important;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.25;
}

.csm-property-card__title a {
	color: #141414;
	text-decoration: none;
}

.csm-property-card__title a:hover {
	color: var(--wp--preset--color--red);
}

.csm-property-card__summary {
	margin-top: 4px !important;
	color: #6a6a6a;
	font-size: 14px;
}

.csm-property-card__footer {
	margin-top: auto !important;
	padding: 14px 0;
	border-top: 1px solid #eeebe5;
}

.csm-property-card__summary + .csm-property-card__footer {
	margin-top: 28px !important;
}

.csm-property-card__city {
	margin: 0;
	padding-left: 16px;
	background: url("../icons/card-location.svg") left center / 12px no-repeat;
	font-size: 14px;
	font-weight: 600;
}

.csm-property-card__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #c0272d !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.csm-property-card__link::after {
	content: "";
	width: 12px;
	height: 12px;
	background: url("../icons/card-arrow.svg") center / contain no-repeat;
}

@media (max-width: 900px) {
	.csm-property-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.csm-property-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

.csm-property__type {
	font-size: 16px;
}

.csm-property__address {
	color: #6a6a6a;
}

.csm-property__facts > * + * {
	margin-top: 16px;
}

.csm-property__fact {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
}

.csm-icon--location-dark::before {
	top: 4px;
	background-image: url("../icons/card-location.svg");
	background-size: 18px;
}

/* ------------------------------------------------------------------
 * Blog index, archives, search
 * ------------------------------------------------------------------ */

.csm-blog__main > * + * {
	margin-top: 24px;
}

.csm-blog__main h1 {
	margin-bottom: 0;
}

.csm-blog .wp-block-post-template {
	gap: 24px !important;
}

.csm-post-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
}

.csm-post-card__media img {
	transition: transform 0.35s ease;
}

.csm-post-card:hover .csm-post-card__media img {
	transform: scale(1.03);
}

.csm-post-badge {
	top: 16px;
	right: 16px;
}

.csm-post-badge a {
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--wp--preset--color--red);
	font-weight: 400;
	letter-spacing: 0.05em;
}

.csm-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 48px 20px 20px;
}

.csm-post-card__body > * {
	margin: 0 !important;
}

.csm-post-card__title {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.csm-post-card__title a {
	color: var(--wp--preset--color--black);
	text-decoration: none;
}

.csm-post-card__title a:hover {
	color: var(--wp--preset--color--red);
}

.csm-post-card__excerpt {
	color: #666;
	font-size: 14px;
	line-height: 1.6;
}

.csm-post-card__excerpt p {
	margin: 0;
}

.csm-post-card__meta {
	margin-top: auto !important;
	padding-top: 17px;
	border-top: 1px solid var(--wp--preset--color--border);
	color: #999;
	font-size: 12px;
}

.csm-post-card__meta > * {
	margin: 0;
	font-size: 12px !important;
}

.csm-post-card__meta a {
	color: inherit;
	text-decoration: none;
}

/* Featured (first) post: photo left, text right. */
.csm-post-card--featured {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.csm-post-card--featured .csm-post-card__media .wp-block-post-featured-image,
.csm-post-card--featured .csm-post-card__media img {
	height: 100%;
}

.csm-post-card--featured .csm-post-card__body {
	justify-content: center;
	gap: 16px;
	padding: 32px;
}

.csm-post-card__date {
	font-size: 14px;
	letter-spacing: 0.05em;
}

.csm-post-card--featured .csm-post-card__title {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.2;
}

.csm-post-card--featured .csm-post-card__excerpt {
	color: var(--wp--preset--color--black);
	font-size: 16px;
	line-height: 1.5;
}

.csm-read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--wp--preset--color--red) !important;
	font-size: 14px;
	letter-spacing: 0.05em;
	text-decoration: none;
}

.csm-read-more::after {
	content: "→";
}

@media (max-width: 781px) {
	.csm-post-card--featured {
		grid-template-columns: 1fr;
	}

	.csm-blog .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

/* "Load more" (next page) styled as the outline button. */
.csm-load-more {
	margin-top: var(--wp--preset--spacing--40) !important;
}

.csm-load-more a {
	display: inline-block;
	padding: 12px 24px;
	border: 1px solid var(--wp--preset--color--red);
	color: var(--wp--preset--color--red);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
}

.csm-load-more a:hover {
	background: var(--wp--preset--color--red);
	color: #fff;
}

.csm-pagination {
	margin-top: var(--wp--preset--spacing--40) !important;
	font-size: var(--wp--preset--font-size--small);
}

.csm-pagination .page-numbers.current {
	color: var(--wp--preset--color--red);
	font-weight: 700;
}

.csm-search-summary {
	font-size: var(--wp--preset--font-size--medium);
}

.csm-search-summary > * {
	margin: 0 !important;
	color: var(--wp--preset--color--black);
	font-size: inherit !important;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.5;
}

.csm-search-term::before {
	content: "“";
}

.csm-search-term::after {
	content: "”";
}

.csm-no-results {
	padding: 40px 24px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: #fff;
	color: #6a6a6a;
	font-size: 14px;
}

.csm-no-results .wp-block-search {
	max-width: 420px;
	margin-inline: auto;
}

/* Sidebar cards. */
.csm-blog__sidebar .wp-block-template-part > * + * {
	margin-top: 28px;
}

.csm-sidebar-card__title {
	margin: 0 0 20px;
	color: var(--wp--preset--color--black);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.5;
}

.csm-all-posts,
.csm-category-list {
	margin: 0 !important;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.csm-category-list {
	display: grid;
	gap: 8px;
	margin-top: 8px !important;
}

.csm-category-list li {
	margin: 0;
}

.csm-all-posts a,
.csm-category-list a {
	display: block;
	padding: 10px 16px;
	border-radius: 4px;
	color: var(--wp--preset--color--black);
	text-decoration: none;
}

.csm-all-posts a:hover,
.csm-category-list a:hover {
	background: var(--wp--preset--color--light-gray);
	color: var(--wp--preset--color--black);
}

.is-news-index .csm-all-posts a,
.csm-category-list .current-cat > a {
	background: var(--wp--preset--color--red);
	color: #fff;
}

/* Calendar block, restyled to match the Figma date picker. */
.csm-calendar {
	font-size: 14px;
}

.csm-calendar table {
	border: 0;
	border-collapse: separate;
	border-spacing: 0 8px;
}

.csm-calendar caption {
	margin-bottom: 8px;
	font-weight: 500;
}

.csm-calendar th {
	border: 0;
	background: none !important;
	color: #717182;
	font-size: 12.8px;
	font-weight: 400;
}

.csm-calendar td {
	padding: 6px 0;
	border: 0;
	text-align: center;
}

.csm-calendar td#today {
	border-radius: 8px;
	background: #030213;
	color: #fff;
}

.csm-calendar td a {
	color: var(--wp--preset--color--red);
	font-weight: 700;
}

.csm-calendar .wp-calendar-nav a {
	color: var(--wp--preset--color--black);
	font-size: 13px;
	text-decoration: none;
}

/* Single post. */
.csm-article__meta {
	align-items: center;
	font-size: 14px;
}

.csm-article__meta .csm-post-badge {
	position: static;
}

.csm-article__footer {
	border-top: 1px solid var(--wp--preset--color--border);
}

/* ------------------------------------------------------------------
 * Leadership
 * ------------------------------------------------------------------ */

.csm-leaders .wp-block-post-template {
	gap: 24px !important;
}

.csm-leader-card {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--light-gray);
	cursor: pointer;
}

.csm-leader-card__photo {
	margin: 0 !important;
	overflow: hidden;
}

.csm-leader-card__photo img {
	filter: grayscale(1);
	transition: filter 0.3s ease;
}

.csm-leader-card__info {
	position: relative;
	flex: 1;
	min-height: 147px;
	margin: 0 !important;
	padding: 16px 82px 16px 22px;
	background: var(--wp--preset--color--light-gray);
	transition: background-color 0.25s ease;
}

.csm-leader-card__info::after {
	content: "";
	position: absolute;
	top: 16px;
	right: 24px;
	width: 48px;
	height: 48px;
	background: url("../icons/leader-arrow-dark.svg") center / contain no-repeat;
}

.csm-leader-card__name {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.5;
}

.csm-leader-card__name a {
	color: #1e1e1e;
	text-decoration: none;
}

/* The whole card is the click target. */
.csm-leader-card__name a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.csm-leader-card__role {
	margin: 0 !important;
	color: #1e1e1e;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.csm-leader-card:hover .csm-leader-card__photo img,
.csm-leader-card:focus-within .csm-leader-card__photo img {
	filter: none;
}

.csm-leader-card:hover .csm-leader-card__info,
.csm-leader-card:focus-within .csm-leader-card__info {
	background: var(--wp--preset--color--red);
}

.csm-leader-card:hover .csm-leader-card__info *,
.csm-leader-card:focus-within .csm-leader-card__info * {
	color: #fff;
}

.csm-leader-card:hover .csm-leader-card__info::after,
.csm-leader-card:focus-within .csm-leader-card__info::after {
	background-image: url("../icons/leader-arrow-light.svg");
}

@media (max-width: 1000px) {
	.csm-leaders .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.csm-leaders .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

/* The popup content lives (hidden) in each card; JS copies it into a <dialog>. */
.csm-leaders .csm-leader-modal {
	display: none;
}

.csm-leader-modal {
	display: grid;
	grid-template-columns: 336px 1fr;
	margin: 0 !important;
	background: #fff;
}

.csm-leader-modal__side {
	display: flex;
	flex-direction: column;
	margin: 0 !important;
}

.csm-leader-modal__photo {
	flex: 1;
	margin: 0 !important;
}

.csm-leader-modal__photo img {
	height: 100%;
}

.csm-leader-modal__name {
	margin: 0 !important;
	padding: 16px 22px 20px;
}

.csm-leader-modal__name .wp-block-post-title {
	margin: 0;
	color: #fff;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.5;
}

.csm-leader-modal__role {
	margin: 0 !important;
	font-size: 15px;
	text-transform: uppercase;
}

.csm-leader-modal__main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 !important;
	padding: 26px 48px 32px 32px;
}

.csm-leader-modal__main > * {
	margin: 0 !important;
}

.csm-leader-modal__label {
	padding-bottom: 18px;
	font-size: 14px;
	font-weight: 400;
}

.csm-leader-modal__bio {
	padding: 9px 24px 18px 0;
	border-top: 1px solid #d0d0d0;
	font-size: 18px;
	line-height: 1.5;
}

.csm-leader-modal__bio p {
	margin: 0;
}

.csm-leader-modal__awards {
	padding-top: 12px;
	border-top: 1px solid #d0d0d0;
}

.csm-leader-modal__awards .csm-leader-modal__label {
	padding-bottom: 12px;
	font-size: 16px;
}

/* Awards only show when a leader has some. */
.csm-leader-modal__awards:not(:has(.csm-chips)) {
	display: none;
}

.csm-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.csm-chips a {
	display: inline-block;
	padding: 4px 6px;
	background: var(--wp--preset--color--sand);
	color: #3c3c3c;
	font-size: 12px;
	font-weight: 600;
	line-height: 15px;
	pointer-events: none;
	text-decoration: none;
}

.csm-chips .wp-block-post-terms__separator {
	display: none;
}

.csm-leader-modal.is-page {
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 781px) {
	.csm-leader-modal {
		grid-template-columns: 1fr;
	}

	.csm-leader-modal__photo img {
		aspect-ratio: 1 !important;
	}

	.csm-leader-modal__main {
		padding: 24px 20px;
	}
}

/* Native <dialog> that hosts the popup. */
.csm-dialog {
	width: min(1200px, calc(100vw - 40px));
	max-width: none;
	max-height: calc(100vh - 40px);
	padding: 0;
	overflow: hidden;
	border: 0;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.csm-dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.csm-dialog .csm-leader-modal {
	display: grid;
	height: min(600px, calc(100vh - 40px));
}

.csm-dialog .csm-leader-modal__bio {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	scrollbar-color: var(--wp--preset--color--red) #d9d9d9;
}

.csm-dialog .csm-leader-modal__bio::-webkit-scrollbar {
	width: 10px;
}

.csm-dialog .csm-leader-modal__bio::-webkit-scrollbar-track {
	background: #d9d9d9;
}

.csm-dialog .csm-leader-modal__bio::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--red);
}

.csm-dialog__close {
	position: absolute;
	top: 16px;
	right: 20px;
	width: 32px;
	height: 32px;
	border: 0;
	background: url("../icons/close.svg") center / 24px no-repeat;
	cursor: pointer;
}

@media (max-width: 781px) {
	.csm-dialog {
		overflow-y: auto;
	}

	.csm-dialog .csm-leader-modal {
		height: auto;
	}

	.csm-dialog .csm-leader-modal__photo img {
		max-height: 320px;
	}

	.csm-dialog__close {
		border-radius: 50%;
		background-color: #fff;
	}
}

html.has-csm-dialog {
	overflow: hidden;
}
