/* Diseño base para pantallas grandes */
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.categoria-box {
  position: relative;
  height: 85px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.categoria-box:hover {
  transform: scale(1.03);
}

.categoria-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 0;
}

.categoria-nombre {
  position: relative;
  z-index: 1;
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.video {
  background: rgb(0, 0, 0);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 1px 8px #ff3366;
  text-align: center;
  transition: transform 0.2s ease;
}

.video:hover {
  transform: translateY(-5px);
}

.video img {
  width: 100%;
  border-radius: 6px;
}

.video-title {
  font-size: 14px;
  margin-top: 8px;
  color: #ffffff;
  font-weight: bold;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.categoria-solo-texto {
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 330px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

.categoria-texto {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  text-align: center;
  padding: 10px 0;
  transition: color 0.3s ease;
}

.categoria-texto:hover {
  color: #000;
}

.popup-mayores {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup-contenido {
  background-color: #111;
  color: white;
  max-width: 600px;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.popup-contenido h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #f33;
  text-shadow: 1px 1px 3px black;
}

.popup-contenido button {
  margin-top: 30px;
  background-color: #f33;
  color: white;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.popup-contenido button:hover {
  transform: scale(1.05);
  background-color: #c00;
}

.bloquear-scroll {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100%;
}

html.bloquear-scroll,
body.bloquear-scroll {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100%;
}

.bienvenida-vineta {
  background-color: #2a2a2a;
  color: #ccc;
  font-size: 0.7rem;
  padding: 0.6rem 1rem;
  margin: 1rem auto;
  max-width: 900px;
  border-left: 4px solid #ff4081;
  border-radius: 4px;
  line-height: 1.4;
  box-shadow: inset 0 0 5px rgba(255, 64, 129, 0.1);
}

.bienvenida-vineta h2 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: #fff;
}

.bienvenida-vineta strong {
  color: #ff77aa;
}

/* =================== */
/* RESPONSIVE - MÓVIL */
/* =================== */
@media (max-width: 768px) {
  .categorias-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

   .barra-deslizante {
        width: 100%;
        height: 2px;
        background-color: transparent;
        position: relative;
        margin-top: 4px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .barra-deslizante::before {
        content: '';
        position: absolute;
        height: 100%;
        width: 25%;
        background-color: #e60000; /* Tu color principal */
        border-radius: 2px;
        animation: deslizar 3s linear infinite;
    }

    .barra-deslizante.visible {
        opacity: 1;
    }

    @keyframes deslizar {
        0% { transform: translateX(0); }
        100% { transform: translateX(400%); }
    }


  .categorias-grid::-webkit-scrollbar {
    display: none;
  }

  .categoria-box {
    height: 70px;
  }

  .categoria-nombre {
    font-size: 13px;
  }

  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .video-title {
    font-size: 12px;
  }

  .bienvenida-vineta {
    font-size: 0.65rem;
    padding: 0.5rem;
  }

  .bienvenida-vineta h2 {
    font-size: 0.8rem;
  }

  .popup-contenido {
    max-width: 90%;
    font-size: 14px;
    padding: 20px;
  }

  .popup-contenido h2 {
    font-size: 20px;
  }

  .popup-contenido button {
    font-size: 16px;
    padding: 10px 20px;
  }
}
