/* Small-screen layout; desktop rules remain unchanged. */
@media screen and (max-width: 800px) {
	body {
		background-position: center top;
		background-size: auto 100vh;
	}

	#supcontainer {
		width: 100%;
		height: 12px;
	}

	#container,
	#container_bio {
		box-sizing: border-box;
		width: 100%;
		max-width: 800px;
		height: auto;
		min-height: 700px;
		margin: 0 auto;
		background-size: 100% 100%;
		overflow: hidden;
		display: flex;
		flex-direction: column;
	}

	#container #top,
	#container_bio #top {
		box-sizing: border-box;
		float: none;
		width: 100%;
		height: auto;
		min-height: 115px;
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		flex-wrap: wrap;
	}

	#container_bio #top #image_left {
		float: none;
		width: auto;
		height: auto;
	}

	#image_left img {
		display: block;
		width: min(300px, 55vw);
		max-width: 100%;
		height: auto;
	}

	#container #centre,
	#container_bio #centre {
		box-sizing: border-box;
		float: none;
		width: 100%;
		height: auto;
		padding: 0;
	}

	#container #slider11,
	#container #slider11 ul,
	#container #slider11 ul li {
		box-sizing: border-box;
		width: 100vw;
		height: auto;
	}

	#container #slider11 img {
		display: block;
		width: 100%;
		max-width: 100%;
		height: auto;
	}

	#container #bottom {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		float: none;
		display: grid;
		grid-template-columns: minmax(0, 38%) minmax(0, 62%);
		align-items: start;
	}

	#container #bottom_left,
	#container #bottom_right {
		box-sizing: border-box;
		float: none;
		width: 100%;
		height: auto;
		margin-top: 16px;
	}

	#container #bottom_left {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	#container #bottom_left > a {
		display: block;
		width: 100%;
	}

	#container #bottom_left #bt1,
	#container #bottom_left #bt_inici,
	#container #bottom_left #bt4 {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		aspect-ratio: 5 / 1;
		background-size: 100% 100%;
		background-position: center;
	}

	#container #bottom_left #bt2,
	#container #bottom_left #bt_galeria {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		aspect-ratio: 30 / 11;
		background-size: 100% 100%;
		background-position: center;
	}

	#container #bottom_left #bt3,
	#container #bottom_left #bt_bio,
	#container #bottom_left #bt_contacte {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		aspect-ratio: 60 / 19;
		background-size: 100% 100%;
		background-position: center;
	}

	#container #bottom_right #contingut_text {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		margin: 0;
		padding: 0 8px;
	}

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

	#container_bio #titol_bio {
		box-sizing: border-box;
		float: none;
		width: auto;
		height: auto;
		padding: 12px 16px 0;
		font-size: clamp(20px, 5vw, 25px);
	}

	#container_bio #text_bio {
		box-sizing: border-box;
		float: none;
		width: auto;
		height: auto;
		max-height: none;
		margin: 0;
		padding: 0 16px 20px;
		overflow: visible;
		font-size: 14px;
	}

	#container_bio #text_contacte {
		box-sizing: border-box;
		float: none;
		width: auto;
		height: auto;
		padding: 32px 20px 20px;
		text-align: right;
	}

	#container_bio #bottom {
		box-sizing: border-box;
		float: none;
		width: 100%;
		height: auto;
	}

	#container_bio #bottom_left {
		box-sizing: border-box;
		float: none;
		width: 100%;
		height: auto;
		margin: 0;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}

	#container_bio #bottom_left > a {
		display: block;
		width: 100%;
	}

	#container_bio #bottom_left #bt1,
	#container_bio #bottom_left #bt_inici,
	#container_bio #bottom_left #bt4 {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		aspect-ratio: 5 / 1;
		background-size: 100% 100%;
		background-position: center;
	}

	#container_bio #bottom_left #bt2,
	#container_bio #bottom_left #bt_galeria {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		aspect-ratio: 30 / 11;
		background-size: 100% 100%;
		background-position: center;
	}

	#container_bio #bottom_left #bt3,
	#container_bio #bottom_left #bt_bio,
	#container_bio #bottom_left #bt_contacte {
		box-sizing: border-box;
		width: 100%;
		height: auto;
		aspect-ratio: 60 / 19;
		background-size: 100% 100%;
		background-position: center;
	}

	#container_bio #centre #gallery {
		box-sizing: border-box;
		float: none;
		width: 100%;
		height: auto;
		padding: 10px;
	}

	#container_bio #centre #gallery ul {
		margin: 0;
		padding: 0;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
		gap: 8px;
	}

	#container_bio #centre #gallery ul li {
		display: block;
	}

	#container_bio #centre #gallery ul img {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		height: auto;
	}

	#footer {
		box-sizing: border-box;
		width: 100%;
		max-width: 780px;
		height: auto;
		margin: 10px auto 0;
		padding: 8px 12px;
		font-size: 10px;
	}

	#jquery-lightbox {
		width: 100vw;
		left: 0 !important;
	}

	#lightbox-container-image-box {
		max-width: calc(100vw - 20px);
	}

	#lightbox-image {
		max-width: calc(100vw - 40px);
		height: auto;
	}
}
