/*
** E-Tech Waste Solutions - site-specific overrides
** Loaded after main.css on every page. Keep template files (main.css) unchanged; put fixes here.
*/

/* ===== Mobile / tablet header (below 992px the menu collapses into the toggle button) ===== */
@media (max-width: 991px) {
	/* menu toggle always at the right edge, never on top of the logo */
	.page_header .toggle_menu {
		right: 0;
		left: auto;
		margin-left: 0;
	}

	/* keep the logo clear of the 60px toggle button */
	.page_header .header_left_logo {
		padding-right: 70px;
	}

	/* social icons compete with the toggle for space; hide them until desktop width */
	.page_header .header_right_buttons {
		display: none;
	}
}

@media (max-width: 767px) {
	/* the long company name must be allowed to wrap, otherwise the header grows wider than the screen.
	   The template gives the menu cell width:10000px so it swallows all free space; on phones the
	   menu lives in the toggle button, so hand that space to the logo instead. */
	.page_header .header_left_logo {
		white-space: normal;
		width: 100%;
		padding-left: 0;
	}

	.page_header .header_mainmenu {
		width: 0;
		padding: 0;
	}

	.page_header .header_left_logo a.logo {
		display: inline-flex;
		align-items: center;
		max-width: 100%;
		word-break: normal;
	}

	.page_header .header_left_logo .logo img {
		max-width: 44px;
		flex-shrink: 0;
	}

	.page_header .logo_text {
		margin-left: 10px;
		min-width: 0;
	}

	.page_header .logo_text .big {
		font-size: 21px;
		line-height: 1.15;
	}

	.page_header .logo_text .small-text {
		font-size: 11px;
	}

	/* less vertical padding so the header doesn't take a third of the screen */
	.page_header.section_padding_20 [class*="container"] {
		padding-top: 10px;
		padding-bottom: 10px;
	}
}

/* ===== Desktop header =====
   The social icons link nowhere yet ("#") and push Blog/FAQ/Contact into a "..." overflow menu.
   Remove this rule once the icons have real profile links (and check the menu still fits). */
.page_header .header_right_buttons {
	display: none;
}

/* small laptops / landscape tablets: tighten logo and menu so all 8 items fit without the "..." menu */
@media (min-width: 992px) and (max-width: 1199px) {
	.page_header .header_left_logo .logo img {
		max-width: 48px;
	}

	.page_header .logo_text .big {
		font-size: 22px;
	}

	.page_header .sf-menu > li > a {
		margin-left: 9px;
		margin-right: 9px;
	}
}

/* ===== Speed: no full-screen loading cover =====
   The template hid every page behind a spinner until everything (including the map) had loaded,
   which made the site feel slower and hurts Google's page-speed scores. */
.preloader {
	display: none !important;
}

/* ===== Page titles are <h1> (for search engines); keep the look the template gave the old <h2> ===== */
.page_breadcrumbs h1 {
	display: inline;
	font-size: 30px;
	word-wrap: break-word;
}

.page_breadcrumbs h1 + .breadcrumb {
	margin-top: 15px;
}

@media (min-width: 992px) {
	.page_breadcrumbs h1 {
		font-size: 40px;
	}
}

/* ===== Jump links (services.html#recycling, contact.html#find-us, events.html#host ...) =====
   the header sticks to the top of the screen; stop it from covering the heading of the section a link jumps to */
section[id] {
	scroll-margin-top: 110px;
}

@media (max-width: 991px) {
	section[id] {
		scroll-margin-top: 80px;
	}
}

/* ===== Footer ===== */
/* social icons without a real profile link ("#") are hidden everywhere; they appear automatically
   once their href is set to a real Facebook/Twitter/Google URL */
a.social-icon[href="#"] {
	display: none;
}

/* on phones the fixed "back to top" button (#toTop, 50px, bottom-right) sat on top of the
   copyright line; leave room for it below the text */
@media (max-width: 767px) {
	.page_copyright {
		padding-bottom: 70px !important;
	}
}

/* ===== Top strip above the header (welcome text + links | search) ===== */
@media (max-width: 767px) {
	/* on phones the two columns stack, so the half/half background no longer lines up */
	.page_topline.cs.two_color {
		background: #54be73;
	}

	/* show only the search bar on phones; welcome text and links are also in the menu/footer */
	.page_topline .row > [class*="col-"]:first-child {
		display: none;
	}
}

@media (max-width: 374px) {
	.page_header .logo_text .big {
		font-size: 18px;
	}
}
