/**
 * layout.css - Divi structural grid recreated slim (no framework module CSS).
 * Reproduces .et_pb_section / .et_pb_row / .et_pb_column geometry (gutters3 defaults)
 * plus the per-module padding/width overrides used by the home page.
 * Numbers harvested from the live page's compiled CSS; refined empirically.
 */

/* ---- Kill UA default margins on builder content (Divi resets these; :where = 0
       specificity so any authored module margin still wins). Stops heading/paragraph
       UA margins from inflating every section's height. ---- */
:where(#main-content, .et-l--footer) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd) {
	margin-top: 0;
	margin-bottom: 0;
}

/* ---- Global border-box (Divi set this on *; restore it site-wide so width:100%+padding
   doesn't overflow — e.g. the mobile .nav-container was 420px on a 390px viewport) ---- */
*, *::before, *::after { box-sizing: border-box; }

/* ---- Section ---- */
.et_pb_section {
	position: relative;
	background-color: #fff;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	padding: 54px 0;
}

/* ---- Row ---- */
.et_pb_row {
	width: 80%;
	max-width: 1080px;
	margin: 0 auto;
	position: relative;
	padding: 27px 0;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}
.et_pb_row::after { content: ""; display: table; clear: both; }
.et_pb_row_inner { width: 100%; }

/* ---- Column ---- */
.et_pb_column {
	float: left;
	position: relative;
	z-index: 2;
	min-height: 1px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.et_pb_column.et_pb_column_empty { display: none; }
.et_pb_column .et_pb_module:last-child { margin-bottom: 0; }

/* Images never overflow their column (Divi default) */
.et_pb_image img,
.et_pb_image .et_pb_image_wrap img { max-width: 100%; height: auto; }

/* ---- Desktop column widths (gutters3 defaults, applied unconditionally) ---- */
@media (min-width: 981px) {
	.et_pb_row .et_pb_column { margin-right: 5.5%; }
	.et_pb_row .et_pb_column:last-child,
	.et_pb_row .et_pb_column.et-last-child { margin-right: 0; }
	.et_pb_column_4_4 { width: 100%; margin-right: 0 !important; }
	.et_pb_column_3_4 { width: 73.625%; }
	.et_pb_column_2_3 { width: 64.833%; }
	.et_pb_column_1_2 { width: 47.25%; }
	.et_pb_column_1_3 { width: 29.6667%; }
	.et_pb_column_1_4 { width: 20.875%; }

	/* inter-module vertical spacing (Divi gutters3; ~36px absolute regardless of column) */
	.et_pb_column_4_4 .et_pb_module { margin-bottom: 2.75%; }
	.et_pb_column_3_4 .et_pb_module { margin-bottom: 3.735%; }
	.et_pb_column_2_3 .et_pb_module { margin-bottom: 4.242%; }
	.et_pb_column_1_2 .et_pb_module { margin-bottom: 5.82%; }
	.et_pb_column_1_3 .et_pb_module { margin-bottom: 9.27%; }
	.et_pb_column_1_4 .et_pb_module { margin-bottom: 13.174%; }
	.et_pb_column .et_pb_module:last-child { margin-bottom: 0; }

	/* equal-height (make_equal) 2-col rows: bio band + nuvola */
	.et_pb_row.et_pb_equal_columns { display: flex; align-items: stretch; }
	.et_pb_row.et_pb_equal_columns > .et_pb_column { display: flex; flex-direction: column; }
}

/* ---- Wide rows (90% / 1440px) ---- */
.et_pb_row_4.et_pb_row { width: 90%; max-width: 1440px; }

/* ---- Per-section padding overrides ---- */
.et_pb_section_3.et_pb_section { padding-top: 2.5rem; padding-bottom: 0; }

/* ---- Tablet / mobile: stack columns ---- */
@media (max-width: 980px) {
	.et_pb_section { padding: 50px 0; }
	.et_pb_row { width: 80%; padding: 30px 0; }
	.et_pb_row.et_pb_equal_columns { display: block; }
	.et_pb_column {
		width: 100% !important;
		margin: 0 0 30px;
		float: none;
	}
	.et_pb_row .et_pb_column:last-child,
	.et_pb_row .et_pb_column.et-last-child { margin-bottom: 0; }
	.et_pb_section_3.et_pb_section { padding-top: 3rem; padding-bottom: 0; }
}

/* ---- Divi JS removed: neutralize scroll-driven states ---- */
/* Waypoint/animation elements start hidden and were revealed by Divi JS. Force visible. */
.et-waypoint,
.et_pb_animation_off,
[class*="et_pb_animation_"] { opacity: 1 !important; }

/* Parallax sections: Divi JS positioned .et_parallax_bg via inline transform (frozen at
   capture, pushing the image off-screen) and set a fixed height. Reset so the image covers. */
.et_pb_section_parallax { position: relative; }
.et_parallax_bg_wrap { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.et_parallax_bg {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	transform: none !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
}
.et_parallax_gradient { position: absolute !important; inset: 0 !important; }
.et_pb_section_parallax > .et_pb_row,
.et_pb_section_parallax > .et_pb_row_inner { position: relative; z-index: 2; }
