/**
 * Year Accordion Styles
 */

/* Rendi l'anno cliccabile */
.year-accordion-toggle {
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: opacity 0.3s ease;
}

.year-accordion-toggle:hover {
  opacity: 0.7;
}

/* Aggiungi un indicatore visivo (freccia) */

/* Nuova freccia SVG lineare, più visibile */
.year-accordion-toggle::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  position: absolute;
  right: -32px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  background: none;
  mask-image: url('data:image/svg+xml;utf8,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L11 14L16 9" stroke="%23000" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L11 14L16 9" stroke="%23000" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  background-color: #222;
  transition: transform 0.3s cubic-bezier(.4,2,.6,1), background-color 0.2s;
}

.year-accordion-toggle:hover::after {
  background-color: #0073e6;
}

.year-accordion-toggle.is-collapsed::after {
  transform: translateY(-50%) rotate(-90deg);
}

/* Contenuto accordion */
.year-accordion-content {
  max-height: 10000px;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease;
  opacity: 1;
}

.year-accordion-content.is-collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* Responsive: su mobile sposta la freccia sotto */
@media (max-width: 549px) {
  .year-accordion-toggle::after {
    position: static;
    display: block;
    margin-top: 5px;
    right: auto;
    left: 0;
    transform: none;
  }
  .year-accordion-toggle.is-collapsed::after {
    transform: rotate(-90deg);
  }
}
