/* Responsive layer for the Ghost theme (max-width: 1024px) */

#mobile-menu-toggle,
#mobile-nav {
	display: none;
}

.footer-phone {
	display: inline-block;
	margin-left: 18px;
	color: #fff;
	font-size: 14px;
	line-height: 40px;
	text-decoration: none;
	vertical-align: middle;
}

.footer-phone:hover,
.footer-phone:active {
	text-decoration: underline;
}

/* Search: full width of its container */
#searchformwrapper,
#searchform {
	width: 100% !important;
	box-sizing: border-box;
}

#searchform {
	display: flex;
	align-items: stretch;
}

#searchform .searchbox {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	float: none !important;
	box-sizing: border-box;
}

#searchform .searchbutton {
	flex: 0 0 40px;
	float: none !important;
}

@media (max-width: 1024px) {
	html,
	body {
		height: auto !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
	}

	#body-wrapper {
		height: auto !important;
		min-height: 100vh;
		overflow: visible !important;
	}

	/* ---------- Header / logo ---------- */
	#menu-container {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: 0 !important;
		z-index: 10001;
	}

	#mainmenuleft,
	#mainmenuright {
		display: none !important;
	}

	#logo {
		position: fixed !important;
		left: 50% !important;
		top: 10px !important;
		margin: 0 !important;
		transform: translateX(-50%);
		z-index: 10002;
	}

	#logo img {
		max-height: 52px;
		width: auto;
	}

	#demologo {
		width: 56px;
		height: 56px;
		background-size: contain;
	}

	/* ---------- Mobile menu button ---------- */
	#mobile-menu-toggle {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		position: fixed;
		top: 16px;
		right: 14px;
		width: 44px;
		height: 44px;
		padding: 10px;
		border: 0;
		border-radius: 50%;
		background: rgba(0, 0, 0, 0.6);
		z-index: 10005;
		cursor: pointer;
	}

	#mobile-menu-toggle span {
		display: block;
		width: 100%;
		height: 2px;
		border-radius: 2px;
		background: #fff;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	body.mobile-nav-open #mobile-menu-toggle span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	body.mobile-nav-open #mobile-menu-toggle span:nth-child(2) {
		opacity: 0;
	}

	body.mobile-nav-open #mobile-menu-toggle span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	body.mobile-nav-open #logo {
		opacity: 0;
	}

	/* ---------- Mobile menu panel ---------- */
	#mobile-nav {
		position: fixed;
		inset: 0;
		z-index: 10004;
		display: none;
		padding: 84px 20px 30px;
		overflow: auto;
		text-align: left;
		background: #050505;
	}

	body.mobile-nav-open #mobile-nav {
		display: block;
	}

	body.mobile-nav-open {
		overflow: hidden;
	}

	#mobile-nav ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	#mobile-nav li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	}

	#mobile-nav a {
		display: block;
		padding: 13px 4px;
		color: #fff;
		font-size: 18px;
		text-decoration: none;
	}

	#mobile-nav .mobile-nav-group h3 {
		margin: 18px 0 4px;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 1.5px;
		text-transform: uppercase;
		color: #8a8a8a;
	}

	#mobile-nav .mobile-nav-group:first-child h3 {
		margin-top: 0;
	}

	#mobile-nav .mobile-nav-contacts {
		display: flex;
		flex-direction: column;
		gap: 4px;
		margin-top: 22px;
		padding-top: 16px;
		border-top: 1px solid rgba(255, 255, 255, 0.25);
	}

	#mobile-nav .mobile-nav-contacts a {
		padding: 7px 4px;
		font-size: 16px;
		color: #fff;
	}

	#mobile-nav-close {
		display: none;
	}

	/* ---------- Background ---------- */
	#bgImage {
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
		z-index: 0;
	}

	#bgImageWrapper {
		position: absolute !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
	}

	#bgImageWrapper img {
		width: 100% !important;
		height: 100% !important;
		max-width: none !important;
		left: 0 !important;
		top: 0 !important;
		object-fit: cover;
	}

	#bgPattern {
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
		background-size: cover;
	}

	#bgText {
		left: 16px !important;
		right: 16px !important;
		bottom: 72px !important;
		text-align: left;
	}

	#bgText .headerText {
		font-size: 24px !important;
		line-height: 1.3 !important;
		height: auto !important;
	}

	#bgText .subText {
		font-size: 14px !important;
	}

	.h1_main,
	#bgImages,
	#thumbOpener,
	#videoExpander,
	#bottomleft,
	#footer,
	#fullControl,
	.prevBG,
	.nextBG,
	.fitCenterBG,
	.fullCenterBG {
		display: none !important;
	}

	/* Keep only the music button from the right-side controls. */
	#topRight {
		position: fixed !important;
		top: auto !important;
		bottom: 16px !important;
		right: 12px !important;
		z-index: 10003;
	}

	#topRight > *:not(.soundplaylist) {
		display: none !important;
	}

	.soundplaylist {
		display: block !important;
	}

	#playWrapper {
		position: fixed !important;
		top: auto !important;
		left: 12px !important;
		right: 12px !important;
		bottom: 64px !important;
		width: auto !important;
		max-height: 70vh;
		overflow: auto;
		display: none !important;
		opacity: 1 !important;
		z-index: 10006;
	}

	body.mobile-player-open #playWrapper {
		display: block !important;
	}

	#mobile-player-close {
		position: absolute;
		top: 4px;
		right: 8px;
		width: 36px;
		height: 36px;
		border: 0;
		background: transparent;
		color: #fff;
		font-size: 26px;
		line-height: 1;
		cursor: pointer;
	}

	#audioList ul {
		max-height: 34vh;
		overflow: auto;
	}

	/* ---------- Content ---------- */
	#content {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		width: auto !important;
		height: auto !important;
		margin: 84px 12px 70px !important;
		padding: 16px !important;
		overflow: visible !important;
		box-sizing: border-box;
	}

	#contentBox {
		width: auto !important;
		height: auto !important;
		overflow: visible !important;
	}

	#contentBoxContainer {
		position: relative !important;
		top: 0 !important;
	}

	#contentBoxScroll {
		display: none !important;
	}

	#content img,
	#contentBoxContainer img {
		max-width: 100% !important;
		height: auto !important;
	}

	#content table,
	#content tbody,
	#content tr,
	#content td {
		display: block;
		width: 100% !important;
		box-sizing: border-box;
	}

	#content td img {
		display: block;
		margin: 0 auto 12px;
	}

	#content h1,
	#content h2,
	#content h3,
	#content h1.caption {
		font-size: 22px !important;
		line-height: 1.3 !important;
	}

	#content .content-with-sidebar,
	#content .content-full-width,
	#content #left-col,
	#content .left-col-with-sidebar,
	#content .page-content,
	#content .sh_1of2,
	#content .sh_1of3,
	#content .sh_2of3,
	#content .sh_1of4,
	#content .sh_2of4,
	#content .sh_3of4,
	#content .sh_1of5,
	#content .sh_2of5,
	#content .sh_3of5,
	#content .sh_4of5 {
		float: none !important;
		width: 100% !important;
		margin: 0 !important;
	}

	/* Sidebar and testimonials stack below the content. */
	#right-col,
	aside#right-col {
		display: block !important;
		float: none !important;
		width: auto !important;
		margin: 20px 12px 70px !important;
	}

	#right-col > ul > li {
		width: 100% !important;
	}

	.galleryitems,
	.portfolioitems {
		width: auto !important;
	}

	.galleryitems li,
	.portfolioitem {
		float: none !important;
		width: 100% !important;
		margin: 0 0 14px !important;
	}

	#contentLoading {
		left: 20px !important;
		width: calc(100% - 40px) !important;
		box-sizing: border-box;
	}
}
