/* ==========================================================================
   Giacomo Licata – Divi 5 child theme
   Page, header and footer design is set in each module's Divi settings.
   This file only holds what Divi has no setting for:
     1. Base: page background + font (as on the original site), fixed-height images
     2. Header: fixed over the page, dark after scrolling, current-page link
     3. Hover overlays on the Team / News images + News lightbox
     4. Fallback header/footer (header.php / footer.php), used only when no
        Divi Theme Builder header/footer is assigned
   ========================================================================== */

/* 1. Base ---------------------------------------------------------------- */
html body.gl-site {
	background-color: #242424;
	/* background-image is added inline from functions.php */
	margin: 0;
	padding: 0;
}
/* Fallback font for anything outside Divi modules (modules set Roboto themselves). */
body.gl-site { font-family: 'Roboto', sans-serif; }
body.gl-site #page-container,
body.gl-site #main-content,
body.gl-site .et-l--header,
body.gl-site .et-l--footer {
	background: transparent;
	padding-top: 0;
}

/* Fixed-height images (box photos 200px, products 250px): Divi's Image module has
   no height setting for the picture itself, so it fills the module's height here.
   object-fit (cover / fill) is set natively on each Image module. */
body.gl-site .gl-img-fill .et_pb_image_wrap {
	display: block !important;
	width: 100% !important;
	height: 100%;
}
body.gl-site .gl-img-fill .et_pb_image_wrap img {
	width: 100%;
	height: 100%;
}

/* Price list: name left, price right, dotted leader between (Prices + Home). */
body.gl-site .gl-price-list { list-style: none !important; margin: 0 0 12px !important; padding: 0 !important; }
body.gl-site .gl-price-list li {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 5px 0 !important;
	margin: 0 !important;
}
body.gl-site .gl-price-list li span:first-child {
	display: flex;
	flex: 1 1 auto;
	align-items: baseline;
}
body.gl-site .gl-price-list li span:first-child::after {
	content: '';
	flex: 1 1 auto;
	margin: 0 0 4px 10px;
	border-bottom: 1px dotted #777;
}
body.gl-site .gl-price-list li span:last-child { font-weight: 700; color: #c8a27c; white-space: nowrap; }
body.gl-site .gl-price-from { text-transform: uppercase; letter-spacing: 1px; font-size: 13px; color: #c8a27c; }
body.gl-site .gl-small { font-size: 13px; color: #999; }

/* Home "Find us" map fills the height of its column. */
body.gl-site .gl-map-col .et_pb_code,
body.gl-site .gl-map-col .et_pb_code_inner { flex: 1 1 auto; height: 100%; min-height: 360px; }
body.gl-site .gl-map-col iframe { min-height: 360px; }

/* 2. Header -------------------------------------------------------------- */
/* Theme Builder header section (class gl-header) and fallback header share these. */
body.gl-site .gl-header {
	position: fixed !important;
	top: 0;
	left: 0;
	width: 100% !important;
	z-index: 1000;
	transition: background-color 0.3s ease;
}
/* Dark once scrolled. Divi writes `.et-l--header>.et_builder_inner_content .et_pb_section.et_pb_section_0_tb_header
   { background-color: rgba(0,0,0,0) !important }` from the section's own background setting, so this
   selector has to be more specific than that one to win. */
body.gl-site .gl-header.is-scrolled,
html body.gl-site .et-l--header > .et_builder_inner_content .et_pb_section.gl-header.is-scrolled {
	background-color: #242424 !important;
}
body.gl-site.admin-bar .gl-header { top: 32px; }

/* Current page in the menu (original: brown with a soft shadow). */
body.gl-site .gl-nav-item.gl-active a,
body.gl-site .gl-nav-item a.gl-active,
body.gl-site .gl-header__nav a.gl-nav-link.active {
	color: #996e52 !important;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Footer bar: slightly see-through, as on the original. */
body.gl-site .gl-footer-bar { opacity: 0.9; }
body.gl-site .gl-social {
	display: flex;
	justify-content: center;
	gap: 20px;
}
body.gl-site .gl-social img { width: 24px; height: 24px; max-width: none; }

@media (max-width: 767px) {
	body.gl-site .et-l--header .gl-header .et_pb_column { align-items: center !important; justify-content: center !important; }
	body.gl-site .et-l--header .gl-header-nav { column-gap: 10px !important; margin-top: 10px; }
}
@media (max-width: 782px) {
	body.gl-site.admin-bar .gl-header { top: 46px; }
}

/* 3. Hover overlays + lightbox ------------------------------------------ */
body.gl-site .gl-hover-card {
	position: relative !important;
	overflow: hidden;
}
body.gl-site .gl-hover-card:has(.gl-lightbox) { cursor: pointer; }
body.gl-site .gl-hover-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	z-index: 1;
	pointer-events: none;
	border-radius: 12px;
}
body.gl-site .gl-hover-card:hover::before { opacity: 1; }
body.gl-site .gl-hover-overlay {
	position: absolute !important;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: max-content;
	max-width: 100%;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 0.3s;
	z-index: 2;
	pointer-events: none;
}
body.gl-site .gl-hover-card:hover .gl-hover-overlay { opacity: 1; }
body.gl-site .gl-hover-overlay h3,
body.gl-site .gl-hover-overlay p { margin: 0; padding: 0; }
body.gl-site .gl-hover-overlay a { color: inherit; }

body.gl-site .gl-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	justify-content: center;
	align-items: center;
	z-index: 100000;
}
body.gl-site .gl-modal.is-open { display: flex; }
body.gl-site .gl-modal__content {
	max-width: 90%;
	max-height: 90%;
	display: flex;
	flex-direction: column;
	align-items: center;
}
body.gl-site .gl-modal__image { max-width: 100%; max-height: 100%; border-radius: 8px; }
body.gl-site .gl-modal__close {
	margin-top: 1rem;
	padding: 0.5rem 1rem;
	background-color: #fbf7f5;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13.3333px;
	color: #000;
}

/* 4. Fallback header/footer (header.php / footer.php) ------------------- */
body.gl-site header.gl-header {
	background-color: transparent;
	border-bottom: 1px solid #d9d9d9;
	padding: 10px 20px;
	margin: 0;
}
body.gl-site .gl-header__bar { display: flex; justify-content: space-between; align-items: center; }
body.gl-site .gl-header__logo-link { display: block; line-height: 0; }
body.gl-site .gl-header__logo { display: block; max-width: 200px; height: auto; margin: 0; }
body.gl-site .gl-header__nav { display: flex; justify-content: flex-end; gap: 20px; }
body.gl-site .gl-header__nav a.gl-nav-link {
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	line-height: normal;
	text-decoration: none;
}
body.gl-site p.gl-credit {
	color: #aaa;
	font-size: 10px;
	text-align: right;
	margin: 10px 0;
	padding: 0;
	line-height: normal;
}
body.gl-site footer.gl-footer {
	background-color: #222325;
	padding: 20px 0;
	border-top: 1px solid #d9d9d9;
	opacity: 0.9;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	text-align: center;
	margin: 0;
}
body.gl-site .gl-footer__section { flex: 1 1 0%; display: flex; justify-content: center; align-items: center; margin: 10px 0; }
body.gl-site .gl-footer__nav { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; }
body.gl-site .gl-footer__nav a.gl-footer-link {
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	line-height: normal;
	text-decoration: none;
}
body.gl-site .gl-footer__nav a.gl-footer-link:hover { color: #996e52; }
body.gl-site .gl-footer__logo { max-width: 200px; height: auto; }

@media (max-width: 768px) {
	body.gl-site .gl-header__bar { flex-direction: column; }
	body.gl-site .gl-header__logo { margin-bottom: 10px; }
	body.gl-site .gl-header__nav { align-items: center; gap: 10px; width: 100%; justify-content: center; }
	body.gl-site .gl-header__nav a.gl-nav-link { font-size: 12px; }
	body.gl-site footer.gl-footer { flex-direction: column; }
	body.gl-site .gl-footer__section { width: 100%; }
	body.gl-site .gl-footer__nav { gap: 10px; }
	body.gl-site .gl-footer__nav a.gl-footer-link { font-size: 12px; }
}
