@charset "utf-8";

/* ==========================================================================
   INDICE
   1. Variabili (colori, ombre)
   2. Font (@font-face)
   3. Base / Globale (tutte le pagine)
   4. Utility condivise (home.php, win_si.php, win_no.php, registrazione.php)
   5. Componenti condivisi: bottoni (home.php, registrazione.php)
   6. Menu (menu.php)
   7. Home (home.php) - hero, come partecipare, premi/peluche, 3Bee
   8. Prodotti (prodotti.php) - tabella, slider prodotti
   9. Registrazione (registrazione.php) - form, upload OCR
   10. 3Bee - Progetto biodiversità (3bee.php)
   11. Footer (footer.php)
   ========================================================================== */


/* ============================
   1. VARIABILI
   ============================ */
:root {
	/* Rosso Loacker (Colore Principale) */
	--color-primary: #d51d1e;
	--color-primary-hover: #b51416;
	--color-primary-dark: #8b0c0e;

	/* Verde Natura/Prato (Colore Secondario) */
	--color-secondary: #4a9e35;
	--color-secondary-hover: #3b822a;
	--color-secondary-dark: #2d611f;

	/* Accenti (Giallo/Panna "Ribelli ma buoni", Marrone box "Prova a vincere") */
	--color-accent-yellow: #f1d7a0;
	--color-accent-brown: #6b260f;

	/* Neutri, testo e sfondi */
	--color-white: #ffffff;
	--color-bg-light: #fdfbf7;
	--color-text-main: #2b2b2b;

	/* Stati e feedback */
	--color-danger: var(--color-primary);

	/* Ombre e trasparenze */
	--color-primary-alpha-10: rgba(213, 29, 30, 0.1);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
}


/* ============================
   2. FONT
   ============================ */

/* Roboto (solo woff2/woff: copertura completa su tutti i browser moderni) */
@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 100;
	src: url('../fonts/roboto-v30-latin-100.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-100.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: italic;
	font-weight: 100;
	src: url('../fonts/roboto-v30-latin-100italic.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-100italic.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 300;
	src: url('../fonts/roboto-v30-latin-300.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-300.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: italic;
	font-weight: 300;
	src: url('../fonts/roboto-v30-latin-300italic.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-300italic.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/roboto-v30-latin-regular.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-regular.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: italic;
	font-weight: 400;
	src: url('../fonts/roboto-v30-latin-italic.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-italic.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 500;
	src: url('../fonts/roboto-v30-latin-500.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-500.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: italic;
	font-weight: 500;
	src: url('../fonts/roboto-v30-latin-500italic.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-500italic.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 700;
	src: url('../fonts/roboto-v30-latin-700.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-700.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: italic;
	font-weight: 700;
	src: url('../fonts/roboto-v30-latin-700italic.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-700italic.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 900;
	src: url('../fonts/roboto-v30-latin-900.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-900.woff') format('woff');
}

@font-face {
	font-display: swap;
	font-family: 'Roboto';
	font-style: italic;
	font-weight: 900;
	src: url('../fonts/roboto-v30-latin-900italic.woff2') format('woff2'),
		url('../fonts/roboto-v30-latin-900italic.woff') format('woff');
}

@font-face {
	font-family: 'Atomic Marker';
	src: url('../fonts/set-sail-studios-atomic-marker-regular.otf') format('opentype');
	font-weight: normal;
	font-style: normal;
}


/* ============================
   3. BASE / GLOBALE
   (presenti in head.php su tutte le pagine)
   ============================ */

body {
	font-family: 'Roboto', sans-serif;
	font-weight: normal;
	font-style: normal;
	font-size: 14px;
	color: var(--color-text-main);
	background-position: top center;
	background-size: contain;
	background-repeat: repeat-y;
}

.row {
	margin-left: 0px;
	margin-right: 0px;
}

h1,
h2 {
	font-weight: bold;
}

a {
	text-decoration: none;
}

.skip-to-main-content-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
	padding: 1em;
	background-color: black;
	color: white;
	opacity: 0;
}

.skip-to-main-content-link:focus {
	left: 50%;
	transform: translateX(-50%);
	opacity: 1;
}


/* ============================
   4. UTILITY CONDIVISE
   (home.php, win_si.php, win_no.php, registrazione.php)
   ============================ */

.text-red {
	color: var(--color-primary);
}

.text-green {
	color: var(--color-secondary);
}

.text-beige {
	color: var(--color-accent-yellow);
}

.bg-red {
	background-color: var(--color-primary);
}

.bg-green {
	background-color: var(--color-secondary);
}

.bg-foglie {
	background-image: url('../img/sfondo-foglie.jpg');
	background-size: cover;
	background-position: center;
	background-attachment: scroll;
}

.ff-atomic {
	font-family: 'Atomic Marker';
}

.image-small {
	max-width: 150px;
}

.border-dashed-left {
	border-left: 3px dashed var(--color-accent-yellow);
}

/* Icona foglia (bi-leaf non presente in questa versione di Bootstrap Icons) */
.bi-leaf-custom {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 14Q11.5 11.5 14 2Q4.5 4.5 2 14Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 14Q11.5 11.5 14 2Q4.5 4.5 2 14Z'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: center;
	mask-position: center;
}

/* Messaggio di chiusura "Grazie per aver partecipato" (win_si.php, win_no.php) */
.thanks-card {
	max-width: 560px;
	padding: 2.5rem 2rem;
	background-color: var(--color-bg-light);
	border: 2px solid var(--color-primary);
	box-shadow: var(--shadow-md);
}

.thanks-card-logo {
	max-width: 140px;
}


/* ============================
   5. COMPONENTI CONDIVISI: BOTTONI
   (home.php, registrazione.php)
   ============================ */

.button,
.button_green {
	color: var(--color-white);
	border-radius: 65px;
	border: 0px solid transparent;
	font-weight: bold;
	font-size: 2.2rem;
	padding: .25rem 2rem;
	width: max-content;
	box-shadow: 2px 4px 6px 1px rgba(0, 0, 0, .3);
	text-decoration: none;
}

.button {
	background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-primary) 20%, var(--color-primary-hover) 100%);
}

.button:hover {
	color: var(--color-white);
	background: var(--color-primary-dark);
}

.button_green {
	background: linear-gradient(to bottom, var(--color-secondary) 0%, var(--color-secondary-dark) 20%, var(--color-secondary-hover) 100%);
}

.button_green:hover {
	color: var(--color-white);
	background: var(--color-secondary-dark);
}

@media screen and (max-width: 767px) {

	.button,
	.button_green {
		font-size: 1.5rem;
	}
}


/* ============================
   6. MENU (menu.php)
   ============================ */

#attiva_menu {
	max-width: 30px;
	margin: 10px 25px;
	cursor: pointer;
}

#logo_bar {
	background-color: var(--color-primary);
	max-height: 50px;
}

#menu {
	background-color: var(--color-white);
	border-top: 0px solid var(--color-accent-brown);
}

#menu_list li {
	list-style-type: none;
	float: left;
}

#menu_list li a {
	display: block;
	text-align: center;
	text-decoration: none;
	color: var(--color-text-main);
	font-size: 24px;
	position: relative;
}

#menu_list li a.active:after,
#menu_list li a:hover:after {
	content: url('../img/highlight.png');
	position: absolute;
	max-width: 80px;
	left: 50%;
	transform: translateX(-50%);
	bottom: -15px;
}

@media screen and (max-width: 767px) {
	#menu_list li {
		list-style-type: none;
		float: none;
		width: 100%;
		padding-bottom: 20px;
	}
}


/* ============================
   7. HOME (home.php)
   ============================ */

/* --- Hero --- */

@keyframes float {
	0% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-10px);
	}

	100% {
		transform: translateY(0);
	}
}

img.float-on-hover {
	display: block;
	transition: transform 0.3s ease;
}

img.float-on-hover:hover {
	animation: float 2s ease-in-out infinite;
}

/* --- Come partecipare (step cards) --- */

.step-col {
	position: relative;
	z-index: 1;
}

.step-card {
	position: relative;
	padding: 1.5rem 1.25rem 1.5rem;
	background-color: var(--color-white);
	border: 5px solid #D70D1D;
	border-radius: 1.25rem;
	box-shadow: var(--shadow-md);
	transition: transform .3s ease, box-shadow .3s ease;
}

.step-col:nth-child(2) .step-card,
.step-col:nth-child(4) .step-card {
	border-color: #4a9e35;
}

.step-card:hover,
.step-card:focus-within {
	transform: translateY(-8px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.step-number {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3.4rem;
	line-height: 1;
	color: #D70D1D;
	margin: 0 auto 1.5rem;
}

.step-number::after {
	content: url('../img/highlight.png');
	display: block;
	position: absolute;
	left: 50%;
	bottom: -12px;
	transform: translateX(-50%);
	max-width: 90px;
}

.step-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--color-white);
	font-size: 1.6rem;
	transition: transform .3s ease;
}

.step-card:hover .step-icon {
	transform: scale(1.12) rotate(-6deg);
}

.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .6s ease, transform .6s ease;
	transition-delay: var(--step-delay, 0s);
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.cta-partecipa {
	position: relative;
}

.cta-partecipa::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 65px;
	box-shadow: 0 0 0 0 var(--color-primary-alpha-10);
	animation: cta-pulse 2.2s ease-out infinite;
	pointer-events: none;
}

.cta-partecipa:hover::after {
	animation: none;
}

@keyframes cta-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(213, 29, 30, .35);
	}

	70% {
		box-shadow: 0 0 0 18px rgba(213, 29, 30, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(213, 29, 30, 0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.step-card,
	.step-icon,
	.reveal,
	.cta-partecipa::after {
		transition: none !important;
		animation: none !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}
}

/* --- Premi / Peluche --- */

.gray {
	filter: grayscale(100%);
	transition: 1s;
}

.gray:hover {
	filter: grayscale(0%);
	transition: 1s;
}

.iPremi {
	max-width: 90%;
	transition: 1s;
}

#premio {
	width: 100%;
	transition: opacity 0.5s ease-in-out;
	opacity: 1;
}

#premio.is-fading {
	opacity: 0;
}

.peluche-pick {
	text-align: center;
	width: 180px;
	cursor: pointer;
}

.peluche-avatar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 180px;
	height: 180px;
	margin: 0 auto;
	border-radius: 50%;
	background-color: var(--color-white);
	border: 3px solid var(--color-white);
	box-shadow: var(--shadow-md);
	transition: transform .3s ease, box-shadow .3s ease;
}

.peluche-avatar-img {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 50%;
}

.peluche-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.peluche-pick:hover .peluche-avatar {
	transform: translateY(-6px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
}

.peluche-info-btn {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 1.1rem;
	color: var(--color-white);
	background-color: var(--color-primary);
	border: 2px solid var(--color-white);
	border-radius: 50%;
	box-shadow: var(--shadow-md);
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}

.peluche-info-btn:hover,
.peluche-info-btn:focus-visible {
	background-color: var(--color-primary-dark);
	transform: scale(1.1);
}

.modal-peluche-img {
	max-width: 200px;
}

.modal-peluche-dims {
	color: var(--color-text-main);
}

.modal-peluche-dims li {
	padding: .35rem 0;
	border-bottom: 1px solid var(--color-accent-yellow);
}

.modal-peluche-dims li:last-child {
	border-bottom: 0;
}

.modal-peluche-dims strong {
	color: var(--color-primary);
}

.bullet-red li::marker {
	color: var(--color-primary);
}

.peluche-name {
	display: block;
	margin-top: .5rem;
	font-weight: 700;
	font-size: .9rem;
	color: var(--color-white);
}

.peluche-brand {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	box-shadow: var(--shadow-md);
	cursor: pointer;
	transition: transform .3s ease;
}

.peluche-brand:hover {
	transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {

	.peluche-avatar,
	.peluche-brand {
		transition: none !important;
	}
}

/* --- 3Bee / Buoni per scelta --- */

.bee-card {
	background-color: var(--color-bg-light);
	box-shadow: var(--shadow-md);
	transition: transform .3s ease, box-shadow .3s ease;
}

.bee-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}

.bee-logo {
	max-width: 140px;
}

.bee-seal {
	max-width: 170px;
	transform: rotate(-6deg);
	transition: transform .4s ease;
}

.bee-seal:hover {
	transform: rotate(0deg) scale(1.05);
}

@media (prefers-reduced-motion: reduce) {

	.bee-card,
	.bee-seal {
		transition: none !important;
	}
}

small.small {
	font-size: 10px;
	line-height: 9px;
}


/* ============================
   8. PRODOTTI (prodotti.php)
   ============================ */

/* Effetto hover sulla tabella prodotti coinvolti (Bootstrap .table-hover) */
.table-hover tbody tr:hover {
	background-color: var(--color-primary-hover) !important;
	color: var(--color-white) !important;
	cursor: pointer;
}

/* --- Slider prodotti --- */

.product-slider-container {
	overflow-x: auto;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 15px;
	scroll-behavior: smooth;
}

.product-slider-item {
	display: inline-block;
	flex: 0 0 auto;
	margin-right: 5px;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.2s ease-in-out;
	background-color: var(--color-white);
	text-align: center;
}

.product-slider-item:hover {
	transform: translateY(-15px);
}

.product-slider-item img {
	max-width: 100%;
	height: 300px;
	object-fit: contain;
	border-bottom: 0px solid var(--color-primary);
	padding: 10px;
	border-radius: 10px;
	background-color: var(--color-white);
}

.product-slider-item .card-body {
	padding: 0px;
}

.product-slider-item .card-title {
	font-size: 0.95rem;
	margin-bottom: 5px;
	color: var(--color-text-main);
}

.slider-navigation-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(0, 0, 0, 0.5);
	color: white;
	border: none;
	padding: 10px 15px;
	cursor: pointer;
	z-index: 10;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	line-height: 1;
}

.slider-navigation-btn:hover {
	background-color: rgba(0, 0, 0, 0.7);
}

.prev-btn {
	left: 10px;
}

.next-btn {
	right: 10px;
}

.product-slider-container::-webkit-scrollbar {
	height: 8px;
}

.product-slider-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.product-slider-container::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 10px;
}

.product-slider-container::-webkit-scrollbar-thumb:hover {
	background: #555;
}

@media (max-width: 768px) {
	.product-slider-item {
		width: 160px;
	}

	.slider-navigation-btn {
		padding: 8px 12px;
		width: 35px;
		height: 35px;
		font-size: 1.2rem;
	}
}

@media (max-width: 576px) {
	.product-slider-item {
		width: 140px;
		margin-right: 10px;
	}

	.slider-navigation-btn {
		display: none;
	}

	.product-slider-container {
		padding-bottom: 10px;
	}
}


/* ============================
   9. REGISTRAZIONE (registrazione.php)
   ============================ */

#errore {
	color: var(--color-danger);
	font-weight: bold;
	font-size: 24px;
}

.form-control,
.form-select {
	border-radius: 5px;
	border: 1px solid var(--color-primary);
	color: var(--color-text-main);
}

.form-group {
	margin-bottom: 15px;
}

/* Checkbox di consenso: label a tutta larghezza per impilare testo e checkbox */
label[for=dati_reg],
label[for=ricez_info_1] {
	display: block;
}

label a {
	color: inherit;
	text-decoration: underline;
}

/* Modale di caricamento durante la lettura OCR dello scontrino */
#ocr_loading,
#ocr_loading>.modal-dialog,
#ocr_loading>.modal-dialog>.modal-content,
#ocr_loading>.modal-dialog>.modal-content>.modal-body {
	background-color: transparent !important;
}


/* ============================
   10. 3BEE - PROGETTO BIODIVERSITÀ (3bee.php)
   ============================ */

.oasi-card {
	background-color: var(--color-white);
	box-shadow: var(--shadow-md);
	transition: transform .3s ease, box-shadow .3s ease;
}

.oasi-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}

.oasi-card-img {
	height: 280px;
}

@media (min-width: 768px) {
	.oasi-card-img {
		height: 420px;
	}
}

.oasi-region-badge {
	background-color: var(--color-secondary);
	color: var(--color-white);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .02em;
}

.area-card-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	color: var(--color-secondary-dark);
	background-color: var(--color-white);
	border: 2px dashed var(--color-secondary);
}

.area-card-placeholder i {
	font-size: 1.8rem;
	color: var(--color-secondary);
}

.oasi-piantumazione-img {
	width: 260px;
	height: 260px;
	object-fit: cover;
	border-radius: 50%;
	border: 6px solid var(--color-white);
	box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
	.oasi-card {
		transition: none !important;
	}
}


/* ============================
   11. FOOTER (footer.php)
   ============================ */

footer {
	font-family: 'Roboto';
	font-size: 0.8rem;
	background-color: #D70D1D;
}

footer p {
	color: var(--color-white);
	font-family: 'Roboto';
	font-weight: normal;
	font-style: normal;
	font-size: 0.8rem;
	text-align: start;
}

footer p a {
	color: var(--color-white);
	text-decoration: underline;
	font-weight: 700;
}
