/* =====================================================================
   RD Roofing — Elementor companion styles
   Only what Elementor's native controls cannot express. Every rule is
   scoped to an rd-* class that is set in the widget/container's
   Advanced → CSS Classes field, so nothing leaks into other content.
   ===================================================================== */

/* ---------- Base (mirrors original body / html rules) ---------- */
html { scroll-behavior: smooth; }
body.rd-roofing {
	background: #FCFAF6;
	color: #23282B;
	font-family: 'Inter', sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
/* body.rd-roofing prefix outranks Elementor's per-widget paragraph-spacing rule for the last paragraph */
body.rd-roofing .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
body.rd-roofing .elementor-widget-text-editor p { margin-top: 0; }

/* Hello Elementor puts a max-width on .site-main etc. on non-Elementor
   templates only; Elementor Full Width pages are unaffected. */

/* ---------- Measures (original max-width: NNch rules) ---------- */
.rd-mw-18ch .elementor-heading-title { max-width: 18ch; }
.rd-mw-54ch p { max-width: 54ch; }
.rd-mw-56ch p { max-width: 56ch; }
.rd-mw-320 p { max-width: 320px; }

/* ---------- Roofline divider (original inline SVG, 1200×60 viewBox) ----------
   Colour = the container's own Background colour (editable in Elementor). */
.e-con.rd-roofline {
	--min-height: 0px;
	min-height: 0;
	aspect-ratio: 20 / 1;
	padding: 0;
	clip-path: polygon(0% 100%, 0% 56.6667%, 7.5% 6.6667%, 15.8333% 56.6667%, 25% 16.6667%, 34.1667% 63.3333%, 43.3333% 26.6667%, 53.3333% 70%, 63.3333% 30%, 73.3333% 73.3333%, 83.3333% 33.3333%, 91.6667% 66.6667%, 100% 43.3333%, 100% 100%);
}
.e-con.rd-roofline.rd-roofline--flip {
	clip-path: polygon(0% 0%, 0% 43.3333%, 7.5% 93.3333%, 15.8333% 43.3333%, 25% 83.3333%, 34.1667% 36.6667%, 43.3333% 73.3333%, 53.3333% 30%, 63.3333% 70%, 73.3333% 26.6667%, 83.3333% 66.6667%, 91.6667% 33.3333%, 100% 56.6667%, 100% 0%);
}
/* Keep dividers clickable/visible while editing */
.elementor-editor-active .e-con.rd-roofline { min-height: 20px; }

/* ---------- Buttons (.btn) ---------- */
.rd-btn .elementor-button {
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
	white-space: nowrap;
}
.rd-btn--lift .elementor-button:hover,
.rd-btn--lift .elementor-button:focus-visible { transform: translateY(-2px); }
.rd-btn .elementor-button-icon { font-size: 18px; }
.rd-btn .elementor-button-icon svg { width: 18px; height: 18px; }
.rd-btn .elementor-button:focus-visible { outline: 2px solid #2C9A93; outline-offset: 3px; }

/* ---------- Header ---------- */
/* Original: position:sticky + translucent paper + 8px blur */
.elementor-location-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.e-con.rd-header {
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.rd-logo img { width: auto; display: block; }
.rd-header-call-wrap p { margin: 0; }
.rd-header-call {
	display: flex; flex-direction: column; text-align: right; text-decoration: none; color: #1B3450;
	font-size: 0.82rem; line-height: 1.6;
}
.rd-header-call strong { font-size: 1.02rem; font-family: 'Fraunces', serif; font-weight: 700; }

/* Main nav: hover = teal text; current page = teal + 2px underline 6px below */
.rd-main-nav .elementor-nav-menu--main .elementor-item { position: relative; }
.rd-main-nav .elementor-nav-menu--main .elementor-item.elementor-item-active::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: #2C9A93;
	opacity: 1; width: auto;
}

/* Hamburger / close */
.rd-menu-open .elementor-icon,
.rd-menu-close .elementor-icon { cursor: pointer; line-height: 0; }

/* ---------- Mobile nav drawer (original .mobile-nav) ---------- */
.e-con.rd-mobile-nav {
	display: none;
	position: fixed; inset: 0; z-index: 100;
	overflow-y: auto;
}
.e-con.rd-mobile-nav.is-open { display: flex; }
.rd-mobile-menu .elementor-nav-menu--main .elementor-item {
	border-bottom: 1px solid rgba(255, 255, 255, .1);
	text-decoration: none;
}
.rd-mobile-menu .elementor-nav-menu--main .elementor-item.elementor-item-active::after { display: none; }
.rd-drawer-call .elementor-button { justify-content: center; }
/* Original drawer logo link also picked up the `.mobile-nav a` padding + divider */
.e-con.rd-mobile-nav .rd-logo a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
/* In the Elementor editor show the drawer in-flow so it can be edited. */
.elementor-editor-active .e-con.rd-mobile-nav { display: flex; position: relative; inset: auto; }
@media (min-width: 981px) {
	.e-con.rd-mobile-nav.is-open { display: none; }
}
body.rd-menu-is-open { overflow: hidden; }

/* ---------- Service cards ---------- */
.e-con.rd-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.e-con.rd-card:hover { transform: translateY(-4px); }
.rd-service-box .elementor-icon-box-icon { line-height: 0; }
.rd-service-box .elementor-icon-box-title,
.rd-contact-box .elementor-icon-box-title { margin-top: 0; }
.rd-service-box .elementor-icon-box-description,
.rd-contact-box .elementor-icon-box-description { margin: 0; }

/* ---------- Photos ---------- */
.rd-photo-43 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.e-con.rd-photo { overflow: hidden; }
.rd-photo-fill img { width: 100%; height: auto; object-fit: cover; display: block; }

/* ---------- Why list (bold lead-in) ---------- */
.rd-why-list strong { color: #1B3450; }
.rd-why-list .elementor-icon-list-icon { margin-top: 2px; }

/* ---------- Trust strip & area chips ---------- */
.rd-trust .elementor-icon-list-items { row-gap: 12px; }
.rd-chips .elementor-icon-list-items { gap: 12px; }
.rd-chips .elementor-icon-list-item {
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	padding: 10px 20px !important; /* Elementor inline lists zero the item padding with a high-specificity rule */
	margin: 0 !important;
}

/* ---------- Contact cards ---------- */
.e-con.rd-contact-card { text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.e-con.rd-contact-card:hover { transform: translateX(4px); }
.e-con.rd-contact-card:focus-visible { outline: 2px solid #2C9A93; outline-offset: 2px; }
.rd-contact-box .elementor-icon-box-icon { line-height: 0; }

/* ---------- Quote form (Elementor Pro Form) ---------- */
.rd-quote-form .elementor-field-textual,
.rd-quote-form select {
	padding: 12px 14px;
	transition: border-color .15s ease;
	min-height: 0;
}
.rd-quote-form .elementor-field-textual:focus,
.rd-quote-form select:focus { outline: none; border-color: #2C9A93 !important; box-shadow: none; }
.rd-quote-form textarea.elementor-field-textual { resize: vertical; min-height: 96px; }
.rd-quote-form .elementor-button { justify-content: center; }
.rd-quote-form .elementor-button-icon svg { width: 18px; height: 18px; }
.rd-quote-form .elementor-button:hover { transform: translateY(-2px); }
.rd-quote-form .elementor-button { transition: transform .15s ease, background .15s ease; }
.rd-form-note a { font-weight: 600; text-decoration: none; }

/* ---------- Footer ---------- */
/* auto-width flex children: let them wrap instead of overflowing on phones (original flex-wrap behaviour) */
.e-con.rd-footer-cols, .e-con.rd-footer-brand { max-width: 100%; }
.rd-footer-links .elementor-icon-list-item a { text-decoration: none; }
.rd-social .elementor-social-icon svg { width: 18px; height: 18px; }
.rd-social .elementor-social-icon { transition: border-color .2s ease, color .2s ease; }

/* ---------- Floating WhatsApp ---------- */
.rd-float-holder.e-con { padding: 0; min-height: 0; --min-height: 0px; }
.rd-float-whatsapp .elementor-icon {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	transition: transform .2s ease;
	line-height: 0;
}
.rd-float-whatsapp .elementor-icon:hover { transform: scale(1.08); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.rd-btn .elementor-button, .e-con.rd-card, .e-con.rd-contact-card, .rd-float-whatsapp .elementor-icon { transition: none; }
	.rd-btn--lift .elementor-button:hover, .e-con.rd-card:hover, .e-con.rd-contact-card:hover,
	.rd-float-whatsapp .elementor-icon:hover, .rd-quote-form .elementor-button:hover { transform: none; }
}
