/* Mobile fixes on top of the Inovado theme (loaded last, after the theme's responsive.css). */

/* Logo: full-size source shown at 280px (~1.8x density, crisp on retina) */
.header .logo .site-logo { display: block; width: 280px; max-width: 100%; height: auto; margin: 0 auto; }
#header-v5 .logo { margin-top: 26px; }

/* Images and embeds never wider than their column */
.entry img, .page-banner img, .iconbox img { max-width: 100%; height: auto; }
.entry iframe, .google_map iframe { max-width: 100%; }

/* Banner that replaced the Revolution Slider on Chi siamo / La Mission */
.page-banner { max-width: 960px; margin: 0 auto 20px; }
.page-banner img { display: block; width: 100%; }

/* Contact buttons on Contatti */
.contact-links a { display: inline-block; margin: 4px 0; word-break: break-word; }

@media only screen and (max-width: 767px) {
	/* Theme's top bar is a fixed 30px line; the phone + email text needs to wrap */
	#topbar, #topbar .callus { height: auto !important; }
	#topbar .callus { line-height: 1.5 !important; padding: 6px 10px !important; font-size: 12px; }

	/* Theme's columns stack at this width; give stacked boxes some breathing room */
	.one_third, .two_third, .one_half, .one_fourth, .three_fourth { margin-bottom: 24px; }
	.iconbox { margin-bottom: 0; }

	/* Readable type and tappable links */
	body { font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
	.entry p { word-wrap: break-word; }
	.contact-links a { font-size: 16px; padding: 6px 0; }

	/* Map: full width, a bit shorter */
	.google_map iframe { height: 240px; }

	/* Footer copyright line wraps instead of overflowing */
	#copyright .copyright-text { text-align: center; line-height: 1.5; height: auto; white-space: normal; }
	#topbar .social-icons, #copyright .social-icons { display: none; } /* empty in this site */

}

/* ---------- Mobile menu (hamburger, see nav.js) ---------- */
.nav-toggle { display: none; }

@media only screen and (max-width: 767px) {
	/* Header: logo left, menu button right */
	#header-v5 .header-v5-container { height: auto !important; }
	#header-v5 .header-v5-container > .sixteen.columns {
		display: flex; align-items: center; justify-content: space-between; gap: 16px;
	}
	html body #header-v5 .logo { margin: 14px 0 !important; text-align: left; }
	#header-v5 .logo { min-width: 0; }
	.header .logo .site-logo { width: 230px; margin: 0; }

	.nav-toggle {
		display: flex; flex-direction: column; justify-content: center; gap: 5px;
		width: 44px; height: 44px; padding: 10px; margin: 0;
		background: none; border: 0; border-radius: 6px; cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.nav-toggle:focus-visible { outline: 2px solid #289dcc; outline-offset: 2px; }
	.nav-toggle span {
		display: block; height: 2px; width: 100%; background: #444; border-radius: 2px;
		transition: transform .25s ease, opacity .2s ease;
	}
	/* Turns into an X when open */
	.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
	.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* The menu list itself: hidden until opened, then a full-width stacked list */
	#header-v5 #navigation { float: none; width: 100%; position: static !important; }
	#header-v5 #navigation .container, #header-v5 #navigation .sixteen.columns { width: 100%; margin: 0; padding: 0; }
	#header-v5 #navigation ul#nav {
		display: block !important; float: none; margin: 0; padding: 0;
		max-height: 0; overflow: hidden; transition: max-height .3s ease;
		border-top: 1px solid transparent;
	}
	#header-v5.nav-open #navigation ul#nav { max-height: 400px; border-top-color: #e5e5e5; }
	#header-v5 #navigation ul#nav > li { float: none; display: block; height: auto; margin: 0; border-bottom: 1px solid #eee; }
	#header-v5 #navigation ul#nav > li > a {
		display: block; height: auto; line-height: 1.4; padding: 14px 20px; margin: 0;
		font-size: 16px; color: #444; border: 0;
	}
	#header-v5 #navigation ul#nav > li.current-menu-item > a {
		color: #289dcc; box-shadow: inset 3px 0 0 #289dcc; background: #f5fafd;
	}
	#navigation .select-menu { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.nav-toggle span, #header-v5 #navigation ul#nav { transition: none; }
}
