/* Siena by Vespa - template stylesheet */

@font-face {
	font-family: "Bebas Neue";
	src: url("../fonts/bebas-neue-latin-400-normal.woff2") format("woff2"),
	     url("../fonts/bebas-neue-latin-400-normal.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	--sbv-red: #c00a1d;
	--sbv-red-dark: #9a0817;
	--sbv-dark: #232325;
	--sbv-darker: #171717;
	--sbv-light: #f4f4f2;
	--sbv-text: #333;
	--sbv-muted: #6b6b6b;
	--sbv-white: #fff;
	--sbv-max: 1100px;
	--sbv-logo-w: 240px;
	--sbv-head: "Bebas Neue", "Oswald", "Arial Narrow", Arial, sans-serif;
	--sbv-body: "Trebuchet MS", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sbv-bg: url("../images/tuscany_bg.jpg");
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--sbv-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--sbv-text);
	background: #6f8f3a var(--sbv-bg) center top / cover no-repeat fixed;
}

img { max-width: 100%; height: auto; }

a { color: var(--sbv-red); }
a:hover, a:focus { color: var(--sbv-red-dark); }

:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }

.sbv-skip {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--sbv-white); color: var(--sbv-dark); padding: .5rem 1rem;
}
.sbv-skip:focus { left: 1rem; }

h1, h2, h3, h4, .sbv-modtitle, .page-header h1, .page-header h2 {
	font-family: var(--sbv-head);
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1.1;
	color: var(--sbv-dark);
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

/* ---------- Page frame ---------- */
.sbv-page {
	max-width: var(--sbv-max);
	margin: 0 auto 2rem;
	background: var(--sbv-white);
	box-shadow: 0 0 30px rgba(0, 0, 0, .35);
}

/* ---------- Top bar ---------- */
.sbv-topbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: .25rem 1.5rem;
	min-height: 38px;
	padding: .25rem 1rem;
	background: var(--sbv-darker);
	color: #bbb;
	font-size: .85rem;
}
.sbv-topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.sbv-topbar a { color: #ccc; text-decoration: none; }
.sbv-topbar a:hover, .sbv-topbar a:focus, .sbv-topbar .current > a, .sbv-topbar .active > a { color: var(--sbv-white); }
.sbv-topbar .mod-languages ul { gap: .5rem; }
.sbv-topbar .mod-languages a { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .35rem; border-radius: 3px; }
.sbv-topbar .mod-languages .lang-active a { background: var(--sbv-red); color: var(--sbv-white); }
.sbv-topbar .mod-languages img { display: block; width: 18px; height: auto; }

/* ---------- Header: logo column + menubar + hero ---------- */
.sbv-header {
	display: grid;
	grid-template-columns: var(--sbv-logo-w) 1fr;
	background: var(--sbv-red);
}
.sbv-logo { display: block; background: var(--sbv-red); line-height: 0; }
.sbv-logo img { display: block; width: 240px; height: auto; }
.sbv-headmain { min-width: 0; display: flex; flex-direction: column; background: var(--sbv-dark); }

.sbv-menubar {
	position: relative;
	background: linear-gradient(#2c2c2e, var(--sbv-darker));
	border-bottom: 1px solid #000;
}
.sbv-menutoggle { display: none; }

.sbv-mainmenu ul { list-style: none; margin: 0; padding: 0; }
.sbv-mainmenu > ul,
.sbv-mainmenu .mod-menu { display: flex; flex-wrap: wrap; }
.sbv-mainmenu li { position: relative; }
.sbv-mainmenu a, .sbv-mainmenu .mod-menu__heading, .sbv-mainmenu .mod-menu__separator {
	display: block;
	padding: 1.2rem .85rem;
	font-family: var(--sbv-head);
	font-size: 1.05rem;
	letter-spacing: .02em;
	line-height: 1;
	color: #e6e6e6;
	text-decoration: none;
	white-space: nowrap;
}
.sbv-mainmenu a:hover, .sbv-mainmenu a:focus,
.sbv-mainmenu li.current > a, .sbv-mainmenu li.active > a {
	color: var(--sbv-white);
	background: var(--sbv-red);
}
/* dropdown (Termini di noleggio under Tariffe) */
.sbv-mainmenu .mod-menu__sub {
	position: absolute;
	left: 0; top: 100%;
	z-index: 20;
	min-width: 220px;
	background: var(--sbv-darker);
	box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
	display: none;
}
.sbv-mainmenu li:hover > .mod-menu__sub,
.sbv-mainmenu li:focus-within > .mod-menu__sub { display: block; }
.sbv-mainmenu .mod-menu__sub a { font-size: 1rem; padding: .8rem 1rem; }

.sbv-hero { flex: 1; line-height: 0; background: var(--sbv-dark); }

/* slideshow */
.sbv-slideshow { position: relative; overflow: hidden; aspect-ratio: 748 / 300; background: var(--sbv-dark); }
.sbv-slideshow img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1s ease;
}
.sbv-slideshow img:first-child { opacity: 1; }
.sbv-slideshow.sbv-js img { opacity: 0; }
.sbv-slideshow.sbv-js img.is-active { opacity: 1; }

/* ---------- Teasers (Corona style: light / dark / red) ---------- */
.sbv-teasers { display: grid; grid-template-columns: repeat(3, 1fr); }
.sbv-teasers .sbv-module { padding: 1.4rem 1.5rem 1.6rem; background: var(--sbv-light); }
.sbv-teasers .sbv-module:nth-child(2) { background: var(--sbv-dark); color: #c9c9c9; }
.sbv-teasers .sbv-module:nth-child(3) { background: var(--sbv-red); color: #fbe9ea; }
.sbv-teasers .sbv-module:nth-child(2) .sbv-t1,
.sbv-teasers .sbv-module:nth-child(3) .sbv-t1 { color: var(--sbv-white); }
.sbv-teasers .sbv-module:nth-child(3) .sbv-t2 { color: var(--sbv-darker); }
.sbv-teasers .sbv-module p { margin: 0 0 .9rem; }

.sbv-modtitle { margin: 0 0 .6rem; font-size: 1.85rem; }
.sbv-t1 { color: var(--sbv-dark); }
.sbv-t2 { color: var(--sbv-red); }

/* Readmore buttons from the old content */
a.readmore, .sbv-button {
	display: inline-block;
	padding: .35rem .9rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: linear-gradient(#fff, #e9e9e9);
	color: #444;
	font-size: .78rem;
	font-weight: bold;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none;
}
a.readmore:hover, a.readmore:focus, .sbv-button:hover, .sbv-button:focus { background: var(--sbv-white); color: var(--sbv-red); border-color: #aaa; }

/* ---------- Main ---------- */
.sbv-body { display: grid; grid-template-columns: minmax(0, 1fr); }
.sbv-body.has-sidebar { grid-template-columns: minmax(0, 1fr) 260px; }
.sbv-main { padding: 1.5rem 2rem 2.5rem; min-width: 0; outline: none; }
.sbv-sidebar { padding: 1.5rem; border-left: 1px solid #e5e5e5; }

.sbv-main .mod-breadcrumbs, .sbv-main .breadcrumb {
	display: flex; flex-wrap: wrap; gap: .25rem;
	list-style: none; margin: 0 0 1rem; padding: 0;
	font-size: .85rem; color: var(--sbv-muted);
}
.sbv-main .mod-breadcrumbs__divider, .sbv-main .breadcrumb-item + .breadcrumb-item::before { content: "›"; padding: 0 .35rem; color: #aaa; }
.sbv-main .mod-breadcrumbs a { color: var(--sbv-muted); }
.sbv-main .mod-breadcrumbs .visually-hidden, .visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.com-content-article .page-header h1,
.com-content-article .page-header h2,
.item-page .page-header h2 { font-size: 2.4rem; margin: 0 0 1rem; color: var(--sbv-dark); }
.item-page h3 { margin: 1.4rem 0 .6rem; }
.item-page p { margin: 0 0 1rem; }
.item-page::after { content: ""; display: block; clear: both; }

/* old content: floated images */
.item-page img[style*="float: left"] { max-width: 45%; }
.item-page img[style*="float: right"] { max-width: 45%; }

/* old "iconbox" (2x2 photo blocks) */
.iconbox {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	padding: 16px;
	margin: 1rem 0;
	border: 1px solid #e5e5e5;
	background: #fafbfb;
	overflow: hidden;
}
.iconbox br { display: none; }
.iconbox > img { width: 100%; height: auto; border-radius: 3px; }
.iconbox.sbv-history { display: block; }
.iconbox.sbv-history br { display: initial; }

/* tables (tariffe) */
.item-page table { border-collapse: collapse; width: 100%; max-width: 100%; margin: 1rem 0; }
.item-page table td, .item-page table th { border: 1px solid #ddd; padding: .5rem .6rem; }
.sbv-tablewrap { overflow-x: auto; }

/* Gallery */
.sbv-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 10px;
	margin: 1rem 0;
}
.sbv-gallery a { display: block; overflow: hidden; border-radius: 6px; line-height: 0; background: #eee; }
.sbv-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.sbv-gallery a:hover img, .sbv-gallery a:focus img { transform: scale(1.06); }

/* Lightbox */
.sbv-lightbox {
	position: fixed; inset: 0; z-index: 1000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .88);
}
.sbv-lightbox[hidden] { display: none; }
.sbv-lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.sbv-lightbox img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; box-shadow: 0 0 30px #000; }
.sbv-lightbox figcaption { color: #ddd; font-size: .9rem; margin-top: .5rem; }
.sbv-lightbox button {
	position: absolute;
	border: 0; border-radius: 50%;
	width: 48px; height: 48px;
	background: rgba(255, 255, 255, .15);
	color: #fff; font-size: 28px; line-height: 48px;
	cursor: pointer;
}
.sbv-lightbox button:hover, .sbv-lightbox button:focus { background: var(--sbv-red); }
.sbv-lb-close { top: 16px; right: 16px; }
.sbv-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.sbv-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Map */
.sbv-map { position: relative; width: 100%; aspect-ratio: 3 / 2; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; margin: 1rem 0 .5rem; }
.sbv-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Bottom (dark) ---------- */
.sbv-bottom {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	background: linear-gradient(#2a2a2c, var(--sbv-darker));
	color: #bdbdbd;
}
.sbv-bottom .sbv-module { padding: 1.5rem 1.6rem 1.8rem; border-left: 1px solid #333; }
.sbv-bottom .sbv-module:first-child { border-left: 0; }
.sbv-bottom .sbv-t1 { color: var(--sbv-white); }
.sbv-bottom .sbv-t2 { color: #ff3b4b; }
.sbv-bottom a:not(.readmore) { color: var(--sbv-white); }
.sbv-bottom p { margin: 0 0 .8rem; }

.sbv-bottomblock { padding: 1.25rem 1rem; background: var(--sbv-light); text-align: center; }
.sbv-bottomblock p { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sbv-bottomblock img { display: block; max-width: 100%; height: auto; }

.sbv-footer {
	padding: 1.25rem 1rem;
	background: var(--sbv-darker);
	color: #999;
	font-size: .8rem;
	text-align: center;
}
.sbv-footer p { margin: .2rem 0; }
.sbv-footer a { color: #ccc; }

/* ---------- Error page ---------- */
.sbv-errorpage { display: flex; gap: 2rem; align-items: center; padding: 2rem; margin-top: 3rem; }
.sbv-errorlogo img { display: block; background: var(--sbv-red); }
.sbv-errorcode { font-family: var(--sbv-head); font-size: 5rem; line-height: 1; color: var(--sbv-red); margin: 0; }

/* Joomla system messages */
#system-message-container joomla-alert, .alert { display: block; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 4px; background: #fff4d6; border: 1px solid #f0d68a; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	:root { --sbv-logo-w: 190px; }
	.sbv-logo img { width: 190px; }
	.sbv-mainmenu a { font-size: .95rem; padding: 1.2rem .6rem; }
}

@media (max-width: 820px) {
	body { background-attachment: scroll; }
	.sbv-page { margin-bottom: 0; }
	.sbv-topbar { justify-content: space-between; }
	.sbv-header { grid-template-columns: 1fr; position: relative; }
	.sbv-logo { display: flex; justify-content: flex-start; height: 96px; overflow: hidden; padding-left: .75rem; }
	.sbv-logo img { width: 68px; height: 96px; object-fit: cover; object-position: top; }
	.sbv-menubar { position: static; }
	.sbv-menutoggle {
		display: inline-flex; align-items: center; gap: .55rem;
		position: absolute; right: .75rem; top: 24px;
		padding: .6rem .85rem;
		border: 2px solid rgba(255, 255, 255, .75); border-radius: 4px;
		background: transparent; color: var(--sbv-white);
		font-family: var(--sbv-head); font-size: 1.3rem; letter-spacing: .06em; line-height: 1;
		cursor: pointer;
	}
	.sbv-burger, .sbv-burger::before, .sbv-burger::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
	.sbv-burger::before, .sbv-burger::after { content: ""; position: absolute; left: 0; }
	.sbv-burger::before { top: -6px; }
	.sbv-burger::after { top: 6px; }
	.sbv-mainmenu { display: none; }
	.sbv-menubar.is-open .sbv-mainmenu { display: block; }
	.sbv-menubar:not(.is-open) { border-bottom: 0; }
	.sbv-mainmenu > ul, .sbv-mainmenu .mod-menu { flex-direction: column; }
	.sbv-mainmenu a { padding: .95rem 1.1rem; border-top: 1px solid #333; font-size: 1.1rem; }
	.sbv-mainmenu .mod-menu__sub { position: static; display: block; box-shadow: none; background: #1f1f1f; }
	.sbv-mainmenu .mod-menu__sub a { padding-left: 2.2rem; }
	.sbv-teasers, .sbv-bottom { grid-template-columns: 1fr; }
	.sbv-bottom .sbv-module { border-left: 0; border-top: 1px solid #333; }
	.sbv-bottom .sbv-module:first-child { border-top: 0; }
	.sbv-body.has-sidebar { grid-template-columns: 1fr; }
	.sbv-main { padding: 1.25rem 1.1rem 2rem; }
	h1, .com-content-article .page-header h1, .item-page .page-header h2 { font-size: 2.1rem; }
	.item-page img[style*="float"] { float: none !important; display: block; max-width: 100%; margin: 0 0 1rem !important; }
	.sbv-errorpage { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
	.iconbox { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.sbv-slideshow img, .sbv-gallery img { transition: none; }
}

@media print {
	body { background: none; }
	.sbv-topbar, .sbv-menubar, .sbv-hero, .sbv-teasers, .sbv-bottom, .sbv-bottomblock { display: none; }
	.sbv-page { box-shadow: none; }
}

@media (max-width: 820px) {
	.item-page [style*="justify"] { text-align: left !important; }
	.sbv-topbar { gap: .25rem .75rem; padding: .3rem .75rem; }
	.sbv-topbar .mod-languages ul { gap: .2rem; }
}

/* fixes */
.iconbox.sbv-history > img { width: auto; max-width: 45%; }
.sbv-main nav .mod-breadcrumbs, .sbv-main ol.breadcrumb { padding: 0 !important; }
.item-page table { border: 1px solid #ddd !important; }
.sbv-teasers--after { border-top: 1px solid #e5e5e5; }
.sbv-mainmenu .mod-menu__toggle-sub { display: none; }