/***

====================================================================
	Mobile-First Responsive Enhancements
====================================================================

***/

/* Ensure all images are responsive */
img,
picture,
figure {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Responsive images with different sizes */
img[sizes] {
	width: 100%;
	height: auto;
}

/* Background images responsive */
[class*="background"] {
	background-size: cover;
	background-position: center;
	background-attachment: scroll;
}

@media only screen and (max-width: 768px) {
	[class*="background"] {
		background-size: cover;
		background-attachment: scroll;
	}
}

/* Video embed responsive */
video,
iframe[src*="youtube"],
iframe[src*="vimeo"],
[class*="embed"],
.video-wrapper {
	max-width: 100%;
	height: auto;
}

/* Ensure media queries work for all devices */
body {
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
}

/* Touch-friendly buttons and links */
a,
button,
input[type="button"],
input[type="submit"],
[role="button"] {
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

/* Better form display on mobile */
input,
textarea,
select {
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

/* Remove default styling from mobile inputs */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* Improve readability on small screens */
@media only screen and (max-width: 480px) {
	body {
		font-size: 14px;
		line-height: 1.6;
	}
	
	h1, h2, h3 {
		word-wrap: break-word;
		word-break: break-word;
	}
	
	p {
		word-wrap: break-word;
		word-break: break-word;
	}
}

/* Responsive spacing helpers */
.margin-sm { margin: 5px !important; }
.margin-md { margin: 10px !important; }
.margin-lg { margin: 15px !important; }

.padding-sm { padding: 5px !important; }
.padding-md { padding: 10px !important; }
.padding-lg { padding: 15px !important; }

@media only screen and (max-width: 768px) {
	.margin-lg {
		margin: 10px !important;
	}
	
	.padding-lg {
		padding: 10px !important;
	}
}

@media only screen and (max-width: 480px) {
	.margin-md,
	.margin-lg {
		margin: 5px !important;
	}
	
	.padding-md,
	.padding-lg {
		padding: 5px !important;
	}
}

/* Visible/Hidden utilities for responsive design */
.visible-xs { display: none; }
.visible-sm { display: none; }
.hidden-md { display: none; }

@media only screen and (max-width: 480px) {
	.visible-xs { display: block !important; }
	.visible-sm { display: block !important; }
	.hidden-xs { display: none !important; }
}

@media only screen and (max-width: 768px) and (min-width: 481px) {
	.visible-sm { display: block !important; }
	.hidden-sm { display: none !important; }
}

@media only screen and (min-width: 769px) {
	.visible-lg { display: block !important; }
	.hidden-lg { display: none !important; }
	.hidden-md { display: block !important; }
}

/* Ensure SVG icons are responsive */
svg {
	max-width: 100%;
	height: auto;
}

/* Prevent horizontal scrolling */
html, body {
	max-width: 100%;
	overflow-x: hidden;
}

/* Better text selection on mobile */
::selection {
	background-color: var(--main-color);
	color: var(--white-color);
}

::-moz-selection {
	background-color: var(--main-color);
	color: var(--white-color);
}

/* Smooth scrolling for better UX */
html {
	scroll-behavior: smooth;
}

/* Responsive font scaling */
@media only screen and (max-width: 1200px) {
	html {
		font-size: 15px;
	}
}

@media only screen and (max-width: 992px) {
	html {
		font-size: 14px;
	}
}

@media only screen and (max-width: 768px) {
	html {
		font-size: 13px;
	}
}

@media only screen and (max-width: 480px) {
	html {
		font-size: 12px;
	}
}

/* Enhanced responsive media queries for all screen sizes */

/* Extra Large Screens (1920px and up) */
@media only screen and (min-width: 1920px) {
	.auto-container {
		max-width: 1400px;
	}
}

/* Large Screens (1200px to 1919px) */
@media only screen and (min-width: 1200px) and (max-width: 1919px) {
	.auto-container {
		max-width: 1200px;
	}
}

/* Medium-Large Screens (992px to 1199px) */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
	.auto-container {
		max-width: 100%;
		max-width: calc(960px + 30px);
	}
}

/* Medium Screens / Tablets (768px to 991px) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
	
	.auto-container {
		max-width: 100%;
		padding: 0px 20px;
	}
	
	[class*="col-md-"] {
		width: 100%;
	}
	
	section {
		padding: 40px 0;
	}
	
	h1 { font-size: var(--font-44); }
	h2 { font-size: var(--font-36); }
	h3 { font-size: var(--font-28); }
	h4 { font-size: var(--font-22); }
}

/* Tablets Landscape / Small Desktop (640px to 767px) */
@media only screen and (min-width: 640px) and (max-width: 767px) {
	
	.auto-container {
		max-width: 100%;
		padding: 0px 15px;
	}
	
	section {
		padding: 30px 0;
	}
	
	h1 { font-size: var(--font-36); }
	h2 { font-size: var(--font-28); }
	h3 { font-size: var(--font-22); }
	h4 { font-size: var(--font-18); }
}

/* Tablets Portrait / Large Mobile (480px to 639px) */
@media only screen and (min-width: 480px) and (max-width: 639px) {
	
	.auto-container {
		max-width: 100%;
		padding: 0px 12px;
	}
	
	section {
		padding: 25px 0;
	}
	
	h1 { font-size: var(--font-28); }
	h2 { font-size: var(--font-22); }
	h3 { font-size: var(--font-18); }
	h4 { font-size: var(--font-16); }
}

/* Small Mobile Phones (up to 479px) */
@media only screen and (max-width: 479px) {
	
	.auto-container {
		max-width: 100%;
		padding: 0px 10px;
	}
	
	section {
		padding: 20px 0;
	}
	
	h1 { font-size: var(--font-22); }
	h2 { font-size: var(--font-18); }
	h3 { font-size: var(--font-16); }
	h4 { font-size: var(--font-14); }
	p { font-size: var(--font-13); }
}

/* Extra Small Phones (up to 360px) */
@media only screen and (max-width: 360px) {
	
	.auto-container {
		max-width: 100%;
		padding: 0px 8px;
	}
	
	h1 { font-size: var(--font-20); line-height: 1.3; }
	h2 { font-size: var(--font-16); line-height: 1.3; }
	h3 { font-size: var(--font-14); }
	h4 { font-size: var(--font-12); }
	p { font-size: 12px; }
}

/* Landscape Orientation Adjustments */
@media only screen and (orientation: landscape) {
	
	section {
		padding: 30px 0;
	}
	
	@media only screen and (max-height: 600px) {
		section {
			padding: 15px 0;
		}
	}
}
