/* ============================================
   SHORTS VERTICALES - CSS DEFINITIVO
   ============================================ */

/* 1. Forzar contenedor vertical 9:16 */
.layout-6 .post-img .embed-responsive {
  position: relative !important;
  width: 100% !important;
  padding-bottom: 177.78% !important; /* 9:16 */
  height: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background: #000 !important;
}

/* 2. Asegurar que el contenido interno se expanda */
.layout-6 .post-img .embed-responsive .short-vertical__inner {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer !important;
}

.layout-6 .post-img .embed-responsive .short-vertical__inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
}

.layout-6 .post-img .embed-responsive .short-vertical__inner:hover img {
  transform: scale(1.05) !important;
}

/* 3. Ocultar iframes originales para que no interfieran */
.layout-6 .post-img .embed-responsive iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  z-index: -1 !important; /* Lo mandamos atrás por si acaso */
}

/* 4. Estilo del botón Play (SVG) */
.short-vertical__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
  z-index: 2;
}

.short-vertical__inner:hover .short-vertical__play {
  transform: translate(-50%, -50%) scale(1.1);
}

/* 5. Grid: 3 columnas en desktop, 2 en tablet, 1 en móvil */
@media (min-width: 992px) {
  #contentCargarMas.row > [class*="col-md-6"] {
    flex: 0 0 auto;
    width: 33.3333% !important;
  }
}
@media (min-width: 576px) and (max-width: 991px) {
  #contentCargarMas.row > [class*="col-md-6"] {
    flex: 0 0 auto;
    width: 50% !important;
  }
}
@media (max-width: 575px) {
  #contentCargarMas.row > [class*="col-md-6"] {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* 6. Etiqueta SHORT */
.layout-6 .post-img .embed-responsive::after {
  content: "SHORT";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(227, 6, 19, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
}

/* 7. Estilos del Modal (Lightbox) */
.short-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.short-modal.is-open { display: flex; }
.short-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}
.short-modal__content {
  position: relative;
  width: 90%;
  max-width: 400px;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: shortModalIn 0.3s ease-out;
}
@keyframes shortModalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.short-modal__player, .short-modal__player iframe { width: 100%; height: 100%; border: 0; }
.short-modal__close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.7);
  color: #fff; font-size: 24px; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center;
}
