/************** VARIABILI DI SISTEMA *************/
:root {
    --primary-color: #ff7e5f;
    --secondary-color: #feb47b;
    --background-color: #333;
    --hover-color: #555;
    --submenu-background: #444;
    --text-color: rgb(255, 255, 255);
    --text-hover: red;
    --article-background: #f4f4f4;
    --menu-item-size: 50px;
    --green-color: #329680;
    --green_gray-color: #48cfc9;
    --blue-color:#1144dc;
    --red-color:red;
    --black-color: #000000;
    --white-color: #FFF;
    --gray-color: #ededed9f;
}
/*************** IMPOSTAZIONI SCHERMO *************/
.scaled-125 {

    transform: scale(0.7);
}
.scrollable {
    overflow: auto;
    max-height: 100vh; /* Imposta l'altezza massima al 100% dell'altezza della finestra */
}
/*************** IMPOSTAZIONI CONTENUTO *************/
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    color: #333;
    overflow: hidden;  
}
.body2 {
    display: fixed;
    background-color: #ffcc00;
    color: black;
    font-weight: bold;
    font-size: 18px;
    padding: 15px 30px;
    border-radius: 25px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: fit-content;
    margin: 320px auto;
    z-index: 99999999;
}
.body3 {
    position: relative;
    top: 220px;
    width: 100%;
    text-align: center;
    font-weight: bold;
}
header {
    background: linear-gradient(
        #0329ff 0%,
        #036aff 25%,
        #039aff 50%,
        #66ccff 75%,
        #ffffff 100%
    );    
    color: var(--white-color);
    padding: 10px;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0,1); /* Aumenta l'ombra */
    border-bottom: 3px solid var(--red-color); /* Aggiunge un bordo */
    font-size: 24px; /* Aumenta la dimensione del testo */
    font-weight: bold; /* Rende il testo più marcato */
}
.bg {
        width: 100%;
        height: 100%;
        background-color: var(--gray-color); /* O il colore che vuoi */
        position: relative;
        top: 50px; /* Aggiunto per abbassare lo sfondo */
    }
    
h2 {
    font-size: 130%;
    margin: 1em 2em;
    padding: 0;
    position: relative;
    color: var(--black-color);
}
h4 {
    color: var(--red-color);
    display: inline;
    white-space: nowrap;
}
h5 {
    display: inline;
    white-space: nowrap;
    font-size: large;
}
h6 {
    font-size: 300%;
    margin: 0.5em 2em;
    padding: 0;
    position: relative;
    color: var(--white-color);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.content {
    flex: 1;
    overflow-y: auto;
    margin-top: 100px;
    padding: 20px;
    justify-content: center; /* Centra l'elemento orizzontalmente */
    align-items: center; /* Centra l'elemento verticalmente */
}
.article-box {
    width: 80%;
    max-width: 800px;
    height: calc(100vh - 250px);  /* Adatta l'altezza alla finestra, meno lo spazio dell'header e margini */
    background-color: rgba(244, 244, 244, 0.6);
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    color: var(--black-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);

    /* **Posizionamento** */
    position: absolute;
    top: 200px; /* Regola l'altezza per spostarlo sotto la linea rossa */
    left: 50%;
    transform: translateX(-50%);
    
    /* **Impedisce lo scroll dell'intero box** */
    overflow: hidden; 
    display: flex;
    flex-direction: column;
}

/* Permette lo scroll SOLO del contenuto interno */
.article-box .content {
    margin-top: 0;
    max-height: 100%; /* Occupa tutta l'altezza disponibile */
    overflow-y: auto; /* Abilita lo scroll verticale solo per il contenuto */
}
footer {
    background-color: var(--background-color);
    color: var(--text-color);
    text-align: center;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 1000;
    padding: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.footer-text {
    display: flex;
    width: 100%; /* Assicura che il contenitore prenda tutta la larghezza disponibile */
    margin: 0;
    justify-content: center; /* Centra la scritta nel footer */
    margin-right: 20%;
}
.Privacy {
    margin: 0;
    display: flex; /* Imposta il layout flex */
    justify-content: flex-start; /* Allinea gli elementi a sinistra */
    padding: 10px;
    gap: 15px; /* Aggiunge spazio tra gli elementi */
    margin-top: 0; /* Riduce lo spazio tra Privacy e la scritta nel footer */
}
/***************** PARAMETRI PER BUSTA DA LETTERE ***************/
html,body {
	margin: 0;
	height: 100%;
	text-align: center;
	font-family: 'Ubuntu';
}
.frame{
    position: relative;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Altezza della viewport */
    top: 250px;
    width: 600px;
    height: 350px;
    margin: 0 auto ;
    background: #435D77;
    border-radius:0 0 40px 40px; 
}
#button_open_envelope{
	width: 180px;
	height: 40px;
	position: relative;
	z-index: 311;
	top: 250px;
	left: 208px;
	border-radius: 20px;
	color: #fff;
	font-size: 26px;
	padding:15px 0; 
	border: 2px solid #34c726;
	transition:.3s;
}
#button_open_envelope:hover{
	background: #FFf;
	color: #2b67cb;
	transform:scale(1.1);
	transition:background .25s, transform .5s,ease-in;
	cursor: pointer;
}
.message{
    position: relative;
    width: 580px;
    min-height:300px;
    height: auto;
    background: #fff;
    margin: 0 auto;
    top: -45px;
    box-shadow: 0 0 5px 2px #333;
    transition:2s ease-in-out;
    transition-delay:1.5s;
    z-index: 300;
}
.left,.right,.top{width: 0;	height: 0;position:absolute;top:0;z-index: 310;}
.left{	
	border-left: 300px solid #337efc;
	border-top: 160px solid transparent;
	border-bottom: 160px solid transparent;
}
.right{	
	border-right: 300px solid #337efc;
	border-top: 160px solid transparent;
	border-bottom: 160px solid transparent;;
	left:300px;
}
.top{	
	border-right: 300px solid transparent;
	border-top: 200px solid #03A9F4;
	border-left: 300px solid transparent;
	transition:transform 1s,border 1s, ease-in-out;
	transform-origin:top;
	transform:rotateX(0deg);
	z-index: 500;
}
.bottom{
	width: 600px;
	height: 190px;
	position: absolute;
	background: #2b67cb;
	top: 160px;
	border-radius:0 0 30px 30px;
	z-index: 310; 
}
.open{
	transform-origin:top;
	transform:rotateX(180deg);
	transition:transform .7s,border .7s,z-index .7s ease-in-out;
	z-index: 200;
}
.pull{
	-webkit-animation:message_animation 2s 1 ease-in-out;
	animation:message_animation 2s 1 ease-in-out;
	-webkit-animation-delay:.9s;
	animation-delay:.45s;
	transition:1.5s;
	transition-delay:1s;
	z-index: 350;
}
#name,#email,#phone,#messarea,#send{
	margin: 0;
	padding: 0 0 0 10px;
	width: 570px;
	height:40px;
	float: left;
	display: block;
	font-size: 18px;
	color: #2b67cb;
	border:none;
	border-bottom:1px solid #b61111;    <!-- Crea una riga fra le scritte -->
	letter-spacing: normal;
}
#messarea{
	height: 117px;
	width: 560px;
	overflow: auto;
	border:none;
	padding: 10px;
}
#send {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
    font-size: 18px;
    padding: 15px 20px;
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50%;
    text-align: center;
    margin: 5px auto;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#send:hover {
    background: linear-gradient(to right, #96c93d, #00b09b);
    transform: translateY(-3px);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

::-moz-placeholder{color: #7CB342;font-family: 'Ubuntu';font-size: 20px;opacity: 1;} 
::-webkit-input-placeholder {color: #7CB342; font-family: 'Ubuntu';font-size: 20px;}
*:focus {outline: none;}
input:focus:invalid,textarea:focus:invalid {
 /* when a field is considered invalid by the browser */
    background: #fff url(images/invalid.png) no-repeat 98% center;
    box-shadow: 0 0 5px #d45252;
    border:1px solid #b03535;
}
input:required:valid,textarea:required:valid { 
	/* when a field is considered valid by the browser */
    background: #fff url(images/valid.png) no-repeat 98% center;
    box-shadow: 0 0 5px #5cd053;
    border-color: #28921f;
}
@-webkit-keyframes message_animation {
	0%{
		transform:translatey(0px);
		z-index: 300;
		transition: 1s ease-in-out;
	}
	50%{
		transform:translatey(-340px);
		z-index: 300;
		transition: 1s ease-in-out;
	}
	51%{
		transform:translatey(-340px);
		z-index: 350;
		transition: 1s ease-in-out;
	}
	100%{
		transform:translatey(0px);
		z-index: 350;
		transition: 1s ease-in-out;
	}
}
@keyframes message_animation {
	0%{
		transform:translatey(0px);
		z-index: 300;
		transition: 1s ease-in-out;
	}
	50%{
		transform:translatey(-340px);
		z-index: 300;
		transition: 1s ease-in-out;
	}
	51%{
		transform:translatey(-340px);
		z-index: 350;
		transition: 1s ease-in-out;
	}
	100%{
		transform:translatey(0px);
		z-index: 350;
		transition: 1s ease-in-out;
	}
}
/****************** PARAMETRI MENU E SUBMENU ****************/
.menu {
    display: flex;
    justify-content: center;
    background-color: transparent;
    position: fixed;
    width: 100%;
    top: 150px;
    z-index: 1000;
}
.menu-item {
    position: relative;
    margin: 5px;
    background-color: var(--green-color);
    border-radius: 10px;
    transition: background-color 0.3s ease;
}
.menu a {
    color: var(--black-color);
    font-weight: bold;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    text-align: center;
}
.menu a:hover:not(.active) {
    background: linear-gradient(to right, var(--green-color), var(--blue-color));
    color: var(--white-color);
    border-radius: 10px;
    transform: scale(1.1);
}
.menu a.active {
    background: var(--blue-color);
    cursor: default;
    font-size: 18px;
    border-radius: 10px;
    color: var(--white-color);
    text-shadow: none; /* Rimuove l'ombra del testo */
    transform: none; /* Rimuove la trasformazione */
    box-shadow: none; /* Rimuove l'ombra */
}
.submenu {
    display: block;
    position: absolute;
    top: 100%;/* Posiziona il sottomenu direttamente sotto il menu principale */
    left: -100px;/* Allinea il sottomenu con il bordo sinistro del menu principale */
    transform: translateX(50%);
    background-color: transparent;
    border-radius: 10%;
    width: 150px;
    height: fit-content;
    margin: 0; /* Rimuove il margine */
    z-index: 1;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease, box-shadow 0.3s ease; /* Aggiunge una transizione */
}
.menu-item:hover .submenu {
    opacity: 1;
}
.submenu a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--black-color);
    text-decoration: none;
    border-radius: 10px; /* Arrotonda gli angoli */
    margin: 10px 0; /* Aggiunge spazio verticale tra gli elementi */
    background-color: var(--green-color); /* Colore di sfondo vivace */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Aggiunge una transizione */
    padding: 10px; /* Aggiunge spazio interno */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Aggiunge un'ombra */
    border: 2px solid var(--primary-color); /* Aggiunge un bordo colorato */
}
.submenu a:hover:not(.active) {
    background-color: var(--hover-color); /* Cambia colore al passaggio del mouse */
    transform: scale(1.05); /* Aggiunge un effetto di ingrandimento */
    border-radius: 10px;
}
.submenu a.active {
    color: var(--white-color); /* Cambia il colore del testo a bianco per i sottomenu attivi */
    background-color: var(--blue-color); /* Cambia il colore di sfondo */
    text-shadow: none; /* Rimuove l'ombra del testo */
    transform: none; /* Rimuove la trasformazione */
    box-shadow: none; /* Rimuove l'ombra */
}
.menu-item:hover .submenu {
    opacity: 1;
}
/*********  Quadrato menu mobile ***********/        
.menu-toggle {
    display: none;
    position: fixed;
    font-size: 15px;
    color: var(--black-color);
    background-color: var(--green-color);
    border-color: aqua;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
}
/************* SCRITTA SCORREVOLE ***************/
.scritta-scorrevole {
    position: fixed;
    top: 50%;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background-color: #333;
    color: white;
    font-size: 40px;
    font-weight: bold;
    padding: 10px 0;
    z-index: 3;
}
.testo {
    display: inline-block;
    padding-left: 100%;
    animation: scorrimento 20s linear infinite;
}
@keyframes scorrimento {
    from { transform: translateX(5%); }
    to { transform: translateX(-100%); }
}
/************ STILI PER MENU MOBILI ****************/
@media (min-width: 1px) and (max-width: 620px) {
.menu {
    margin: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0px; /* Imposta il menu esattamente sotto l'header */
    left: 0;
    background-color: transparent; /* Cambia colore se necessario */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}
.menu.open {
    background-color: transparent;
    transform: perspective(0);
    display: flex; /* Mostra il menu quando attivo */
    opacity: 1
}    
.menu-item {
    width: 90%;
    text-align: center;
} 
.submenu {
    display: none;
    width: auto; /* Imposta la larghezza automatica in base al contenuto */
    background-color: transparent;
    text-align: center;
    position: absolute;
    left: 50%; /* Sposta il sottomenu al centro */
    transform: translateX(-50%); /* Centra il sottomenu orizzontalmente */
    margin: 0; /* Rimuove margini indesiderati */
    z-index: 1;
    opacity: 0;
}
.menu-item.active .submenu {
    display: block; /* Mostra il sottomenu quando l'elemento del menu è attivo */
}    
/********** Bottone con tre puntini menu mobile *********/
.menu-toggle {
    display: block;
    position: fixed;
    top: 10px;
    right: 10px;
    font-size: 25px;
    background: var(--primary-color); /* Sfondo vivace */
    color: white;
    border: 3px solid var(--secondary-color); /* Bordo visibile */
    border-radius: 10px; /* Angoli arrotondati */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Aggiunge un'ombra */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Aggiunge una transizione */
}
.menu-toggle:hover {
    background: var(--hover-color); /* Cambia colore al passaggio del mouse */
    transform: scale(1.1); /* Aggiunge un effetto di ingrandimento */
}
.frame {
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translate(-55%, -40%) scale(0.5);
    width: 100%;
    max-width: 500px;
  }
.body2 {
    position: absolute;
    top: 37%;
    left: 52%;
    transform: translate(-50%, -120%) scale(0.7);
    width: 100%;
    max-width: 600px;
  }
.body3{
    top: 190px;
    transform: scale(0.7);
}
.message{
    left: 10px; 
}
.footer-content {
    flex-direction: column;
    text-align: center;
}
.footer-text{
    margin: 0;
}
.Privacy {
    justify-content: center;
    margin-top: 5px; /* Spazio tra scritta e Privacy */
}
}
/************ STILI PER MENU MOBILI ****************/
@media (min-width: 621px) and (max-width: 768px) { 
    .menu {
        margin: 0;
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        position: fixed;
        top: 0px; /* Imposta il menu esattamente sotto l'header */
        left: 0;
        background-color: transparent; /* Cambia colore se necessario */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
        opacity: 0;
    }
    .menu.open {
        background-color: transparent;
        transform: perspective(0);
        display: flex; /* Mostra il menu quando attivo */
        opacity: 1
    }    
    .menu-item {
        width: 90%;
        text-align: center;
    } 
    .submenu {
        display: none;
        width: auto; /* Imposta la larghezza automatica in base al contenuto */
        background-color: transparent;
        text-align: center;
        position: absolute;
        left: 50%; /* Sposta il sottomenu al centro */
        transform: translateX(-50%); /* Centra il sottomenu orizzontalmente */
        margin: 0; /* Rimuove margini indesiderati */
        z-index: 1;
        opacity: 0;
    }
    .menu-item.active .submenu {
        display: block; /* Mostra il sottomenu quando l'elemento del menu è attivo */
    }    
    /********** Bottone con tre puntini menu mobile *********/
    .menu-toggle {
        display: block;
        position: fixed;
        top: 10px;
        right: 10px;
        font-size: 25px;
        background: var(--primary-color); /* Sfondo vivace */
        color: white;
        border: 3px solid var(--secondary-color); /* Bordo visibile */
        border-radius: 10px; /* Angoli arrotondati */
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Aggiunge un'ombra */
        transition: background-color 0.3s ease, transform 0.3s ease; /* Aggiunge una transizione */
    }
    .menu-toggle:hover {
        background: var(--hover-color); /* Cambia colore al passaggio del mouse */
        transform: scale(1.1); /* Aggiunge un effetto di ingrandimento */
    }
    .frame {
        transform: scale(0.5);
      }
    .body2{
        transform: scale(0.7);
    }
    .body3{
        top: 190px;
        transform: scale(0.7);
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-text{
        margin: 0;
    }
    .Privacy {
        justify-content: center;
        margin-top: 5px; /* Spazio tra scritta e Privacy */
    }
    }
    