/* Tipografía Global */
@font-face {
	font-family: 'Buixots';
	src: url('../assets/fonts/Buixots.woff2') format('woff2'),url('../assets/fonts/Buixots.woff') format('woff');
	font-weight: normal;
	font-style: normal;
}
body {
	margin: 0;
	overflow-x: hidden;
	/* Oculta cualquier desbordamiento horizontal global */
	font-family: 'Buixots', sans-serif;
	background-color: #fff782;
	/* Fondo claro */
	color: black;
	font-size: 1.75em;
	text-transform:uppercase;
}
img {
	cursor: pointer;
	/* Cursor de mano */
}
#gameCanvas {
	width: 100vw;
	/* 100% del ancho del viewport */
	height: 100vh;
	/* 100% de la altura del viewport */
	position: relative;
	/* Para posicionamiento absoluto de los elementos hijos */
	overflow: hidden;
	/* Asegura que nada salga del canvas */
	background-color: #F0F8FF;
	/* Fondo opcional para visualización */
	user-select: none;
	/* Desactiva la selección */
	pointer-events: auto;
	/* Permite los eventos de clic */
}
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	background-color: #f8f9fa;
	position: sticky;
	top: 0;
	z-index: 1000;
}
#languageSelector {
	font-size: 1rem;
}
/* ========================= */
/* Slider Homepage */
/* ========================= */
#worldSliderContainer {
	position: relative;
	overflow: hidden;
	/* Oculta cualquier contenido que sobresalga */
	width: 100%;
	height: 100vh;
	/* Altura completa de la ventana */
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #f0f8ff;
	/* Fondo claro para pruebas */
}
/* Contenedor de Slides */
#worldSlider {
	display: flex;
	/* Alinea los slides en fila horizontal */
	transition: transform 0.5s ease-in-out;
	/* Transición suave entre slides */
	width: 100%;
	/* Asegura que ocupa todo el ancho */
}
.world-image {
	width: auto;
	/* Keep the real size */
	max-width: 100%;
	/* Prevent overflow */
	max-height: 350px;
	/* Limit height */
	display: block;
	margin: 0 auto 10px;
	/* Center the image */
}
/* 📱 Responsive: Make it smaller only on mobile */
@media (max-width: 768px) {
	.world-image {
		max-width: 80%;
		/* Shrink a bit */
		max-height: 150px;
		/* Limit height on mobile */
	}
}
/* Slides individuales */
.world-slide {
	flex: 0 0 100%;
	/* Cada slide ocupa el 100% del ancho */
	display: flex;
	/* Alinea los elementos dentro del slide */
	justify-content: space-between;
	/* Espacia las columnas */
	align-items: center;
	/* Centra verticalmente */
	padding: 20px;
	box-sizing: border-box;
	/* Incluye padding en el tamaño */
	padding-bottom: 80px;
}
/* Diseño de columnas para pantallas grandes */
/* Diseño de columnas para pantallas grandes */
.world-left {
	flex: 0 0 40%;
	/* Ocupa el 40% */
	padding: 10px;
	text-align: center;
}
/* ✅ Add left padding/margin only for large screens */
@media (min-width: 1024px) {
	.world-left {
		padding-left: 40px;
		/* Adjust as needed */
		margin-left: 50px;
		/* Optional: Add margin */
	}
}
@media (max-width: 1280px) {
    .world-left {
        display:none;
		}
}
.world-right {
	display: flex;
	flex-wrap: wrap;
	/* Permitir que las misiones se envuelvan */
	gap: 10px;
	/* Espacio entre los botones */
	justify-content: flex-start;
	/* Alinear las misiones a la izquierda */
	align-items: flex-start;
	/* Alinear las misiones verticalmente */
	width: 100%;
	/* Asegurar que ocupe todo el ancho disponible */
	padding: 10px;
	/* Agregar espacio interno */
	box-sizing: border-box;
	/* Incluye padding en el tamaño total */
}


/* Responsive: columnas en una sola fila */
@media (max-width: 768px) {
	.world-slide {
		flex-direction: column;
		/* Apila las columnas verticalmente */
	}
	.world-left {
		width: 100%;
		/* Ocupa todo el ancho */
		text-align: center;
		margin-bottom: 20px;
	}
	.world-right {
		width: 100%;
		/* Ocupa todo el ancho */
		justify-content: center;
		/* Centra las misiones */
	}
}
.nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: transparent;
	width: 70px;
	height: 70px;
	cursor: pointer;
	transition: transform 0.15s ease-out, filter 0.15s ease-out;
	/* Faster transition */
	z-index: 10;
	/* Ensures it's above content */
}
/* Faster & Smooth Hover Effect */
.nav-arrow:hover {
	transform: translateY(-50%) scale(1.2);
	/* Enlarges smoothly */
	filter: brightness(1.3);
	/* Slightly increases brightness */
}
/* Responsive Adjustments */
@media (max-width: 768px) {
	.nav-arrow {
		width: 55px;
		height: 55px;
	}
	.nav-arrow:hover {
		transform: translateY(-50%) scale(1.1);
		/* Slight scale effect */
	}
}
/* Flecha izquierda */
#prevWorld {
	left: 20px;
	/* Margen desde el borde izquierdo */
	background-image: url('../assets/arrow-left.svg');
	/* Ruta al SVG */
}
/* Flecha derecha */
#nextWorld {
	right: 20px;
	/* Margen desde el borde derecho */
	background-image: url('../assets/arrow-right.svg');
	/* Ruta al SVG */
}
#prevWorld {
	left: 20px;
	background-image: url('../assets/arrow-left.svg');
	/* Icono SVG */
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
#nextWorld {
	right: 20px;
	background-image: url('../assets/arrow-right.svg');
	/* Icono SVG */
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
	.nav-arrow {
		width: 50px;
		height: 50px;
	}
	#prevWorld {
		left: 10px;
	}
	#nextWorld {
		right: 10px;
	}
}
@media (max-width: 480px) {
	.nav-arrow {
		width: 40px;
		height: 40px;
	}
	#prevWorld {
		left: 5px;
	}
	#nextWorld {
		right: 5px;
	}
}
/* Estilo Global de Botones */
button {
	display: inline-block;
	padding: 9px 8vh;
	font-size: 36px;
	text-align: center;
	text-decoration: none;
	border: none;
	cursor: pointer;
	border-radius: 5px;
	color: black;
	background-color: white;
	text-transform: uppercase;
	font-family: 'Buixots', sans-serif;
	box-shadow: 2px 3px #000;
	border: 2px solid black;
	margin: 6px 0;
	line-height: 40px;
	transition: transform 0.2s ease, background-color 0.3s ease;
}
button:hover {
	color: white;
	transform: scale(1.1);
	background-color: black;
	/* Cambia a negro al pasar el cursor */
}
/* ========================= */
/* Base Styles for Missions */
/* ========================= */
/* Mission Container - Holds button and overlays */
.mission-container {
	position: relative;
	/* Allows child elements to be positioned relative to the container */
	width: 120px;
	/* Fixed width */
	height: 130px;
	/* Includes space for overlays like lock icon */
	margin: 10px;
	/* Spacing between containers */
	display: inline-block;
	/* Aligns containers horizontally by default */
}
/* Mission Row Layout */
.world-right {
	display: flex;
	flex-wrap: wrap;
	/* Allows wrapping to the next row */
	gap: 10px;
	/* Adds space between mission buttons */
	justify-content: space-around;
	/* Even spacing between rows and alignment */
}
/* ========================= */
/* Mission Box Styles */
/* ========================= */
/* Default Mission Button */
.mission-box {
	position: relative;
	/* Context for tooltips */
	z-index: 0;
	/* Ensure mission-box doesn't interfere with tooltip */
	width: 120px;
	height: 116px;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	cursor: pointer;
	transition: transform 0.2s ease, filter 0.3s ease;
}
/* Tooltip text */
.mission-box .tooltip {
	font-family: 'Buixots', sans-serif;
	visibility: hidden;
	background-color: rgba(255, 255, 255, 0.85);
	color: #333;
	text-align: center;
	padding: 5px 10px;
	border-radius: 5px;
	border: 2px solid black;
	box-shadow: 2px 3px #000;
	position: absolute;
	top: 110%;
	/* Position tooltip below the mission box */
	left: 50%;
	transform: translateX(-50%);
	z-index: 1001;
	/* Higher than mission-box */
	white-space: nowrap;
	font-size: 22px;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	text-transform:none;
}

@media (max-width: 768px) {
    .tooltip {
        display: none !important;
    }
}

/* Show tooltip on hover */
.mission-box.unlocked:hover .tooltip {
	visibility: visible;
	opacity: 1;
}
/* Hover Effect */
.mission-box:hover {
	transform: scale(1.1);
	/* Slight enlargement on hover */
	z-index: 2;
	/* Brightens the button */
}
/* Mission Button Types - Background Images */
.mission-box.simple {
	background-image: url('../assets/mission-button.svg');
}
.mission-box.destruction {
	background-image: url('../assets/mission-button-red.svg');
}
.mission-box.list {
	background-image: url('../assets/mission-button-green.svg');
}
/* ========================= */
/* Lock Icon Styles */
/* ========================= */
/* Lock Icon Overlay */
.lock-overlay {
	position: absolute;
	top: 59px;
	/* Position vertically within the mission button */
	right: -5px;
	/* Slight offset horizontally */
	width: 46px;
	/* Fixed width for the lock icon */
	height: 60px;
	/* Fixed height for the lock icon */
	background-image: url('../assets/lock-icon.svg');
	/* Path to the lock icon */
	background-size: contain;
	/* Keeps the aspect ratio */
	background-repeat: no-repeat;
	/* Prevents repetition */
	z-index: 10;
	/* Ensures it appears above the mission button */
	pointer-events: none;
	/* Prevents interaction */
}
/* Show lock icon for locked buttons */
.mission-box.locked .lock-overlay {
	display: block;
}
/* Hide lock overlay for unlocked buttons */
.mission-box:not(.locked) .lock-overlay {
	display: none;
}
/* ========================= */
/* Mission Number Styles */
/* ========================= */
/* Mission Number Display */
.mission-number {
	position: absolute;
	top: 2%;
	/* Center vertically */
	left: 41%;
	/* Slight adjustment for horizontal centering */
	transform: translate(-50%, -50%);
	/* Centers the number perfectly */
	font-size: 56px;
	/* Large font for visibility */
	font-weight: bold;
	/* Makes the number stand out */
	color: black;
	/* Font color */
	text-align: center;
	/* Aligns the number centrally */
	z-index: 5;
	/* Above the mission button background */
}
/* ========================= */
/* Timer Icon Styles */
/* ========================= */
/* Timer Icon Overlay */
.timer-icon {
	position: absolute;
	top: 67px;
	/* Positioned at the top-right corner */
	right: 3px;
	width: 48px;
	/* Small size for the timer icon */
	height: 55px;
	background-image: url('../assets/icons/timer-icon.svg');
	/* Path to the timer icon */
	background-size: cover;
	/* Ensures the icon maintains aspect ratio */
	background-repeat: no-repeat;
	/* Prevents repetition */
	z-index: 5;
	/* Above the mission button */
}
/* ========================= */
/* Responsive Design */
/* ========================= */
/* Adjust for Tablet (Max Width 768px) */
@media (max-width: 768px) {
	.mission-container {
		width: 96px;
		height: 110px;
		margin: 8px;
	}
	.mission-box {
		width: 90px;
		height: 88px;
	}
	.lock-overlay {
		width: 40px;
		height: 45px;
		top: 45px;
		right: -11px;
	}
	.mission-number {
		font-size: 40px;
	}
	.world-right {
		justify-content: space-between;
		/* Maintain spacing on smaller screens */
	}
}
/* Adjust for Mobile (Max Width 480px) */
@media (max-width: 480px) {
	.mission-container {
		width: 80px;
		height: 90px;
		margin: 5px;
	}
	.mission-box {
		width: 60px;
		height: 58px;
	}
	.lock-overlay {
		width: 27px;
		height: 31px;
		top: 28px;
		right: -5px;
	}
	.mission-number {
		font-size: 28px;
	}
	.timer-icon {
		width: 15px;
		height: 15px;
	}
	.world-right {
		justify-content: center;
		/* Center align for smallest devices */
	}
}
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	background-color: #f8f9fa;
	position: sticky;
	top: 0;
	z-index: 1000;
}
/* Contenedor general */
#marioCanvas {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}
/* Contenedor del juego */
.game-square {
	position: relative;
	width: 450px;
	height: 450px;
	border: 5px solid black;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	overflow: hidden;
	background-color: white;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
/* Fila */
.row {
	display: flex;
	width: 100%;
	height: 33.333%;
	position: absolute;
}
/* Estilo de las imágenes */
.row img {
	flex: none;
	width: 150px;
	height: 100%;
}
.treasure-container {
	display: flex;
	justify-content: center;
	gap: 20px;
	/* Add space between the chests */
	margin-top: 20px;
}
.treasure-chest {
	cursor: pointer;
	text-align: center;
}
.treasure-chest img {
	width: 80px;
	height: 80px;
}
@media (max-width: 899px) {
  .treasure-chest img {
    width: 60px !important;
    height: 60px !important;
  }
}


.copyright {
    display: flex;
    flex-wrap: wrap; /* ✅ Ensures it wraps only if necessary */
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 5px; /* ✅ Adds small spacing between links */
    white-space: nowrap; /* ✅ Prevents text from breaking into multiple lines */
}


.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px; /* ✅ Adds spacing inside the footer */
    flex-wrap: wrap; /* ✅ Ensures wrapping in small screens */
    gap: 10px; /* ✅ Adds space between items */
    margin: 0 auto; /* ✅ Centers the footer */
    max-width: 90%; /* ✅ Ensures it doesn't touch screen edges */
}


/* Responsive View: Stack items vertically */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column; /* ✅ Stack elements vertically on small screens */
        align-items: center; /* ✅ Center elements */
    }
}



    .social-icons {
        display: flex;
        gap: 10px;
    }
    .social-icon {
        width: 60px;
        height: 60px;
    }








/* 🌍 Language Footer */
.language-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Centers horizontally */
	justify-content: center;
	/* Ensures everything inside is centered */
	text-align: center;
	width: 100%;
	padding: 15px 0;
	background-color: white;
	/* Or any background you want */
	z-index: 1000;
}
/* 🌍 Flag Container */
.flag-container {
	display: flex;
	justify-content: center;
	/* Ensures flags are centered */
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	margin-left: 70px;
}
@media (max-width: 768px) {
  .flag-container {
    margin-left: 0px;
  }
}

/* 🌍 Flag Icons */
.flag-btn {
	width: 52px;
	/* Adjust flag size */
	height: auto;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border-radius: 5px;
	/* Slight rounding */
}
/* 🎯 Hover & Selected Effect */
.flag-btn:hover,.flag-btn.selected {
	transform: scale(1.1);
	box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3);
}
/* 📱 Mobile Optimization */
@media (max-width: 480px) {
	.flag-btn {
		width: 35px;
		/* Slightly smaller on small screens */
	}
	.language-footer {
		font-size: 1rem;
	}
}
/* 🎨 Header Styling */
/* Sticky Header */
.game-header {
	position: sticky;
	top: 0;
	left: 0;
	/*width: 100%;*/
	background-color: white;
	/* Or any theme color */
	z-index: 1000;
	/* Ensures it stays on top */
	padding: 12px 20px;
	box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
	/* Adds a subtle shadow */
}
/* 🔹 Logo Container - Centered */
.logo-container {
	flex: 1;
	/* Takes available space */
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 150px;
	/* Prevents logo from being squeezed too much */
}
/* 🏆 Buixots Logo */
.buixots-logo {
	max-height: 78px;
	/* Default desktop size */
	width: auto;
	transition: max-height 0.2s ease-in-out;
	margin: 0 auto;
}
/* ✅ Ensures Keys & Buttons Stay in Place */
.keys-container,.header-buttons {
	flex: 0 0 auto;
}
@media (max-width: 480px) {
	.logo-container {
    display: none;
  }
  .keys-container {
    gap: 2px; /* Redueix l'espai entre claus */
    /* Pots afegir també flex: 1; si necessites que ocupi més espai */
  }
  .game-header {
    justify-content: space-between; /* Manté els elements distribuïts */
    padding: 8px 10px;
  }
  .header-buttons button {
    padding: 5px 10px;
    font-size: 1rem;
    margin: 0 5px;
  }
}

/* 📱 Mobile Adjustments */
@media (max-width: 480px) {
  .buixots-logo {
    display: none;
  }
}





.persistent-ring {
	position: absolute;
	border: 4px solid #4CFF4C;
	border-radius: 50%;
	pointer-events: none;
	animation: ringAppear 0.5s ease-out;
}
@keyframes ringAppear {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}
.hint-ring {
	position: absolute;
	box-shadow: 0 0 10px 4px rgba(76, 255, 76, 0.5);
	/* Brillo alrededor */
	animation: pulse-ring 1.5s infinite;
	/* Efecto de pulso */
}
/* Animación de pulso (opcional) */
@keyframes pulse-ring {
	0% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.2);
		opacity: 0.7;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}
#timerDisplay {
	position: absolute;
	top: 5px;
	right: 5px;
	color: #000;
	padding: 3px 6px;
	font-family: Arial, sans-serif;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 5px;
	z-index: 1000;
	/* Asegura que el temporizador esté por encima de otros elementos */
	background-color: rgba(255, 255, 255, 0.5);
	border-radius: 16px;
	/*box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
	*/
	/*border: 3px solid white;
	*/
}

@media (max-width: 480px) {
  #timerDisplay {
    top: 5px;           /* Reducció de la posició superior */
    right: 5px;         /* Reducció de la posició lateral */
    padding: 3px 6px;   /* Reducció del padding */
    font-size: 14px;    /* Mida de font més petita */
    border-radius: 16px;/* Ajust del radi per mantenir proporció */
    gap: 3px;           /* Reducció de l'espai entre elements */
  }
}

#timerText {
	font-family: 'Buixots', sans-serif;
	font-size: 19px;
	color:#333;
	margin-left: -6px;
}
/* Keys container: Align keys in a row */
.keys-container {
	display: flex;
	align-items: center;
	gap: 5px;
	/* Space between keys */
}
/* Key icon */
.key-icon {
	width: 40px;
	height: 40px;
	background-image: url('../assets/icon-key.svg');
	/* Path to the key SVG */
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
/* Wrapper to position key count badge */
.key-wrapper {
	position: relative;
	display: inline-block;
}
/* Small red badge for key count */
.key-count {
	position: absolute;
	top: -10px;
	right: -10px;
	background-color: red;
	color: white;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 12px;
	font-weight: bold;
}
@keyframes keyUpdateEffect {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}
/* Animation for key system updates */
.keys-container.animated {
	animation: keyUpdateEffect 0.3s ease-in-out;
}
/* Barra de carga */
/* Contenedor del loading bar */
.loading-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 350px;
	height: 25px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(255, 255, 255, 0.9);
	border-radius: 5px;
	box-shadow: 2px 3px #000;
	border: 2px solid black;
	z-index: 950;
	/* Asegura que está por encima de otros elementos */
	overflow: hidden;
}
/* Contenedor de la barra */
.loading-bar {
	width: 100%;
	height: 30px;
	background: repeating-linear-gradient(45deg, /* Angle of the diagonal */
	#e0e0e0, /* First color */
	#e0e0e0 10px, /* Stop color at 10px */
	#c0c0c0 10px, /* Start second color at 10px */
	#c0c0c0 20px /* End second color at 20px */
	);
	border-radius: 0px;
	overflow: hidden;
	position: relative;
	z-index: 940;
}
/* Progreso del loading bar */
.loading-bar-fill {
	height: 120%;
	width: 0;
	background-color: #4CFF4C;
	/* Color verde para el progreso */
	border-radius: 0px;
	transition: width 0.3s ease;
	z-index: 930;
}
.lupa-icon {
	width: 50px;
	height: 50px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
	border: 3px solid white;
	z-index: 10;
	transition: transform 0.2s ease;
}

@media (max-width: 480px) {
  .lupa-icon {
    width: 13px;
    height: 13px;
  }

}
.lupa-icon img {
	width: 70%;
	height: 70%;
}
.lupa-icon:hover {
	transform: scale(1.1);
}
.hint-circle {
	z-index: 20;
}
/* Apply horizontal margins to the popup box when there's no wrapper */
#popupOverlay > #popupBox.popup-box {
	width: 90%;
	max-width: 450px;
	margin: 20px auto;
	/* 20px top, auto left/right, 20px bottom */
	box-sizing: border-box;
}
/* Popup Overlay: covers the entire viewport */
#popupOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(255, 232, 107, 0.95);
	z-index: 900;
	display: flex;
	justify-content: center;
	align-items: center;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease;
}
/* Default Popup Wrapper (used for gameplay popups with overlay) */
.popup-wrapper {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80vw;
	max-width: 80vw;
	max-height: calc(100vh - 40px);
	/* Ensures popup doesn’t exceed viewport */
	box-sizing: border-box;
	padding: 20px;
	overflow-y: auto;
}

@media (max-width: 899px) {
  .popup-wrapper {
    width: 95vw;  /* Increase width to use more screen space */
    max-width: 95vw; /* Ensure it doesn't go beyond the viewport */
    max-height: 95vh; /* Increase height to use more space */
    padding: 10px; /* Reduce padding to bring content closer to the edges */
  }
}



/* Popup Wrapper for Main Pages (no overlay;
grows with content) */
.popup-wrapper.main {
	position: relative;
	width: 90%;
	max-width: 450px;
	margin: 20px auto;
	/* Centers the box and adds vertical margins */
	box-sizing: border-box;
	padding: 20px;
	overflow: visible;
	/* Allow the popup to expand vertically without scrolling */
}
/* Popup Box inside the Wrapper */
.popup-box {
	position: relative;
	width: 100%;
	background-color: #fffffe;
	/* Light background */
	padding: 30px 40px 34px 40px;
	/* Default padding: top, right, bottom, left */
	border-radius: 15px;
	border: 3px solid black;
	box-shadow: 3px 4px #000;
	text-align: center;
	margin-bottom: 10px;
	box-sizing: border-box;
	font-size: clamp(1.4rem, 2.5vw, 1.8rem);
	/* Responsive font size */
	height: auto;
	/* Allow height to grow with content */
}
/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
	.popup-wrapper.main {
		width: 95vw;
		max-width: 95vw;
		padding: 10px;
		margin: 10px auto;
	}
	.popup-box {
		padding: 20px 30px 24px 30px;
		/* Reduced padding for mobile */
		font-size: 1.4rem;
	}
}
@media (min-width: 1024px) {
	/* Force a fixed width for popup boxes on large screens */
	#popupOverlay > #popupBox.popup-box,.popup-wrapper.main {
		width: 450px;
		/* Fixed width on desktops */
		max-width: 450px;
		/* Ensure it doesn't exceed 450px */
		margin: 20px auto;
		/* Center the popup horizontally */
	}
}
/* Popup Icon and Content */
#popupIcon {
	margin: 0 auto 20px;
	width: 70px;
	height: 70px;
}
#popupIcon img {
	width: 100%;
	height: auto;
	display: block;
}
#popupContent {
	margin-top: 10px;
	font-size: 1.8rem;
	line-height: 1.5;
	color: #333;
	text-align: center;
}
/* Popup Actions (Buttons) */
#popupActions button {
	font-size: 1.8rem;
	padding: 12px 20px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	margin: 10px 5px;
}
/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
	.popup-box {
		padding: 20px;
		font-size: 1.8rem;
	}
	#popupContent {
		font-size: 1.8rem;
	}
	#popupActions button {
		font-size: 1.4rem;
		padding: 10px 15px;
	}
	#popupIcon {
		width: 50px;
		height: 50px;
		margin-bottom: 15px;
	}
}
/* Popup Actions (Buttons) */
#popupActions button {
	font-size: 1.8rem;
	padding: 12px 20px;
	border: 2px solid black;
	/* Restored border */
	border-radius: 5px;
	cursor: pointer;
	margin: 10px 5px;
	color: black;
}
/* 🔹 Overlay per a popups a pantalla completa */
.fullscreen-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(255, 232, 107, 0.95);
	z-index: 1100;
	/* 🆙 Assegura que estigui sobre el header */
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease-in-out;
}
/* 🔹 Popup en modal */
.fullscreen-popup {
	width: 90vw;
	height: 90vh;
	max-width: 1000px;
	max-height: 90vh;
	background: white;
	border: 3px solid black;
	box-shadow: 5px 5px black;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px;
	border-radius: 20px;
}
/* 🔹 Contingut del popup */
.fullscreen-popup-content {
	width: 100%;
	max-width: 900px;
	padding: 20px;
}
/* 🔹 Botó per tancar */
.btn-close-popup {
	display: block;
	margin: 20px auto 0;
	padding: 10px 20px;
	font-size: 1.5rem;
	background: none;
	border: 2px solid black;
	box-shadow: 3px 3px black;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	border-radius: 10px;
}
.btn-close-popup:hover {
	background-color: #fff565;
	color: #333;
}
/* 🔹 Ajustaments de text dins el popup */
.fullscreen-popup h2 {
	font-size: clamp(1.8rem, 3vw, 2.5rem);
	/* Responsive title */
	margin-bottom: 15px;
}
.fullscreen-popup p {
	font-size: clamp(1.85rem, 2.5vw, 1.4rem);
	/* Ajusta el text de paràgrafs */
	line-height: 1.6;
	max-width: 90%;
	margin: 0 auto;
}
.fullscreen-popup ul {
	text-align: left;
	font-size: clamp(1rem, 2vw, 1.3rem);
	/* Millor lectura */
	padding-left: 20px;
	max-width: 90%;
}
.fullscreen-popup ul li {
	margin-bottom: 10px;
}
/* 🔹 Ajust per a la imatge dins del popup */
.fullscreen-popup img {
	max-width: 100%;
	height: auto;
	margin-top: 15px;
	border-radius: 10px;
}
/* 🔹 Ajust de mides en pantalles molt petites */
@media (max-width: 480px) {
	.fullscreen-popup {
		width: 95vw;
		height: 95vh;
		padding: 15px;
	}
	.fullscreen-popup-content {
		padding: 10px;
	}
	.fullscreen-popup h2 {
		font-size: 1.9rem;
	}
	.fullscreen-popup p,.fullscreen-popup ul {
		font-size: 1.5rem;
	}
}
/* Primary Button */
.btn-primary {
	background-color:#fff;
	color: #333;
}
.btn-primary:hover {
	background-color: #fff565;
	color: #333;
}
/* Secondary Button */
.btn-secondary {
	background-color: #FF5138;
	color: white;
}
.btn-secondary:hover {
	background-color: #EA341A;
}
.btn-menu {
	font-size: 1.5rem;
	padding:6px 20px;
	border: 3px solid black;
	/* ✅ Vora negra com el popup-box */
	border-radius: 8px;
	/* Arrodoniment suau */
	background-color: white;
	/* Fons blanc per coherència */
	box-shadow: 3px 4px #000;
	/* ✅ Ombra com el popup-box */
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

/* Efecte quan es passa el cursor per sobre */
.btn-menu:hover {
	background-color: #fff565;
	color: #333;
}
/* Ajustos per a pantalles petites */
@media (max-width: 480px) {
	.btn-menu {
		font-size: 1rem;
		padding: 1px 8px;
	}
}


.btn-reset {
	font-size: 1.2rem;
	padding:9px 24px;
	border: 3px solid black;
	/* ✅ Vora negra com el popup-box */
	border-radius: 8px;
	/* Arrodoniment suau */
	background-color: #fd2222;
	/* Fons blanc per coherència */
	box-shadow: 1px 2px #000;
	/* ✅ Ombra com el popup-box */
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	line-height: 12px;
	color:#FFF;
}
.btn-reset:hover {
	background-color: #fff565;
	color: #333;
}
.wechat-wrapper {
  position: relative;
  display: inline-block;
}

.wechat-tooltip {
  position: absolute;
  bottom: 120%; /* o top: 110% si ho vols damunt o sota */
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: none;
}

.wechat-tooltip img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

footer a {
  color: #ff4309; /* taronja viu (tailwind orange-500) */
  text-decoration: none;
  font-weight: 500;
  transition: text-decoration 0.3s ease;
}

footer a:hover {
  text-decoration: underline;
}