/*
Theme Name: Heritage Building & Design
Theme URI: https://hbandd.com/
Author: Josh Castro
Author URI: https://threeringfocus.com/
Description: Custom WordPress theme for Heritage Building & Design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: heritage-bd
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================
   DEFAULTS
   ===================================================== */
/* Box model reset  */
*,
*::before,
*::after {
    box-sizing: border-box; /* border & padding included inside box */
    margin: 0;
    padding: 0;
}
/* Root & body base */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* stop iOS auto-zooming text */
}
body {
    min-height: 100vh;
    line-height: 1.5; /* comfortable reading rhythm, better than browser default ~1.2 */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeSpeed;
}
/* Media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%; /* prevents images breaking layout on small screens */
    height: auto;
}
/* Typography resets */
h1, h2, h3, h4, h5, h6 {
    font-weight: inherit; /* don't force bold until you set your own scale */
    line-height: 1.2;
}
p, li {
    overflow-wrap: break-word; /* long words/URLs don't overflow containers */
	line-height: 1.8rem;
}
a {
    color: inherit;
    text-decoration: none;
	transition: color .4s ease-in-out, background-color .4s ease-in-out;
}
/* Lists */
li {
	list-style-position: inside;
}
/* Forms & buttons inherit fonts (Safari/Firefox don't by default) */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}
button {
    cursor: pointer;
    background: none;
    border: none;
	transition: color .4s ease-in-out, background-color .4s ease-in-out, border-color .4s ease-in-out;
}
/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}
/* Root variables — Heritage Building & Design brand palette */
:root {
    /* Backgrounds */
    --color-background: #ececec;
    --color-background-dark: #222222;
	--color-background-light: #ffffff;
    /* Text */
    --color-text: #222222;
    --color-text-on-dark: #ececec;
    /* Headings */
    --color-heading-primary: #222222;
    --color-heading-secondary: #ac7d3a;
    /* Buttons */
    --color-button-bg: #ac7d3a;
    --color-button-text: #ececec;
    --color-button-border: #ac7d3a;
    --color-button-bg-hover: transparent;
    --color-button-text-hover: #ac7d3a;
    --color-button-bg-on-dark: transparent;
    --color-button-text-on-dark: #ececec;
    --color-button-border-on-dark: #ececec;
    --color-button-bg-hover-on-dark: #ececec;
    --color-button-text-hover-on-dark: #222;
    /* Typography */
    --font-base: montserrat, sans-serif;
    --font-heading: bookmania, serif;
}
/* Accessibility: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Focus visibility (don't remove outlines without replacing them) */
:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
/* Screen-reader-only text: visually hidden but still announced by
   assistive tech. Reused for skip links, form labels, etc. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
/* When a screen-reader-text element receives focus (e.g. the skip
   link is tabbed to), reveal it visibly so sighted keyboard users
   can see and use it too. */
.screen-reader-text:focus {
    background-color: var(--color-background, #f1f1f1);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--color-heading-primary, #1a1a1a);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
/* Background images cover and are responsive */
.bg-cover {
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

/* =====================================================
   BASE COMPONENTS
   ===================================================== */
body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-base);
}
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading-primary);
    font-family: var(--font-heading);
}
/* Utility for accent/secondary headings, e.g. eyebrow text or subheads */
.heading-accent {
    color: var(--color-heading-secondary);
	font-family: var(--font-heading);
    font-style: italic;
	font-size: 1.5rem;
}
/* Standard (light-context) button — solid fill by default, outlines on hover */
.button,
button[type="submit"],
input[type="submit"] {
    display: inline-block;
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
    border: 1px solid var(--color-button-border);
    font-family: var(--font-heading);
    font-style: italic;
    padding: 0.55em 1.5em 0.4em 1.5em;
    border-radius: 0;
    font-weight: 700;
	font-size: 1.1em;
	line-height: normal;
    transition: background-color 0.4s ease-in-out, color 0.4s ease-in-out;
}
.button:hover,
.button:focus,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--color-button-bg-hover);
    color: var(--color-button-text-hover);
}
/* Dark-context button — outlined by default, fills solid on hover.
   Apply .button--white directly, or it's applied automatically to
   any .button placed inside .site-header. */
.button--white,
.site-header .button,
.site-header button[type="submit"],
.site-header input[type="submit"] {
    background-color: var(--color-button-bg-on-dark);
    color: var(--color-button-text-on-dark);
    border-color: var(--color-button-border-on-dark);
}
.button--white:hover,
.button--white:focus,
.site-header .button:hover,
.site-header .button:focus {
    background-color: var(--color-button-bg-hover-on-dark);
    color: var(--color-button-text-hover-on-dark);
}
/* Apply to any section with a dark background (e.g. footer, CTA banners)
   so text/links automatically use the light-on-dark palette. */
.has-dark-background {
    background-color: var(--color-background-dark);
    color: var(--color-text-on-dark);
}
.has-dark-background h1,
.has-dark-background h2,
.has-dark-background h3,
.has-dark-background h4,
.has-dark-background h5,
.has-dark-background h6 {
    color: var(--color-text-on-dark);
}

/* =====================================================
   TYPE SCALE
   ===================================================== */
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.8rem; }

/* =====================================================
   TYPOGRAPHY SPACING (vertical rhythm)
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 1.25rem;
}
p, ul, ol, blockquote, table, figure {
    margin-bottom: 1.75rem;
}
/* Remove the extra top margin when a heading is the very first
   element in a content block (e.g. right after opening a card,
   section, or .entry-content) — avoids unwanted gap at the top */
h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child,
p:first-child {
    margin-top: 0;
}
/* Remove trailing margin on the last element inside a content block. */
.entry-content > :last-child,
.entry-content-2 > :last-child,
.pr-col > :last-child{
    margin-bottom: 0;
}

/* =====================================================
   SITE HEADER
   ===================================================== */
.site-header {
    position: relative;
    width: 100%;
    height: 120px;
    padding: 35px 100px 25px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.site-logo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    line-height: 0;
}
.site-logo img {
    display: block;
    max-height: 145px;
    width: auto;
}
.site-header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.site-header-note {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    white-space: nowrap;
}

/* =====================================================
   FRONT PAGE
   ===================================================== */
.hero {
    width: 100%;
    height: 100vh;
    max-height: 1000px;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.front-page-one {
    width: 100%;
    padding: 100px 20px;
}
.fp1-wrapper {
    max-width: 1400px;
    margin: 0 auto; /* centers the wrapper itself within the full-width section */
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}
.fp1-wrapper > p {
	max-width: 780px;
}
.fp1-head,
.fp1-wrapper > p {
    flex: 1 1 400px; /* lets both columns shrink/stack gracefully below ~800px combined width */
}
.fp1-wrapper > :last-child {
    margin-bottom: 0;
}
.fp1-head > h1 {
	margin: .5em 0;
}
.fp1-head .button {
    align-self: flex-start;
}
.front-page-two {
	width: 100%;
	padding: 100px 20px;
	background-image: url("images/home/bg-01.jpg");
}
.fp2-wrapper {
    max-width: 1400px;
    margin: 0 auto; /* centers the wrapper itself within the full-width section */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.fp2-wrapper h2,
.fp4-content h2,
.fp5-content h2,
.fp6-headline h2 {
	font-size: 3rem;
}
.fp2-wrapper h2,
.fp4-content h2 {
	margin: 0;
}
.front-page-three {
	width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.fp3-box {
	width: calc(33.33% - 14px);
	height: 550px;
	position: relative;
}
.box-shadow {
	text-align: center;
	background-color: rgba(0,0,0,.8);
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	opacity: 0;
	transition: opacity .5s ease-in-out;
}
.box-shadow h3 {
	margin: 0;
}
.box-shadow a {
    display: inline-block;
    color: var(--color-button-text-hover);
    border-bottom: 1px solid var(--color-button-border);
    font-family: var(--font-heading);
    font-style: italic;
    padding: 0.55em 1.5em;
    border-radius: 0;
    font-weight: 700;
	font-size: 1.4em;
    transition: color 0.4s ease-in-out;
}
.box-shadow a:hover,
.box-shadow a:focus {
    color: var(--color-button-text);
}
.fp3-box:hover .box-shadow,
.fp3-box:focus-within .box-shadow {
	opacity: 1;
}
.front-page-four {
	width: 100%;
	padding: 100px 20px;
	background-image: url("images/home/bg-02.jpg");
}
.fp4-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}
.fp4-image {
	width: 100%;
	max-width: 664px;
	height: 880px;
	box-shadow: 5px 5px 8px 2px rgba(0,0,0,.3);
}
.fp4-divide {
	width: 1px;
	height: 620px;
	margin: auto;
	background-color: var(--color-background);
}
.fp4-content {
	width: 100%;
	max-width: 630px;
}
.fp4-content p {
	margin: 1rem 0 1.75rem 0;
}
.front-page-five {
	width: 100%;
	min-height: 730px;
	background-image: url("images/home/bg-03.jpg");
	display: flex;
	align-items: flex-end;
	box-shadow: 5px 5px 8px 2px rgba(0,0,0,.3);
}
.fp5-box {
	width: 100%;
	padding: 70px 20px;
	background-color: rgba(34,34,34,.9);
}
.fp5-wrap {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
}
.fp5-content {
	max-width: 800px;
}
.fp5-content p {
}
.front-page-six {
	width: 100%;
	padding: 120px 20px;
}
.fp6-headline {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
}
.fp6-wrap {
	width: 100%;
	max-width: 1500px;
	margin: 40px auto;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
	flex-wrap: wrap;
}
.fp6-quote {
	width: calc(33.33% - 54px);
	padding: 30px 0 10px 0;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
}
.fp6-quote img {
	margin-top: 6px;
}
.fp6-content {
	max-width: 410px;
}
.fp6-divide {
	align-self: stretch;
	width: 1px;
	background-color: var(--color-background-dark);
}
.fp6-button {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
}

/* =====================================================
   STANDARD PAGES
   ===================================================== */
article {
	padding: 0 20px;
}
.entry-header {
	width: 100%;
	text-align: center;
}
.entry-header h1,
.entry-header-2 h1{
	color: var(--color-text-on-dark);
	background-color: var(--color-button-bg);
	display: inline-block;
	text-align: center;
	margin: 0;
	padding: 15px 20px;
    line-height: 1em;
    font-size: 2rem;
}
.entry-content {
	max-width: 1030px;
    margin: 60px auto;
}

/* =====================================================
   TEMPLATE PAGES
   ===================================================== */
.about-1 {
	padding-left: 150px;
}
.entry-header-2 {}
.ab1-wrap {
	width: 100%;
	padding: 50px 0 100px 0;
	display: flex;
	justify-content: space-between;
	gap: 40px;
}
.entry-content-2 {
	flex: 2;
	max-width: 900px;
}
.ab1-image {
	flex: 1;
	max-width: 770px;
	min-height: 350px;
	background-color: black;
}
.about-2,
.about-3,
.about-4,
.about-5 {
	background-color: var(--color-background-light);
}
.about-2 {
	width: 100%;
	padding: 80px 20px;
}
.ab2-wrap {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 40px;
}
.ab2-image {
	flex: 1;
	max-width: 460px;
	min-height: 580px;
	padding: 50px 10px;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: flex-end;
}
.ab2-content {
	flex: 2;
	max-width: 880px;
}
.about-3 {
	width: 100%;
	padding-top: 100px;
}
.ab3-box {
	width: calc(100% - 40px);
	max-width: 1680px;
	margin: 0 auto;
	padding: 100px 20px;
	border-top: 2px solid #ac7d3a;
	border-bottom: 2px solid #ac7d3a;
	text-align: center;
}
.ab3-box h2 {
	color: var(--color-heading-secondary);
	max-width: 920px;
	margin: 0 auto;
}
.ab3-box p {
	margin: 20px auto 0 auto;
	max-width: 900px;
}
.about-4 {
	width: 100%;
	padding: 100px 0;
	display: flex;
	justify-content: space-between;
	gap: 30px;
	flex-wrap: wrap;
}
.ab4-image {
	height: 460px;
	width: calc(25% - 22.5px);
}
.about-5 {
	width: 100%;
	padding: 1px 20px 100px 20px;
}
.ab5-content {
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
	text-align: center;
}
.process-container {
	padding: 100px 0;
	background-color: var(--color-background-light);
}
.pr-row {
	width: 100%;
	padding: 0 150px;
}
.pr-row.pr-last {
	padding-right: 0;
}
.pr-wrap {
	width: 100%;
	display: flex;
	justify-content: space-between;
	gap: 40px;
}
.pr-col {
	flex: 1;
	max-width: 720px;
	margin-bottom: 80px;
}
.pr-col p:has(+ ul) {
    margin-bottom: 0.5rem; /* whatever adjustment you need */
}
.pr-step {
	display: inline-block;
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
    font-family: var(--font-heading);
    font-style: italic;
    padding: 0.55em 1.5em 0.4em 1.5em;
    font-weight: 700;
	font-size: 1.1em;
	line-height: normal;
}
.pr-box {
	flex: 1.175;
	width: 50%;
	max-width: 920px;
	min-height: 500px;
	background-color: #ac7d3a;
	padding: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}
.prb-content {
    color: #fff;
	max-width: 580px;
}
.prb-content h2 {
    color: #fff;
}
.project-gallery {
	width: 100%;
	padding: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* =====================================================
   BLOG
   ===================================================== */
.blog-padding {
	padding: 80px 20px;
}
.blog-grid {
	width: 100%;
	max-width: 1400px;
	margin: 60px auto 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
.blog-card {
	display: flex;
	flex-direction: column;
}
.blog-card-thumb {
	display: block;
	margin-bottom: 20px;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}
.blog-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.blog-card-content {
	display: flex;
	flex-direction: column;
	flex: 1;
}
.blog-card .entry-title {
	margin-top: 0;
	font-size: 1.3rem;
}
.blog-card .entry-excerpt {
	flex: 1; /* keeps card content aligned even when excerpt lengths differ */
}
.blog-pagination {
	width: 100%;
	max-width: 1400px;
	margin: 60px auto 0 auto;
	text-align: center;
}
@media (max-width: 900px) {
	.blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.blog-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
	padding-bottom: 1px;
	font-style: italic;
}
.site-footer a:hover {
	color: #ac7d3a;
}
.footer-top {
	width: 100%;
	border-bottom: 1px solid #ececec;
	padding: 5px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.footer-top > div:first-child,
.footer-top > div:last-child {
	flex: 1; /* equal-width side columns force .foot-logo to sit truly centered */
}
.footer-top > div:last-child {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 15px;
}
.footer-top .fab,
.footer-top .fa-brands {
    font-size: 1.4em;
}
.foot-logo {
    width: 260px;
	flex: none; /* stays its natural width, doesn't grow like its siblings */
}
.foot-logo img {
    display: block;
    max-height: 110px;
    width: auto;
}
.footer-middle {
	padding: 50px 30px 70px 30px;
	text-align: center;
}
.footer-navigation li {
	display: inline;
	border-right: 1px solid #ececec;
	padding: 0 15px;
}
.footer-navigation li:last-child {
	border: none;
}
.footer-bottom {
	padding: 0px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.footer-bottom > p:first-child,
.footer-bottom > p:last-child {
	flex: 1; /* equal-width side columns force .center-p to sit truly centered */
}
.footer-bottom > p:last-child {
	text-align: right;
}
.center-p {
	flex: 2;
    text-align: center;
}
.not-italic {
   font-style: normal;
}

/* =====================================================
   RESPONSIVE ELEMENTS
   ===================================================== */
.response img {
    width: 100%;
    height: auto;
    display: block;
}
.videoWrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    padding-top: 25px;
    height: 0;
}
.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.map-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
}
.map-container iframe, .map-container object, .map-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =====================================================
   PAGE BREAKS
   ===================================================== */
@media (max-width: 1200px) /* large tablets / small laptops */ {
	.site-logo {top: 0; left: 20px; transform:none;}
	.fp6-wrap {gap: 20px;}
	.fp6-quote {width: calc(33.33% - 28px);}
	.about-1 {padding-left: 40px;}
	.pr-row {padding: 0 40px;}
	.pr-box {flex: 1; width: 100%;}
}
@media (max-width: 1100px) {
	.ab4-image {width: calc(50% - 15px);}
}
@media (max-width: 1000px) /* tablets, landscape */ {
	.fp3-box {width: 100%;}
	.fp4-content {max-width: 664px;}
	.fp4-wrapper {flex-direction: column-reverse;}
	.fp4-divide {display: none;}
	.fp4-image {height: 700px;}
	.fp6-wrap {align-items: center; flex-direction: column;}
	.fp6-quote {width: 100%; max-width: 480px;}
	.fp6-divide {width: 90%; height: 1px; max-width: 480px; margin: 0 auto;}
	.fp6-headline,.fp6-button {text-align: center;}
	.footer-bottom {flex-direction: column;}
	.footer-top, .footer-middle, .footer-bottom {padding-left: 20px; padding-right: 20px;}
	.about-1 {padding: 0 40px;}
	.ab1-wrap {flex-direction: column;}
	.entry-content-2, .ab1-image {max-width: 100%;}
	.about-2  {padding: 80px 40px;}
	.ab2-wrap {flex-direction: column-reverse;}
	.ab2-image {width: 100%;}
}
@media (max-width: 780px) /* tablets, portrait / large phones */ {
	.site-header-info {display: none;}
	.fp4-image {height: 600px;}
	.footer-middle {padding-bottom: 30px;}
	.pr-wrap {gap: 0; flex-direction: column;}
	.pr-row {padding: 0 20px;}
	.pr-row.pr-last {padding-right: 20px;}
}
@media (max-width: 680px) {
	.fp2-wrapper {justify-content: center; align-items: center; text-align: center;}
	.ab4-image {width: 100%;}
}
@media (max-width: 500px) /* phones */ {
	h1 { font-size: 2.5rem; }
	h2 { font-size: 2rem; }
	h3 { font-size: 1.6rem; }
	h4 { font-size: 1.25rem; }
	h5 { font-size: 1rem; }
	h6 { font-size: 0.8rem; }
	.fp2-wrapper h2, .fp4-content h2, .fp5-content h2, .fp6-headline h2 {font-size: 2rem;}
	
	.site-header {height: 100px;}
	.site-logo img {max-height: 121px;}
	.sfm-navicon-button {top: 22px !important;}
	.fp4-image {height: 500px;}
	.about-1, .about-2 {padding-left: 20px; padding-right: 20px;}
}
