/**
 * The Garden Company – core styles.
 *
 * Brand tokens (--gc-*) are defined as Elementor V4 global variables in the active kit
 * (the single source of truth). This file only REFERENCES them. No raw colour values below.
 */

/* Montserrat, self-hosted, with the old theme's weight mapping:
   Light → 200 (also renders 100), Medium → 400, Bold → 700 (also renders 800). */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-light-webfont.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-lightitalic-webfont.woff2") format("woff2"); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-medium-webfont.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-mediumitalic-webfont.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-bold-webfont.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-bolditalic-webfont.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* Elementor's frontend CSS sets `.elementor img { height: auto }`, which overrides the height attribute that
   avatars rely on (the old theme rendered them at exactly the attribute size, e.g. 96×96). */
.elementor img.avatar-96 { height: 96px; }

/* Native V4 containers that carry legacy (Bootstrap) layout classes: drop Elementor's container sizing defaults
   (.e-con { width:100%; max-width; margin-inline:auto; position:relative }) so the legacy rules size them as before
   (e.g. .row relies on width:auto + negative margins). Specificity (0,1,0) via :where(): beats Elementor's .e-con
   by load order, and loses to the legacy layout classes in site.css (loaded later), e.g. .col-md-4's max-width on
   loop items, which carry no data-e-type for the compatibility layer. */
:where(div, footer, header, section, nav, main, aside, article).e-con {
	width: auto;
	max-width: none;
	min-width: 0;
	margin-inline-start: 0;
	margin-inline-end: 0;
	position: static;
}

/* Inline SVGs in legacy .svg-container wrappers (logos, award badges). The old theme printed a bare <svg> here that
   sized intrinsically; Elementor's e-svg adds a wrapper div and an inline width/height:100% on the <svg>. Remove
   the wrapper from layout and undo the inline size (inline styles can only be overridden with !important). */
.svg-container > .e-svg-base { display: contents; }
.svg-container > .e-svg-base > svg { width: auto !important; height: auto !important; }

/* Elementor applies its default kit typography (Roboto, not loaded) to these V3 widgets; the legacy content they
   render inherits the site font, as it always did. */
.elementor .elementor-widget-theme-post-content,
.elementor .elementor-widget-shortcode,
.elementor .elementor-widget-post-comments,
.elementor .elementor-widget-text-editor,
.elementor .elementor-widget-html { font-family: inherit; font-weight: inherit; color: inherit; }

/* V3 widget wrappers (Post Content, dynamic Shortcode blocks) inside native V4 templates: take them out of layout so
   the legacy markup they render lays out as direct children of the surrounding containers (flex rows etc.). */
.e-con > .elementor-widget-shortcode,
.e-con > .elementor-widget-shortcode > .elementor-widget-container,
.e-con > .elementor-widget-shortcode .elementor-shortcode,
.e-con > .elementor-widget-theme-post-content,
.e-con > .elementor-widget-theme-post-content > .elementor-widget-container,
.e-con > .elementor-widget-post-comments,
.e-con > .elementor-widget-post-comments > .elementor-widget-container,
.e-con > .elementor-widget-text-editor,
.e-con > .elementor-widget-text-editor > .elementor-widget-container,
.e-con > .elementor-widget-html,
.e-con > .elementor-widget-html > .elementor-widget-container { display: contents; }

/* Native cards: an image tag with no source (e.g. a deleted attachment) shows nothing, like the legacy empty tile. */
img.image-background:not([src]) { display: none; }
/* Native tiles render the tile image as <img class="image-background">: crop it like the legacy background-size: cover. */
.content-grid-ele-container img.image-background,
.hero-container img.image-background { object-fit: cover; object-position: center center; }

/* Pages/posts built in Elementor: Elementor caps a document's top-level containers at max-width:min(100%,var(--width))
   (0,2,0), which stops the legacy full-width rows (.row-full-width + negative margins) stretching to the content edges.
   Their sizing comes from the legacy classes, as in the old page content. (Theme templates keep Elementor's rule.) */
:is([data-elementor-type="wp-page"], [data-elementor-type="wp-post"]) > .e-con { max-width: none; }

/* Native images in legacy heroes and content-ratio tiles fill their box, as the legacy <img> did (no size attributes,
   a responsive file at 100vw); everywhere else they keep their aspect ratio when legacy CSS sets only the width. */
.hero-container .hc-visual-container > img.e-image-base,
.content-grid-ele-container.size-content-ratio .cg-visual-container > img.e-image-base { width: 100%; height: auto; }
:where(.elementor img.e-image-base:not(.image-background)) { height: auto; } /* zero specificity: beats the height attribute, never an element's own styles (e.g. the 96px avatar) */

/* Photographer credit badge on V4 images (inc/photo-credit.php): non-cover images are wrapped so the badge can sit in
   the image's corner, like the old theme's JS wrapper. */
.img-width-caption { position: relative; display: block; }
.hero-container .hc-visual-container > .img-width-caption > img.e-image-base,
.content-grid-ele-container.size-content-ratio .cg-visual-container > .img-width-caption > img.e-image-base { width: 100%; height: auto; }

/* Footer section headings are H2s with the H5 look (technical SEO audit, 26 Nov 2026); the old theme sized footer
   H5s by tag, so the same size is given to the .h5 class there. */
.elementor [data-e-type]:is(footer.secondary-footer .h5, footer.primary-footer .h5) { font-size: 1rem; }

/* Case study "dream" section (native port, 27 Nov 2026): the spacing the legacy .content-container .row > .col-12
   wrappers gave it (row: 1rem margin and flex, so margins don't collapse; column: 10px padding). */
.gc-dream-section,
.elementor [data-e-type]:is(.gc-dream-section) {
	display: flow-root;
	margin: 1rem 0;
	padding: 10px 0;
}
