/* Parochial Directory — Front End Styles */

.pd-directory-wrap {
	--pd-navy: #0b1f4b;
	--pd-gold: #c9a227;
	--pd-bg: #f7f7f5;
	--pd-text: #222;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 1100px;
	margin: 0 auto;
	color: var(--pd-text);
}

.pd-directory-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 20px;
	text-align: center;
}

.pd-crest-logo {
	height: 90px;
	width: auto;
	display: block;
}

.pd-directory-title {
	margin: 0;
	color: var(--pd-navy);
	font-size: 26px;
	letter-spacing: 0.02em;
}

@media (max-width: 500px) {
	.pd-directory-header {
		flex-direction: column;
		gap: 8px;
	}
	.pd-crest-logo {
		height: 70px;
	}
}

.pd-controls {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	padding: 16px;
	background: var(--pd-navy);
	border-radius: 8px;
}

.pd-search-input {
	flex: 1 1 260px;
	padding: 10px 14px;
	border: none;
	border-radius: 6px;
	font-size: 15px;
}

.pd-category-filter,
.pd-sort-order {
	flex: 0 0 200px;
	padding: 10px 14px;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	background: #fff;
}

.pd-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.pd-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid #eee;
	display: flex;
	flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pd-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.pd-card-image {
	position: relative;
	height: 160px;
	background: #e5e5e5;
}

.pd-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pd-card-image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 13px;
}

.pd-card-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--pd-gold);
	color: var(--pd-navy);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 10px;
	border-radius: 20px;
}

.pd-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.pd-card-title {
	margin: 0 0 8px;
	font-size: 18px;
	color: var(--pd-navy);
}

.pd-card-desc {
	font-size: 13px;
	color: #555;
	margin: 0 0 10px;
}

.pd-card-meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	font-size: 13px;
	line-height: 1.6;
}

.pd-card-meta a {
	color: var(--pd-navy);
	text-decoration: none;
}

.pd-card-meta a:hover {
	text-decoration: underline;
}

.pd-directions-btn {
	margin-top: auto;
	display: inline-block;
	text-align: center;
	background: var(--pd-navy);
	color: #fff !important;
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.pd-directions-btn:hover {
	background: var(--pd-gold);
	color: var(--pd-navy) !important;
}

.pd-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #777;
	padding: 30px 0;
}

.pd-loading {
	text-align: center;
	color: #999;
	padding: 30px 0;
}

.pd-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 26px;
}

.pd-page-btn {
	background: var(--pd-navy);
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.pd-page-btn:hover:not(:disabled) {
	background: var(--pd-gold);
	color: var(--pd-navy);
}

.pd-page-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.pd-page-status {
	font-size: 13px;
	color: #555;
}

@media (max-width: 600px) {
	.pd-controls {
		flex-direction: column;
	}
	.pd-category-filter,
	.pd-sort-order {
		flex: 1 1 auto;
	}
}

.pd-read-more {
	margin: 0 0 12px;
}

.pd-read-more a {
	color: var(--pd-navy);
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.pd-read-more a:hover {
	text-decoration: underline;
	color: var(--pd-gold);
}

/* Single entry page — themed to inherit Twenty Twenty-Four's design tokens
   where available (font, colors, content width), with safe fallbacks so it
   still looks right on any theme. */
#pd-single-main {
	--pd-navy: #0b1f4b;
	--pd-gold: #c9a227;
	display: flow-root;
	padding-top: var(--wp--preset--spacing--50, 32px);
	padding-bottom: var(--wp--preset--spacing--60, 48px);
	font-family: var(--wp--preset--font-family--system-font, var(--wp--preset--font-family--body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
	color: var(--wp--preset--color--contrast, #222);
}

.pd-single-entry.alignwide {
	max-width: var(--wp--style--global--wide-size, 1000px);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wp--style--global--content-padding, 16px);
	padding-right: var(--wp--style--global--content-padding, 16px);
}

.pd-back-link {
	display: inline-block;
	margin-bottom: 18px;
	color: var(--pd-navy);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
}

.pd-back-link:hover {
	color: var(--pd-gold);
	text-decoration: underline;
}

.pd-single-header {
	display: flex;
	gap: var(--wp--preset--spacing--40, 28px);
	flex-wrap: wrap;
	margin-bottom: var(--wp--preset--spacing--40, 28px);
}

.pd-single-image {
	flex: 0 0 280px;
	max-width: 280px;
	border-radius: 6px;
	overflow: hidden;
}

.pd-single-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

.pd-single-placeholder {
	height: 200px;
	border-radius: 6px;
}

.pd-single-heading {
	flex: 1 1 320px;
}

.pd-single-badge {
	position: static;
	display: inline-block;
	margin-bottom: 12px;
}

.pd-single-title.wp-block-post-title {
	margin: 0 0 16px;
	color: var(--wp--preset--color--contrast, var(--pd-navy));
	font-size: var(--wp--preset--font-size--x-large, 2rem);
	line-height: 1.15;
}

.pd-single-meta {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	font-size: 0.95rem;
	line-height: 1.8;
}

.pd-single-meta a {
	color: var(--pd-navy);
	text-decoration: none;
}

.pd-single-meta a:hover {
	text-decoration: underline;
}

.pd-single-content.entry-content {
	border-top: 1px solid var(--wp--preset--color--contrast-3, #e0e0e0);
	padding-top: var(--wp--preset--spacing--40, 24px);
	font-size: var(--wp--preset--font-size--medium, 1.05rem);
	line-height: 1.75;
	max-width: var(--wp--style--global--content-size, 65ch);
}

.pd-single-content.entry-content p {
	margin: 0 0 1em;
}

@media (max-width: 600px) {
	.pd-single-header {
		flex-direction: column;
	}
	.pd-single-image {
		max-width: 100%;
	}
	.pd-single-title.wp-block-post-title {
		font-size: var(--wp--preset--font-size--large, 1.6rem);
	}
}
