/* ==========================================================================
   Poppet Head Estate — main stylesheet
   Recreates the original site: black header + nav, white content panel on
   deep red background, feature row, black footer.
   ========================================================================== */

:root {
	--phe-red: #941515;
	--phe-red-bright: #ff0000;
	--phe-black: #000;
	--phe-text: #333;
	--phe-heading: #010c14;
	--phe-border: #eee;
	--phe-hover: #672b80;
	--phe-width: 1010px;
	--phe-font: 'Open Sans', Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
	margin: 0;
	background: var(--phe-red);
	font-family: var(--phe-font);
	font-size: 14px;
	font-weight: 400;
	color: var(--phe-text);
	-webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--phe-red); text-decoration: underline; transition: color .2s ease-in; }
a:hover, a:focus { color: var(--phe-hover); }

p { margin: 0 0 12px; line-height: 1.68em; }

h1, h2, h3, h4, h5, h6 { font-family: var(--phe-font); font-weight: 600; color: var(--phe-heading); word-break: break-word; }
h1 { font-size: 26.4px; line-height: 1.5; margin: 18px 0; }
h2 { font-size: 21.6px; line-height: 1.6; margin: 17px 0; clear: both; }
h3 { font-size: 19.2px; line-height: 1.5; margin: 16px 0; }
h4 { font-size: 15px; margin: 16px 0; }

ul, ol { margin: 0 0 24px 20px; padding: 0; }
li { line-height: 1.6em; margin-bottom: 2px; }

blockquote {
	font-weight: 600;
	line-height: 1.4;
	font-size: 16.8px;
	border-left: 4px solid var(--phe-border);
	margin: 0 0 16px;
	padding-left: 30px;
}
blockquote p { font-size: 16.8px; line-height: 1.5; }

table { max-width: 100%; border-collapse: collapse; border-spacing: 0; }
hr { border: 0; border-bottom: 1px solid var(--phe-border); margin: 24px 0; }

.screen-reader-text {
	position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
	background: #fff; color: #000; padding: 10px 14px;
}

.phe-container { width: 100%; max-width: var(--phe-width); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header { background: var(--phe-black); }
.site-branding { display: block; line-height: 0; }
.site-branding img { display: block; width: 100%; max-width: 1004px; margin: 0 auto; }
.site-branding .logo-mobile { display: none; max-width: 300px; }

.site-title-text { color: #fff; font-size: 28px; padding: 20px; display: block; line-height: 1.2; text-decoration: none; }

/* ---------- Navigation ---------- */
.site-nav {
	background: var(--phe-black);
	border-top: 1px solid var(--phe-border);
	border-bottom: 1px solid var(--phe-border);
	margin-top: 4px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav li { margin: 0; position: relative; }
.site-nav a {
	display: block;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	text-decoration: none;
	padding: 10px 21px 9px;
	line-height: 17px;
}
.site-nav a:hover,
.site-nav a:focus,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current_page_parent > a { color: var(--phe-red-bright); }

/* dropdowns (if the client adds sub-pages later) */
.site-nav ul ul {
	display: none; position: absolute; top: 100%; left: 0; min-width: 200px;
	background: #000; z-index: 50; flex-direction: column;
}
.site-nav li:hover > ul, .site-nav li:focus-within > ul { display: flex; }

.menu-toggle {
	display: none;
	width: 100%;
	background: #000;
	color: #fff;
	border: 0;
	border-top: 1px solid #333;
	font: 700 13px/1 Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: .05em;
	padding: 14px 16px;
	text-align: left;
	cursor: pointer;
}
.menu-toggle .bars { display: inline-block; width: 18px; vertical-align: middle; margin-right: 10px; }
.menu-toggle .bars span { display: block; height: 2px; background: #fff; margin: 3px 0; }

.mobile-phone {
	display: none;
	background: var(--phe-red);
	color: #fff;
	text-align: center;
	font-weight: 600;
	padding: 10px 16px;
	text-decoration: none;
}
.mobile-phone:hover, .mobile-phone:focus { color: #fff; background: #7a1010; }

/* ---------- Main panel ---------- */
.site-main-wrap { background: #fff; padding: 3px 3px 10px; }

.layout { display: flex; gap: 2%; align-items: flex-start; }
.layout .content-area { flex: 1 1 auto; min-width: 0; }
.layout.has-sidebar .content-area { width: 74.5%; }
.layout.has-sidebar .sidebar { width: 23.5%; flex: 0 0 23.5%; order: -1; }

.content-area { padding: 0 0 20px; }
.content-area .entry-content { padding-top: 30px; }
.content-area .entry-header + .entry-content { padding-top: 0; }
.page-title, .entry-title { margin-top: 18px; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--phe-red); }

.entry-content::after { content: ""; display: table; clear: both; }
.entry-content img.aligncenter, .entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content img.alignleft { float: left; margin: 0 16px 10px 0; }
.entry-content img.alignright { float: right; margin: 0 0 10px 16px; }
.entry-content ul.square { list-style-type: square; }

/* ---------- Sidebar / widgets ---------- */
.widget { margin-bottom: 30px; }
.widget-title {
	margin: 10px 0;
	text-transform: uppercase;
	font-size: 19.2px;
	line-height: 1.5;
	color: var(--phe-heading);
}
.widget p { margin-bottom: 10px; }
.media-thumb { display: block; position: relative; margin-bottom: 25px; line-height: 0; }
.media-thumb img { display: block; width: 100%; max-width: 220px; }
.sidebar .media-thumb img { max-width: 100%; }
.for-lease-link img { display: block; max-width: 198px; }

/* ---------- Feature row ---------- */
.feature-row { background: #fff; border-top: 10px solid var(--phe-red); padding: 3px 3px 20px; }
.feature-row .phe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2%; }
.feature-row .widget { margin-bottom: 10px; }
.feature-row .widget-title { margin-top: 6px; }
.feature-row a img { display: block; }

/* logo slider */
.logo-slider {
	position: relative;
	max-width: 275px;
	aspect-ratio: 275 / 200;
	margin: 0 auto;
	background: #fff;
	box-shadow: 0 0 10px #333;
	overflow: hidden;
}
.logo-slider a { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.logo-slider a.is-active { opacity: 1; pointer-events: auto; }
.logo-slider img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* zoom icon overlay used on lightbox thumbnails */
.has-zoom { position: relative; display: inline-block; line-height: 0; }
.has-zoom::after {
	content: "";
	position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px;
	background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='M15.5 15.5 22 22'/%3E%3C/svg%3E");
	opacity: .85;
	pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer { background: #000; color: #fff; font-size: 12px; padding: 30px 0 45px; }
.site-footer .phe-container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; color: #fff; font-size: 12px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--phe-red-bright); }

/* ---------- Blog / news ---------- */
.news-item { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--phe-border); }
.news-item:last-child { border-bottom: 0; }
.pagination { margin: 20px 0; }
.pagination .page-numbers { padding: 4px 8px; }

/* ---------- Business directory ---------- */
.business-directory { width: 100%; margin-top: 10px; }
.business-directory td { padding: 14px 10px; vertical-align: top; border-top: 1px solid #ddd; line-height: 1.68em; }
.business-directory tr:first-child td { border-top: 0; }
.business-directory td.logo { width: 200px; text-align: left; vertical-align: middle; }
.business-directory td.logo img { max-width: 170px; }
.business-directory td p { margin: 0; }

/* ---------- Contact ---------- */
.contact-map { width: 100%; height: 300px; border: 0; display: block; margin: 20px 0; }
.contact-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2%; margin-bottom: 20px; }
.contact-columns h2 { margin-top: 0; }

.phe-form { max-width: 700px; }
.phe-form .field { margin-bottom: 16px; display: grid; grid-template-columns: 160px 1fr; align-items: start; gap: 10px; }
.phe-form label { font-weight: 600; padding-top: 7px; }
.phe-form .req { color: var(--phe-red); }
.phe-form input[type=text], .phe-form input[type=email], .phe-form input[type=tel], .phe-form textarea {
	width: 100%; padding: 8px 10px; font: inherit; border: 1px solid #ccc; border-radius: 3px; background: #fff;
}
.phe-form input:focus, .phe-form textarea:focus { outline: 2px solid var(--phe-red); outline-offset: 0; border-color: var(--phe-red); }
.phe-form textarea { min-height: 130px; }
.phe-form .hp { position: absolute; left: -9999px; }
.phe-form button {
	background: var(--phe-red); color: #fff; border: 0; padding: 10px 26px; font: 600 14px var(--phe-font);
	border-radius: 3px; cursor: pointer;
}
.phe-form button:hover { background: #000; }
.phe-form .actions { margin-left: 170px; }
.phe-notice { padding: 12px 16px; margin: 0 0 20px; border-radius: 3px; }
.phe-notice.success { background: #e6f4ea; color: #1e5e2f; border: 1px solid #b7dfc3; }
.phe-notice.error { background: #fdecea; color: #8a1c1c; border: 1px solid #f3b9b4; }

/* ---------- Lightbox ---------- */
.phe-lightbox {
	position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.85);
	display: none; align-items: center; justify-content: center; padding: 40px 16px;
}
.phe-lightbox.is-open { display: flex; }
.phe-lightbox__inner { position: relative; max-width: 100%; max-height: 100%; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.phe-lightbox__inner img, .phe-lightbox__inner video { display: block; max-width: min(1024px, 92vw); max-height: 82vh; }
.phe-lightbox__inner iframe { display: block; width: min(800px, 92vw); height: min(600px, 75vh); border: 0; background: #fff; }
.phe-lightbox__title { color: #fff; padding: 8px 12px; font-size: 13px; }
.phe-lightbox__close {
	position: absolute; top: -36px; right: -4px; background: none; border: 0; color: #fff;
	font-size: 32px; line-height: 1; cursor: pointer; padding: 0 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
	.phe-container { padding: 0 16px; }
	.site-header .phe-container { padding: 0; }
	.site-nav a { padding: 10px 12px 9px; }
}

@media (max-width: 787px) {
	.site-branding .logo-desktop { display: none; }
	.site-branding .logo-mobile { display: block; }
	.menu-toggle { display: block; }
	.mobile-phone { display: block; }
	.site-nav { border: 0; margin-top: 0; }
	.site-nav .phe-container { padding: 0; }
	.site-nav ul { display: none; flex-direction: column; }
	.site-nav.is-open ul { display: flex; }
	.site-nav ul ul { position: static; display: flex; padding-left: 16px; }
	.site-nav a { padding: 12px 16px; border-top: 1px solid #222; font-size: 13px; }

	.layout { flex-direction: column; }
	.layout.has-sidebar .content-area,
	.layout.has-sidebar .sidebar { width: 100%; flex: 1 1 auto; }
	.layout.has-sidebar .sidebar { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

	.feature-row .phe-grid { grid-template-columns: 1fr; }
	.contact-columns { grid-template-columns: 1fr; }
	.phe-form .field { grid-template-columns: 1fr; gap: 4px; }
	.phe-form .actions { margin-left: 0; }

	.business-directory, .business-directory tbody, .business-directory tr, .business-directory td { display: block; width: 100%; }
	.business-directory td.logo { width: 100%; border-top: 1px solid #ddd; padding-bottom: 0; }
	.business-directory td:not(.logo) { border-top: 0; padding-top: 6px; }
	.site-footer .phe-container { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 520px) {
	.layout.has-sidebar .sidebar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.logo-slider a { transition: none; }
}
