/**
 * tenants_module.css
 *
 * Styles for template-parts/modules/tenants_module.php and
 * template-parts/snippets/card-tenant.php
 *
 * Two display modes:
 *   [data-mode="slider"]       — horizontal scroll track, 3.5/2.5/1.25 visible cards
 *   [data-mode="full_listings"] — 3-column portrait grid, 9/page JS pagination
 *
 * Header supports an optional two-column intro layout (.tenants-module__intro-row)
 * when the content WYSIWYG field is populated.
 */

/* ---------------------------------------------------------------
   Section
--------------------------------------------------------------- */
.tenants-module {
	background-color: var(--white);
	padding: 100px 0 90px;
	overflow: hidden;
}
.tenants-module.layout-full_listings {
	padding: 40px 0 90px;
}

/* Full listings mode has padded grid — no overflow clipping needed. */
.tenants-module[data-mode="full_listings"] {
	overflow: visible;
}

/* ---------------------------------------------------------------
   Header
--------------------------------------------------------------- */
.tenants-module__header {
	padding: 0 40px;
	margin-bottom: 48px;
}

/* Sub header — numbered label with underline */
.tenants-module__subheader {
	display: inline-block;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--black);
	margin-bottom: 28px;
	min-width: 260px;
}

.tenants-module__subheader-text {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--black);
}

/* ---------------------------------------------------------------
   Two-column intro row: heading left, content copy right
   Shown when the tenants_content WYSIWYG field is populated.
--------------------------------------------------------------- */
.tenants-module__intro-row {
	display: grid;
	grid-template-columns: 55% 1fr;
	gap: 48px;
	align-items: start;
}

.tenants-module__intro-row .introduction-module__heading {
	align-self: start;
}

.tenants-module__intro-row .tenants-module__content {
	align-self: end;
}

.introduction-module__heading {width: 90%;}
/* ---------------------------------------------------------------
   Heading row: large heading left, link right (no content block)
--------------------------------------------------------------- */
.tenants-module__heading-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.tenants-module__heading {
	flex: 1;
}

.tenants-module__heading p,
.tenants-module__heading h2,
.tenants-module__heading h3 {
	font-size: clamp(36px, 4.5vw, 72px);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--black);
	margin: 0;
}

/* ---------------------------------------------------------------
   Content copy (right side of intro row)
--------------------------------------------------------------- */
.tenants-module__content {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding-top: 8px;
}

.tenants-module__content p {
	font-size: 15px;
	line-height: 1.7;
	color: var(--black);
	margin: 0 0 20px;
}

.tenants-module__content p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------
   Link — used in both layouts
--------------------------------------------------------------- */
.tenants-module__link {
	display: inline-block;
	flex-shrink: 0;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0em;
	
	color: var(--blue);
	text-decoration: none;
	white-space: nowrap;
	/*padding-bottom: 6px;*/
	/*border-bottom: 1px solid var(--black);*/
	transition: color 0.2s ease, border-color 0.2s ease;
	margin-top: 20px;
}

.tenants-module__link:hover {
	color: var(--black);
	border-color: var(--main-color);
}

/* ---------------------------------------------------------------
   Full listings — 3-column portrait grid
--------------------------------------------------------------- */
.tenants-module__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 48px 24px;
	padding: 0 40px;
}

/* Cards in grid mode — reset the flex sizing from slider mode */
.tenants-module[data-mode="full_listings"] .tenant-card {
	flex: none;
}

/* ---------------------------------------------------------------
   Pagination
--------------------------------------------------------------- */
.tenants-module__pagination {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 40px 60px 0;
	flex-wrap: wrap;
}

.tenants-module__page-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border-radius: 2px;
	border: 1px solid var(--black);
	background-color: transparent;
	color: var(--black);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.tenants-module__page-btn.is-active {
	background-color: var(--yellow);
	border-color: var(--yellow);
}

.tenants-module__page-btn:hover:not(.is-active) {
	background-color: #f5f5f5;
}

.tenants-module__page-btn:focus-visible {
	outline: 2px solid var(--yellow);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------
   Slider track
   Formula: W = (100vw - G * (N - 1)) / N
   Default: N=3.5, G=24px → 3 gaps → calc((100vw - 72px) / 3.5)
--------------------------------------------------------------- */
.tenants-module__slider {
	overflow: hidden;
}

.tenants-module__track {
	display: flex;
	gap: 24px;
	overflow-x: scroll;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-right: 40px;
	cursor: grab;
}

.tenants-module__track::-webkit-scrollbar {
	display: none;
}

.tenants-module__track:active {
	cursor: grabbing;
}

/* ---------------------------------------------------------------
   Tenant card
--------------------------------------------------------------- */
.tenant-card {
	flex: 0 0 calc((100vw - 72px) / 3.5);
	scroll-snap-align: start;
}

.tenants-module__track .tenant-card:first-child {
	border-left: 40px solid var(--white);
	flex: 0 0 calc((100vw - 72px) / 3.5 + 40px);
}

.tenant-card__inner {
	display: block;
	text-decoration: none;
}

/* Portrait image — 3:4 ratio */
.tenant-card__image-wrap {
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background-color: var(--grey);
}

.tenant-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: transform 0.4s ease;
}

.tenant-card__inner:hover .tenant-card__image {
	transform: scale(1.04);
}

.tenant-card__placeholder {
	width: 100%;
	aspect-ratio: 3 / 4;
	background-color: var(--grey);
}

/* Card meta — name left, specialism right */
.tenant-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 0 0;
	border-bottom: 1px solid var(--blue);
	padding-bottom: 14px;
}

.tenant-card__name {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0em;
	text-transform: uppercase;
	color: var(--blue);
	line-height: 1.3;
}

.tenant-card__specialism {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--blue);
	line-height: 1.4;
	text-align: right;
	flex-shrink: 0;
	padding-top: 2px;
}

/* ---------------------------------------------------------------
   Nav arrows — bottom-right of module (slider mode only)
--------------------------------------------------------------- */
.tenants-module__nav {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 32px 60px 0;
}

.tenants-module__prev,
.tenants-module__next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 1.5px solid var(--btn-grey);
	background-color: transparent;
	color: var(--btn-grey);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
  cursor: pointer;
}

.tenants-module__prev.is-active,
.tenants-module__next.is-active {
	background-color: var(--yellow);
	border-color: var(--yellow);
	color: var(--black);
}

.tenants-module__prev:hover.is-active,
.tenants-module__next:hover.is-active,
.tenants-module__prev:hover,
.tenants-module__next:hover {
	background-color: var(--yellow-hover);
	border-color: var(--yellow-hover);
}

.tenants-module__prev:focus-visible,
.tenants-module__next:focus-visible {
	outline: 2px solid var(--yellow);
	outline-offset: 3px;
}

.tenants-module__prev svg,
.tenants-module__next svg {
	display: block;
	flex-shrink: 0;
}

.tenants-module__pagination  .tenants-module__link {
	display:none
}

.layout-full_listings .introduction-module__heading {
  font-size: clamp(40px, 4.5vw, 74px);
}

/* ---------------------------------------------------------------
   Responsive — 992px: 2.5 visible slider / 2-col grid
   N=2.5, G=20px → 2 gaps → calc((100vw - 40px) / 2.5)
--------------------------------------------------------------- */
@media (max-width: 992px) {
	.tenants-module {
		padding: 80px 0 64px;
	}

	.tenants-module__header {
		padding: 0 20px;
		margin-bottom: 40px;
	}

	.tenants-module__intro-row {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}

	.tenants-module__track {
		gap: 20px;
		padding-right: 40px;
	}

	.tenant-card {
		flex: 0 0 calc((100vw - 40px) / 2.5);
	}

	.tenants-module__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 36px 20px;
		padding: 0 40px;
	}

	.tenants-module__heading-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.tenants-module__pagination {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
		padding: 24px 40px 0;
	}

	.tenants-module__nav {
		padding: 0;
		justify-content: flex-end;
	}

	.tenants-module__track .tenant-card:first-child {
		border-left: 20px solid var(--white);
		flex: 0 0 calc((100vw - 72px) / 2.5 + 33px);
	}

	.tenants-module__heading-row .tenants-module__link {
		display:none
	}
	.tenants-module__pagination  .tenants-module__link {
		display:block;
		font-size: 15px;
		margin-top: 0px;
	}

	.tenants-module.layout-full_listings {
		padding: 0px 0 40px;
	}

}

/* ---------------------------------------------------------------
   Responsive — 700px: 1.25 visible slider / 1-col grid
   N=1.25, G=16px → 1 gap → calc((100vw - 16px) / 1.25)
--------------------------------------------------------------- */
@media (max-width: 700px) {
	.tenants-module {
		padding: 44px 0 40px;
	}

	.tenants-module__header {
		padding: 0 24px;
		margin-bottom: 32px;
	}

	.tenants-module__intro-row {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.tenants-module__heading-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

  .tenants-module__track {
    gap: 12px;
    padding-left: 20px;
  }

	.tenant-card {
		flex: 0 0 calc((100vw - 16px) / 1.25);
	}

	.tenants-module__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 16px;
		padding: 0 24px;
	}

	.tenants-module__nav {
		padding: 20px 24px 0;
	}

	.tenants-module__prev,
	.tenants-module__next {
		width: 44px;
		height: 44px;
	}

	.tenants-module__pagination {
		padding: 24px 24px 0;
		justify-content: flex-start;
	}
	.tenants-module__nav {
    padding: 0px 0px 20px 24px;
  }
}
@media (max-width: 600px) {
  .tenants-module__track .tenant-card:first-child {
    border-left: 20px solid var(--white);
    flex: 0 0 calc((100vw - 72px) / 2.5 + 193px);
  }
}

@media (max-width: 480px) {
	.tenants-module__grid {
		grid-template-columns: 1fr;
	}
}
