/* =========================================================================
   D-Zigners - Site footer (fully custom, sitewide)
   Ported 1:1 from the approved static preview. Divi's native footer
   module is hidden below; this markup (printed via
   dzigners_render_site_footer() on the wp_footer hook in functions.php)
   is the real footer on every page.
   ========================================================================= */

html {
	scroll-behavior: smooth;
}

/* Hide Divi's native footer completely - our custom footer replaces it
   everywhere. */
#main-footer {
	display: none !important;
}

.dz-footer {
	position: relative;
	overflow: hidden;
	background: var(--dz-black);
	color: rgba(255, 255, 255, 0.72);
	padding: calc(var(--dz-space-2xl) + var(--dz-space-lg)) 0 var(--dz-space-xl);
}

/* Same "G" isotipo used elsewhere on the site, shown at full brand-orange
   opacity so it actually reads on the dark footer background - the
   extra top/bottom padding above gives it room to sit fully in view
   instead of being squeezed tight against the footer content. */
.dz-footer__decor {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	opacity: 1;
	pointer-events: none;
}

.dz-footer__inner {
	position: relative;
	z-index: 1;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 32px;
}

.dz-footer__top {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: var(--dz-space-xl);
	padding-bottom: var(--dz-space-xl);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dz-footer__logo {
	display: inline-block;
	margin-bottom: var(--dz-space-md);
}

/* Same crop-fix as the header logo (see css/header.css for the full
   measurement notes: the source PNG has ~17-23% transparent safe-zone
   padding baked in on every side), rebuilt here as a CSS mask instead
   of an <img> so it can also be recolored to solid brand orange -
   background-color paints through the logo's own alpha shape, which
   is exact/guaranteed rather than approximating orange via a filter
   chain on top of the image's real (dark gray) pixel color. */
.dz-footer__logo-mark {
	display: block;
	width: 266px;
	height: 72px;
	background-color: var(--dz-accent);
	-webkit-mask-image: var(--dz-logo-url);
	mask-image: var(--dz-logo-url);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 405px 135px;
	mask-size: 405px 135px;
	-webkit-mask-position: -67.5px -31.5px;
	mask-position: -67.5px -31.5px;
}

.dz-footer__tagline {
	font-family: var(--dz-font-body);
	font-size: 14px;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.6);
	max-width: 320px;
	margin: 0 0 var(--dz-space-md);
}

.dz-footer__social {
	display: flex;
	gap: 10px;
}

.dz-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: var(--dz-white);
	transition: background 0.3s ease, transform 0.3s ease;
}

.dz-footer__social a:hover {
	background: var(--dz-accent);
	transform: translateY(-2px);
}

.dz-footer__social svg {
	width: 16px;
	height: 16px;
}

.dz-footer__heading {
	font-family: var(--dz-font-body);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--dz-white);
	margin: 0 0 var(--dz-space-md);
}

.dz-footer__links,
.dz-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.dz-footer__links a,
.dz-footer__contact a,
.dz-footer__contact p {
	font-family: var(--dz-font-body);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
	margin: 0;
	transition: color 0.25s ease;
}

.dz-footer__contact a {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.dz-footer__contact-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	color: rgba(255, 255, 255, 0.5);
	transition: color 0.25s ease;
}

.dz-footer__contact-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.dz-footer__contact a:hover .dz-footer__contact-icon {
	color: var(--dz-accent);
}

.dz-footer__links a:hover,
.dz-footer__contact a:hover {
	color: var(--dz-white);
}

.dz-footer__col--cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.dz-footer__col--cta .dz-footer__heading {
	max-width: 200px;
}

/* No border-top here - .dz-footer__top already has a border-bottom
   right above this, and the two together were rendering as an odd
   doubled-up line right before the copyright bar. */
.dz-footer__bottom {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: var(--dz-space-lg);
	padding: var(--dz-space-lg) 0;
	background: var(--dz-black);
}

.dz-footer__bottom p {
	font-family: var(--dz-font-body);
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
	margin: 0;
}

.dz-footer__legal {
	display: flex;
	gap: 20px;
}

.dz-footer__legal a {
	font-family: var(--dz-font-body);
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
	text-decoration: none;
	transition: color 0.25s ease;
}

.dz-footer__legal a:hover {
	color: var(--dz-white);
}

@media (max-width: 900px) {
	.dz-footer__top {
		grid-template-columns: 1fr 1fr;
	}
	.dz-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.dz-footer__top {
		grid-template-columns: 1fr;
	}
	.dz-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Mobile footer: the "G" decor SVG uses preserveAspectRatio="slice",
   which fully covers whatever box it's given - at mobile widths the
   footer stacks into one tall column (all the grid columns above
   collapse to 1fr), so that same inset:0 box became much taller and
   the slice-scaled pattern grew along with it, ending up big enough
   to sit directly behind/through the logo at the top of the stack
   instead of reading as a subtle corner accent. Pinning it to a
   small, fixed-size corner block (instead of covering the full,
   now much taller, footer) keeps it away from the logo and any other
   content regardless of how tall the stacked footer gets. */
@media (max-width: 900px) {
	.dz-footer__decor {
		inset: auto;
		top: auto;
		left: auto;
		bottom: 0;
		right: 0;
		width: 200px;
		height: 113px;
		opacity: 0.5;
	}
}

@media (max-width: 560px) {
	.dz-footer__decor {
		width: 140px;
		height: 79px;
		opacity: 0.4;
	}
}
