/* ============================================================
   Interactive Categories Showcase — ics-style.css  v1.1
   Layout: menu 50% sinistra | immagine 50% destra
   ============================================================ */

.ics-showcase *,
.ics-showcase *::before,
.ics-showcase *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Wrapper: occupa tutta l'altezza della viewport,
      larghezza contenuta nel flusso della pagina ── */
.ics-showcase {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: stretch;
  font-family: inherit;
  cursor: none;
}

/* ── Lista sinistra — 50% ── */
.ics-list {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  width: 50%;
  flex-shrink: 0;
  padding: 60px clamp(32px, 5vw, 80px);
}

.ics-list ul {
  list-style: none;
  width: 100%;
}

/* ── Singola voce ── */
.ics-item {
  position: relative;
  overflow: hidden;
  cursor: none;
}

.ics-item + .ics-item {
  margin-top: 2px;
}

.ics-item a,
.ics-item > span {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.30);
  transition: color 0.35s ease;
  position: relative;
}

/* Linea animata */
.ics-item a::after,
.ics-item > span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
}

.ics-item:hover a::after,
.ics-item:hover > span::after,
.ics-item.is-active a::after,
.ics-item.is-active > span::after {
  transform: scaleX(1);
}

/* Numero ordinale */
.ics-item__index {
  font-size: clamp(10px, 0.9vw, 12px);
  font-weight: 400;
  letter-spacing: 0.1em;
  opacity: 0.45;
  transition: opacity 0.35s;
  flex-shrink: 0;
  align-self: center;
  color: #fff;
}

/* Nome categoria */
.ics-item__name {
  font-size: clamp(20px, 2.8vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.35s ease, transform 0.35s cubic-bezier(0.77, 0, 0.18, 1);
  display: inline-block;
}

/* Contatore (opzionale) */
.ics-item__count {
  font-size: clamp(10px, 0.9vw, 12px);
  opacity: 0.4;
  margin-left: 4px;
  color: #fff;
}

/* Hover & active */
.ics-item:hover a,
.ics-item:hover > span,
.ics-item.is-active a,
.ics-item.is-active > span {
  color: #fff;
}

.ics-item:hover .ics-item__name,
.ics-item.is-active .ics-item__name {
  transform: translateX(10px);
}

.ics-item:hover .ics-item__index,
.ics-item.is-active .ics-item__index {
  opacity: 1;
}

/* ── Area immagini — 50% destra ── */
.ics-images {
  position: relative;
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
}

/* ── Singola immagine ── */
.ics-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  transition: none;
  pointer-events: none;
}

.ics-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.18, 1);
}

/* Entrata */
.ics-image.is-entering {
  opacity: 1;
  clip-path: inset(0% 0 0 0);
  transition: clip-path 0.65s cubic-bezier(0.77, 0, 0.18, 1);
  pointer-events: auto;
}

.ics-image.is-entering img {
  transform: scale(1);
}

/* Attiva (stabile) */
.ics-image.is-active {
  opacity: 1;
  clip-path: inset(0% 0 0 0);
  pointer-events: auto;
  transition: none;
}

.ics-image.is-active img {
  transform: scale(1);
}

/* Uscita */
.ics-image.is-leaving {
  opacity: 1;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s cubic-bezier(0.77, 0, 0.18, 1);
  pointer-events: none;
}

/* Placeholder senza immagine */
.ics-image__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2a 0%, #2a2a3a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ics-image__placeholder span {
  font-size: clamp(18px, 2.5vw, 36px);
  color: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Cursore custom ── */
.ics-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ics-cursor.is-visible {
  opacity: 1;
}

.ics-cursor__dot {
  width: 40px;
  height: 40px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.18, 1);
}

.ics-cursor.is-hovering .ics-cursor__dot {
  transform: scale(1.8);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Focus accessibilità ── */
.ics-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

/* ── Empty state ── */
.ics-empty {
  padding: 40px;
  color: #999;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ics-showcase {
    flex-direction: column;
    height: auto;
    min-height: 100svh;
    cursor: auto;
  }

  .ics-cursor { display: none; }

  .ics-list {
    width: 100%;
    order: 2;
    padding: 36px 24px 48px;
  }

  .ics-images {
    width: 100%;
    height: 56vw;
    min-height: 240px;
    order: 1;
    flex-shrink: 0;
  }

  .ics-item__name {
    font-size: clamp(20px, 6vw, 32px);
  }
}
