/* --- CONTAINER DA GRELHA (2 Colunas por padrão) --- */
.rc-youtube-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 24px !important;
  width: 100% !important;
}

/* --- CARD DO VÍDEO --- */
.rc-youtube-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rc-yt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.rc-youtube-card:hover .rc-yt-thumb {
  transform: scale(1.05);
  opacity: 0.85;
}

/* --- BOTÃO PLAY NO CENTRO --- */
.rc-yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  transition: transform 0.2s ease;
}

.rc-youtube-card:hover .rc-yt-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
}

/* --- TÍTULO SOBREPOSTO --- */
.rc-yt-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- LIGHTBOX / MODAL --- */
.rc-yt-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.rc-yt-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: #000;
  border-radius: 8px;
  overflow: visible; /* Permite posicionamento destacado se necessário */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* --- BOTÃO FECHAR (Canto Superior Direito da Modal) --- */
.rc-yt-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.rc-yt-modal-close:hover {
  background: #ff0000;
  color: #ffffff;
  transform: scale(1.1);
  border-color: #ff0000;
}

.rc-yt-iframe-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.rc-yt-iframe-wrapper iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- RESPONSIVO: MOBILE --- */
@media (max-width: 767px) {
  .rc-youtube-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .rc-yt-modal-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}
