/*
 * Ordinary Lives - People Directory Stylesheet (Stage 1 Prototype)
 * Archive People Directory Visual Language
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');
@import './hero-ordinary-lives.css';

:root {
	--ol-color-dark-bg: #111820;
	--ol-color-dark-sec: #1B252D;
	--ol-color-ivory: #F5F1E8;
	--ol-color-text-sec: #C7C3BB;
	--ol-color-accent: #A9865B;
	--ol-font-serif: 'Cormorant Garamond', Georgia, serif;
	--ol-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Body Override for People Directory Page */
body.page-template-page-people,
body.page-people,
.ordinary-page-root {
	background-color: var(--ol-color-dark-bg);
	color: var(--ol-color-ivory);
	margin: 0;
	padding: 0;
	font-family: var(--ol-font-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* People Intro Viewport Section (Dark Slate Background with Historic Background Image) */
.ordinary-people-intro-viewport {
	min-height: 480px;
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background-image: url('../images/people-intro-bg.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: var(--ol-color-ivory);
	overflow: hidden;
	box-sizing: border-box;
}

/* Dark Gradient Overlay for Intro */
.ordinary-people-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(17, 24, 32, 0.85) 0%,
		rgba(17, 24, 32, 0.75) 50%,
		#111820 100%
	);
	z-index: 1;
}

/* People Intro Content */
.ordinary-people-intro-content {
	position: relative;
	z-index: 10;
	padding: 3rem 5rem 2.5rem 5rem;
	max-width: 860px;
	box-sizing: border-box;
}

/* Intro Heading */
.ordinary-people-heading {
	font-family: var(--ol-font-serif);
	font-size: clamp(4.2rem, 6.2vw, 5.2rem);
	font-weight: 400;
	line-height: 0.95;
	color: var(--ol-color-ivory);
	margin: 0 0 1.25rem 0;
	letter-spacing: -0.02em;
}

.ordinary-people-intro-copy {
	font-family: var(--ol-font-sans);
	font-size: clamp(1.15rem, 1.6vw, 1.3rem);
	line-height: 1.6;
	color: var(--ol-color-text-sec);
	max-width: 620px;
	margin: 0 0 2rem 0;
	font-weight: 300;
}

/* Integrated Search & Location Filter Bar */
.ordinary-people-controls {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
	max-width: 680px;
}

.ordinary-people-search-wrapper {
	position: relative;
	flex: 1;
	min-width: 320px;
	max-width: 480px;
}

.ordinary-people-search-wrapper .ordinary-search-input {
	width: 100%;
	height: 54px;
	background: rgba(17, 24, 32, 0.78);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(245, 241, 232, 0.22);
	border-radius: 999px;
	padding: 0 1.75rem 0 3.25rem;
	color: var(--ol-color-ivory);
	font-family: var(--ol-font-sans);
	font-size: 1.0rem;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.25s ease, background 0.25s ease;
}

.ordinary-people-search-wrapper .ordinary-search-input::placeholder {
	color: var(--ol-color-text-sec);
	opacity: 0.85;
}

.ordinary-people-search-wrapper .ordinary-search-input:focus {
	border-color: rgba(245, 241, 232, 0.6);
	background: rgba(17, 24, 32, 0.92);
}

.ordinary-people-search-wrapper .ordinary-search-icon-inside {
	position: absolute;
	left: 1.1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: var(--ol-color-text-sec);
	pointer-events: none;
}

.ordinary-people-search-wrapper .ordinary-search-icon-inside svg {
	width: 100%;
	height: 100%;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.75;
}

/* Location Filter Dropdown Control */
.ordinary-people-filter-btn {
	height: 54px;
	padding: 0 1.4rem;
	background: rgba(17, 24, 32, 0.78);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(245, 241, 232, 0.22);
	border-radius: 12px;
	color: var(--ol-color-ivory);
	font-family: var(--ol-font-sans);
	font-size: 0.95rem;
	font-weight: 400;
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	box-sizing: border-box;
}

.ordinary-people-filter-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(245, 241, 232, 0.4);
	color: var(--ol-color-ivory);
	text-decoration: none;
}

.ordinary-people-filter-btn svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.75;
}

/* Main People Section (PURE WHITE BACKGROUND #FFFFFF) */
.ordinary-people-section {
	background-color: #FFFFFF;
	color: var(--ol-color-dark-bg);
	padding: 4.5rem 5rem 6.5rem 5rem;
	box-sizing: border-box;
	position: relative;
	z-index: 5;
}

.ordinary-people-section-header {
	margin-bottom: 3.5rem;
}

.ordinary-people-section-title {
	font-family: var(--ol-font-serif);
	font-size: 2.85rem;
	font-weight: 400;
	color: var(--ol-color-dark-bg);
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.01em;
}

.ordinary-people-section-sub {
	font-family: var(--ol-font-sans);
	font-size: 1.1rem;
	color: #666666;
	font-weight: 300;
	margin: 0;
}

/* First Row of Four Person Cards Grid (4 Columns Desktop) */
.ordinary-people-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

.ordinary-person-card {
	position: relative;
	height: 360px;
	max-height: 360px;
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.5rem 1.4rem;
	box-sizing: border-box;
	text-decoration: none;
	color: var(--ol-color-ivory);
	background-color: var(--ol-color-dark-bg);
	box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ordinary-person-card:hover,
.ordinary-person-card:focus {
	transform: translateY(-4px);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
	text-decoration: none;
	outline: none;
}

.ordinary-person-card .ordinary-card-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
	z-index: 1;
	transition: transform 0.4s ease;
}

.ordinary-person-card:hover .ordinary-card-bg {
	transform: scale(1.04);
}

.ordinary-person-card .ordinary-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		180deg,
		rgba(17, 24, 32, 0) 25%,
		rgba(17, 24, 32, 0.65) 60%,
		rgba(17, 24, 32, 0.95) 100%
	);
	z-index: 2;
	pointer-events: none;
}

.ordinary-person-card .ordinary-card-content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.ordinary-person-card-name {
	font-family: var(--ol-font-serif);
	font-size: 1.68rem; /* ~27px serif title */
	font-weight: 400;
	line-height: 1.1;
	color: var(--ol-color-ivory);
	margin: 0 0 0.45rem 0;
	letter-spacing: -0.01em;
}

.ordinary-person-card-meta {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	width: 100%;
}

.ordinary-person-card-info {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.ordinary-person-card-location {
	font-family: var(--ol-font-sans);
	font-size: 0.94rem; /* ~15px location */
	color: var(--ol-color-ivory);
	opacity: 0.9;
	font-weight: 400;
}

.ordinary-person-card-count {
	font-family: var(--ol-font-sans);
	font-size: 0.84rem; /* ~13.5px memory count */
	color: var(--ol-color-text-sec);
	font-weight: 300;
}

.ordinary-person-card-arrow {
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	max-width: 36px !important;
	max-height: 36px !important;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(245, 241, 232, 0.25);
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: var(--ol-color-ivory);
	flex-shrink: 0;
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
	box-sizing: border-box;
}

.ordinary-person-card-arrow svg {
	width: 16px !important;
	height: 16px !important;
	max-width: 16px !important;
	max-height: 16px !important;
	stroke: currentColor !important;
	stroke-width: 1.75 !important;
	fill: none !important;
	display: block !important;
}

.ordinary-person-card:hover .ordinary-person-card-arrow {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(245, 241, 232, 0.5);
	transform: translateX(3px);
}

/* Compact More People Grid */
.ordinary-people-compact-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1.25rem;
}

.ordinary-person-compact-tile {
	position: relative;
	height: 220px;
	max-height: 220px;
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.1rem 1.0rem;
	box-sizing: border-box;
	text-decoration: none;
	color: var(--ol-color-ivory);
	background-color: var(--ol-color-dark-sec);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ordinary-person-compact-tile:hover,
.ordinary-person-compact-tile:focus {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
	text-decoration: none;
	outline: none;
}

.ordinary-person-compact-tile .ordinary-compact-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
	z-index: 1;
	transition: transform 0.4s ease;
}

.ordinary-person-compact-tile:hover .ordinary-compact-bg {
	transform: scale(1.04);
}

.ordinary-person-compact-tile .ordinary-compact-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		180deg,
		rgba(17, 24, 32, 0) 25%,
		rgba(17, 24, 32, 0.65) 60%,
		rgba(17, 24, 32, 0.95) 100%
	);
	z-index: 2;
	pointer-events: none;
}

.ordinary-person-compact-tile .ordinary-compact-content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.ordinary-person-compact-name {
	font-family: var(--ol-font-serif);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.15;
	color: var(--ol-color-ivory);
	margin: 0 0 0.25rem 0;
	letter-spacing: -0.01em;
}

.ordinary-person-compact-meta {
	font-family: var(--ol-font-sans);
	font-size: 0.8rem;
	color: var(--ol-color-text-sec);
	font-weight: 300;
}

.ordinary-person-compact-count {
	font-family: var(--ol-font-sans);
	font-size: 0.76rem;
	color: var(--ol-color-accent);
	font-weight: 500;
	margin-top: 0.15rem;
	display: block;
}

/* Responsive Breakpoints */
@media (max-width: 1400px) {
	.ordinary-people-compact-grid {
		grid-template-columns: repeat(5, 1fr);
	}
}

@media (max-width: 1180px) {
	.ordinary-people-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.75rem;
	}
	.ordinary-people-compact-grid {
		grid-template-columns: repeat(4, 1fr);
	}
	.ordinary-people-intro-content {
		padding: 3rem 3.5rem 2rem 3.5rem;
	}
	.ordinary-people-section {
		padding: 3.5rem 3.5rem 5rem 3.5rem;
	}
}

@media (max-width: 880px) {
	.ordinary-people-compact-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 720px) {
	.ordinary-people-intro-content {
		padding: 2rem 1.25rem 2rem 1.25rem;
	}
	.ordinary-people-heading {
		font-size: clamp(3.2rem, 11vw, 4.2rem);
	}
	.ordinary-people-controls {
		flex-direction: column;
		align-items: stretch;
	}
	.ordinary-people-search-wrapper {
		max-width: 100%;
		min-width: 100%;
	}
	.ordinary-people-section {
		padding: 3rem 1.25rem 4rem 1.25rem;
	}
	.ordinary-people-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

@media (max-width: 600px) {
	.ordinary-people-compact-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}
