/* ================================
   YouTube Shorts Feed – FIX NEWSPAPER
   ================================ */

/* CONTENEDOR GRID */
.ysf-shorts-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
	margin-top: 0px !important;

  /* rompe floats del tema */
  float: none !important;
  clear: both !important;
}

/* ITEMS */
.ysf-shorts-grid > .ysf-short {
  width: auto !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* LINK SHORT */
.ysf-short-link {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 9 / 16 !important;
  background: #000;
  overflow: hidden;
  border-radius: 14px;
}

/* IMAGEN */
.ysf-short-link img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
}

.ysf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.ysf-header h3 {
  margin: 0;
  font-size: 20px;
}

.ysf-view-all {
  font-size: 14px;
  text-decoration: none;
  font-weight: 600;
}

.ysf-view-all:hover {
  text-decoration: underline;
}

/* PLAY OVERLAY */
.ysf-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ysf-play::before {
  content: '';
  width: 64px;
  height: 64px;
  background: rgba(0,0,0,.6);
  border-radius: 50%;
}

.ysf-play::after {
  content: '';
  position: absolute;
  margin-left: 4px;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* HOVER */
.ysf-short-link img {
  transition: transform .3s ease;
}
.ysf-short-link:hover img {
  transform: scale(1.04);
}
/* Blindaje formato Shorts */
.ysf-short {
  width: 100%;
}

.ysf-short-link {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
  border-radius: 16px;
}

/* Imagen HD */
.ysf-short-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}
/* Hover suave */
.ysf-short-link {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ysf-short-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
/* ================================
   MODAL SHORTS (FIX DEFINITIVO)
   ================================ */

.ysf-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none;
}

.ysf-modal.active {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fondo */
.ysf-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

/* Caja del vídeo */
.ysf-modal-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
}

/* Ratio vertical REAL */
.ysf-modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
}

.ysf-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Botón cerrar */
.ysf-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* Flechas navegación – FIX DEFINITIVO */
.ysf-modal-prev,
.ysf-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 30px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* SIEMPRE DENTRO DEL MODAL */
.ysf-modal-prev {
  left: 12px;
}

.ysf-modal-next {
  right: 12px;
}


/* En móvil las metemos dentro */
@media (max-width: 480px) {
  .ysf-modal-prev {
    left: 10px;
  }
  .ysf-modal-next {
    right: 10px;
  }
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 1024px) {
  .ysf-shorts-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .ysf-shorts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .ysf-shorts-grid {
    grid-template-columns: 1fr !important;
  }
}
