/* =========================================================
   Angela Luna Site Polish
   1. Animations: Divi's slide/flip/zoom effects off, one fade for all modules
   2. Buttons: every button matches the homepage "Book a Discovery Call!" button
   3. Layout: one row width and consistent section spacing (desktop)
   ========================================================= */

/* ---------- 1. Animations ---------- */

/* Switch off Divi's own entrance effects everywhere */
#et-boc .et_animated,
#et-boc .et_had_animation {
	animation: none !important;
}
/* Rows, columns and sections Divi had hidden for an effect are simply shown */
#et-boc .et_animated:not(.et_pb_module) {
	opacity: 1 !important;
}
.et-l--header .et_pb_module {
	opacity: 1 !important;
}

/* The one fade: modules start transparent and ease in as they scroll into view */
html.alp-fade #et-boc .et_pb_module:not(.et-l--header *) {
	opacity: 0 !important;
}
html.alp-fade #et-boc .et_pb_module.alp-in:not(.et-l--header *) {
	opacity: 1 !important;
	transition: opacity 1.3s cubic-bezier(.25, .1, .25, 1) !important;
}
html.alp-fade #et-boc .et_pb_module.alp-now {
	transition: none !important;
}

/* ---------- 2. Buttons ---------- */

html body #page-container .et_pb_section .et_pb_button.et_pb_button:not(.dipi_accordion_button),
html body #page-container .et_pb_button.et_pb_button:not(.dipi_accordion_button),
html body .woocommerce a.button,
html body .woocommerce button.button,
html body .woocommerce input.button,
html body .woocommerce #respond input#submit,
html body .woocommerce-page a.button,
html body .woocommerce-page button.button,
html body #page-container .et_pb_section .et_pb_module :is(a, button, input).button.button,
html body .wc-block-components-button:not(.is-link),
html body .wp-block-button__link,
html body input.wpcf7-submit {
	background: #C7622B !important;
	color: #FFFFFF !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-family: 'Josefin Sans', Helvetica, Arial, Lucida, sans-serif !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	letter-spacing: 3px !important;
	line-height: 1.7em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	padding: 14px 35px 10px !important;
	transition: transform .3s ease, background-color .3s ease !important;
}
html body #page-container .et_pb_section .et_pb_button.et_pb_button:not(.dipi_accordion_button):hover,
html body #page-container .et_pb_button.et_pb_button:not(.dipi_accordion_button):hover,
html body .woocommerce a.button:hover,
html body .woocommerce button.button:hover,
html body .woocommerce input.button:hover,
html body .woocommerce #respond input#submit:hover,
html body .woocommerce-page a.button:hover,
html body .woocommerce-page button.button:hover,
html body #page-container .et_pb_section .et_pb_module :is(a, button, input).button.button:hover,
html body .wc-block-components-button:not(.is-link):hover,
html body .wp-block-button__link:hover,
html body input.wpcf7-submit:hover {
	background: #B4561F !important;
	color: #FFFFFF !important;
	padding: 14px 35px 10px !important;
	transform: scale(1.05);
}
/* No Divi arrow icons sliding in on hover */
html body #page-container .et_pb_button.et_pb_button:not(.dipi_accordion_button)::before,
html body #page-container .et_pb_button.et_pb_button:not(.dipi_accordion_button)::after {
	display: none !important;
}
html body .woocommerce button.button:disabled,
html body .woocommerce button.button.disabled {
	opacity: .55 !important;
	transform: none !important;
}

/* ---------- 3. Layout (desktop) ----------
   These are defaults only: rows or sections given their own size in Divi
   (full-width images, narrow forms, hero areas) keep it. */
@media (min-width: 981px) {
	/* Divi 5 sizes default rows from these variables */
	.et-l--post,
	.et-l--body {
		--content-width: 90%;
		--content-max-width: 1140px;
	}
	/* Same strength as Divi's own defaults (0,1,0): this file loads after Divi's base styles and before
	   per-block styles, so any padding set on a block still wins. Hero (first) sections keep Divi's spacing. */
	:where(.et-l--post, .et-l--body) :where(.et_pb_section:not(:first-child)) > .et_pb_row {
		padding-top: 30px;
		padding-bottom: 30px;
	}
	:where(.et-l--post, .et-l--body) .et_pb_section:where(:not(:first-child)) {
		padding-top: 80px;
		padding-bottom: 80px;
	}
	/* Blog posts and shop pages sit inside the theme's own container */
	body:not(.et-tb-has-body) #main-content > .container {
		width: 90%;
		max-width: 1140px;
	}
}

/* ---------- 4. Body text fallback ----------
   Text blocks built before Divi had presets (2020-era pages such as Rates & Insurance,
   Common Questions, Client Forms) don't receive the site's text preset and fell back to 16px.
   Element-level strength (0,0,2): beats the theme reset (div { font-size:100% }) but loses to any
   Divi class rule, so blocks with their own setting or a preset still win. */
.et-l--post,
.et-l--body {
	--et_global_body_font_height: 1.55em;
}
html :where(.et-l--post, .et-l--body) div:where(.et_pb_text, .et_pb_toggle_content, .et_pb_tab_content) {
	font-family: 'Lato', Helvetica, Arial, Lucida, sans-serif;
	font-size: 19px;
	font-weight: 500;
}

/* ---------- 5. Image corners ----------
   Every standalone image (image modules, blog thumbnails, post featured images) gets the
   homepage's 15px rounded corners. Backgrounds, header/footer logos and accordions are untouched. */
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_image .et_pb_image_wrap,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_image .et_pb_image_wrap img,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_post .entry-featured-image-url,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_post .entry-featured-image-url img,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_post .et_pb_image_container,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_post .et_pb_image_container img,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_title_featured_container,
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_title_featured_container img,
html body #page-container #main-content .post .et_post_meta_wrapper img,
html body #page-container #main-content article.post > img,
html body .woocommerce-product-gallery .woocommerce-product-gallery__image,
html body .woocommerce-product-gallery .woocommerce-product-gallery__image img,
html body .woocommerce-product-gallery .flex-viewport,
html body .woocommerce-product-gallery .flex-control-thumbs li img,
html body #page-container :is(.et_pb_wc_related_products, .et_pb_shop, .et_pb_wc_upsells) li.product :is(.et_shop_image, a > img, img),
html body #page-container :is(.et_pb_wc_gallery, .et_pb_gallery) .et_pb_gallery_image,
html body #page-container :is(.et_pb_wc_gallery, .et_pb_gallery) .et_pb_gallery_image img,
html body .woocommerce ul.products li.product a img,
html body .woocommerce-page ul.products li.product a img {
	border-radius: 15px !important;
	overflow: hidden !important;
}

/* ---------- 6. Vertical rhythm in text ----------
   Many pages put each heading in its own text block, followed by a separate block of paragraphs.
   Divi gave those headings 35px below and 0px above (stuck to the text before, floating away from
   their own). Headings now get room above and sit close to the text they introduce. */
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_module + .et_pb_text:has(> .et_pb_text_inner > :is(h1, h2, h3, h4, h5, h6):first-child) {
	margin-top: 44px !important;
}
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_text:has(> .et_pb_text_inner > :is(h1, h2, h3, h4, h5, h6):first-child):not(:has(> .et_pb_text_inner > :is(p, ul, ol, blockquote, table, div))) {
	margin-bottom: 14px !important;
}
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_text:not(:has(> .et_pb_text_inner > :is(p, ul, ol, blockquote, table, div))) :is(h1, h2, h3, h4, h5, h6):last-child {
	padding-bottom: 0 !important;
}
/* consecutive paragraph blocks: one normal paragraph gap */
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_text:has(> .et_pb_text_inner > :is(p, ul, ol):last-child) + .et_pb_text:has(> .et_pb_text_inner > :is(p, ul, ol):first-child) {
	margin-top: 1em;
}
/* headings that follow paragraphs inside the same block */
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_text_inner > :is(p, ul, ol, blockquote) + :is(h2, h3, h4, h5) {
	padding-top: 1.2em;
}
/* empty paragraphs WordPress generates from stray line breaks */
html body #page-container :is(.et-l--post, .et-l--body) .et_pb_text_inner p:empty {
	display: none;
}

/* ---------- 7. One width everywhere (1140px) ----------
   Header and footer follow the same 1140px content width as the pages.
   Full-bleed image bands keep their edge-to-edge width. */
@media (min-width: 981px) {
	html body #main-header .container,
	html body #top-header .container {
		width: 90% !important;
		max-width: 1140px !important;
	}
	html body .et-l--footer .et_pb_section > .et_pb_row {
		width: 90% !important;
		max-width: 1140px !important;
	}
}
