/*
Theme Name: David Lee Design Theme
Theme URI: https://egret.digital/
Author: Egret Digital
Author URI: https://egret.digital/
Description: Block theme for David Lee Design, a child of Twenty Twenty-Five. Rebuilt from the Elementor design (kit "LB 1v1", 10215): Josefin Sans, navy links #0A3371, text grey #5A6771, colour panels in slate #6C6C84, sky #70AAC2, plum #7B6379, olive #B0B24B and blush.
Template: twentytwentyfive
Version: 1.0.1
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: davidleedesign-theme
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
p { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
:where(.is-layout-flow) > * + *, :where(.is-layout-constrained) > * + * { margin-block-start: 8px; }
ul.wp-block-list, ol.wp-block-list { margin-top: 0; margin-bottom: 0; }
li > p { margin: 0; }
ul.wp-block-list > li, ol.wp-block-list > li { margin-top: 0 !important; margin-bottom: 0; }
.wp-block-post-content > * { margin-block-start: 0 !important; }

/* ---------- Content width (Elementor kit: 1440px; 95% to 1366px; 85% to 1200px; 90% from 880px down) ---------- */
.dld-wrap { width: 100%; max-width: 1440px; margin-left: auto !important; margin-right: auto !important; padding: 0 3px; box-sizing: border-box; }

/* ---------- Header ---------- */
.dld-header .wp-block-site-logo img { width: 72px; height: auto; }
.dld-header .wp-block-navigation { font-size: 1.26rem; line-height: 20px; }
.dld-header .wp-block-navigation a { padding: 13px 0; }
.dld-header .wp-block-navigation a:hover { color: var(--wp--preset--color--navy); }
.dld-header .wp-block-navigation .current-menu-item > a,
.dld-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--navy); }
.dld-header .wp-block-navigation__responsive-container-open svg { width: 34px; height: 34px; }
.dld-header .wp-block-navigation__responsive-container-open svg path { stroke: currentColor; stroke-width: 1px; }
.dld-header .wp-block-navigation__responsive-container.is-menu-open { padding: 24px 30px !important; }
.dld-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.26rem; }
.dld-header .wp-block-navigation__responsive-container.is-menu-open a { color: var(--wp--preset--color--primary) !important; padding: 6px 0; }
.dld-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.dld-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }

/* Home: the header sits over the banner, with a soft terracotta fade and white menu items separated by small bars */
.dld-site-header-home { position: relative; z-index: 20; margin-bottom: -80px; }
.dld-header-home { box-sizing: border-box; height: 90px; background: linear-gradient(180deg, rgba(194, 136, 112, 0.66) 0%, rgba(194, 136, 112, 0) 56%); }
.dld-header-home .wp-block-navigation a { padding: 5px 0; }
.dld-header-home .wp-block-navigation .wp-block-navigation-item__content, .dld-header-home .wp-block-navigation__responsive-container-open { color: #fff !important; }
.dld-header-home .is-menu-open .wp-block-navigation-item__content { color: var(--wp--preset--color--primary) !important; }
.dld-header-home .wp-block-navigation, .dld-header-home .wp-block-navigation a,
.dld-header-home .wp-block-navigation a[aria-current="page"], .dld-header-home .wp-block-navigation__responsive-container-open { color: #fff; }
.dld-header-home .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item::before { content: ""; position: absolute; left: -16px; top: 50%; width: 2px; height: 8px; margin-top: -4px; background: #fff; }
.dld-header-home .wp-block-navigation-item { position: relative; }
.dld-header-home .is-menu-open .wp-block-navigation-item::before { display: none; }

/* ---------- Title band (sub pages): banner photo with the page title ---------- */
.dld-title-band { margin: 0; }
.dld-title-band .dld-page-title { color: #fff; font-size: 2.7rem; font-weight: 700; line-height: 40px; letter-spacing: 1.6px; margin: 0; }

/* ---------- Home banner ---------- */
.dld-banner { min-height: 249px; margin-top: 0 !important; box-sizing: border-box; padding: 30px 40px 30px 77px; display: flex; align-items: center; gap: 77px; background-size: cover; background-position: center; background-color: var(--wp--preset--color--page-tint); }
.dld-banner .wp-block-image { margin: 0; flex: 0 0 auto; }
.dld-banner .wp-block-image img { width: 148px; height: auto; display: block; }
.dld-banner-text { flex: 1 1 auto; }
.dld-banner .dld-banner-title { color: #fff; font-size: clamp(1.563rem, 0.9359rem + 2.0069vw, 2.441rem); font-weight: 500; letter-spacing: 9.2px; line-height: 35px; margin: 0 0 20px; }
.dld-banner .dld-banner-tag { color: #fff; letter-spacing: 2px; line-height: 20px; margin: 0; }

/* ---------- Rows of panels (20px gutters on white) ---------- */
.dld-stack { display: flex; flex-direction: column; gap: 20px; margin-top: 20px !important; }
.dld-stack > * { margin: 0 !important; }
.dld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dld-row.dld-cols-1 { grid-template-columns: 1fr; }
.dld-row.dld-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.dld-row.dld-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dld-row > * { margin: 0 !important; min-width: 0; }
.dld-col { display: flex; flex-direction: column; gap: 20px; }
.dld-col > * { margin: 0 !important; }
.dld-panel { padding: 50px; min-height: 300px; box-sizing: border-box; }
.dld-panel.dld-auto { min-height: 0; }
.dld-panel.dld-pad-100 { padding: 100px; }
.dld-panel.dld-quote-panel { padding: 100px; display: flex; flex-direction: column; justify-content: center; }
.dld-center { display: flex; flex-direction: column; justify-content: center; }
.dld-photo.wp-block-cover { min-height: 300px; height: 100%; padding: 0; }
.dld-col > .dld-photo.dld-photo-383 { min-height: 383px; height: 383px; flex: 0 0 auto; }
.dld-col > .dld-quote-panel { flex: 1 1 auto; }
.dld-panel p { margin: 0 0 8px; }
.dld-panel h2, .dld-panel h3, .dld-panel h4 { margin: 0 0 10px !important; }
.dld-panel * + h2, .dld-panel * + h3, .dld-panel * + h4 { margin-top: 12px !important; }
.dld-panel .wp-block-list { margin: 0 0 8px !important; }
.dld-panel .wp-block-list + p { margin-top: 20px; }
.dld-on-colour, .dld-on-colour h2, .dld-on-colour h3, .dld-on-colour h4, .dld-on-colour a:not(.wp-element-button) { color: #fff; }
.dld-h-e3 { font-size: clamp(1.25rem, 0.7479rem + 1.6069vw, 1.953rem) !important; font-weight: 400 !important; letter-spacing: normal !important; }

/* Quotes (were Elementor headings in the "Quote" style) */
.dld-quote { color: var(--wp--preset--color--cream); font-size: 2.7rem; font-weight: 700; line-height: 45px; letter-spacing: 1.7px; margin: 0 0 20px !important; }
.dld-quote-by { color: var(--wp--preset--color--cream); line-height: 20px; margin: 0 !important; }

/* Home link panels: white buttons */
.dld-panel .wp-block-buttons { margin-top: 16px !important; }
.dld-panel .wp-block-button__link { padding: 12px 24px; line-height: 20px; }

/* ---------- Accordions (core/details, from the Elementor nested accordion on Services) ---------- */
.dld-acc { margin-top: 10px !important; }
.dld-acc .wp-block-details { margin: 0 !important; border: 1px solid #D5D8DC; }
.dld-acc .wp-block-details + .wp-block-details { border-top: 0; }
.dld-acc .wp-block-details summary { padding: 10px; font-size: 1rem; color: #1F2124; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.dld-acc .wp-block-details summary::-webkit-details-marker { display: none; }
.dld-acc .wp-block-details summary::before { content: "+"; font-weight: 700; width: 14px; text-align: center; font-size: 1.2rem; line-height: 1; }
.dld-acc .wp-block-details[open] summary::before { content: "\2212"; }
.dld-acc .wp-block-details > :not(summary) { padding: 10px; border-top: 1px solid #D5D8DC; margin: 0 !important; }

/* ---------- Galleries (core Gallery, masonry columns like the Elementor Pro gallery) ---------- */
.wp-block-gallery.dld-masonry { display: block !important; column-count: 3; column-gap: 10px; }
.wp-block-gallery.dld-masonry > figure.wp-block-image { display: block; width: 100% !important; margin: 0 0 10px !important; break-inside: avoid; }
.wp-block-gallery.dld-masonry > figure.wp-block-image img { width: 100% !important; height: auto !important; display: block; object-fit: initial !important; }
.wp-block-gallery.dld-masonry > figure[hidden] { display: none !important; }
.wp-block-gallery.dld-masonry.dld-masonry-js { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 2px; grid-auto-flow: row dense; column-gap: 10px; row-gap: 0; columns: auto; }
.wp-block-gallery.dld-masonry.dld-masonry-js > figure.wp-block-image { margin: 0 !important; align-self: start; }
.wp-block-gallery.dld-masonry.dld-cols-4.dld-masonry-js { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; }
.wp-block-gallery.dld-masonry.dld-cols-4 { column-count: 4; column-gap: 20px; }
.wp-block-gallery.dld-masonry.dld-cols-4 > figure.wp-block-image { margin-bottom: 20px !important; }
.dld-gallery-panel { padding: 50px; }
.dld-filter { display: none; text-align: center; margin: 0 0 20px !important; font-size: 1.26rem; }
.dld-filter-on .dld-filter { display: block; }
.dld-filter a { display: inline-block; margin: 0 5px; padding: 7px 14px; color: var(--wp--preset--color--contrast); border-bottom: 1px solid transparent; }
.dld-filter a:hover, .dld-filter a.is-active { color: var(--wp--preset--color--primary); }
.dld-filter a.is-active { border-bottom-color: currentColor; }

/* ---------- Gravity Forms (carried over from Elementor Custom Code "Gravity Forms", id 5873) ---------- */
/* Font: Josefin Sans. The Elementor CSS asked for "Montserrat Regular", which is not loaded on the site, so live fell back to Arial. */
#gform_wrapper_3, #gform_wrapper_3 input, #gform_wrapper_3 textarea, #gform_wrapper_3 button { font-family: var(--wp--preset--font-family--josefin-sans); }
#gform_wrapper_3 .gfield_label { font-size: 1rem; font-weight: 700; color: var(--wp--preset--color--contrast); }
#gform_wrapper_3 .gfield_required { color: #c02b0a; }
#gform_3 .gform-body input[type=text], #gform_3 .gform-body input[type=email], #gform_3 .gform-body input[type=tel], #gform_3 .gform-body input[type=number] { font-size: 1.2rem; border: 0; color: #000; padding: 8px; background: #fff; }
#gform_3 .gform-body textarea { border: 1px solid #666; color: #000; background: #fff; }
/* Contact Page: Submit Button */
#gform_submit_button_3 { background-color: #fff; border-style: none; color: #5A6771; font-size: 1.3rem; padding: 10px 16px; letter-spacing: normal; font-weight: 400; line-height: 1.5; cursor: pointer; }
#gform_submit_button_3:hover { background-color: var(--wp--preset--color--page-tint); }

/* ---------- Contact ---------- */
.dld-contact-lines p { margin: 0 0 20px; }
.dld-contact-lines a { color: var(--wp--preset--color--contrast); }
.dld-address { line-height: 18px; }

/* ---------- Privacy ---------- */
.dld-privacy-row { gap: 10px !important; }
.dld-privacy-row > .dld-panel { padding: 40px; }
.dld-privacy-row h2 { color: var(--wp--preset--color--slate); font-weight: 400; letter-spacing: normal; font-size: var(--wp--preset--font-size--x-large); }
.dld-privacy-row .wp-block-image { margin: 0; }

/* ---------- Footer ---------- */
.dld-footer { padding: 10px 20px; }
.dld-footer p { margin: 0; }
.dld-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; min-height: 92px; max-width: 1400px; margin: 0 auto; }
.dld-footer-grid > * { margin: 0 !important; }
.dld-footer-legal { color: var(--wp--preset--color--contrast); }

/* ---------- 404 ---------- */
.dld-404 { min-height: 100vh; gap: 30px; padding: 40px 20px; }
.dld-404 .dld-404-small { font-size: clamp(1.25rem, 0.7479rem + 1.6069vw, 1.953rem); font-weight: 400; letter-spacing: normal; margin: 0; }
.dld-404 .dld-404-title { font-size: 2.7rem; line-height: 45px; letter-spacing: 1.7px; margin: 0; }
.dld-404-btn .wp-block-button__link { width: 80px; height: 80px; border-radius: 50%; border: 1px solid #fff; background: transparent; color: #fff; font-family: Inter, sans-serif; font-size: 25px; letter-spacing: -1px; padding: 0; display: flex; align-items: center; justify-content: center; }
.dld-404-btn .wp-block-button__link:hover { background: #fff; color: #000; }

@media (min-width: 1367px) { .dld-banner.dld-wrap { max-width: 1434px; } }

/* ---------- Laptop / tablet widths: Elementor boxed the content (95% to 1366px, 85% to 1200px) ---------- */
@media (max-width: 1366px) { .dld-wrap { max-width: 95%; padding: 0; } }
@media (max-width: 1200px) { .dld-wrap { max-width: 85%; } }

/* Elementor switched to the hamburger menu at 1200px and below; core does it at 600px, so extend it */
@media (min-width: 600px) and (max-width: 1200px) {
	.dld-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.dld-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.dld-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
	.dld-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
	.dld-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { flex-direction: column; align-items: flex-start; }
}

/* ---------- Tablet: the grids stack at 1024px and below ---------- */
@media (max-width: 1024px) {
	.dld-row, .dld-row.dld-cols-3, .dld-row.dld-cols-4 { grid-template-columns: 1fr; gap: 20px; }
	.dld-row .dld-swap { order: -1; }
	.dld-col.dld-col-swap > :last-child { order: -1; }
	.dld-panel h2, .dld-panel h3, .dld-panel h4 { text-align: center; }
	.dld-panel .wp-block-buttons { justify-content: center; }
	.dld-panel.dld-quote-panel, .dld-panel.dld-pad-100 { padding: 50px; }
	.dld-banner { padding: 30px; gap: 30px; min-height: 0; }
	.dld-banner .wp-block-image img { width: 90px; }
	.wp-block-gallery.dld-masonry { column-count: 2; }
	.wp-block-gallery.dld-masonry.dld-cols-4 { column-count: 3; }
	.wp-block-gallery.dld-masonry.dld-masonry-js { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-gallery.dld-masonry.dld-cols-4.dld-masonry-js { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.dld-header-home { padding-right: calc(7.5% + 10px) !important; }
	.dld-title-band { min-height: 200px !important; }
	.dld-privacy-row h2 { text-align: left !important; }
}
@media (max-width: 880px) { .dld-wrap { max-width: 90%; } .dld-header-home { padding-right: calc(5% + 10px) !important; } }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.dld-panel { padding: 40px; }
	.dld-panel.dld-quote-panel { padding: 30px; }
	.dld-panel.dld-pad-100 { padding: 40px; }
	.dld-header { padding-top: 10px !important; padding-bottom: 10px !important; }
	.dld-header-home { padding: 10px 20px !important; }
	.dld-site-header-home { margin-bottom: -82px; }
	.dld-banner { flex-direction: column; text-align: center; gap: 20px; padding: 30px 20px; }
	.dld-banner .wp-block-image img { width: 174px; }
	.dld-banner .dld-banner-title { font-size: 1.563rem; line-height: 25.6px; }
	.dld-quote { line-height: 1.5em; }
	.dld-title-band.wp-block-cover { justify-content: center; }
	.dld-title-band .wp-block-cover__inner-container { text-align: center; width: 100% !important; }
	.dld-header .wp-block-site-logo img { width: 48px; }
	.dld-contact-lines { text-align: center; }
	h2, h3, h4, .wp-block-heading { line-height: 1.5em; }
	.wp-block-gallery.dld-masonry { column-count: 1; }
	.wp-block-gallery.dld-masonry.dld-cols-4 { column-count: 2; column-gap: 10px; }
	.wp-block-gallery.dld-masonry.dld-cols-4 > figure.wp-block-image { margin-bottom: 10px !important; }
	.wp-block-gallery.dld-masonry.dld-masonry-js { grid-template-columns: 1fr; }
	.wp-block-gallery.dld-masonry.dld-cols-4.dld-masonry-js { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
	.dld-gallery-panel { padding: 20px; }
	.dld-footer-grid { grid-template-columns: 1fr; gap: 12px; max-width: 90%; }
}

/* ---------- Wide screens: line the header and footer up with the 1440px box, backgrounds stay full-bleed ---------- */
@media (min-width: 1441px) {
	.dld-header { padding-left: calc(50% - 705px) !important; padding-right: calc(50% - 705px) !important; }
	.dld-title-band > .wp-block-cover__inner-container { max-width: 1380px; margin-left: auto; margin-right: auto; }
}
