/* Desktop padrão: 3 colunas */
.mwd-youtube-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mwd-youtube-item a {
  text-decoration: none;
  display: flex;
  gap: 1rem;
}

.mwd-youtube-thumb-wrapper {
  position: relative;
  overflow: hidden;
  min-width: 165px;
  min-height: 100px;
  position: relative;
  transition: all, .3s;
  flex: 0 0 45%;

  &:hover {
    img {
      opacity: .75;
    }

    .mwd-youtube-play-icon {
      opacity: 1;
    }
  }
}

.mwd-youtube-thumb-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  min-width: 165px;
  min-height: 100px;
  object-fit: cover;
  border-radius: 10px !important;
}

.mwd-youtube-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: var(--e-global-color-primary);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  pointer-events: none;
  opacity: 0;
  transition: all, .3s;
}


.mwd-youtube-title-wrapper {
  margin: 0.75rem 0;
  flex: 0 0 55%;
  display: -webkit-box;
  /* necessário para line-clamp */
  -webkit-box-orient: vertical;
  /* orientação vertical */
  -webkit-line-clamp: 3;
  /* máximo de 3 linhas */
  overflow: hidden;
  /* esconde o excesso */

  .mwd-youtube-date,
  .mwd-youtube-title {
    width: 90%;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #ffffff;
  }
}

/* Tablet: 2 colunas (até 1024px) */
@media (max-width: 1024px) {
  .mwd-youtube-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: 1 coluna (até 768px) */
@media (max-width: 768px) {
  .mwd-youtube-grid {
    grid-template-columns: 1fr;
  }

  /* Ocultar os 4 últimos itens no mobile */
  .mwd-youtube-grid .mwd-youtube-item:nth-last-child(-n + 4) {
    display: none;
  }

  /* Remover mínimos de tamanho no mobile */
  .mwd-youtube-thumb-wrapper {
    min-width: 0;
    min-height: 0;
  }

  .mwd-youtube-thumb-wrapper img {
    min-width: 0;
    min-height: 0;
  }
}