/*
Theme Name:   Brand CRE Child
Theme URI:    https://brandrealtyllc.com/
Description:  Brand Realty commercial real estate child theme for Kadence. Brand colours, Montserrat, custom header/footer with TREC notices. Pair with the Brand CRE Listings plugin.
Author:       Brand Realty LLC
Template:     kadence
Version:      1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  brand-cre-child
*/

/* ---------- Fonts (self-hosted Montserrat variable, SIL OFL) ---------- */
@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations"), url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations"), url("assets/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
	--bcre-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--bcre-maroon: var(--global-palette1, #7F0323);
	--bcre-maroon-dark: var(--global-palette2, #5E0219);
	--bcre-ink: var(--global-palette3, #1A1A1A);
	--bcre-charcoal: var(--global-palette4, #2B2B2B);
	--bcre-grey: #F4F4F4;
	--bcre-line: #E6E6E6;
	--bcre-wrap: 1240px;
	--global-body-font-family: var(--bcre-font);
	--global-heading-font-family: var(--bcre-font);
	--global-palette-btn-bg: var(--bcre-maroon);
	--global-palette-btn-bg-hover: var(--bcre-maroon-dark);
	--global-palette-highlight: var(--bcre-maroon);
	--global-palette-highlight-alt: var(--bcre-maroon-dark);
}

body, button, input, select, textarea,
h1, h2, h3, h4, h5, h6, .site-title, .entry-title { font-family: var(--bcre-font); }
body { color: var(--bcre-charcoal); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { color: var(--bcre-ink); font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--bcre-maroon); }
a:hover { color: var(--bcre-maroon-dark); }
:focus-visible { outline: 3px solid var(--bcre-maroon); outline-offset: 2px; }

.bcre-wrap { width: 100%; max-width: var(--bcre-wrap); margin: 0 auto; padding: 0 1.25rem; box-sizing: border-box; }

/* Buttons (core + Kadence) */
.wp-block-button__link, .wp-element-button, .button, button.button, input[type=submit] {
	background: var(--bcre-maroon); color: #fff; border-radius: 4px; font-weight: 600; padding: .75em 1.4em;
}
.wp-block-button__link:hover, .wp-element-button:hover { background: var(--bcre-maroon-dark); color: #fff; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--bcre-maroon); border: 2px solid currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--bcre-maroon); color: #fff; border-color: var(--bcre-maroon); }

/* ---------- Header ---------- */
.bcre-header { position: relative; z-index: 50; background: #fff; border-bottom: 1px solid var(--bcre-line); }
.bcre-topbar { background: var(--bcre-ink); color: #D9D9D9; font-size: .8rem; }
.bcre-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 34px; }
.bcre-topbar p { margin: 0; }
.bcre-topbar__tag { letter-spacing: .04em; }
.bcre-topbar__links { display: flex; gap: 1.25rem; }
.bcre-topbar a { color: #fff; text-decoration: none; }
.bcre-topbar a:hover { text-decoration: underline; color: #fff; }
.bcre-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.bcre-header__brand { flex: 0 0 auto; }
.bcre-logo, .custom-logo-link { display: block; line-height: 0; }
.bcre-logo img, .custom-logo { width: 230px; height: auto; max-height: 56px; object-fit: contain; }
.bcre-nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 1.25rem; }
.bcre-menu { display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.bcre-menu li { position: relative; margin: 0; }
.bcre-menu a { display: flex; align-items: center; gap: .3rem; min-height: 44px; padding: .5rem .7rem; color: var(--bcre-ink); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.bcre-menu a:hover, .bcre-menu .current-menu-item > a, .bcre-menu .current-menu-ancestor > a, .bcre-menu .current_page_parent > a { color: var(--bcre-maroon); }
.bcre-menu .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--bcre-maroon); }
.bcre-menu .dropdown-nav-toggle, .bcre-menu .kadence-svg-iconset { display: inline-flex; width: .7em; }
.bcre-menu .kadence-svg-iconset svg { width: .7em; height: .7em; }
.bcre-menu .sub-menu { position: absolute; left: 0; top: 100%; min-width: 200px; margin: 0; padding: .4rem 0; list-style: none; background: #fff; border: 1px solid var(--bcre-line); border-top: 3px solid var(--bcre-maroon); box-shadow: 0 8px 20px rgba(0,0,0,.08); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease, visibility .12s; }
.bcre-menu li:hover > .sub-menu, .bcre-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.bcre-menu .sub-menu a { padding: .55rem 1rem; font-weight: 500; }
.bcre-header__cta { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .55rem 1rem; border-radius: 4px; background: var(--bcre-maroon); color: #fff !important; font-weight: 700; text-decoration: none; white-space: nowrap; }
.bcre-header__cta:hover { background: var(--bcre-maroon-dark); }
.bcre-header__cta-label { font-weight: 500; opacity: .9; }
.bcre-nav-toggle { display: none; margin-left: auto; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--bcre-line); border-radius: 4px; background: #fff; color: var(--bcre-ink); font-weight: 600; cursor: pointer; }
.bcre-nav-toggle:hover, .bcre-nav-toggle:focus { background: var(--bcre-grey); color: var(--bcre-ink); }
.bcre-nav-toggle__bars, .bcre-nav-toggle__bars::before, .bcre-nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: ""; transition: transform .15s ease; }
.bcre-nav-toggle__bars::before { position: absolute; top: -6px; }
.bcre-nav-toggle__bars::after { position: absolute; top: 6px; }
.bcre-nav-toggle[aria-expanded="true"] .bcre-nav-toggle__bars { background: transparent; }
.bcre-nav-toggle[aria-expanded="true"] .bcre-nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.bcre-nav-toggle[aria-expanded="true"] .bcre-nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
	.bcre-menu a { padding: .5rem .5rem; font-size: .9rem; }
	.bcre-header__cta-label { display: none; }
}
@media (max-width: 1024px) {
	.bcre-header__inner { min-height: 68px; flex-wrap: wrap; }
	.bcre-logo img, .custom-logo { width: 180px; }
	.bcre-nav-toggle { display: inline-flex; }
	.bcre-nav { display: none; flex: 0 0 100%; flex-direction: column; align-items: stretch; gap: .75rem; padding: .25rem 0 1rem; }
	.bcre-nav.is-open { display: flex; }
	.bcre-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.bcre-menu > li { border-top: 1px solid var(--bcre-line); }
	.bcre-menu a { padding: .75rem .25rem; font-size: 1rem; }
	.bcre-menu .current-menu-item > a { box-shadow: inset 3px 0 0 var(--bcre-maroon); padding-left: .75rem; }
	.bcre-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 .5rem 1rem; min-width: 0; }
	.bcre-menu .sub-menu a { padding: .5rem .25rem; }
	.bcre-menu .kadence-svg-iconset { display: none; }
	.bcre-header__cta { justify-content: center; }
	.bcre-header__cta-label { display: inline; }
}
@media (max-width: 600px) {
	.bcre-topbar__tag { display: none; }
	.bcre-topbar__inner { justify-content: center; }
}

/* ---------- Kadence content areas ---------- */
.entry-hero-container-inner { background: var(--bcre-grey); }
.entry-hero-container-inner .entry-header { min-height: 150px; }
.entry-hero .entry-title, .page-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.content-style-boxed .content-bg, .content-style-boxed .entry { box-shadow: none; }
.single-content .bcre-lede, .bcre-lede { font-size: 1.15rem; color: #444; max-width: 70ch; }
.bcre-sample-note { padding: .75rem 1rem; background: #FFF4CC; border-left: 4px solid #C9A227; color: #4A3A00; font-size: .95rem; }

/* Home: full-width bands built from Group blocks.
   Kadence outputs classic group markup (.wp-block-group__inner-container), so target both. */
.home .entry-content.single-content, .home .single-content { margin-top: 0; }
.single-content .bcre-band, .bcre-band { margin: 0 !important; padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem; }
.bcre-band > .wp-block-group__inner-container,
.bcre-band:not(:has(> .wp-block-group__inner-container)) > * { max-width: calc(var(--bcre-wrap) - 2.5rem); margin-left: auto !important; margin-right: auto !important; }
.bcre-band > h2, .bcre-band > .wp-block-group__inner-container > h2 { margin-top: 0 !important; margin-bottom: .4rem !important; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.bcre-band > h2::after, .bcre-band > .wp-block-group__inner-container > h2::after { content: ""; display: block; width: 48px; height: 3px; margin-top: .6rem; background: var(--bcre-maroon); }
.bcre-band .bcre-lede { margin-bottom: 1.75rem !important; }
.bcre-band .wp-block-buttons { margin-top: 1.75rem; }
.bcre-band--soft { background: var(--bcre-grey); }
.bcre-band--dark { background: var(--bcre-ink); color: #E6E6E6; text-align: center; }
.bcre-band--dark h2 { color: #fff !important; }
.bcre-band--dark h2::after { margin-left: auto; margin-right: auto; }
.bcre-band--dark p { color: #E6E6E6; }
.bcre-band--dark .wp-block-buttons { justify-content: center; }
.bcre-band--dark .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; border-color: #fff; }
.bcre-band--dark .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--bcre-ink); }
.single-content .bcre-hero { margin: 0; }
.single-content .bcre-hero h1 { margin-top: 0; }

.bcre-services-grid > .wp-block-group__inner-container,
.bcre-services-grid:not(:has(> .wp-block-group__inner-container)) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.single-content .bcre-services-grid .bcre-service { margin: 0; }
.bcre-service { padding: 1.4rem 1.25rem; background: #fff; border: 1px solid var(--bcre-line); border-top: 3px solid var(--bcre-maroon); border-radius: 4px; }
.bcre-service h3 { margin: 0 0 .5rem !important; font-size: 1.05rem; line-height: 1.3; }
.bcre-service p { margin: 0 0 .6rem !important; font-size: .95rem; }
.bcre-service p:last-child { margin: 0 !important; font-weight: 600; }
.bcre-service a { text-decoration: none; }
@media (max-width: 1100px) { .bcre-services-grid > .wp-block-group__inner-container, .bcre-services-grid:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bcre-services-grid > .wp-block-group__inner-container, .bcre-services-grid:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: 1fr; } }

.bcre-team-grid > .wp-block-group__inner-container,
.bcre-team-grid:not(:has(> .wp-block-group__inner-container)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.bcre-team-grid .bcre-broker { flex-direction: column; padding: 1.5rem; border: 1px solid var(--bcre-line); border-radius: 4px; }
.bcre-team-grid .bcre-broker__contact a { overflow-wrap: anywhere; }
.bcre-team-grid .bcre-broker__photo { width: 120px; height: 120px; }
@media (max-width: 760px) { .bcre-team-grid > .wp-block-group__inner-container, .bcre-team-grid:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: 1fr; } }

/* Latest posts block on home */
.bcre-band .wp-block-latest-posts.is-grid li > a { font-size: 1.1rem; font-weight: 700; color: var(--bcre-ink); }
.bcre-band .wp-block-latest-posts__featured-image img { border-radius: 4px; }

/* Blog / Market Insights archive: full content width, compact cards (was narrow with oversized titles). */
body.blog .content-container.site-container, body.category .content-container.site-container, body.tag .content-container.site-container { max-width: var(--global-content-width, 1290px); }
body.blog .hero-section .entry-hero-container-inner, body.category .hero-section .entry-hero-container-inner { padding-bottom: 0; }
body.blog .content-area, body.category .content-area { margin-top: 1.5rem; margin-bottom: 3rem; }
.blog .entry, .archive .entry { border: 1px solid var(--bcre-line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; box-shadow: none; transition: box-shadow .15s ease; }
.blog .entry:hover, .archive .entry:hover { box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.blog .kadence-posts-list, .archive .kadence-posts-list { gap: 1.75rem; }
body.blog .loop-entry .entry-header, body.archive .loop-entry .entry-header { margin-bottom: 0; }
body.blog .loop-entry .entry-summary, body.archive .loop-entry .entry-summary { margin-top: .25rem; }
body.blog .loop-entry .entry-summary p, body.archive .loop-entry .entry-summary p { margin: 0; }
.blog .loop-entry .entry-content-wrap, .archive .loop-entry .entry-content-wrap { padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.blog .loop-entry .entry-title, .archive .loop-entry .entry-title { font-size: 1.2rem !important; line-height: 1.35 !important; margin: .35rem 0 .4rem; overflow-wrap: normal; word-break: normal; hyphens: none; }
.blog .loop-entry .entry-title a:hover, .archive .loop-entry .entry-title a:hover { color: var(--bcre-accent); }
.blog .loop-entry .entry-meta, .archive .loop-entry .entry-meta { font-size: .82rem; margin: 0 0 .6rem; }
.blog .loop-entry .entry-meta .posted-by, .archive .loop-entry .entry-meta .posted-by, .blog .loop-entry .entry-meta .posted-by + .meta-divider, .blog .loop-entry .entry-meta .meta-divider:first-of-type { display: none; }
.blog .loop-entry .entry-summary, .archive .loop-entry .entry-summary { font-size: .95rem; line-height: 1.6; color: var(--bcre-text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .9rem; }
.blog .loop-entry .entry-footer, .archive .loop-entry .entry-footer { margin-top: auto; }
.blog .loop-entry .post-more-link, .archive .loop-entry .post-more-link { font-size: .8rem; letter-spacing: .06em; color: var(--bcre-accent); }
@media (min-width: 1025px) { .blog .kadence-posts-list.grid-lg-col-3, .archive .kadence-posts-list.grid-lg-col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Footer ---------- */
.bcre-footer { background: var(--bcre-ink); color: #CFCFCF; font-size: .95rem; }
.bcre-footer a { color: #fff; }
.bcre-footer a:hover { color: #fff; text-decoration: underline; }
.bcre-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 2rem; padding-top: 3.25rem; padding-bottom: 2.5rem; }
.bcre-footer__about img { width: 200px; height: auto; margin-bottom: 1rem; }
.bcre-footer__about p { max-width: 34ch; }
.bcre-footer__h { margin: 0 0 .9rem; color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.bcre-footer__menu, .bcre-footer__legal { margin: 0; padding: 0; list-style: none; }
.bcre-footer__menu li, .bcre-footer__legal li { margin: 0 0 .5rem; }
.bcre-footer__menu a { text-decoration: none; }
.bcre-footer__legal a { font-size: .95rem; line-height: 1.45; }
.bcre-footer__addr { font-style: normal; line-height: 1.7; }
.bcre-footer__bottom { border-top: 1px solid #333; padding: 1.25rem 0 1.5rem; font-size: .82rem; color: #B5B5B5; }
.bcre-footer__bottom p { margin: 0 0 .4rem; }
.bcre-footer__eho { display: flex; align-items: center; gap: .5rem; }
.bcre-footer__eho svg { flex: 0 0 auto; color: #fff; }
@media (max-width: 960px) { .bcre-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bcre-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* FAQ accordions (Services page) */
.bcre-faq { border: 1px solid var(--bcre-line); border-radius: 6px; padding: 0; margin: 0 0 .6rem; background: #fff; }
.bcre-faq summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 700; color: var(--bcre-ink); list-style: none; position: relative; padding-right: 2.5rem; }
.bcre-faq summary::-webkit-details-marker { display: none; }
.bcre-faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--bcre-accent); }
.bcre-faq[open] summary::after { content: "–"; }
.bcre-faq > p { margin: 0; padding: 0 1.1rem 1rem; }
#team { scroll-margin-top: 110px; }
