/* Widget Pills animato */
.cocchi-pills {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  align-items: center;
  gap: 1.1rem 1.25rem;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  isolation: isolate;
}
.cocchi-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  flex-basis: auto;
  min-width: 0;
  min-height: 70px;
  padding: clamp(14px, 2.6vw, 19px) clamp(18px, 3.6vw, 26px);
  border: 4px solid #111;
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 400;
  color: #111;
  cursor: pointer;
  line-height: 1.05;
  transform-origin: center;
  transition:
    flex-basis 520ms cubic-bezier(.22,1,.36,1),
    padding 360ms cubic-bezier(.22,1,.36,1),
    border-width 280ms cubic-bezier(.22,1,.36,1),
    border-color 240ms linear,
    color 240ms linear,
    background-color 240ms linear,
    font-size 420ms cubic-bezier(.22,1,.36,1),
    font-weight 220ms linear,
    line-height 420ms cubic-bezier(.22,1,.36,1),
    box-shadow 260ms ease,
    transform 520ms cubic-bezier(.22,1,.36,1);
  position: relative;
  z-index: 1;
  outline: none;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  will-change: flex-basis, transform, padding, font-size;
}

.cocchi-pill:hover,
.cocchi-pill:focus,
.cocchi-pill:focus-visible {
  border-color: #ff9100;
  color: #ff9100;
  background: transparent;
  flex-basis: 100%;
  width: 100%;
  font-size: clamp(2.4rem, 4.1vw, 3.7rem);
  padding: 0.58em 1.35em;
  line-height: 1.08;
  font-weight: 600;
  border-width: 6px;
  
  z-index: 3;
}

.cocchi-pills:has(.cocchi-pill:hover) .cocchi-pill:not(:hover),
.cocchi-pills:has(.cocchi-pill:focus-visible) .cocchi-pill:not(:focus-visible) {
  transform: scale(0.985);
}
/* Laptop */
@media (max-width: 1366px) {
  .cocchi-pill {
    font-size: 1.5rem;
    min-height: 54px;
    padding: 0.5em 1em;
}
  .cocchi-pill:hover,
  .cocchi-pill:focus,
  .cocchi-pill:focus-visible {
    font-size: 3rem;
    padding: 0.55em 1.25em;
  }
}

/* Tablet orizzontale */
@media (max-width: 1200px) {
  .cocchi-pill {
    font-size: 1.3rem;
    min-height: 51px;
    padding: 0.47em 0.91em;
  }
  .cocchi-pill:hover,
  .cocchi-pill:focus,
  .cocchi-pill:focus-visible {
    font-size: 2.5rem;
    padding: 0.55em 1.2em;
  }
}

/* Tablet verticale */
@media (max-width: 1024px) {
  .cocchi-pill {
    font-size: 1.05rem;
    min-height: 47px;
    padding: 0.41em 0.86em;
  }
  .cocchi-pill:hover,
  .cocchi-pill:focus,
  .cocchi-pill:focus-visible {
    font-size: 2rem;
    padding: 0.5em 1.05em;
    border-width: 5px;
  }
}

/* Mobile portrait */
@media (max-width: 767px) {
  .cocchi-pills {
    gap: 0.8rem;
    justify-content: center;
  }
  .cocchi-pill {
    font-size: 1.79rem;
    flex-basis: auto;
    min-width: 0;
    min-height: 37px;
    padding: 0.28em 0.82em;
  }
  .cocchi-pill:hover,
  .cocchi-pill:focus,
  .cocchi-pill:focus-visible {
    font-size: 1.5rem;
    padding: 0.5em 0.95em;
    border-width: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cocchi-pill {
    transition: border-color 140ms linear, color 140ms linear, background-color 140ms linear;
  }
  .cocchi-pills:has(.cocchi-pill:hover) .cocchi-pill:not(:hover),
  .cocchi-pills:has(.cocchi-pill:focus-visible) .cocchi-pill:not(:focus-visible) {
    transform: none;
  }
}
