.yps {
  --yps-orange: #ff7d22;
  --yps-blue: #003769;
  --yps-blue-bright: #0875b9;
  --yps-black: #000;
  --yps-panel: #151a21;
  --yps-panel-light: #222a34;
  --yps-text: #f5f5f2;
  --yps-muted: #9da2a8;
  --yps-border: rgba(255, 255, 255, .14);
  --yps-border-soft: rgba(255, 255, 255, .08);
  position: relative;
  width: min(1180px, calc(100% - 48px));
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 0 90px;
  color: var(--yps-text);
  font-family: inherit;
}

/* Videopillole Indicom: raccordo cromatico con il footer globale.
 * Lo scope sulla pagina evita qualsiasi modifica al footer delle altre pagine. */
body.page-id-16054 .ivh-contact {
  background: #000;
}

body.page-id-16054 #footer {
  position: relative;
  overflow: visible;
}

body.page-id-16054 #footer::before {
  position: absolute;
  top: -150px;
  right: 0;
  left: 0;
  z-index: 1;
  height: 150px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #004068);
  content: "";
}

/* Pannelli leggermente più chiari dello sfondo nero della landing. */
body.page-id-16054 .ivh-monitor {
  background:
    radial-gradient(circle at 88% 18%, rgba(0, 64, 104, .5), transparent 31%),
    radial-gradient(circle at 14% 90%, rgba(255, 125, 34, .13), transparent 30%),
    #151a21;
}

body.page-id-16054 .ivh-timeline {
  background: #151a21;
}

body.page-id-16054 .ivh-track-label {
  background: #11171e;
}

body.page-id-16054 .ivh-clip {
  background:
    linear-gradient(90deg, rgba(255, 125, 34, .14), transparent 55%),
    #222a34;
}

body.page-id-16054 .ivh-track:nth-of-type(3) .ivh-clip {
  background:
    linear-gradient(90deg, rgba(0, 64, 104, .5), transparent 60%),
    #222a34;
}

body.page-id-16054 .ivh-control-panel {
  background:
    radial-gradient(circle at 92% 30%, rgba(0, 64, 104, .76), transparent 32%),
    linear-gradient(130deg, #222a34, #11171e 70%);
}

.yps::before {
  position: absolute;
  inset: 0 -100vw;
  z-index: -2;
  background:
    radial-gradient(circle at 82% 22%, rgba(0, 55, 105, .33), transparent 27%),
    #000;
  content: "";
}

.yps::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

.yps *,
.yps *::before,
.yps *::after {
  box-sizing: border-box;
}

/* Console superiore */

.yps-console-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid var(--yps-border);
  border-bottom: 0;
  background: rgba(255,255,255,.025);
  font-family: "Courier New", monospace;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.yps-console-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--yps-orange);
  font-weight: 700;
}

.yps-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yps-orange);
  box-shadow: 0 0 13px rgba(255,125,34,.85);
  animation: yps-rec 1.8s ease-in-out infinite;
}

.yps-timecode {
  color: var(--yps-text);
  font-size: 12px;
  letter-spacing: .08em;
}

.yps-console-format {
  justify-self: end;
  color: rgba(255,255,255,.42);
}

/* Player / monitor */

.yps-stage {
  position: relative;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid var(--yps-border);
  background:
    radial-gradient(circle at 88% 12%, rgba(0,55,105,.48), transparent 30%),
    #07090b;
  box-shadow: 0 32px 75px rgba(0,0,0,.48);
}

.yps-player-panel {
  min-width: 0;
}

.yps-player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 0;
  background: #000;
  box-shadow: inset 0 0 50px rgba(0,0,0,.35);
}

.yps-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yps-crop {
  position: absolute;
  z-index: 2;
  width: 30px;
  height: 30px;
  pointer-events: none;
  opacity: .7;
}

.yps-crop--tl {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--yps-orange);
  border-left: 1px solid var(--yps-orange);
}

.yps-crop--tr {
  top: 12px;
  right: 12px;
  border-top: 1px solid var(--yps-orange);
  border-right: 1px solid var(--yps-orange);
}

.yps-crop--bl {
  bottom: 12px;
  left: 12px;
  border-bottom: 1px solid var(--yps-orange);
  border-left: 1px solid var(--yps-orange);
}

.yps-crop--br {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--yps-orange);
  border-bottom: 1px solid var(--yps-orange);
}

.yps-now-playing {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  min-height: 56px;
  padding: 17px 2px 2px;
}

.yps-now-label {
  color: var(--yps-orange);
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.yps-now-title {
  overflow: hidden;
  color: var(--yps-text);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ricerca come command bar */

.yps-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0;
  align-items: center;
  margin: 34px 0 52px;
  border: 1px solid var(--yps-border);
  background: var(--yps-panel);
}

.yps-search-prefix {
  padding-left: 18px;
  color: var(--yps-orange);
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.yps-search input {
  min-width: 0;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--yps-text);
  font-family: inherit;
  font-size: 15px;
  box-shadow: none;
}

.yps-search input::placeholder {
  color: rgba(255,255,255,.38);
}

.yps-search:focus-within {
  border-color: rgba(255,125,34,.7);
  box-shadow: 0 0 0 1px rgba(255,125,34,.22);
}

.yps-search button,
.yps-expand {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--yps-orange);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.yps-search button {
  align-self: stretch;
  min-width: 120px;
  padding: 0 24px;
}

.yps-search button:hover,
.yps-expand:hover {
  background: #e9650d;
  box-shadow: 0 10px 25px rgba(255,125,34,.18);
}

.yps-search button:focus-visible,
.yps-expand:focus-visible,
.yps-thumb-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Intestazione timeline */

.yps-grid-header {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.yps-grid-header > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.yps-grid-kicker,
.yps-video-count {
  color: var(--yps-orange);
  font-family: "Courier New", monospace;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.yps-grid-header strong {
  color: var(--yps-text);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.yps-video-count {
  padding-bottom: 5px;
  color: rgba(255,255,255,.5);
}

/* Timeline orizzontale */

.yps-grid {
  display: grid;
  grid-auto-columns: minmax(245px, 30%);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 22px 0 24px;
  border-top: 1px solid var(--yps-border);
  border-bottom: 1px solid var(--yps-border);
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--yps-orange) #17191c;
  scrollbar-width: thin;
}

.yps-grid::-webkit-scrollbar {
  height: 7px;
}

.yps-grid::-webkit-scrollbar-track {
  background: #17191c;
}

.yps-grid::-webkit-scrollbar-thumb {
  background: var(--yps-orange);
}

.yps .yps-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--yps-border);
  border-radius: 0;
  background: var(--yps-panel-light);
  color: var(--yps-text);
  text-align: left;
  scroll-snap-align: start;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.yps .yps-card::before {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 9px;
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.72);
  color: rgba(255,255,255,.68);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .08em;
  content: attr(data-index);
}

.yps .yps-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,125,34,.6);
}

.yps .yps-card.is-active {
  border-color: var(--yps-orange);
  background:
    linear-gradient(135deg, rgba(255,125,34,.12), transparent 58%),
    var(--yps-panel-light);
  box-shadow: inset 0 -3px 0 var(--yps-orange);
}

.yps .yps-thumb-button {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  line-height: 0;
  box-shadow: none;
  cursor: pointer;
}

.yps .yps-thumb-button:hover,
.yps .yps-thumb-button:focus,
.yps .yps-thumb-button:active {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.yps .yps-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050607;
}

.yps .yps-thumb::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 55%, rgba(0,0,0,.65)),
    linear-gradient(90deg, rgba(0,55,105,.18), transparent);
  content: "";
  transition: opacity .2s ease;
}

.yps .yps-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover;
  filter: saturate(.82) contrast(1.04);
  box-shadow: none !important;
  transition: transform .35s ease, filter .35s ease;
}

.yps-card:hover .yps-thumb img,
.yps-card.is-active .yps-thumb img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.04);
}

.yps-play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(0,0,0,.68);
  color: transparent;
  transform: translate(-50%, -50%);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.yps-play::before {
  width: 12px;
  height: 14px;
  margin: 0;
  border: 0;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(1px);
  content: "";
}

.yps-card:hover .yps-play,
.yps-card.is-active .yps-play {
  border-color: var(--yps-orange);
  background: var(--yps-orange);
  transform: translate(-50%, -50%) scale(1.06);
}

.yps .yps-card-body {
  display: flex;
  flex-direction: column;
  min-height: 108px;
  padding: 15px 16px 17px;
}

.yps .yps-card-meta {
  margin-bottom: 9px;
  color: var(--yps-orange);
  font-family: "Courier New", monospace;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.yps .yps-title {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--yps-text);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Archivio espanso: composizione editoriale */

.yps.is-expanded .yps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-columns: auto;
  grid-auto-flow: row;
  overflow: visible;
  border-bottom: 0;
  scroll-snap-type: none;
}

.yps.is-expanded .yps-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.yps.is-expanded .yps-card:first-child .yps-card-body {
  min-height: 130px;
}

.yps.is-expanded .yps-card:first-child .yps-title {
  max-width: 85%;
  font-size: clamp(20px, 2.3vw, 29px);
  line-height: 1.2;
}

.yps-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 50px;
  margin: 30px auto 0;
  padding: 14px 24px;
  border: 1px solid var(--yps-orange);
  background: transparent;
  color: var(--yps-orange);
}

.yps-expand::after {
  margin-left: 14px;
  font-size: 18px;
  line-height: 0;
  content: "＋";
}

.yps.is-expanded .yps-expand::after {
  content: "−";
}

.yps-expand[hidden] {
  display: none;
}

.yps-status {
  padding: 28px;
  border: 1px solid var(--yps-border);
  color: var(--yps-muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
  text-align: center;
}

.yps-notice {
  padding: 14px 18px;
  border-left: 4px solid var(--yps-orange);
  background: #16100c;
  color: #fff;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

@keyframes yps-rec {
  0%,
  100% { opacity: 1; }
  50% { opacity: .28; }
}

@media (max-width: 900px) {
  .yps-grid {
    grid-auto-columns: minmax(250px, 45%);
  }

  .yps.is-expanded .yps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .yps {
    width: min(100% - 28px, 1180px);
    padding: 46px 0 65px;
  }

  .yps-console-bar {
    grid-template-columns: 1fr auto;
    padding-inline: 12px;
  }

  .yps-console-format {
    display: none;
  }

  .yps-timecode {
    justify-self: end;
    font-size: 10px;
  }

  .yps-stage {
    padding: 8px;
  }

  .yps-crop {
    width: 20px;
    height: 20px;
  }

  .yps-now-playing {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 13px 3px 4px;
  }

  .yps-now-title {
    font-size: 14px;
  }

  .yps-search {
    grid-template-columns: auto minmax(0, 1fr);
    margin: 25px 0 42px;
  }

  .yps-search-prefix {
    padding-left: 12px;
    font-size: 9px;
  }

  .yps-search input {
    height: 50px;
    padding-inline: 11px;
    font-size: 14px;
  }

  .yps-search button {
    grid-column: 1 / -1;
    min-height: 45px;
  }

  .yps-grid-header {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .yps-grid {
    grid-auto-columns: 82%;
  }

  .yps.is-expanded .yps-grid {
    grid-template-columns: 1fr;
  }

  .yps.is-expanded .yps-card:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .yps.is-expanded .yps-card:first-child .yps-title {
    max-width: none;
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yps *,
  .yps *::before,
  .yps *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
