.ea-avvento {
--ea-av-cols: 4;
--ea-av-gap: clamp(8px, 1.6cqi, 16px);
--ea-av-cell: calc((100cqi - (var(--ea-av-cols) - 1) * var(--ea-av-gap)) / var(--ea-av-cols));
container-type: inline-size;
width: 100%;
}
@media (max-width: 1024px) {
.ea-avvento { --ea-av-cols: 3; }
}
@media (max-width: 640px) {
.ea-avvento { --ea-av-cols: var(--ea-av-cols-m, 2); }
}
.ea-avvento__grid {
display: grid;
grid-template-columns: repeat(var(--ea-av-cols), minmax(0, 1fr));
grid-auto-rows: var(--ea-av-cell);
grid-auto-flow: dense;
gap: var(--ea-av-gap);
}
.ea-avvento__box {
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin: 0;
padding: 0;
border: 0;
border-radius: 14px;
background: var(--ea-av-bg);
color: var(--ea-av-num);
font: inherit;
text-decoration: none;
cursor: pointer;
box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
-webkit-tap-highlight-color: transparent;
}
.ea-avvento__box--larga { grid-column: span 2; }
.ea-avvento__box--alta  { grid-row: span 2; }
.ea-avvento__num {
font-family: var(--h2_typography-font-family, inherit);
font-weight: 700;
line-height: 1;
font-size: calc(var(--ea-av-cell) * .42);
text-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
@container (max-width: 480px) {
.ea-avvento__num { font-size: calc(var(--ea-av-cell) * .48); }
} a.ea-avvento__box:hover,
a.ea-avvento__box:focus-visible {
transform: translateY(-4px) rotate(-1deg);
box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
color: var(--ea-av-num);
} .ea-avvento__box.is-chiusa {
cursor: not-allowed;
filter: saturate(.55) brightness(.92);
}
.ea-avvento__box.is-chiusa .ea-avvento__num { opacity: .65; }
.ea-avvento__box.is-chiusa::after {
content: "";
position: absolute;
right: 10px;
bottom: 10px;
width: 14px;
height: 14px;
opacity: .7;
background: currentColor;
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7a5 5 0 0 0-10 0v2H5v13h14V9h-2zM9 7a3 3 0 0 1 6 0v2H9V7z'/%3E%3C/svg%3E") center / contain no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7a5 5 0 0 0-10 0v2H5v13h14V9h-2zM9 7a3 3 0 0 1 6 0v2H9V7z'/%3E%3C/svg%3E") center / contain no-repeat;
} .ea-avvento__box.is-vista::before {
content: "";
position: absolute;
top: 10px;
right: 10px;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--ea-av-num) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
opacity: .9;
} .ea-avvento__box.is-oggi {
outline: 3px solid var(--ea-av-oggi);
outline-offset: 3px;
animation: ea-av-pulse 2.4s ease-in-out infinite;
}
@keyframes ea-av-pulse {
0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 0 0 0 var(--ea-av-oggi); }
50%      { box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 0 0 8px transparent; }
} .ea-avvento__box.is-shake { animation: ea-av-shake .45s ease; }
@keyframes ea-av-shake {
0%, 100% { transform: translateX(0); }
20% { transform: translateX(-6px) rotate(-2deg); }
40% { transform: translateX(6px) rotate(2deg); }
60% { transform: translateX(-4px); }
80% { transform: translateX(4px); }
} .ea-avvento__avviso {
margin: 0 0 1.5em;
padding: 1em 1.25em;
border-radius: 12px;
background: rgba(255, 255, 255, .92);
color: #333;
text-align: center;
}
.ea-avvento__avviso p { margin: 0 0 .6em; }
.ea-avvento__avviso p:last-child { margin-bottom: 0; }
.ea-avvento__btn {
display: inline-block;
margin: .25em;
padding: .6em 1.4em;
border-radius: 999px;
background: var(--ea-av-bg);
color: var(--ea-av-num);
font-weight: 600;
text-decoration: none;
}
.ea-avvento__btn--alt { background: #333; color: #fff; }
.ea-avvento__btn:hover { filter: brightness(1.08); color: var(--ea-av-num); }
.ea-avvento__btn--alt:hover { color: #fff; }
.ea-avvento__msg {
min-height: 1.5em;
margin: 1em 0 0;
text-align: center;
font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
.ea-avvento__box,
.ea-avvento__box.is-oggi,
.ea-avvento__box.is-shake { animation: none; transition: none; }
} .ea-avvento__box.has-img {
overflow: hidden;
background-color: var(--ea-av-bg);
background-image:
linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, .05) 60%),
var(--ea-av-img);
background-size: cover;
background-position: center;
}
.ea-avvento__box.has-img .ea-avvento__num {
position: absolute;
left: 12px;
bottom: 10px;
font-size: calc(var(--ea-av-cell) * .26);
text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
} .ea-avvento__box.is-da-girare .ea-avvento__num {
animation: ea-av-invito 2.8s ease-in-out infinite;
}
@keyframes ea-av-invito {
0%, 100% { transform: scale(1); }
50%      { transform: scale(1.08); }
} .ea-avvento__box.is-girando,
.ea-avvento__box.is-girando:hover {
transform: perspective(700px) rotateY(90deg);
transition: transform .32s ease-in;
animation: none;
}
.ea-avvento__box.is-girata,
.ea-avvento__box.is-girata:hover {
transform: perspective(700px) rotateY(0) scale(1.03);
transition: transform .38s ease-out;
animation: none;
}
.ea-avvento__box.is-girata .ea-avvento__num { animation: none; }
@media (prefers-reduced-motion: reduce) {
.ea-avvento__box.is-da-girare .ea-avvento__num { animation: none; }
.ea-avvento__box.is-girando,
.ea-avvento__box.is-girata { transform: none; transition: none; }
} .ea-avvento-ritorno {
margin: 0 0 1.5em;
}
.ea-avvento-ritorno a {
display: inline-flex;
align-items: center;
gap: .4em;
font-weight: 600;
text-decoration: none;
}
.ea-avvento-ritorno a:hover span { transform: translateX(-3px); }
.ea-avvento-ritorno a span { transition: transform .2s ease; } .ea-avvento__avviso--anteprima {
background: #fff8e1;
border: 2px dashed #e0a800;
}
.ea-avvento__avviso--anteprima a { font-weight: 600; }