/**
 * GEP global responsive styles.
 * Applies to all pages: sidebar/content layout, header, ticker, footer, body content.
 * Homepage-specific rules use body.home.
 */

/* Override Elementor custom margin that pulls content up */
.elementor-30322 .elementor-element.elementor-element-896be1a>.elementor-widget-container {
	margin: 0 !important;
}

/* ========== Safe defaults – consistent box model ========== */
html {
	box-sizing: border-box;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

/* ========== GLOBAL: Main content area – cap width & overflow only, preserve existing margins ========== */
#content,
main,
#main,
.site-content,
.elementor-page {
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
}

/* Below sidebar breakpoint: prevent overflow only – do not override template margins/padding */
@media (max-width: 1199px) {

	#content,
	main,
	#main,
	.site-content,
	.site-main,
	.elementor-page,
	.elementor-location-single {
		max-width: 100%;
		overflow-x: hidden;
	}
}

/* Stretched Elementor sections: full width on mobile/tablet (no sidebar visible) */
@media (max-width: 1199px) {
	.elementor-section.elementor-section-stretched {
		left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* ========== GLOBAL: Price ticker – responsive ========== */
.gep-global-ticker-wrap {
	max-width: 100%;
	box-sizing: border-box;
	flex-wrap: nowrap;
	align-items: stretch;
	overflow: hidden;
}

.gep-global-ticker-rec {
	min-width: 0;
	flex: 1 1 auto;
}

.gep-global-ticker-btn {
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.gep-global-ticker-wrap {
		gap: 8px;
	}

	.gep-global-ticker-rec {
		max-width: 100%;
	}

	.gep-global-ticker-btn {
		min-width: 48px;
		width: 48px;
	}

	/* Mobile: show icon only so button doesn’t wrap or get cut off */
	.gep-global-ticker-btn .gep-ticker-btn-text {
		display: none;
	}

	.gep-global-ticker-btn .gep-ticker-btn-icon {
		display: inline-block;
	}
}

@media (max-width: 480px) {
	.gep-global-ticker-rec {
		height: 36px;
	}

	.gep-global-ticker-btn {
		height: 36px;
		min-width: 44px;
		width: 44px;
		font-size: 13px;
	}

	.gep-global-ticker-content {
		font-size: 14px;
	}
}

/* ========== GLOBAL: Mobile header – full width, above Elementor sections ========== */
@media (max-width: 1199px) {
	.gep-mobile-header {
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		/* Above Elementor top sections so hamburger is clickable */
		z-index: 999998 !important;
	}
	/* Keep burger button and its icon spans clickable (override any parent pointer-events) */
	.gep-mobile-header .gep-hamburger-btn,
	.gep-mobile-header #hb,
	.gep-mobile-header .gep-hamburger-btn *,
	.gep-mobile-header #hb * {
		pointer-events: auto !important;
		cursor: pointer;
	}
}

/* ========== GLOBAL: Footer – full width on mobile/tablet ========== */
@media (max-width: 1199px) {

	.footer-section.gep-footer-section,
	.gep-footer-section {
		margin-left: 0 !important;
		max-width: 100% !important;
		width: 100%;
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/* Hide footer decorative image on small screens */
	.gep-footer-col-svg img.gep-footer-svg-img {
		display: none !important;
	}
}

@media (max-width: 768px) {

	.footer-section.gep-footer-section,
	.gep-footer-section {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	.gep-footer-row {
		flex-direction: column;
		gap: 1rem;
	}

	.gep-footer-col-form,
	.gep-footer-col-svg {
		flex: 1 1 100%;
		max-width: 100%;
	}

	/* Hide footer decorative image on mobile */
	.gep-footer-col-svg img.gep-footer-svg-img {
		display: none !important;
	}
}

@media (max-width: 480px) {

	.footer-section.gep-footer-section,
	.gep-footer-section {
		padding-left: 10px !important;
		padding-right: 10px !important;
	}
}

/* ========== GLOBAL: Elementor sections – prevent overflow on all pages ========== */
.elementor-section,
.elementor-container,
.elementor-widget-wrap,
.elementor-widget-container {
	max-width: 100%;
	box-sizing: border-box;
}

.elementor-column-wrap {
	overflow-x: hidden;
	min-width: 0;
}

.elementor-section {
	overflow-x: hidden;
}

.elementor-widget-wrap {
	overflow-x: hidden;
	min-width: 0;
}

/* Allow flex children to shrink on small screens */
@media (max-width: 1199px) {

	#content,
	main,
	#main,
	.site-content,
	.elementor-page {
		min-width: 0;
	}
}

/* Table widget: horizontal scroll on small screens */
.elementor-widget-table .elementor-widget-container {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.elementor-widget-table table {
	max-width: 100%;
	min-width: 0;
}

/* Long words / URLs – break to avoid overflow */
.elementor-widget-text-editor,
.elementor-widget-theme-post-content {
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* ========== HOMEPAGE: Base – prevent overflow, full-width ========== */
body.home .elementor-section,
body.home .elementor-container,
body.home .elementor-widget-wrap,
body.home .elementor-widget-container {
	max-width: 100%;
	box-sizing: border-box;
}

body.home .elementor-section.elementor-section-boxed>.elementor-container {
	max-width: 100%;
}

body.home .elementor-column-wrap,
body.home .elementor-widget-wrap {
	overflow-x: hidden;
}

/* Images and media */
body.home .elementor img,
body.home .elementor video,
body.home .elementor iframe {
	max-width: 100%;
	height: auto;
}

body.home .elementor-widget-image img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Typography scaling */
body.home .elementor-heading-title {
	word-wrap: break-word;
}

/* Buttons and CTAs */
body.home .elementor-button-wrapper,
body.home .elementor-widget-button .elementor-button {
	max-width: 100%;
}

body.home .elementor-widget-button .elementor-button {
	white-space: normal;
	text-align: center;
}

/* Tablet and below */
@media (max-width: 1024px) {
	body.home .elementor-section.elementor-section-boxed>.elementor-container {
		padding-left: 20px;
		padding-right: 20px;
	}

	body.home .elementor-column-gap-default>.elementor-column>.elementor-element-populated {
		padding: 10px;
	}
}

@media (max-width: 768px) {
	body.home .elementor-section.elementor-section-boxed>.elementor-container {
		padding-left: 16px;
		padding-right: 16px;
	}

	body.home .elementor-section {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	body.home .elementor-section.elementor-section-stretched {
		left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	body.home .elementor-column-gap-default>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-narrow>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-extended>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-wide>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-wider>.elementor-column>.elementor-element-populated {
		padding: 8px;
	}

	body.home .elementor-heading-title {
		font-size: clamp(1.25rem, 4vw, 2rem) !important;
		line-height: 1.3;
	}

	body.home .elementor-widget-text-editor,
	body.home .elementor-widget-theme-post-content {
		font-size: clamp(14px, 2.5vw, 16px);
		line-height: 1.5;
	}
}

@media (max-width: 480px) {
	body.home .elementor-section.elementor-section-boxed>.elementor-container {
		padding-left: 12px;
		padding-right: 12px;
	}

	body.home .elementor-section {
		padding-top: 28px;
		padding-bottom: 28px;
	}

	body.home .elementor-column-gap-default>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-narrow>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-extended>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-wide>.elementor-column>.elementor-element-populated,
	body.home .elementor-column-gap-wider>.elementor-column>.elementor-element-populated {
		padding: 6px;
	}

	body.home .elementor-heading-title {
		font-size: clamp(1.125rem, 5vw, 1.5rem) !important;
	}

	body.home .elementor-widget-button .elementor-button {
		padding: 10px 20px;
		font-size: 14px;
	}
}

/* Homepage content: prevent overflow only, preserve template padding/margins */
@media (max-width: 1199px) {

	body.home #content,
	body.home main,
	body.home .site-main,
	body.home .elementor-location-single,
	body.home .elementor-page {
		max-width: 100%;
		overflow-x: hidden;
		min-width: 0;
	}
}

@media (min-width: 1200px) {

	body.home .elementor-page,
	body.home #content,
	body.home main {
		max-width: 100%;
	}
}

/* GEP footer on homepage – mobile */
@media (max-width: 768px) {

	body.home .gep-footer-section,
	body.home .footer-section.gep-footer-section {
		padding-left: 12px !important;
		padding-right: 12px !important;
		margin-left: 0 !important;
		max-width: 100% !important;
	}

	body.home .gep-footer-row {
		flex-direction: column;
		gap: 1rem;
	}

	body.home .gep-footer-col-form,
	body.home .gep-footer-col-svg {
		flex: 1 1 100%;
		max-width: 100%;
	}

	body.home .gep-footer-col-svg img.gep-footer-svg-img {
		max-height: 180px;
	}
}

@media (max-width: 480px) {

	body.home .gep-footer-section,
	body.home .footer-section.gep-footer-section {
		padding-left: 10px !important;
		padding-right: 10px !important;
	}
}

/* Jump-to-top and utility spacing */
@media (max-width: 768px) {
	body.home .gep-footer-jump {
		flex-wrap: wrap;
		gap: 0.5rem;
		padding: 0.75rem 0.5rem;
	}
}

/* 787–1199px: reduce ticker top space; keep ticker below mobile header so hamburger stays clickable */
@media (min-width: 787px) and (max-width: 1199px) {
	.gep-global-ticker-wrap {
		margin-top: -2rem !important;
		z-index: 1;
	}
	/* Ensure mobile header stays above ticker so hamburger and logo remain clickable */
	.gep-mobile-header {
		z-index: 100001 !important;
	}
	.gep-mobile-header .gep-hamburger-btn,
	.gep-mobile-header #hb,
	.gep-mobile-header .gep-mobile-header-logo,
	.gep-mobile-header .gep-mobile-header-logo a {
		pointer-events: auto !important;
	}
}