/**
 * AHEAD Mauritius – site-wide responsive overrides
 * Loaded after theme + Elementor styles.
 */

/* Base: prevent horizontal scroll */
html,
body {
	max-width: 100%;
	overflow-x: clip;
}

img,
video,
iframe,
embed,
object,
svg {
	max-width: 100%;
	height: auto;
}

/* Elementor / ElementsKit containers */
.e-con,
.e-con-inner,
.elementor-section,
.elementor-container,
.elementor-widget-wrap,
.elementor-widget-container,
.ekit-wid-con {
	max-width: 100%;
	box-sizing: border-box;
}

.elementor-widget-image img,
.elementor-widget-image a {
	max-width: 100%;
	height: auto;
}

/* Tables & embeds */
table {
	max-width: 100%;
}

.wp-block-table,
.elementor-widget-text-editor,
.post-entry {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* GiveWP / forms */
.give-form-wrap,
.give-embed-form,
.give-form,
form.wpcf7-form,
.wpcf7,
.ekit-form,
.searchandfilter {
	max-width: 100%;
}

.give-form input,
.give-form select,
.give-form textarea,
.wpcf7 input,
.wpcf7 select,
.wpcf7 textarea,
.ekit-form input,
.ekit-form select,
.ekit-form textarea {
	max-width: 100%;
	box-sizing: border-box;
}

/* --------------------------------------------------
   Header nav – keep Contact on one line
   (menu was wrapping under the bar on laptop widths)
-------------------------------------------------- */
.elementor-26 .elementor-element-520e8ae .elementskit-menu-container {
	overflow: visible;
}

.elementor-26 .elementor-element-520e8ae .elementskit-navbar-nav {
	flex-wrap: nowrap !important;
	white-space: nowrap;
}

@media only screen and (max-width: 1400px) {
	.elementor-26 .elementor-element-520e8ae .elementskit-navbar-nav > li {
		margin: 0 2px !important;
	}

	.elementor-26 .elementor-element-520e8ae .elementskit-navbar-nav > li > a {
		padding: 12px 6px !important;
		font-size: 15px !important;
	}
}

@media only screen and (max-width: 1200px) and (min-width: 1025px) {
	.elementor-26 .elementor-element-520e8ae .elementskit-navbar-nav > li {
		margin: 0 !important;
	}

	.elementor-26 .elementor-element-520e8ae .elementskit-navbar-nav > li > a {
		padding: 12px 4px !important;
		font-size: 14px !important;
	}

	.elementor-26 .elementor-element-db70c6a .ekit_creative_button {
		padding-left: 14px !important;
		gap: 10px !important;
	}
}

/* Mobile: keep header Donation hidden (Elementor hide settings).
   Only show Donation inside the red hamburger menu. */
@media only screen and (max-width: 1024px) {
	.elementskit-navbar-nav > .menu-item-donation-mobile {
		display: list-item !important;
		margin-top: 16px !important;
		padding-top: 16px !important;
		border-top: 1px solid rgba(255, 255, 255, 0.25);
	}

	.elementskit-navbar-nav > .menu-item-donation-mobile > a {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		margin: 8px 20px 20px !important;
		padding: 12px 20px !important;
		background: #fff !important;
		color: #d53f34 !important;
		border-radius: 6px !important;
		font-weight: 700 !important;
		width: calc(100% - 40px);
		box-sizing: border-box;
	}

	.elementskit-navbar-nav > .menu-item-donation-mobile > a:hover,
	.elementskit-navbar-nav > .menu-item-donation-mobile > a:focus {
		background: #21293b !important;
		color: #fff !important;
	}
}

/* Keep injected Donation menu item off desktop (button already shows) */
@media only screen and (min-width: 1025px) {
	.elementskit-navbar-nav > .menu-item-donation-mobile {
		display: none !important;
	}
}

/* --------------------------------------------------
   Tablet
-------------------------------------------------- */
@media only screen and (max-width: 1024px) {
	.elementor-heading-title {
		word-wrap: break-word;
		overflow-wrap: break-word;
	}

	/* Off-canvas menu: Contact stacks normally with other items */
	.elementor-26 .elementor-element-520e8ae .elementskit-navbar-nav {
		flex-wrap: wrap !important;
		white-space: normal;
	}

	/* Hero text block on Home – was fixed 700px */
	.elementor-9600 .elementor-element-9b9aa2f {
		width: 100% !important;
		max-width: 100% !important;
		--container-widget-width: 100% !important;
	}

	/* Soften decorative negative pull on volunteer cards */
	.elementor-9600 .elementor-element-2828705,
	.elementor-9600 .elementor-element-af8b120,
	.elementor-9600 .elementor-element-81ee75d {
		--margin-right: 0px !important;
		margin-right: 0 !important;
	}
}

/* --------------------------------------------------
   Mobile
-------------------------------------------------- */
@media only screen and (max-width: 767px) {
	/* Global flex safety: column+wrap can spawn horizontal columns */
	.e-con.e-flex {
		min-width: 0;
	}

	.e-con.e-flex[style*="flex-direction: column"],
	.e-con.e-flex {
		max-width: 100%;
	}

	.elementor-element.elementor-widget {
		max-width: 100% !important;
	}

	/* Buttons */
	.ekit_creative_button,
	.btn-default,
	.elementor-button {
		max-width: 100%;
		box-sizing: border-box;
	}

	.ekit-btn-wraper {
		max-width: 100%;
	}

	/* Header logo */
	.elementor-26 .elementor-element img,
	.site-logo img,
	.custom-logo {
		max-width: 140px;
		height: auto;
	}

	/* Home hero */
	.elementor-9600 .elementor-element-8738beb {
		--min-height: auto !important;
		min-height: auto !important;
		--padding-top: 120px !important;
		--padding-bottom: 40px !important;
	}

	.elementor-9600 .elementor-element-9b9aa2f {
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-9600 .elementor-element-7b970a3 {
		--flex-direction: column !important;
		--flex-wrap: wrap !important;
		align-items: flex-start !important;
	}

	.elementor-9600 .elementor-element-555d477 {
		--flex-direction: column !important;
	}

	.elementor-9600 .elementor-element-2828705,
	.elementor-9600 .elementor-element-af8b120,
	.elementor-9600 .elementor-element-81ee75d {
		--width: 100% !important;
		--margin-bottom: 0px !important;
		--margin-right: 0px !important;
		width: 100% !important;
		margin: 0 !important;
	}

	.elementor-9600 .elementor-element-5206ee5,
	.elementor-9600 .elementor-element-29665cb,
	.elementor-9600 .elementor-element-d417e9d {
		--width: 100% !important;
		width: 100% !important;
	}

	/* Donation page – Contact us boxes overflow (column + wrap) */
	.elementor-9610 .elementor-element-21dccc1 {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		align-items: stretch !important;
		height: auto !important;
		min-height: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		--width: 100% !important;
		--padding-right: 10px !important;
		gap: 16px !important;
		--gap: 16px 16px !important;
		--row-gap: 16px !important;
		--column-gap: 16px !important;
	}

	.elementor-9610 .elementor-element-21dccc1 > .elementor-element {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 auto !important;
	}

	.elementor-9610 .elementor-element-197939f,
	.elementor-9610 .elementor-element-8790447,
	.elementor-9610 .elementor-element-9a4bb0f,
	.elementor-9610 .elementor-element-61d583c,
	.elementor-9610 .elementor-element-7352010 {
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-9610 .elementor-element-35e9102 {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
		--width: 100% !important;
	}

	.elementor-9610 .elementor-element-35e9102 > .elementor-element {
		width: 100% !important;
		max-width: 100% !important;
		--width: 100% !important;
	}

	.elementor-9610 .elementor-element-89784df,
	.elementor-9610 .elementor-element-e4de175,
	.elementor-9610 .elementor-element-0c9db9b,
	.elementor-9610 .elementor-element-b5251a0 {
		width: 100% !important;
		max-width: 100% !important;
		--width: 100% !important;
		margin-right: 0 !important;
		--margin-right: 0px !important;
	}

	/* Image gallery minor overflow */
	.elementor-5634 .elementor-element-79e93f6 {
		width: 100% !important;
		max-width: 100% !important;
		overflow: hidden;
	}

	/* Footer */
	.elementor-31 .e-con,
	.elementor-31 .elementor-element {
		max-width: 100%;
	}

	.elementor-31 .elementor-element-4795baa {
		--gap: 40px 16px !important;
		--row-gap: 40px !important;
	}

	/* Newsroom / Search & Filter already has custom CSS; reinforce */
	.elementor-element-0171ed1 .searchandfilter > div > ul {
		grid-template-columns: 1fr !important;
	}

	/* Page headers */
	.page-header,
	.elementor-widget-heading .elementor-heading-title {
		word-break: break-word;
	}

	/* Testimonials slider */
	.elementskit-testimonial-slider {
		max-width: 100%;
		overflow: hidden;
	}

	/* Back to top button stay on screen */
	#sbttb-btn,
	.sbttb-progress {
		max-width: 46px;
	}
}

/* --------------------------------------------------
   Small phones
-------------------------------------------------- */
@media only screen and (max-width: 480px) {
	.elementor-9600 .elementor-element-31e2c87 .elementor-heading-title {
		font-size: 26px !important;
	}

	.ekit_creative_button {
		width: 100%;
		justify-content: space-between;
	}

	.elementor-26 .elementor-element-ad52afc {
		--padding-left: 12px !important;
		--padding-right: 12px !important;
	}
}

/* Keep back-to-top from covering content on mobile */
@media only screen and (max-width: 767px) {
	.elementor-9610 .elementor-element-21dccc1 {
		padding-bottom: 70px !important;
	}
}
