/* Layout: container, sections, header, mobile menu, footer, banners, grids. */

.mt-container {
	width: 100%;
	max-width: calc(var(--mt-container) + var(--mt-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--mt-gutter);
}

.mt-container--narrow {
	max-width: calc(800px + var(--mt-gutter) * 2);
}

.mt-section {
	padding-block: var(--mt-section-y);
}

/* Zero specificity so layout classes (.mt-split, .mt-contact-grid…) on the same element win. */
:where(.mt-section > .mt-container) {
	display: flex;
	flex-direction: column;
	gap: var(--mt-space-3xl);
}

.mt-section--muted { background: var(--mt-bg-muted); }
.mt-section--surface { background: var(--mt-bg-surface); }
.mt-section--accent { background: var(--mt-bg-accent); }
.mt-section--brand { background: var(--mt-bg-brand); }
.mt-section--inverse { background: var(--mt-bg-inverse); }

.mt-section__head-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--mt-space-lg);
}

/*
 * MADA Tech widgets always take the full width of their Elementor container.
 * Without this, a container with "align items: center" shrinks them to their
 * content — and the image collage (absolutely positioned) collapses to 0.
 */
.elementor-widget[class*="elementor-widget-mt-"] {
	width: 100%;
}

/* Elementor widgets that stack a heading above content. */
.mt-widget-stack {
	display: flex;
	flex-direction: column;
	gap: var(--mt-space-3xl);
	width: 100%;
}

.mt-single-image {
	width: 100%;
	aspect-ratio: 620 / 520;
	object-fit: cover;
}

.mt-team__photo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mt-team__photo .mt-team__placeholder {
	width: 30%;
	height: auto;
	opacity: 0.3;
}

.mt-nav-widget {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Elementor-built header: keep the theme's sticky behaviour and spacing. */
.mt-header--elementor {
	border-bottom: 0;
}

/* Grids */
.mt-grid {
	display: grid;
	gap: var(--mt-space-lg);
}

.mt-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
	.mt-grid--3,
	.mt-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.mt-grid--2,
	.mt-grid--3,
	.mt-grid--4 { grid-template-columns: minmax(0, 1fr); }

	.mt-section__head-row {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Horizontal swipe on mobile (cards peek from the left). */
	.mt-carousel-mobile {
		display: grid;
		grid-auto-columns: 78%;
		grid-auto-flow: column;
		grid-template-columns: none;
		gap: 16px;
		margin-inline: calc(var(--mt-gutter) * -1);
		padding-inline: var(--mt-gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.mt-carousel-mobile > * {
		scroll-snap-align: start;
	}
}

/* Split: media + text */
.mt-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: var(--mt-space-4xl);
}

.mt-split--top { align-items: start; }

.mt-split__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--mt-space-xl);
}

@media (max-width: 1024px) {
	.mt-split {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--mt-space-2xl);
	}

	/* Mobile shows the image above the text. */
	.mt-split__media {
		order: -1;
	}
}


/* ---------- Mobile menu (full screen, On Dark) ---------- */
.mt-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	flex-direction: column;
	background: var(--mt-bg-accent);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--mt-ease), visibility 0.3s;
	overflow-y: auto;
}

.mt-mobile-menu.is-open {
	opacity: 1;
	visibility: visible;
}

.mt-mobile-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
	padding-inline: 20px;
}

.mt-mobile-menu__top .mt-logo img {
	width: 132px;
}

.mt-mobile-menu__close {
	padding: 0;
	border: 0;
	background: none;
	color: var(--mt-icon-brand);
	cursor: pointer;
}

.mt-mobile-menu nav {
	padding: 16px 20px 0;
}

.mt-mobile-menu nav ul {
	list-style: none;
}

.mt-mobile-menu nav > ul > li {
	border-bottom: 1px solid var(--mt-border-default);
}

.mt-mobile-menu nav > ul > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	color: var(--mt-text-secondary);
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.65;
}

.mt-mobile-menu nav > ul > li > a::after {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 12H5'/%3E%3Cpath d='m10 7-5 5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 12H5'/%3E%3Cpath d='m10 7-5 5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mt-mobile-menu nav .current-menu-item > a,
.mt-mobile-menu nav .current-menu-ancestor > a {
	color: var(--mt-text-primary);
	font-weight: 500;
}

.mt-mobile-menu .sub-menu {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 16px 18px 0;
}

.mt-mobile-menu .sub-menu a {
	color: var(--mt-text-secondary);
	font-size: 1rem;
}

.mt-mobile-menu__bottom {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: auto;
	padding: 32px 20px;
}

/* Phone on top, social icons on their own row (up to 6 icons don't fit beside the number). */
.mt-mobile-menu__contact {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.mt-mobile-menu__contact .mt-social {
	flex-wrap: wrap;
}

.mt-mobile-menu__phone small {
	display: block;
	color: var(--mt-text-secondary);
	font-size: 0.75rem;
}

.mt-mobile-menu__phone a {
	color: var(--mt-text-primary);
	font-weight: 500;
	direction: ltr;
	display: inline-block;
}

body.mt-menu-open {
	overflow: hidden;
}

/* Social squares */
.mt-social {
	display: flex;
	gap: 8px;
	list-style: none;
}

.mt-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--mt-border-default);
	color: var(--mt-icon-brand);
	transition: border-color 0.3s var(--mt-ease), background-color 0.3s var(--mt-ease), color 0.3s var(--mt-ease), transform 0.3s var(--mt-ease);
}

.mt-social a:hover {
	border-color: var(--mt-border-strong);
	background-color: var(--mt-border-strong);
	color: var(--mt-bg-inverse);
	transform: translateY(-2px);
}

.mt-mobile-menu .mt-social a {
	width: 36px;
	height: 36px;
}


/* Image layer for hero + page banners (separate element so it can zoom/parallax). */
.mt-hero,
.mt-page-hero {
	isolation: isolate;
	overflow: hidden;
}

.mt-hero__bg {
	position: absolute;
	inset: -6% 0;
	z-index: -1;
	background: var(--mt-bg-inverse) center / cover no-repeat;
	will-change: transform;
}

/* ---------- Page hero (inner pages) ---------- */
.mt-page-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 560px;
	padding-top: var(--mt-header-h);
	padding-bottom: 88px;
	background: var(--mt-bg-inverse) center / cover no-repeat;
	color: var(--mt-text-on-dark);
}

.mt-page-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(22, 22, 22, 0.62);
}

.mt-page-hero > .mt-container {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.mt-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--mt-text-on-dark-muted);
	font-size: var(--mt-fs-small);
	font-weight: 400;
	list-style: none;
}

.mt-breadcrumb li + li::before {
	content: "/";
	margin-inline-end: 10px;
}

.mt-breadcrumb a:hover {
	color: var(--mt-text-on-dark);
}

.mt-page-hero__title {
	color: var(--mt-text-on-dark);
	font-size: var(--mt-fs-display);
	font-weight: 300;
	line-height: var(--mt-lh-display);
}

.mt-page-hero__subtitle {
	max-width: 640px;
	color: var(--mt-text-on-dark-muted);
	font-size: var(--mt-fs-body-lg);
}

@media (max-width: 767px) {
	.mt-page-hero {
		min-height: 340px;
		padding-bottom: 40px;
	}

	.mt-page-hero__title {
		font-size: 2.5rem;
	}
}

/* Simple head (default pages, articles) */
.mt-page-head {
	padding-block: 96px 72px;
	background: var(--mt-bg-muted);
}

.mt-page-head .mt-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mt-page-head .mt-breadcrumb {
	color: var(--mt-text-secondary);
}

@media (max-width: 767px) {
	.mt-page-head {
		padding-block: 48px 40px;
	}
}

/* ---------- CTA band ---------- */
.mt-cta-band {
	position: relative;
	overflow: hidden;
	padding-block: 96px;
	background: var(--mt-bg-brand);
}

.mt-cta-band__pattern {
	position: absolute;
	top: -60px;
	inset-inline-end: 40%;
	width: 260px;
	opacity: 0.08;
	pointer-events: none;
}

.mt-cta-band .mt-container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
}

.mt-cta-band__text {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 620px;
}

.mt-cta-band__text p {
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-body-lg);
}

@media (max-width: 767px) {
	.mt-cta-band {
		padding-block: 64px;
	}

	.mt-cta-band .mt-container {
		flex-direction: column;
		align-items: stretch;
		gap: 28px;
	}

	.mt-cta-band .mt-actions {
		flex-direction: column;
	}

	.mt-cta-band .mt-btn {
		width: 100%;
	}
}
