/* Grid TV Categoria - Cards + Modal (ajustado) */

.tv-grid-wrapper {
  margin-top: 2rem;
}

.tv-grid-modal-grid .tv-grid-card {
  border: 0;
  background: #fff;
  border-radius: .5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease;
}
.tv-grid-modal-grid .tv-grid-card:hover,
.tv-grid-modal-grid .tv-grid-card:focus-within {
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.15);
}

/* Área da mídia com aspect ratio fixo */
.tv-grid-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: .5rem;
  overflow: hidden;
  background: #111;
}

.tv-grid-card__thumb {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: inherit;
}

.tv-grid-card__thumb-bg {
  position: absolute;
  inset: 0;
  background: #222 center/cover no-repeat;
  transition: transform .4s ease, filter .4s ease;
}
.tv-grid-card__thumb:hover .tv-grid-card__thumb-bg,
.tv-grid-card__thumb:focus .tv-grid-card__thumb-bg {
  transform: scale(1.05);
  filter: brightness(.9);
}

/* Ícone Play para vídeos */
.tv-grid-card__play-icon {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  z-index: 2;
  background: rgba(0,0,0,.50);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform .3s ease, background .3s ease;
}
.tv-grid-card__thumb:hover .tv-grid-card__play-icon,
.tv-grid-card__thumb:focus .tv-grid-card__play-icon {
  transform: translate(-50%,-50%) scale(1.08);
  background: rgba(0,0,0,.65);
}

.tv-grid-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.tv-grid-card__title a { color: #111; }
.tv-grid-card__title a:hover,
.tv-grid-card__title a:focus { text-decoration: underline; }
.tv-grid-card__excerpt { margin-top: .25rem; }

/* MODAL */
.tv-grid-video-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  font-family: inherit;
}
.tv-grid-video-modal.is-open { display: block; }
.tv-grid-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(2px);
}
.tv-grid-video-modal__dialog {
  position: relative;
  width: min(94vw, 1040px);
  margin: 5vh auto;
  background: #000;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 15px 45px -10px rgba(0,0,0,.6);
}
.tv-grid-video-modal__close {
  position: absolute;
  top: .15rem;
  right: .45rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  padding: .25rem .5rem;
  z-index: 5;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.tv-grid-video-modal__close:hover,
.tv-grid-video-modal__close:focus {
  color: #ffc107;
}
.tv-grid-video-modal__body { width: 100%; background: #000; }
.tv-grid-video-modal__player {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #000;
}
.tv-grid-video-modal__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .tv-grid-video-modal__dialog { margin: 8vh auto; }
}