/* ==========================================================================
   Veosat — capçalera i peu
   ========================================================================== */

:root {
	--vs-blue: #0057e6;
	--vs-text: #404040;
	--vs-black: #000;
	--vs-white: #fff;
	--vs-header-h: 80px;
	--vs-max: 1400px;
	--vs-gutter: 20px;
	--vs-font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--vs-font-title: 'Oswald', 'Arial Narrow', sans-serif;
	--vs-admin-bar: 0px;
}

.admin-bar { --vs-admin-bar: 32px; }
@media (max-width: 782px) {
	.admin-bar { --vs-admin-bar: 46px; }
}

body {
	padding-top: var(--vs-header-h);
	font-family: var(--vs-font-body);
	color: var(--vs-text);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.vs-header svg,
.vs-footer svg {
	display: block;
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Capçalera
   -------------------------------------------------------------------------- */

.vs-header {
	position: fixed;
	top: var(--vs-admin-bar);
	left: 0;
	right: 0;
	z-index: 999;
	height: var(--vs-header-h);
	background: var(--vs-blue);
	color: var(--vs-white);
	font-family: var(--vs-font-body);
}

.vs-header__inner {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	max-width: var(--vs-max);
	height: 100%;
	margin: 0 auto;
	padding: 0 var(--vs-gutter);
}

.vs-header a,
.vs-header button {
	color: inherit;
	text-decoration: none;
}

.vs-header button {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.vs-header :focus-visible {
	outline: 2px solid var(--vs-white);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Logo */
.vs-logo {
	grid-column: 2;
	display: flex;
	align-items: center;
}

.vs-logo img {
	display: block;
	width: auto;
	height: 42px;
	max-width: 210px;
}

.vs-logo__text {
	font-family: var(--vs-font-title);
	font-size: 32px;
	letter-spacing: .02em;
}

/* Menú principal (escriptori) */
.vs-nav {
	grid-column: 1;
	height: 100%;
}

.vs-nav__menu {
	display: flex;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-nav__menu > li {
	display: flex;
	align-items: center;
}

.vs-nav__menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 10px;
	font-size: 14px;
	line-height: 40px;
	white-space: nowrap;
}

.vs-nav__menu > li:first-child > a {
	padding-left: 0;
}

.vs-nav__caret svg {
	width: 10px;
	height: 7px;
	transition: transform .2s ease;
}

.vs-nav__menu > li:hover .vs-nav__caret svg,
.vs-nav__menu > li:focus-within .vs-nav__caret svg,
.vs-nav__menu > li.is-open .vs-nav__caret svg {
	transform: rotate(180deg);
}

/* Desplegable: panell blanc a tota l'amplada */
.vs-nav__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: var(--vs-gutter);
	right: var(--vs-gutter);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px 30px;
	margin: 0;
	padding: 20px;
	list-style: none;
	background: var(--vs-white);
	border-radius: 0 0 20px 20px;
	box-shadow: 0 12px 30px rgba(0, 38, 102, .15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.vs-nav__menu > li:hover > .sub-menu,
.vs-nav__menu > li:focus-within > .sub-menu,
.vs-nav__menu > li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.vs-nav__menu .sub-menu a {
	display: block;
	padding: 8px 0;
	font-size: 16px;
	line-height: 1.4;
	color: var(--vs-text);
}

.vs-nav__menu .sub-menu a:hover {
	color: var(--vs-blue);
}

.vs-nav__menu .sub-menu :focus-visible {
	outline-color: var(--vs-blue);
}

/* Primer element del desplegable (o amb la classe vs-menu-titol): títol */
.vs-nav__menu .sub-menu > li:first-child,
.vs-nav__menu .sub-menu > li.vs-menu-titol {
	grid-column: 1 / -1;
}

.vs-nav__menu .sub-menu > li:first-child > a,
.vs-nav__menu .sub-menu > li.vs-menu-titol > a {
	padding: 0 0 10px;
	font-size: 24px;
	font-weight: 700;
	line-height: 35px;
	color: var(--vs-blue);
}

/* Eines de la dreta */
.vs-tools {
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 28px;
}

.vs-account {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 16px;
	line-height: 1.2;
}

.vs-account svg {
	width: 18px;
	height: 18px;
}

/* Selector d'idioma */
.vs-lang {
	position: relative;
}

.vs-lang__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 16px;
}

.vs-lang__toggle svg {
	width: 10px;
	height: 7px;
}

.vs-lang__list {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 70px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: var(--vs-white);
	border-radius: 8px;
	box-shadow: 0 8px 20px rgba(0, 38, 102, .18);
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, visibility 0s linear .15s;
}

.vs-lang.is-open .vs-lang__list,
.vs-lang:focus-within .vs-lang__list {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.vs-lang__list a {
	display: block;
	padding: 6px 16px;
	color: var(--vs-blue) !important;
	font-weight: 700;
	text-align: center;
}

.vs-lang__list :focus-visible {
	outline-color: var(--vs-blue);
}

/* Elements només de mòbil */
.vs-back,
.vs-burger,
.vs-nav__tools {
	display: none;
}

/* --------------------------------------------------------------------------
   Capçalera — mòbil i tauleta
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {

	.vs-tools {
		display: none;
	}

	.vs-back {
		grid-column: 1;
		justify-self: start;
		display: inline-flex;
		align-items: center;
		gap: 8px;
		font-size: 13px;
		text-transform: uppercase;
	}

	.vs-back svg {
		width: 8px;
		height: 15px;
	}

	.vs-logo img {
		height: 34px;
	}

	.vs-burger {
		grid-column: 3;
		justify-self: end;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 28px;
		height: 20px;
	}

	.vs-burger__bar {
		display: block;
		height: 2px;
		background: currentColor;
		border-radius: 2px;
		transition: transform .2s ease, opacity .2s ease;
	}

	.vs-header.is-open .vs-burger__bar:nth-child(2) { transform: translateY(9px) rotate(45deg); }
	.vs-header.is-open .vs-burger__bar:nth-child(3) { opacity: 0; }
	.vs-header.is-open .vs-burger__bar:nth-child(4) { transform: translateY(-9px) rotate(-45deg); }

	/* Panell del menú */
	.vs-nav {
		position: fixed;
		top: calc(var(--vs-header-h) + var(--vs-admin-bar));
		left: 0;
		right: 0;
		bottom: 0;
		height: auto;
		padding: 10px var(--vs-gutter) 40px;
		overflow-y: auto;
		background: var(--vs-blue);
		visibility: hidden;
		opacity: 0;
		transition: opacity .2s ease, visibility 0s linear .2s;
	}

	.vs-header.is-open .vs-nav {
		visibility: visible;
		opacity: 1;
		transition-delay: 0s;
	}

	.vs-nav__menu {
		flex-direction: column;
		height: auto;
	}

	.vs-nav__menu > li {
		display: block;
		border-bottom: 1px solid rgba(255, 255, 255, .2);
	}

	.vs-nav__menu > li > a,
	.vs-nav__menu > li:first-child > a {
		display: flex;
		justify-content: space-between;
		width: 100%;
		padding: 14px 0;
		font-size: 18px;
		line-height: 1.3;
	}

	.vs-nav__menu .sub-menu {
		position: static;
		display: none;
		grid-template-columns: 1fr;
		padding: 0 0 14px;
		background: none;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

	/* A mòbil només obre amb clic (classe is-open) */
	.vs-nav__menu > li:hover > .sub-menu,
	.vs-nav__menu > li:focus-within > .sub-menu {
		display: none;
	}

	.vs-nav__menu > li.is-open > .sub-menu {
		display: grid;
	}

	.vs-nav__menu > li:hover .vs-nav__caret svg,
	.vs-nav__menu > li:focus-within .vs-nav__caret svg {
		transform: none;
	}

	.vs-nav__menu > li.is-open .vs-nav__caret svg {
		transform: rotate(180deg);
	}

	.vs-nav__menu .sub-menu a,
	.vs-nav__menu .sub-menu > li:first-child > a,
	.vs-nav__menu .sub-menu > li.vs-menu-titol > a {
		padding: 8px 0 8px 12px;
		font-size: 15px;
		font-weight: 400;
		line-height: 1.4;
		color: var(--vs-white);
	}

	.vs-nav__menu .sub-menu > li:first-child > a,
	.vs-nav__menu .sub-menu > li.vs-menu-titol > a {
		font-weight: 700;
	}

	.vs-nav__menu .sub-menu :focus-visible {
		outline-color: var(--vs-white);
	}

	.vs-nav__tools {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-top: 24px;
	}

	.vs-nav__tools .vs-lang__list {
		top: auto;
		bottom: calc(100% + 10px);
		right: auto;
		left: 0;
	}

	body.vs-menu-open {
		overflow: hidden;
	}
}

/* --------------------------------------------------------------------------
   Peu
   -------------------------------------------------------------------------- */

.vs-footer {
	padding: 50px 0;
	background: var(--vs-white);
	color: var(--vs-text);
	font-family: var(--vs-font-body);
}

.vs-footer__inner {
	display: flex;
	gap: 50px;
	max-width: var(--vs-max);
	margin: 0 auto;
	padding: 0 var(--vs-gutter);
}

.vs-footer__col {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 0;
}

.vs-footer a {
	color: inherit;
	text-decoration: none;
}

.vs-footer :focus-visible {
	outline: 2px solid var(--vs-blue);
	outline-offset: 3px;
	border-radius: 2px;
}

.vs-footer__logo img {
	display: block;
	width: 200px;
	max-width: 100%;
	height: auto;
}

.vs-footer__logo .vs-logo__text {
	font-family: var(--vs-font-title);
	font-size: 30px;
	color: var(--vs-blue);
}

.vs-footer__title {
	margin: 0 0 14px;
	font-family: var(--vs-font-title);
	font-size: 20px;
	font-weight: 700;
	line-height: 24px;
	text-transform: uppercase;
	color: var(--vs-black);
}

.vs-footer__text {
	margin: 20px 0 0;
	font-size: 13px;
	line-height: 1.5;
}

.vs-footer__office .vs-footer__text {
	margin-top: 0;
}

.vs-footer__big {
	font-size: 28px;
	font-weight: 200;
	line-height: 42px;
	color: var(--vs-black);
	overflow-wrap: anywhere;
}

.vs-footer__big:hover,
.vs-footer__menu a:hover {
	color: var(--vs-blue);
}

.vs-social {
	display: flex;
	gap: 12px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.vs-social a {
	display: grid;
	place-items: center;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: var(--vs-black);
	color: var(--vs-white);
	transition: background-color .15s ease;
}

.vs-social a:hover {
	background: var(--vs-blue);
}

.vs-social svg {
	width: 13px;
	height: 13px;
}

.vs-footer__social-mobile {
	display: none;
}

.vs-footer__copy {
	margin: 24px 0 0;
	font-size: 13px;
	line-height: 1.5;
}

.vs-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-footer__menu a {
	display: inline-block;
	font-size: 13px;
	line-height: 19.5px;
	color: var(--vs-black);
}

@media (max-width: 1024px) {
	.vs-footer__inner {
		flex-wrap: wrap;
		gap: 40px;
	}

	.vs-footer__col {
		flex: 1 1 calc(50% - 20px);
	}
}

@media (max-width: 767px) {
	.vs-footer__inner {
		flex-direction: column;
		gap: 32px;
	}

	.vs-footer__social-mobile {
		display: block;
	}

	.vs-footer__social-desktop {
		display: none;
	}

	.vs-footer__big {
		font-size: 24px;
		line-height: 36px;
	}
}

/* --------------------------------------------------------------------------
   Moviment reduït
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.vs-header *,
	.vs-footer * {
		transition: none !important;
	}
}
