/* Video tutorial (pagina dedicata e fascia in Home): griglia delle schede e copertina con player caricato al clic.
   Le variabili --public-* arrivano da public-pages.css; i valori di riserva servono nella Home, che non lo carica. */

.vt-language-note {
   margin-top: 14px !important;
   font-size: 15px !important;
}

.vt-grid {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 28px;
   margin-top: 42px;
}

.vt-grid-wide {
   grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vt-card {
   display: flex;
   flex-direction: column;
   min-width: 0;
   overflow: hidden;
   border: 1px solid var(--public-line, #e1e6f0);
   border-radius: 9px;
   background: #fff;
   transition: border-color .2s ease, box-shadow .2s ease;
}

.vt-card:hover {
   border-color: #c8b0dd;
   box-shadow: 0 18px 45px rgba(12, 21, 48, .08);
}

.vt-player {
   position: relative;
   display: block;
   aspect-ratio: 16 / 9;
   overflow: hidden;
   background: #07112f;
}

.vt-player img,
.vt-player iframe {
   display: block;
   width: 100%;
   height: 100%;
   border: 0;
   object-fit: cover;
}

.vt-play {
   position: absolute;
   top: 50%;
   left: 50%;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 64px;
   height: 64px;
   border-radius: 50%;
   color: #fff;
   background: linear-gradient(135deg, var(--public-purple, #7417cb), var(--public-pink, #ef19bd));
   box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
   font-size: 22px;
   transform: translate(-50%, -50%);
   transition: transform .2s ease;
}

.vt-play i {
   margin-left: 4px;
}

.vt-player:hover .vt-play,
.vt-player:focus-visible .vt-play {
   transform: translate(-50%, -50%) scale(1.08);
}

.vt-player:focus-visible {
   outline: 3px solid var(--public-pink, #ef19bd);
   outline-offset: -3px;
}

.vt-card-body {
   display: flex;
   flex: 1;
   flex-direction: column;
   padding: 22px 24px 24px;
}

.vt-card-body h3 {
   margin-bottom: 10px;
   color: var(--public-ink, #07112f);
   font-size: 19px;
   line-height: 1.35;
}

.vt-card-body p {
   flex: 1;
   margin-bottom: 16px;
   color: var(--public-muted, #5c6375);
   font-size: 15px;
   line-height: 1.6;
}

.vt-link {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   color: var(--public-purple, #7417cb);
   font-size: 14px;
   font-weight: 800;
}

.vt-link:hover {
   color: var(--public-pink, #ef19bd);
}

.vt-section-link {
   margin-top: 28px;
}

.vt-home-actions {
   margin-top: 32px;
}

/* Barra di ricerca e filtri per playlist, in stile YouTube (solo pagina Video tutorial) */
.vt-toolbar[hidden],
.vt-results[hidden],
.vt-playlist[hidden],
.vt-item[hidden],
.vt-empty[hidden],
.vt-search-clear[hidden] {
   display: none !important;
}

.vt-toolbar {
   padding: 22px 0;
   border-bottom: 1px solid var(--public-line, #e1e6f0);
   background: #fff;
}

.vt-search {
   position: relative;
   display: flex;
   align-items: center;
   max-width: 640px;
   margin: 0 auto;
}

.vt-search > i {
   position: absolute;
   left: 20px;
   color: var(--public-muted, #5c6375);
   font-size: 16px;
   pointer-events: none;
}

.vt-search input {
   width: 100%;
   height: 50px;
   padding: 0 52px 0 50px;
   border: 1px solid #cfd5e2;
   border-radius: 999px;
   color: var(--public-ink, #07112f);
   background: #fff;
   font-size: 16px;
   outline: none;
   transition: border-color .2s ease, box-shadow .2s ease;
}

.vt-search input:focus {
   border-color: var(--public-purple, #7417cb);
   box-shadow: 0 0 0 4px rgba(116, 23, 203, .12);
}

.vt-search input::-webkit-search-cancel-button {
   display: none;
}

.vt-search-clear {
   position: absolute;
   right: 8px;
   width: 36px;
   height: 36px;
   border: 0;
   border-radius: 50%;
   color: var(--public-muted, #5c6375);
   background: transparent;
}

.vt-search-clear:hover {
   background: #f0f2f7;
}

.vt-chips {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 10px;
   margin-top: 14px;
}

.vt-chip {
   padding: 8px 16px;
   border: 0;
   border-radius: 9px;
   color: var(--public-ink, #07112f);
   background: #eef0f5;
   font-size: 14px;
   font-weight: 700;
   transition: background-color .15s ease, color .15s ease;
}

.vt-chip:hover {
   background: #e1e4ec;
}

.vt-chip.is-active {
   color: #fff;
   background: var(--public-ink, #07112f);
}

.vt-chip:focus-visible {
   outline: 3px solid var(--public-pink, #ef19bd);
   outline-offset: 2px;
}

.vt-playlist-head {
   display: flex;
   flex-wrap: wrap;
   align-items: flex-end;
   justify-content: space-between;
   gap: 12px 28px;
}

.vt-playlist-head .public-lead {
   margin-bottom: 0;
}

.vt-playlist-meta {
   display: flex;
   flex-direction: column;
   align-items: flex-end;
   gap: 8px;
}

.vt-count {
   display: inline-flex;
   padding: 4px 12px;
   border-radius: 999px;
   color: var(--public-purple, #7417cb);
   background: rgba(116, 23, 203, .08);
   font-size: 13px;
   font-weight: 800;
}

.vt-item {
   display: flex;
   min-width: 0;
}

.vt-item > .vt-card {
   width: 100%;
}

.vt-empty {
   margin-top: 32px;
   color: var(--public-muted, #5c6375);
   font-size: 17px;
   text-align: center;
}

.vt-results .vt-grid {
   margin-top: 28px;
}

@media (max-width: 575px) {
   .vt-playlist-meta {
      align-items: flex-start;
   }

   .vt-chips {
      flex-wrap: nowrap;
      justify-content: flex-start;
      overflow-x: auto;
      padding-bottom: 4px;
   }

   .vt-chip {
      flex: 0 0 auto;
   }
}

@media (max-width: 991px) {
   .vt-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 22px;
   }
}

@media (max-width: 575px) {
   .vt-grid,
   .vt-grid-wide {
      grid-template-columns: minmax(0, 1fr);
   }
}

@media (prefers-reduced-motion: reduce) {
   .vt-card,
   .vt-play {
      transition: none;
   }
}
